Musical Menorah (made With Arduino)

2,271

15

16

Introduction: Musical Menorah (made With Arduino)

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

LED Contest 2017

Participated in the
LED Contest 2017

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    16 Discussions

    0
    liyaBK
    liyaBK

    Question 7 weeks ago on Introduction

    wow! this project is amazing! i would be glad if you send me the code you made for the music

    0
    RalphB48
    RalphB48

    3 years 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!

    0
    Teitelbot
    Teitelbot

    Reply 1 year ago

    Can you send me your finished code?

    0
    AaronS337
    AaronS337

    2 years ago

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

    0
    izikl
    izikl

    Question 2 years ago on Introduction

    is it safe to connect a led directly to digital output without a resistor ?

    0
    EleneF
    EleneF

    Answer 2 years ago

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

    0
    izikl
    izikl

    Reply 2 years 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
    EleneF
    EleneF

    Reply 2 years ago

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

    0
    EleneF
    EleneF

    2 years 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
    EleneF
    EleneF

    2 years 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
    BrownDogGadgets
    BrownDogGadgets

    3 years ago

    Very slick! Now I just want to make one out of LEGOs...

    0
    jercool
    jercool

    Reply 3 years ago

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

    0
    tliguori330
    tliguori330

    3 years ago

    Top level instructable very clear

    0
    jercool
    jercool

    Reply 3 years ago

    Thanks

    0
    DIY Hacks and How Tos

    Fun idea. And you don't have to worry about fire hazards.

    0
    jercool
    jercool

    Reply 3 years ago

    True i didn't think about that lol.