Introduction: Chanting LED Hanukkah Menorah

In this instructable we will create a chanting menorah for Hanukkah.

Every day we light another candle, this will be done by simply pressing a push button. The middle candle (called shamash - servant) is always lit.

The music is played from a microSD card, through a simple speaker. I used an old PC speaker for that purpose.

Step 1: Bill of Materials

For this menorah you need:

  1. Arduino (I used UNO, but nano can be used also)
  2. SPI Micro-SD card for Arduino (you can also use data-logger shield).
  3. NPN transistor. I recommend 2N2222.
  4. 9 LEDs.
  5. 9 1K resistors.
  6. 1 10K resistor.
  7. A speaker.
  8. Wires.

Step 2: Wiring Scheme

Wire all together using the attached scheme.

For the microSD card:

  • VCC goes to 5V on the Arduino UNO (for power)
  • GND goes to Ground on Arduino UNO
  • D0 (MISO) goes to pin 12 on Arduino UNO
  • D1 (MOSI) goes to pin 11 on Arduino UNO
  • CLK (SCK) goes to pin 13 on Arduino UNO
  • D3 (CS) goes to pin 10 on Arduino UNO

The push button is connected to an analog input with a pull-up resistor. It is a good solution if you are out of digital pins.

The speaker is connected via a transistor so that the digital pin won't draw too much current. I added the 2N2222 pinout for reference.

Step 3: Code

To play the wav file I used the TMRpcm library found here.

A lot of forums tell you to put delay in the loop() in order to play, but this is wrong. The library is asynchronous, it means you can play a file and continue executing other code. To do this, write: tmrpcm.play("1.wav");. Then, check if the file finished playing using if (tmrpcm.isPlaying() == 0).

For example, to play continuously, use:

if (tmrpcm.isPlaying() == 0) {tmrpcm.play("1.wav");}

All the code is in the attached zip file. You can also find there the WAV file with a Hanukkah song, I used Audacity to convert it to unsigned 8 bit PCM wav audio, at 16000Hz. I also doubled the playing speed.

Step 4: Play the Menorah

One thing is missing: stop playing on long press. It is not hard to add, I plan to add it soon.