Intro: Fakenflicker: LED Candle
Celebrate Christmas the old fashioned way the fakenflicker LED candle!
The fakenflicker is a tiny, battery powered candle simulator. 3 colored LED's authentically flicker and fade, just like a real candle, controlled by a PICaxe 08M.
This project was designed by propellanttech. You can get the kit or bare pcb from Gadget Gangster and download a PDF version of this howto. If you get the kit, the PICaxe will come pre-programmed, but the board has a programming cable connector if you'd like to reprogram it.
Here's a little video of the candle in action:
Warm up your soldering iron and get started!
Step 1: Parts List
- Fakenflicker PCB
- 3xAA Battery Box
- PICaxe 08M and 8 Pin dip socket
- 3x 120 ohm Resistors (Brown - Red - Brown)
- 1x 10k ohm Resistor (Brown - Black - Orange)
- 1x 22k ohm Resistor (Red - Red - Orange)
- 2x .1 uF ceramic capacitors
- 3x colored LCD's
- Optional - 3.5mm headphone jack to program the PICaxe
Step 2: Make: Resistors
First, add the 120 ohm resistors (Brown - Red - Brown) to the board at R1, R2, and R3.
These resistors limit the current that flows through the LED's and keeps them from burning out. Using a lower resistor value will make the LED's brighter, but will shorten it's lifespan.
Step 3: Make: More Resistors
Two more resistors;
A 10k ohm Resistor (Brown - Black - Orange) goes at R5
A 22k ohm Resistor (Red - Red - Orange) goes at R4
Step 4: Make: Caps
Add the 2 ceramic caps at C1 and C2. These caps aren't polarized, so it doesn't matter which way they go in.
These caps are for power conditioning - the power that comes out of the battery pack is pretty stable, but these caps help 'smooth-out' current fluctuations as the microcontroller switches LED's on and off.
Step 5: Make: LED's
Now, let's add the LED's to the board. Note that the LED's will go on the opposite side of the board (The side where's the no silkscreen or printing).
The LED's are polarized - it's easy to figure it out: The shorter lead goes through the square shaped hole. Same for all of the LED's.
Step 6: Make: LED's - Other Side
Here's what the other side of the board looks like.
Step 7: Make: PICaxe
Pop the IC socket in the board at U1. Notice that the notch goes as indicated on the silkscreen. Once the socket has been soldered down, push the PICaxe in the socket.
Step 8: Make: Battery Box
Almost done! Add the battery box as indicated in the photo. Note that the wires go though the holes in the box labeled 'BATT' and the red wire goes on the left (near the + sign) and the black wire goes through the right hole (near the - sign).
In the photo, I put the two wires though the hole at the corner of the board and tied them in a knot before soldering them in. This is for stress relief - tugging on the wires that connect to the battery box won't put any stress on the solder connection. This isn't necessary, however.
To turn the fakenfliker on, add batteries and flip the switch on the battery box.
Step 9: Programming (Optional): Adding the Jack
If you've ordered a kit, the PICaxe will come pre-programmed, so there's no need to add the programming jack (aka headphone jack) unless you want to re-program it.
If you add the jack, be sure to add it to the other side of the pcb (on the same side as the LED's), as shown in the photo. You don't need to solder it down, the curved pins on the headphone jack should be fine.
Step 10: Programming (Optional): Guide
To program a PICaxe, you'll need;
1 - A programming cable. You can hack up a Serial cable fairly easily, or you can buy a USB cable from Sparkfun for $25 or so.
2 - The Programming Editor. Revolution Education (the makers of the PICaxe) offer a free editor, here.
3 - Knowledge. This is the easiest part - coding for the PICaxe is very simple, just like basic. RevEd's manual (pdf) is pretty helpful.
The fakenflicker is connects:
Pin 3 (port 4)to the top left LED
Pin 5 (port 2)to the top right LED
Pin 6 (port 1)to the bottom middle LED
All LED's are connected so that 'sinking' them makes them illuminate. For example, to turn on the bottom middle LED, you'll use the command "low 1".
Step 11: External Power (Optional)
1 - 5V power source
If your source is 5V (like a regulated power supply), you can just connect it where the battery box is connected.
2 - 6V+ power source
To connect to a 6V+ power source, the board supports a voltage regulator. Here's how you set it up;
- Disconnect any battery, if it's connected
- Add a regulator at U2. Note, the regulator should be, Pin1:ground, Pin2:Vout, Pin3:Vin. The tab is connected to Vout. You should probably also use larger capacitors (10uF).
- Connect your power source to the board at the box labeled 'ext'.