Musical Menorah (made With Arduino)

1,482

12

14

About: I make cool projects!

Chanukah is coming soon! So I thought it would be a great idea to make a project relating to the holiday. I made this cool Chanukah Menorah with an Arduino that plays a different song each time you change the night by pressing the button. The LEDs flicker similar to a flame on a candle. I found the songs for the Menorah by finding MIDI files of the song and using an online tool to convert it to an Arduino tone code.

Step 1: Parts/Materials

Switch to each picture to see what part it is. Hover your mouse over each object.

Step 2: Cut the LEDs

Cut 8 of the 9 LEDs about half way leaving one LED uncut. The uncut LED be the Shamash (The taller candle in the middle).

Step 3: Put the LEDs Into the Breadboard

Next, put the LEDs into the breadboard and place them equidistance from each other(every LED should have the same amount of distance between each other). I placed each LED 2 pins/holes between each other. Each side should have 4 LEDs with the Shamash (tallest LED) In the middle separating the two sides.

Step 4: Place a Short Piece of Wire Connecting Each Ground Pin to the Ground Bar

Place a short piece of wire connecting each ground pin of every LED to the Ground Bar (Usually marked in Blue).

Step 5: Connect the Ground and Positive Rails to 5v (5 Volts) and GND (Ground)

Take two wires and connect the bar marked in red to the 5v Pin and the Ground rail to the ground pin (GND) on the Arduino.

Step 6: Connect Each LED to Their Proper Pin

Connect each LED to their specific numbered pin on the Arduino. This time your connecting the LED's other pin (NOT GROUND) to the corresponding pins on the Arduino. *NOTE as you go from right to left the pin numbers decrease. The first LED (It starts on the right side) goes to pin 13 the next to pin 12, then 11, 10 ,9 8, 7, 6 and 5 should be the last pin for the last LED (All the way at the end of the left side) Your LED Menorah should look something like the last image of this step with all of the wires connected up.

Step 7: Next Place the Button on the Breadboard

Next, place the button on the breadboard making sure that one side of the pins is on one side of the breadboard while the other pins are on the other side of it.

Step 8: Connect a Resistor Up to the Button

Connect a resistor up to the lower right side of the button with the other leg of the resistor going to another column on the breadboard.

Step 9: Connect the Resistor to 5v and the Button to Ground

Take a wire (The red wire in the image) and connect it to the same column as the other side of the resistor. Connect the other side of that wire (The red wire in the image) to the 5v rail (The red one). Then take another wire (It is the black wire in the photo) and connect it to the top left side of the button and connect the other side of that wire to the ground rail (The blue one).

Step 10: Connect Button to Pin 2 on the Arduino

Now, connect a wire between the top right pin of the button (The green wire in the photo) to pin 2 on the Arduino

Step 11: Connect the Speaker

Next, connect one wire of the the speaker to pin 4 and the other to ground on the Arduino.

*NOTE if you are building this with a piezo buzzer and not a speaker, then you must take note of which wire goes to ground and which goes to pin 4.

Step 12: Time to Program the Arduino

After you completed all the previous steps your Menorah should look something similar to this.

Now to program the Arduino you must make sure you have Arduino installed on your computer.

If you don't have it you can download Arduino from their website https://www.arduino.cc/

Next download the code file Menorah2.ino from the download button bellow and open it on Arduino.

Upload the code to the Arduino and test out your Menorah!

Step 13: Conclusion

Now you can power your Musical Menorah using batteries or over a usb port.

Enjoy your new Musical Menorah

Share

    Recommendations

    • First Time Author

      First Time Author
    • Toys Contest

      Toys Contest
    • Big and Small Contest

      Big and Small Contest

    14 Discussions

    0
    None
    AaronS337

    13 days ago

    Very cool idea!
    How do I change the music to diffrent songs?

    0
    None
    EleneFizikl

    Answer 19 days ago

    I think you'll burn them out. I used a 220-ohm resistor for each light.

    0
    None
    iziklEleneF

    Reply 19 days ago

    Hi Elen - I agree with you , yet Jercool didn’t use any resistor ... I guess Arduino May have a current limiter in the digital outputs ...

    0
    None
    EleneFizikl

    Reply 19 days ago

    Without a resistor you can burn out LEDs with Arduino. Best to use a resistor.

    0
    None
    EleneF

    25 days ago

    Thanks so much! I love this. I changed the code a little so that the next song only goes on when you push the button. I may try to figure out how to add an interrupt so I can skip to the next song if I want. I'm going to wire it into a 3D printed menorah.

    0
    None
    EleneF

    26 days ago

    I might be doing something wrong but I can't get it to go to any number of counts besides 1. Any ideas?

    0
    None
    jercoolBrownDogGadgets

    Reply 10 months ago

    That is posible. There are many ways to integrate electronic projects with Legos.

    0
    None
    RalphB48

    1 year ago

    Thank you so much! One of my colleagues at work is Jewish and doesn't have anything with which to decorate his desk this season. I decided I would make him a arduino menorah and, while searching for ideas, came across your instructable. I made some minor code tweaks I thought I'd share. I'm by no means an expert programmer so just my 2c.

    I added in pRNG to flicker the Shamash:

    #include "pRNG.h"
    pRNG prng;

    I made an array of the LED pins:
    const int ledPins[] = {13, 12, 11, 10, 8, 7, 6, 5};

    and streamlined the loop:

    void loop() {

    buttonState = digitalRead(buttonPin);
    byte flick1 = prng.getRndByte();
    analogWrite(9, flick1);
    if (buttonState == LOW) {
    count++;
    digitalWrite(ledPins[count-1], HIGH);
    midi(count);
    }

    if (count == 9) {
    count = 0;
    for (int i = 0; i <= 7; i++){
    digitalWrite(ledPins[i], LOW);
    }
    }
    }

    As you can tell with the song call, I combined all the songs into one midi sub and passed it the count. Within that function, I check the integer and play the required song.

    I'll try to post a pic of my finished design after this weekend. It's just breadboarded right now. I'm also hoping to migrate to a smaller chip to save my Uno, haha.

    YOU SAVED ME HOURS ON THOSE MIDIS!