Musical Activated Light Up Christmas Tree

by ehudwill in Circuits > Arduino

1822 Views, 13 Favorites, 0 Comments

Musical Activated Light Up Christmas Tree

5694795015be4d5e2c000165.jpeg

I have wanted to do this project for a while and finally found the time. Music and lights are two things that go great together at Christmas. People drive all over to see huge displays that cover an entire house and more. I decided to avoid the traffic and create my own little light show.

Tools and Materials

Photo Dec 29, 9 26 12 PM.jpg

Tools

Soldering tool

Wire stripper

Helping Hands

Utility Knife

Exacto Knife

Arduino Uno

Hot Glue Gun

Materials

Solder

Wire

RGB LED x 8

Poster Foam Board

Glue Sticks

3.5mm audio wire

Speaker

MP3 player with a 3.5 mm audio jack

Heat shrink

Small cardboard box

Plastic Ball Ornaments

Code

Coding2.gif

This is code I have used in a previous project. However this time it did not work as usual. It did not work and I had to make sure modifications to the code to get it to work correctly. I have loaded the files I used below. The ino file is the Arduino file and the other two files are library files. If you need to know how they work check out this link.

Making the Tree

FullSizeRender 78.jpg
IMG_1949.JPG
IMG_1958.JPG
IMG_1955.JPG
IMG_1959.JPG
IMG_1952.JPG
IMG_1960.JPG
IMG_1961.JPG
IMG_1950.JPG
IMG_1951.JPG
FullSizeRender 90.jpg
FullSizeRender 76.jpg
FullSizeRender 94.jpg
IMG_1953.JPG
FullSizeRender 95.jpg

I did some research online to help me decide what I wanted my tree to look like. I looked at some other trees that had been hand drawn and that helped me find a technique. I started with a rough sketch on some scrape poster paper. I started with the top of the tree and made a mark at the center of the paper. Then I drew lines from the center top to the left and right corners at the bottom. I had a large triangle.

I measured 2 inches from the top of the tree. From that point I drew the branches out of the triangle about an inch. I then measured about halfway up from there and drew out and down to the branch. I then measured 1.5 inches down and drew the branches out an inch. Then I measured about halfway up from the branch line and drew a line out and down from there. I then measured 1 inch down and drew the branches out an inch. Then I measured about halfway up from the branch line and drew a line out and down from there. I then measured 1 inches down and drew the branches out an inch. Then I measured about halfway up from the branch line and drew a line out and down from there.

Then I drew a trunk for the tree large enough for the box I was planning to use for the storage of the electronics.

I went over the lines with a utility knife/exacto knife. I went over it several times to avoid destroying destroying the board.

Adding the LEDs

FullSizeRender 98.jpg
FullSizeRender 82.jpg
FullSizeRender 84.jpg
FullSizeRender 85.jpg
FullSizeRender 77.jpg
FullSizeRender 93.jpg
FullSizeRender 75.jpg
FullSizeRender 73.jpg
FullSizeRender 86.jpg
FullSizeRender 91.jpg
FullSizeRender 87.jpg
FullSizeRender 79.jpg
FullSizeRender 97.jpg
FullSizeRender 74.jpg
IMG_2092.JPG
IMG_2093.JPG
IMG_2095.JPG
FullSizeRender 81.jpg
FullSizeRender 92.jpg
IMG_2118.JPG
IMG_2120.JPG
FullSizeRender 83.jpg
FullSizeRender 88.jpg
FullSizeRender 96.jpg

I had eight LEDs to place so I marked three spots along the bottom branch, two at the next level up, two at the next level, and one near the top. I tried to put the LEDs about half an inch or so from the edge. I mostly eyeballed it since I wanted something more organic. I used a soldering tool to make a hole where the LEDs would go. I placed the LEDs in the holes from the back of the tree. I used RGB LEDs and bent the leads I did not plan on using down. I alternated green and red for the LEDs. This helped secure the LEDs in place.

Then I began the process of soldering them down. These are common cathode RGB LEDs so I soldered the ground to the red and green leads respectively with a single wire. Then I soldered separate wires for the ground of the LED. These wires would go into the pins for the Arduino.

Then I used scrap LED leads soldered to the ends of the wire to make it easier to fit into the Arduino. I used heat shrink to cover the solder and reduce the chances of a short.

The LEDs were too bright so I got some plastic christmas balls and cut the white ones in half. Then I glued the halves over the LEDs using hot glue. This diffused the lights very nicely.

Storage for Electronics

FullSizeRender 80.jpg
FullSizeRender 89.jpg

I had a box from a USB hub I had gotten. I cut out the cardboard inside the box to accommodate the electronics. Then I used hot glue to attach it to the back of the tree. This serves two purposes; protecting the electronics and supporting the tree.

Setting Up the Audio

FullSizeRender 101.jpg
FullSizeRender 102.jpg

I salvaged a 3.5mm audio cable from some old toy to use with this project. I tested it to figure out which wires needed to go where on the Arduino board for it to light up. I recommend you test the wire to make sure you are setting it up correctly. I then soldered leads to the wires.

Playing With Your Tree

IMG 2132
FullSizeRender 100.jpg
FullSizeRender 103.jpg

Plug your wires from the tree into your Arduino. I put the lead from the bottom right LED into pin 5. Then the other LEDs one after another into 6 through 12. Then plug in the wires for the audio into the Arduino. The positive from the audio goes into the ground and the negative into analog 3. I used an audio splitter to separate the signal. One goes to a speaker and the other to the wire connecting to the Arduino. I used an old iPod touch to play the music. Plug your Arduino into its power source and enjoy some Christmas melodies enhanced by dancing lights.