Step 1: Equipment
- Arduino Uno or Arduino Duemilanove with ATMega328 and breadboard to program the ATTiny85 microcontroller.
- Soldering equipment
- Hot glue gun
- Utility Knife
- Drill with spade bit
- ATTiny85 microcontroller. Other ATTiny variants will probably also work but this is the one I used.
- 8 pin microcontroller socket (optional)
- Orange LED.
- 1 ohm resistor. This value is calculated based on the use of a 3v power supply and LED with 3v - 3.2v forward voltage.
- Screw terminal (optional)
- Small piece of proto board
- 3v battery pack and AAA batteries.
Step 2: Program the Microcontroller
I've written the LED flickering sketch in the Arduino 1.0 software and used an Arudino Uno to program the microcontroller. High-Low tech have written some excellent articles on using the Arduino to program an ATTiny (Arduino Board as ATTiny Programmer, Programming an ATTiny w/ Arduino 1.0). My flickering LED sketch is attached to this instructable step. The LED pulses in sets. The program randomly selects the amount of pulses in each set, alternates the brightness level of each pulse and delay between sets. Values can be adjusted to change how it will behave so customise to your liking. It does the job but I'm sure there's improvements to be made. If any one can make any advancements, just send me the code and I'll update the instructable.
Once programmed, test that all is well by removing the Arduino. Adding an LED and 1 ohm resistor to Pin 5 (referred to as Pin 0 in the Arduino sketch). Connect a 3v power supplies positive to pin 8 and negative to pin 4. The LED should periodically flicker. I also tested mine using the Arduinos 5v supply and a 150 ohm resistor on the LED.
Step 3: Carve a Candle
Drill out the base using a spade drill bit to accommodate the height of the circuit board and battery pack. This was about 25mm for my project. You'll then need to carve out a snug fitting battery compartment to insert the pack. Wax is fairly soft so just take it easy and don't lose a finger. The battery pack will be a friction fit and responsible for holding the circuit board in the cavity we created with the spade bit.
Remove the candle wick and drill a 4mm hole to allow the LEDs wires to pass through.
Step 4: Prepare Components and Build Circuit
Solder some wires to the legs of the LED and insulate them with some heat shrink tubing or tape.
Step 5: Install Components
To make the LED look more at home on the top of a candle, add small dobs of hot glue and shape with a toothpick until you've built an imitation hot glue flame. You're done! Build your own customised candles like the three candle coffee and chocolate version shown in the intro of this instructable.