Make a LED Christmas Tree That Syncs to Music! (Custom Build From Scratch)

by BrownDogGadgets in Circuits > LEDs

3575 Views, 55 Favorites, 0 Comments

Make a LED Christmas Tree That Syncs to Music! (Custom Build From Scratch)

Make your X-mas Tree Sync To Music

I bought a string of LED Christmas tree lights last year that you could program with an app on your phone. It was ok, but I wanted to go further and design the animations myself. This year, I not only designed my own music-reactive animations, but I also made the whole tree from scratch!


I used easy-to-connect circuits and simple craft supplies to make this music-reactive tree.

The template, tutorial, and code are available below. :)

The electronics I used are micro:bit, Neopixels, a Crazy Circuits Bit Board from Brown Dog Gadgets, and an Audio Analyzer from DF Robot. The craft supplies that I used are easy to find at the dollar store or craft supply store, like dowels, garlands, tape, hot glue, and sculpture wire.

I hope you use this tutorial to light up your tree or any other festive decorations! Happy Making, and Happy Holidays!

Supplies

Untitled design (2).png

Print and Cut Out the Template

IMG_3831.jpg
  • Print the templates and cut out the three circles, but leave the star intact.
  • Gather supplies from the list above!

Tip: The tree structure can be made with many types of baskets or even just foam core to make a cone shape. The limitation is the approx. 3.5 inch distance between LEDs, so the circumference of the bottom circle should be no greater than (14 LEDs* 3.5 inches) or 49 inches.

Add the Template to the Bottom

1E22C425-DB8C-4035-B2CB-BFBB90F499EF_1_102_o.jpg

Tape the large circle template to the bottom of your basket. If your basket is smaller, you can trim the circle down to size.

Tape the Dowels to the Basket

IMG_3732.jpg
IMG_3741.jpg
IMG_3742.jpg
  • Tape the dowels to the bottom where it meets the table, and the top of the basket using the lines on the template as a guide. There are 14 lines.
  • I used a long piece of electric tape and positioned each dowel as I spun the basket around, but you could also use individual pieces of tape.


Glue the Small Circle Templates to Foam Core

BDG_LED Tree2.jpg
BDG_LED Tree3.jpg
BDG_LED Tree1.jpg
  • Glue the small circle templates to foam core and cut them out.
  • Use a hole punch to punch out each of the outer holes, and an awl to put a hole thru the inner holes.


Place the Circle Over the Dowels

IMG_3751.jpg
IMG_3753.jpg
IMG_3749.jpg
  • Place the circle over the dowels one at a time. It's ok to bend them a little to get them into place.
  • Push the circle down until the dowels form a point at the top.


Cut Off the Dowels

IMG_3764.jpg
IMG_3766.jpg

Cut the dowles off above the circle as shown.

Connect the Circuit

IMG_3874.jpg
IMG_3890.jpg
IMG_3883.jpg
IMG_3884.jpg

While building, I connected and disconnected the circuit several times as I attached the components, but in the end, the connections needed to be like this:

  • Battery Pack to + and -
  • Neopixel Tree LEDs to Pin 16 (Use 3 Long Headers to connect the Neopixel connector to Jumper Cables)
  • Neopixel Star LEDs to Pin 15 (optional)
  • Audio Amplifier 3-Wire Cable to Pin 1
  • Audio Amplifier Pin S to micro:bit Pin 0 and Pin R to micro:bit Pin 15
  • Audio Amplifier Pins L and "-" to Aux cable using Alligator Clips as shown in detail in a later step.


Attach the Circuit

IMG_3773.jpg
IMG_3770.jpg
IMG_3771.jpg
  • Stack the circles on top of each other, aligning the 4 circles in the center. (There is a right and wrong way, rotate 90 degrees if it doesn't align perfectly).
  • Place the Bit Board over the holes on the opposite side of the 14 holes, so those holes appear on the bottom.
  • Thread a twist tie or pipe cleaner through the holes of both foam circles and twist it on the bottom side to secure it.
  • Use mounting tape to secure the battery pack.


Place and Prepare the Audio Amplifier

BDG_LED Tree a2.jpg
BDG_LED Tree amplifier.png
IMG_3890.jpg
  • Use a piece of double-sided mounting tape to adhere the Audio Amplifier board to the bottom of the foam circles.
  • Fold the two outer pins on the Audio Amplifier up to make it easier to clamp to.
  • Attach an alligator clip to each of those pins.
  • NOTE: Music reactivity is optional! This project can be created as an animated tree that doesn't react to music, so skipping the Audio Amplifier is a simpler option. :)


Add Glue Dots

IMG_3779.jpg
IMG_3783.jpg
IMG_3790.jpg

Add a glue dot or a dab of hot glue to the top of each dowel and place each dowel inside the holes on the circle piece as shown.

Place the Speaker

IMG_3793.jpg
IMG_3800.jpg
IMG_3791.jpg
  • In my case, I had a small speaker that fit inside the tree, so I connected my audio splitter cable to both the speaker and my phone (the music player) via a splitter. It is necessary to make a physical connection via an aux cable (rather than bluetooth) so that the micro:bit can read the audio values to animate the tree.
  • Alternatively, instead of using a splitter, you could use your computer and play the music from the phone's speaker and headphones as a multi-output device.
  • An AUX Cable will typically have two or more connections separated by little black rings. Connect the GND alligator clip to the ring closest to the cable and the other alligator clip to the tip as shown.


Add the Neopixels

IMG_3801.jpg
IMG_3807.jpg
IMG_3820.jpg
  • Add two strings of Neopixels to the tree by measuring the height of the tree and dividing it by seven sections.
  • Tape an LED to each dowel, then move to the next one horizontally to make a full ring, then jump down to the next row and go around again until you've placed all 98 pixels. (This is hard to show in photos, and is easier to understand by watching the video above.)

Wire the Neopixels to Pin 16

IMG_3824.jpg
IMG_3826.jpg
IMG_3823.jpg

Wire the strip to Pin 16 using 3 long header pins and jumper wires as shown.

Upload the Code!

Screen Shot 2023-12-11 at 8.20.05 PM.png
Screen Shot 2023-12-12 at 2.59.52 PM.png
  • This is one of the most advanced code sequences that we've released, so if you are new to coding, just download it and watch it happen! Click Here.

Tip: Do the colors look strange? It could be that your Neopixel strip uses different RGB colors than mine! To fix it, experiment with changing the RGB color options in the "set" block (photo 2) for your strip.


Add Garland and Ornaments

BDG_LED Tree - Garland 1.png
BDG_LED Tree - Garland 2.png
  • Add garland by wrapping it tightly around the tree. Look for translucent or shiny garland to diffuse and bounce the light throughout the tree.
  • Add ornaments if desired!


Add a Star!

Natasha Dzurny _ LED Components-10.jpg


  • Optional: Follow the Neopixel Star LED Tree Topper Tutorial to add a star to the tree, or add your own tree topper.
  • If you don't make the star, wrap the garland around a disposable cup and place it over the micro:bit at the top of the tree to create the tree's point.

Hint: The star is already animated in the code from the last step! Just connect it to Pin 15. If you don't make the star, the code still works for just the tree too!

Plug and Play!

Watch the Musical Neopixel Xmas Tree
Christmast Tree Stills - 58.JPG
Christmast Tree Stills - 44.JPG
Christmast Tree Stills - 45.JPG
Christmast Tree Stills - 49.JPG
  • Plug in your music and watch it go!
  • Press buttons A and B to advance to the next or previous animation.

Rock on Holiday Style! We hope you have a festive season! :)




via GIPHY