Introduction: RGB-LED Wire Tree
I want to a share with you my RGB-LED wire tree. One evening I remembered building wire trees as a kid. Nowadays I really enjoy building small electronic projects with microcontrollers similar to arduino, especially with LEDs. So i thought to myself, why not combine both and the idea of an LED wire tree was born. First I checked, if someone had already done something like this before but I didn't find what I was looking. I could mainly find LED wire trees that show one colour. As I think single colour LEDs are a bit boring, I wanted to have one with RGB-LEDs to be able to let the wire tree appear in all colours of the rainbow. So I startet to build one myself. The result you can see in the image above. The wire tree I based this instructible on is my third one. I hope you enjoy my instructable and I can motivate some of you to make one yourself.
For the project itself you only need a few supplies and tools:
- 10 RGB-LEDs (+ spares in case one is damaged), or more if you like
- copper wire 0,14 mm² (or thicker, but not too thick as it will get difficult to braid) with 3 different coloured insulations around 5 m per colour (Number of LEDs x length between 40 and 50 cm)
- silver wire 0,6 mm around 15 m (2 to 3 times the length that is need of each colour)
- microcontroller, in my case a Wemos D1 mini, but basicly everyone will work as long as it fits in the flower pot)
- Power source (in case of Wemos D1 mini any micro-usb phone charger will work)
- 3 MOSFETs or transistors (I used n-channel Mosfets but you can also use p-channel if you adapt the circuit)
- Resistors of different values
- Heat shrinking tubing or electrical tape
- Flower pot
- Hot glue
- Small wooden sticks (for example the sticks from the new year rockets)
- Thin wooden board (for example the bottom of the wooden boxes sometimes fruits are sold in)
- Pin Headers (male and/or female)
- Soldering iron
- Wire cutter
- Tweezers (optional)
- Helping Hand (optional)
- Rotation tool (optional)
Most of the things you need are shown in one of the Pictures above. You can get them in hardware stores, craft stores or Amazon. Some things however can come for free: The stones I took from a nearby field. And the wooden board was waste until I recycled the fruit box.
Step 1: Preparations
First, make sure all RGB-LEDs work, as it is really annoying to replace an LED later on.To test the LEDs simply connect them to a power source with Voltage from 3.3 to 5 V. I used a laboratory power supply adjusted to 4 V. If you dont have any you can use the voltage pins on the microcontroller board or batteries. In case of common anode RGB-LED connect the anode (the longest leg), see picture 1, to the Voltage (or "+") and one of the remaining legs to Ground ("-"). The LED should now light up in one color, see pictures 2 to 4. If you have common cathode RGB-LED its the other way around. Do this for all legs eq. colours and all LEDs. You might realise, that with a fixed voltage the three different colours will be of different brightness. We have to consider that later on.
In the next step you cut all the legs except to common anode of the RGB-LED so that only a few millimeters remain. I used the little dent you can see on the first image on all four legs as an orientation, see picture 5.
Now you have to choose which coloured copper wires you want to combine for the wire tree. As I write this guide I have done three different RGB-LED wire trees. Depending on the color of the flower pot I combined different colours. For this one with a blackish flower pot I used the colours brown,yellow and black. When you have decided what colours to use, you can start cutting the copper wires to length, picture 7. In my case, I cut them to a length of 50 cm with the tree rising somewhat around 30 cm out of the flower pot. You will loose some length when braiding the cables and more important, you need some length left for the electrical connections. So as a rule of thumb the cables should be at least 15 - 20 cm longer than the height you want for your tree. Depending on the size of the flower pot you can choose different sizes here.
To give you an idea of the sizes I used:
First tree was 20 cm high in a flower pot 10 cm height and diameter. The other ones are around 30 cm high in a flower pot of 12 cm height and 13 cm diameter.
Step 2: Soldering the Copper Wires
To solder the copper wires to the RGB-LEDs, first you have to strip on end of each wire around 3-5 mm and put some solder on it. If you use braid as I do, make sure the single braids are twisted together so they don't stick out. As there is little space between the legs of the LEDs and the wires shouldn't touch each other. It is very important that the colours are always soldered in the same order on the LED or else connecting the LEDs later to the microcontroller will become very difficult.
Next you can solder the wires to the RGB-LED. To do this, I clamped the LED with the ramaing long leg, the common anode or cathode, to a helping hand, as you can see on the second picture. Repeat this for all LEDs. Make sure you have a tight connection by wiggling the copper wires.
Step 3: Braiding the Copper Wires
After you soldered the copper wires to the LEDs its time to braid. If you don't know how to braid there are many tutorials on youtube. Just search for "3 strand braid". To braid the wires I again used the helping hand to hold the LED's for me. In my case the helping hand often slided towards me while braiding so I clamped it onto the desk. As braiding is time consuming, I did most it while whatching some TV series.You should leave around 8-10 cm of copperwire that isn't braided. To do this, just knot the wires when you come close to the 8 cm on the shortest wire. For all pieces the left over length should be more or less the same.
Step 4: Soldering the Silver Wire and Twisting
Now you can solder the silver wire to the remaining leg of the LEDs. To do that, you first have to cut a piece off. The length of the piece should be double the length of the copper wires plus 20 cm, depending on how firmly you twist it around later on. If you make more twist per cm than of course you need more wire length than with fewer twist per cm. In my case this means 120 cm per piece. To be sure how much you need, first only cut one piece and remember the length of it.
After that you fold the silver wire in half creating a loop in the middle, see picture 1. Then the loop is pushed over the remaing leg of the LED, the common anode (or cathode). To make this easier you can bend the leg a little bit upwards, see picture 2. After that apply soder to the loop with the leg being inside. Make sure that there is a good connection between the silver wire and the leg. After that you can cut the part of the leg thats sticking out and maybe file the sharp edges that come with the cutting.
Once you have soldered the silver wire in place, you can start twisting it around the braided copper wires until the knot from the step before. The silver wire should be as least as long as the copper wires as you can see in picture 5. The part of the silver wire that stick out behind the knot will later become the roots of the wire tree. It doesn't matter if some silver wires are shorter but the majority should be as long the copper wires. Depending on your result you can now adapt the length of the next silver wires originating from the length of the first wire or leave it as is. Now repeat this for all remaining LEDs. In the end you have a bundle of this "branches".
Step 5: Assembling the Wire Tree
To assemble the wire tree first put all the branches together so that the knots at the end of the braided part lie next to each other as can be seen in the first picture. Than temporary fixate them together and roughly design your tree as you see fit. To design the tree I made different styles of branches. Some I left as they are and some I paired to represent branche forks. I marked the branches that I wanted in pairs with a clipper at the point where I wanted them to seperate. Then I dismanteld the wire tree again and put silver wire around the branches to be put in pairs. The silver wire had about the same length as before, roughly 120 cm in my case. The final step is, to put all the branches, the paired and the single ones, together and again twist some silver wire around starting in the point where they all seperate. This last silver wire needs to be the longest, as the trunk has now a quit big diameter. I went for 140 cm.
Step 6: Sorting the Wires and Soldering the Electrical Connections
Now that you finished the tree trunk its time to sort the wires. Start with the silver wires as they are the least movable ones. First put the 3 to 4 shortest silver wires straight down from the trunk and twist them together. The other wires should bend outside and will become the roots later on. Shorten the twisted wires sticking out of the bottom to equal length reaching at least 2-3 cm out of the tree trunk. Next take a short (for example 10 cm) piece of wire to be soldered to the silver wires sticking out of the bottom of the tree. The silver wiring will later be connected to positive Voltage. (Normally in electronics red wire corresponds to positive Voltage (or Vin) and black to negative (or GND). But with RGB LEDs I usually reserve the red wire for the red LED, so in this case, I therefore use orange wire as it is "nearest" to red.) Strip one side of the wire for 1-2 cm and twist it around the silver wires at the bottom as can be seen in picture 4 and solder them into place.
Next, start sorting the different wire colours together. Lengthen ten according to the shortest on and strip all of them for 1 - 2 cm and twist the stripped ending together. Now test the LEDs again by applying positive voltage to the silver wiring an the blank copper wire parts. Remember which of your color corresponds to which of the red, green or blue light. Now solder green wire to the wires controlling the green LEDs and so on, in the same way as for the silver wiring in the paragraph above. In the last step put some heat shrinking tubing or electrical tape above the naked copper wires to insulate them from touching and therefore shorting each other.
To later control the RGB-LED wire tree, I used a standard button switch. I cut the not needed leg of the button switch and soldered to wires at the remainging ones. Be sure to use the right ones as the 2 legs "connect" by the "plastic bar" on the bottom of the switch are connected together.
Step 7: Planting the Tree
As you can see in the pictures, the tree is planted inside the flower pot on a piece of wooden board and surrounded by stones.
To make the wooden board I first measured the inner diameter of the flower pot. Then I draw a circle on a piece of cardboard and cut it out. Then I checked, if the cardboard circle fit in the desired depth of the flower pot and if not, cut it a little bit smaller. Once I was satisfied, I transferred the carboard shape on the wooden board and cut it out. For the wooden board I used the bottom of a wooden orange box from the local supermarket. The wooden board needs a hole in the middle with a diameter of 10 mm. To hold the wooden board at the desired height, I sawed 3 little sticks from scrap wood I had lying around. In my case they were 7 cm long.
Next I drilled a hole in the bottom of the flower pot to run the powercable through and grinded a channel for the cable with a rotary multitool deep enough for my cable to let the flower pot sit flat on the ground. Next I put some hot glue on the two ends of the sticks I sawed earlier and put them in the flower pot, forming a tripod for the wooden board to sit on.
Now that the tree can be put in the flower pot, I started arranging the stones around the tree trunk. It is not important to completly cover the wooden board with trees, as even when you are only half a meter away you can't really see that deep into the flower pot. Make sure you leave a small spot open where you can put and reach the button switch to control the LEDs. When I was satisfied with the looks, I glued the stones in place, using hot glue. After that I drilled two small holes next to each other to run the cables soldered to the button switch through and glued the button switch in place.
The last step is to design the roots. For that I twisted 2 or more of the silver wires sticking out together with them seperating at different distances as can be seen in picture 11. Then I bend the roots around the wooden board like in picture 12. Afterwards I formed a circle with silver wire that I put over them and bend the roots around the ring, as can be seen in picture 13 and tightend them one after another bit by bit. The last step is to cut the endings of silver wire that stick out to much.
Step 8: Electric Circuit and the Microcontroller
In the final step I put together the electrical circuit. The microcontroller is controlling the RGB-LEDs. As the GPIOs of the microcontroller only supply 3.3 V, which is not enough for some of the LEDs to shine bright, I connected the microntroller to MOSFETs that can switch the LEDs with the input voltage of the microcontroller, which is 5 V. (Instead of MOSFETs you might as well use transistor but I had MOSFETS lying around from a futer project so I used them.) However some LED can't stand 5 V and the different colours will shine in different brightness when they are applied to the same voltage of 5 V. This is where the resistors come in. The values of the resistors have to be calculated for every colour of the RGB-LED according to the Datasheet and can differ from manufacturer to manufacturer. Or you can just use the values provided in the circuit diagramm and test if the values are working for you. If not, you can tinker a bit with the resistor values by rising and lowering the resitor values until all colours shine equally bright. For the button to work, there needs to be a pullup resistor or the button might get detected as presses forever. In this case the Wemos D1 mini has internal pullup resistors that can be activated within the code. If the used microntroller doesn't support that, an external pullup resistor is needed.
After selecting the resistor values I soldered all the electronical parts together on a breadboard. To connect the wires coming from the tree, I used male pinheaders on the board and female ones on the wires, but you might as well solder them directly to the board. Before connecting everything together and putting it into the flower pot you should flash the program onto the microcontroller. I attached the code file. I hope I did enough commenting in the code so anyone can understand whats going on. Right now, the code is very basic and I might add features to it in the future. If I do so, I will post an update here and probably will move the code to github. When you plug the tree in, it will blink in red green, blue and white an then will start to cycle through the hue color spectrum. You than can change colormodes with button presses.
As of now, the code contains 3 modes:
- 0: Off
- 1: Rainbow mode: Cycling through the hue color spectrum
- 2: Fixed color mode
You can toggle between the colormodes by holding the button for more than half a second. If succesful, the tree will flash white the number of times stated before the mode above. In fixed color mode a short button press (less than half a second) will cycle through 7 different colors defined in the code. If the button press is not accepted (short button press only works in fixed color mode) the tree will flash as when first plugged in. Feel free to alter the code as you see fit.
Step 9: Enjoy
Whats left to do is find a sweet spot for your newly made RGB-LED wire tree and enjoy it. All in all the making of this tree took me about 8-10 hours spread over a few days. Some of the more time consuming things like braiding and twisting the silver wire around the branches I did when watching TV.
You might wonder why there are no pictures of the tree shining red. It's simply because as while I'm writing this instructable I'm waiting for a shipment of electronics that I need to assemble the controller. Because of that I used the controller from my first RGB-LED tree for the pictures. However the LEDs in the RGB-LED tree I based this instructables on needs lower resistor values for red and the red light is therefore very dimm.
Participated in the
First Time Author Contest