LED Hanukkah Menorah

23K3536

Intro: LED Hanukkah Menorah

I wanted to make an LED menorah for a friend. In planning this I decided I wanted to keep the parts-count very low and use components I had on hand. I think I have achieved my goals and couldn't be happier at the outcome of this project.

Please visit my webpage for more on this and other projects:
http://jumptuck.wordpress.com

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

In the design process I set several goals:
  • 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.

I chose the tiny13 because I had several on hand just collecting dust. In order to control 9 leds without a shift register (a separate part) I needed to implement a charlieplex.

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

Parts List:

  • 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

Note: I etched my own circuit board because I am set up to do so. That being said, this should be a pretty easy project to do point-to-point soldering on some perf board.

STEP 3: Circuit Board

Update: Board files and code are available here https://github.com/szczys/LED-menorah

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

The most important thing during assembly is the polarity of the LEDs. With most designs the polarity of the LEDs would all be in the same direction for for ease of PCB design I have flipped half the them. This means you must follow the component layout graphic to ensure the flat side of the LEDs are facing the appropriate direction.

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

Update: board files and code are available here https://github.com/szczys/LED-menorah

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.

This source code is written in C for the avr-gcc comiler. I have also included a HEX file that can be burnt directly to a tiny13 without the need to be compiled.

The ATtiny13 uses the factory fuse settings:
hfuse: 0xFF
lfuse: 0x6A

STEP 6: Conclusion

In order to display the menorah in an upright position I attached a KK connector to the wires coming from my battery pack. I used a rubber-band to hold this in place on the back of the battery pack and then plugged the pin header from the menorah into the KK connector.

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).

35 Comments

Good Morning,
I am trying to built this Chanukia. I am using arduino uno. (ide 1.8) to copy the program from github to ATTINY13A-PU.

When I am trying to program the AVR attiny13A-pu I get error message below:

Chanukia 243:3 : error: "led port is not declared in this scope"
Exit status 1:

"ledPort = 0xFF"
^~~~~~~~
"led port is not declared in this scope"

And it is highliting the lat line of the text "ledPort = 0xFF"

Any advice?

Thanks,

Ben


Hi, loved your Menorah/Channukiyah (it's all the same) :)


I am doing a project for the event I am having this Sunday.

Need your help.

I want to use 2 or 3 AA or AAA batteries to light all 9 LEDs. I don't care much about them turning off but it would be nice if a simple switch On/Off switch can be incorporated. I may or may not get the battery housing in time so a battery colder may also need to be invented. Maybe then taking out the battery would shut it off too...

So, my question is this...

If I connect the batteries in series for 3V and connect the LEDs in parallel so each one gets enough... Can I connect just one resistor in series to provide the right current to all the LEDs at once???

Please help me out ASAP. I may not have enough time to order the right stuff...


THANKS!!!

p.s. Happy Holidays!

Er,what precisely IS a Hanukkah Menorah????????
hanukkah is a jewish holiday, and a menorah is is a nine branched candle stand used on that holiday.

somehow its gotten quite popular among elektronics and kits...
NO IT ISNT!! a menorah only has SEVEN candles, 1 4 each day of the week!!!!! a HANNUKIA is wat u use 4 hannuka w/ 8 candles and a shamash (the 9th 1)!! i HATE it wen ppl make this mistake!!!!!!!!!!!
but nice instructable btw
hahaha. You're blatantly wrong. A menorah has 9 candles and they are lit in succession, adding one to the number of lit candles each night of hanukkah. There are 8 days of hanukkah; the 9th candle is the one that you light with a match and then use to light the 8 others. Hannukiah is just another name for a Menorah. Get your facts straight.
There are two menorahs; the Temple (as in Jerusalem Temple in the Temple Mount) menorah, and the Channukah menorah:
http://www.chabad.org/library/article_cdo/aid/1358679/jewish/Is-MY-Menorah-The-Same-As-THE-Menorah.htm
:-)

Don't make it complicated. The word Channukiyah is fairly recent. The Menorah means a Light or Candelabra. The one for Channukah has 9 lamps the one in the Temple had 7. :)

we got Xmas after all and nothing else....so simple...;D
relax mate, i didnt say that to upset anyone
not everyone knows everything ;)
Oy vey already......................vot a nice little toy!
how do i program the fuse ?
thank you

marC:)
i like this, im going to make one tomorow, that is if i manage to get eagle to work, and i can make a nice adjustment im planning on.
il upload pictures if everything worked out!
oh, and 1 more thing, why are u using only 4 resistors for 9 leds?

sry if its obvious (like in the code/some leds in series) i havent looked at the details alot yet...
I love the idea One suggestion i could make though, if you were willing to make a two sided board, would be to use a battery holder with pc pins and solder it onto the back of the pcb. It should be able to stand up by itself your way is also very interesting, however i would have shortened the wire and terminated the connection myself, also using hot glue instead of a rubber band. Just some advice to the aesthetics of the design
Ok, so im trying to figure out AVR programming, and these "<< or >>" keep showing up, mainly in the PORTB |= (1<< something) and PORTB &= ~(1<< something). I know that they are used to set bits without setting the other bits (right?). Can anyone explain a little further how you do this?
May i just say that i have only just started on electronic and you have or anybody that knows how to create a pcb are very skilled i just can't get my head round it yet i might do in a few years ;-)
More Comments