Arduino Christmas Cheer!

Published

Introduction: Arduino Christmas Cheer!

About: I'm a 18-year-old high school student, I love engineering, film production, design and everything in between.

Tiss the season to stick Arduino's in festive places, and what better place than a Christmas tree! In this project, we are going to be making a Christmas tree that can sing a bunch of different Christmas songs and light up in conjunction with the music! Attached is an audio file of the tree in action to give you an idea of what it sounds like.

Step 1: Parts Needed

So the tree isnt really doing that much meaning our parts list is actually pretty small with all we will be needing as follows:

  • Arduino Micro (Here)
  • Buzzer (Here)
  • 12 LEDs (Here)
  • Button (Here)
  • Wire
  • Case material

as for tools, all we will be needing is a soldering iron, glue gun, and box cutter making this a really simple, fun project!

Step 2: Wiring Everything Up!

The wiring for this project is a little messy because we are going to be controlling six sets of 2 LEDs but overall its still pretty simple to get everything connected properly.

Let's start by making our LED chain, we start by soldering all the ground legs (short legs) together making a common ground between all the LEDs, this common ground can then be soldered to the Arduino's ground input. Now we are going to want to pair the 12 LEDs into groups of 2, we do this by connecting each individual group's longer leg together meaning when power is supplied to that set they will both turn on. Now we should have 1 common ground and 6 cathodes we need to connect to the Arduino, each set is connected to one of the Arduino inputs which are pin 3, 4, 5, 6, 7 and 9 (pin 8 is used by the buzzer).

Now for the buzzer one the bottom of it you should see a positive and a negative terminal we are going to want to solder a wire to both and connect it to the Arduino. The ground terminal of the buzzer goes to ground on the Arduino and positive goes to pin 8.

And lastly, we are going to connect a button that lets us turn on and off the music because it does kinda get a little annoying after the 4th or 5th hour. One leg of the button connects to ground on the Arduino and the other leg connected to pin 10.

And that's all the wiring!

Step 3: The Code

The code allows us to generate tones from the Arduino and lets it play specific notes, let's take a look at some important features of it.

There's a section of the code that lets us choose the tempo of the song, I chose 250 to keep it classicly but still a little upbeat, then above that there's a bunch of numbers separated by commas, this is the length of each note that's going to be played and then again above that is the actual notes that are being played in order, these can be rearranged to play any song you want as long as you don't mind the sounds of 8 bit.

Open the code in the Arduino IDE and upload it to your board and give it a test, if all goes well we can move on, if not try double checking all your connections and reuploading the code.

Step 4: The Case

Okay, so the case is actually really basic its only 4 pieces of cardboard that are glued together to make a box that the base of your pot plant Christmas tree can fit in. We will then need to make a smaller triangular box which our button will fit on, once that's done we can glue that in the middle of one of the sides of our box, or button can then be mounted inside of that a the wires can be led to the back corner of the box as that's were we are going to mount the Arduino and buzzer because it keeps it out of sight, we can do this by using a tiny bit of hot glue to keep it in place.

Now the basic case is completed but we want to add some Christmas themes to it, I did this by glueing a mini Christmas hat to my button and added a little message below it but your decorations are completely up to your own personal taste.

Step 5: More Songs!

That's pretty much it, you should now have a Christmas tree that can sing jingle bells but if you want it to play some more songs head here , theres an Arduino user who put togther his own Christmas 8-bit songs and they are great! just drag and drop the few lines of code into our code, reupload it and enjoy!

Thanks for reading! if you have any questions at all id love to answer them, leave me a comment or PM if you do!

Share

    Recommendations

    • Water Contest

      Water Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Oil Contest

      Oil Contest

    Discussions