My DIY Christmas Tree

Fiancee wanted a Christmas Tree, I wanted a project of my own, this is the result of the two.

Every single RGB LED (or light you see there) randomly generates a colour every second. As well as this, it randomly generates which RGB LED will be changed. I did this as I really hate those Christmas Trees that either have a fixed pattern in which they change the order of the lights, or the colours that they cycle through. I did do one with 7 colours including clear though the fiancee preferred this version instead.

I will have a link below to the full Youtube clip.

This was not particularly easy to take a picture of, or video thank to how bright these RGB LEDs are.

A little bit better, but still rather bright.

The animated version is the first ‘image’.

Can’t really see much of the electronics on the backend with it all light up, not to worry I have some pictures of it all off.

Here’s the rear view of the Christmas Tree animated, not as bright, a lot easier to see.

Here’s what it looks like when it is off.

Here’s a closer picture of what the Christmas Tree looks like when it is off. I bought the ‘Tree’ part from WalMart on clearance just after Christmas. It had plain white LEDs, with different sort of LED Holders.

It took a while to figure out how I was going to properly mount my RGB LEDs into this tree as the holes that the default product used were a lot larger.

The LED holder itself is from eBay, you can find it if you look up “50 Pcs 5mm Silver Chrome Metal LED Bezel Plastic Holder”. To ensure that the RGB LEDs did not move I put a small amount of clear tape on it so it would provide a snug fit into the holder.

As it turns out the pre-drilled holes were still too big for the LED holder to properly stay in place. To solve this problem I went to the hardware store and bought 42 W14 washers. Placing one on each side, then using the nut that came with the LED holder I was able to securely mount them in there.

Here we can see the second washer as well as the LED Holder’s nut on the back of each of the LED Holders. I had to drill/cut a hole to fit the Arduino Uno’s USB-B cable. Only reason I used an Arduino Uno instead of say a Micro was I already own several of them.

The majority of the wiring you see is what is called wire wrap wire. It is a rather high gauge wire that does not require any soldering. I did not want to solder wires in case a RGB LED shorted out or if I want to replace them more easily. This did mean that I needed to use a terminal block as the amperage that most wire wrap wires are rated for are rather low. Each set of 5 (or 6) is tied to one wire that connected to the potentiometer (the blue thing dangling). The Potentiometer allows me to adjust the voltage going to the RGB LEDs to make them slightly less brighter.

The RGB LEDs that I used can be found on eBay if you search “5MM 4PIN RGB RED BLUE GREEN COMMON ANODE/CATHODE LED LIGHTS DIODE”. In my case I bought the common Anode, I should have bought common Cathode to make my programming life a little easier, but either can work.

Another thing I would probably do is buy RGB LEDs that have control circuits already in them as the Arduinos only have limited PWM lines, meaning I had to use PWM Drivers to control all 63 PWM lines to the RGB LEDs. You get this number by realizing each RGB LED has 3 control lines each, one for Red, one for Green, and one for Blue. Times this by the total number of RGB LEDs, 21, and it gets 63 control lines required.

The PWM Driver modules that I bought can be found on eBay if you search “16 Channel 12-bit PWM/Servo Drive module.” I was fortunate that there is already a library by Adafruit to control this, as these PWM Drivers are used by PCA9685. This PWM Drivers can also be daisy chained so that only 2 control lines are required to control quite a few of them. All you have to do is solder an ‘address’ on them to do so.

Tried my best to keep most the wiring rather neat, not the easiest thing to do but I think it turned out quite well.

Here is the higher resolution/full 21 second video of the Christmas Tree in action

Parts List:
Arduino Uno
21 Common Anode RGB LEDs
21 LED Holders
42 W14 Washers
4 16 Channel PWM Drivers
1 10k Ohm Potentiometer
1 Terminal Block
4 Daisy Chain Cables.
1 Clearance Walmart Christmas Tree

If you have any questions, comments, etc, please let me know below or in a PM and I’ll try to answer them. Additionally, if there is a large demand for the code I will comment it and provide a link to it.

Nice job, looks interesting. The changing effect turned out well.

These might have made the wiring a little easier: Power & Gnd to each part, then signal daisy chained from LED to LED. Control with Adafruit's Neopixel library

I found out about those sorts of LEDs after having already ordered everything. I figured I might as well use all the parts I ordered and use it as a lessons learned type thing and use addressable RGB LEDs in the future where I need to use 3+ at a time.

The washers added a nice touch!

Nice idea, it's good when a spontaneous project comes up like that :)