DIY PCB Christmas Tree

by Babd_Catha in Circuits > Gadgets

260 Views, 0 Favorites, 0 Comments

DIY PCB Christmas Tree

ssapin2.jpg
aaaa.jpg

Hello everyone !


Since Christmas is fast approaching, I wanted to make something for the occasion.

After a few weeks of work, I created this small Christmas tree made from two nested PCBs.


It has slowly blinking LEDs all over it, creating a nice ambiance when in a dimly lit room.

So, if you want one for yourself or as a gift to someone, here's what you will need :

Supplies

  • First, the two PCBs. You can order them from any supplier, or even make them yourself if you have the tools and the knowledge for that. You can download the gerber files here on Dropbox.
  • Then all of the required components (I added links to the components I used on LCSC, but you can get them from anywhere and from any brand) :
  • And finally, you will need tools to solder the components to the boards. You can use any technique, but because this project only uses SMD components, I highly recommend getting a hot air station or a reflow oven, a desoldering pump and some soldering paste.

How It Works

PCB1_schematic.png
PCB2_schematic.png
Triangle.png
sawtooth.png
comparator.png

Before showing you how to assemble the tree, I want to explain how this tree works. There are three main things to look at :


First, the signal responsible for the breathing pattern of the LEDs, called triangle signal on the schematic. This signal is generated using U1, a 555 timer. It first creates a square wave with a period of about 2 seconds. This signal is then filtered using a simple RC filter composed of C4 and R28, to create the smooth triangular wave that we need, represented in blue. The luminosity of the LEDs will be proportional to this signal.


Then, the signal used to time the PWM fed to the LEDs, called sawtooth signal on the schematic. This signal is generated using U2, another 555 timer. It creates a sawtooth signal, with a period proportional to the value of C1. This signal will set the frequency of the PWM sent to the LEDs, and is represented in green.


Finally, we combine these two signals using U3, a comparator, to create a PWM signal with a duty cycle slowly changing over time. The comparator outputs is set to 5V when the sawtooth signal is greater than the triangle signal, and to ground otherwise. Because the voltage of the triangle signal is slowly moving, the amount of time during which the comparator output is high slowly changes over time, creating the PWM with a variable duty cycle that we need. This signal is then sent to the LEDs, which are controller using a simple mosfet transistor.


Only one part of the tree has the components to create this effect, so to create a link between the two parts of the tree, two sets of pads are used for redundancy.

Now that we know how the LEDs are controlled, we can move on to making the tree.

Making the Tree

dd.jpg

This is pretty straightforward, once you have gathered all the required components, solder them to the boards using the schematics as a reference, solder the two boards together, and you're done.

Now, to make your life a bit easier, here are some tips I discovered while making them :


  • If you've never soldered SMD components before with hot air before, you can watch a tutorial here on YouTube.
  • Start with the USB port. It is quite hard to solder because the pads are really close to each other. I usually solder the mechanical connections (the four holes on the sides) first, then I solder the pads to the PCB. This usually creates bridges between the connections, so, to get rid of them, i use the desoldering pump once or twice, and the result is almost perfect.
  • Then, solder one LED with it's resistor, and all of the components controlling the LEDs. This way, you can verify that everything is working before you finish soldering all of the lights. If the tree is not working at this stage, you can use the test points (TP1, 2 and 3) to help you find the issue.
  • Then, you can finish soldering everything on both PCBs. If everything works fine on the main board, you can insert the other one in it's slot, and create the electrical connection between the two using a normal soldering iron.

Your tree should now be perfect ! I hope you had fun and learned a bit while making this small project, and, if you want to improve it, you could try playing with different colored LEDs, or making a 3D printable base for the tree :-)