Please visit my webpage for more on this and other projects:
Disclaimer: I am not Jewish. I have done a bit of Internet research about the Hanukkah Menorah in order to learn the principles behind it's design, and how the candles are lit. I respect this religion and mean no offense in the case of any errors I have made regarding this tradition. Please contact me and I will be happy to make changes to this instructable.
Step 1: The Design
- Controlled by an AVR ATtiny13
- Interfaced with 1 push button
- Driven by ~3v of unregulated power
- Incorporate an auto-off function to simulate the candles burning out each night.
A schematic is available below.
For those electrical engineers reading this, I have two points to make:
1. I did not use a pull-up resistor for the reset pin, it is left floating. This is not a critical application so if we have a random reset it's not the end of the world.
2. I did not use a decoupling capacitor because I'm using unregulated power and I don't think it's essential.
Step 2: Parts
- Power supply that puts out between 2.7v and 3.3v. I am using 2 AAA batteries but I have also run this off of a CR2032 3v battery.
- 9 LEDs (I used white)
- 4 resistors (22ohm - Red,Red,Black)
- 1 momentary push button (these are common, I salvaged mine from a broken stereo system)
- 1 pin header (2 pins)
- 1 DIP socket (8 pins) - this is optional as you could just solder the microcontroller directly onto the board.
- 1 AVR ATtiny13 microcontroller
- 1 Circuit board of some type
Step 3: Circuit Board
As I said in the last step, you can either etch your own board, or use perf board.
I have pictures of the etched board as well as the Eagle CAD pictures of the artwork and layout. I used one jumper (seen in red on the second picture) wire. I could have avoided this and gone with a completely one-sided board but it would have meant running a trace in between pads of and LED. For ease of the etching process I decided one jumper was best.
In case you're wondering, I use the toner transfer method with cupric chloride as my etchant.
Step 4: Assembly
Assembly1. Solder a jumper wire in place. I used the clipped lead from a resistor.
2. Bend the LEDs at a 90 degree angle and solder in place. Be careful of the polarity. All of the LEDs should be at the same height except the LED in the middle. This is for the light called the Shamash and should be higher than the rest.
3. Solder the 4 resistors in place.
4. Solder the momentary push button in place.
5. Solder the IC socket in place. (if you are going to solder the IC directly to the board you should probably program it first)
6. Solder the 2-pin header in place. This will be used for power. Note that I soldered mine the underside of the board so the power can be connected to the back. I will also use this to stand the menorah upright.
Tip: To solder a pin header to the underside of the board I slide the black plastic up the pins about half way, solder the pins in place, then slide the plastic back down.
Step 5: Source Code
I have written the source code so that it performs in this manner:
- Plug in the power and the device starts up, lighting the Shamash (candle in the middle).
- Each button push lights an additional candle from right to left, allowing for the prayer to be said before the next candle is lit.
- After about 1 hour the lights will "burn out" when the device goes into power down mode. In this state very little power is consumed and the device will wait until the next night of Hanukkah.
- One button push will wake the device up from sleep and light the Shamash.
The ATtiny13 uses the factory fuse settings:
Step 6: Conclusion
It is important to connect the battery with the proper polarity or you will damage the processor. The positive lead needs to be connected to the pin with the trace leading away from it. The negative lead connects to the pin that is soldered to the ground plane (large area of copper).