Sierpinski Christmas Tree
Due to COVID, I’ll be spending the holidays in my NYC apartment for the first time instead of traveling home. While unfortunate, that means I get to come up with some creative ideas for Christmas decorations. Resources for making things in a 400 sf studio apartment are essentially limited to 3D printing and soldering - luckily, PCBs from China are absurdly cheap and ship quickly, so I decided to make an apartment-sized tech-y Christmas tree. One of the critical requirements is that whatever I made needed to be compact enough to reasonably store and travel with later, so making something modular seemed like a good approach. The idea struck me to design a PCB that would represent a single unit of a Sierpinski Triangle so that I could tesselate together many identical boards to make a tree of any size.
I started by drawing a snow-covered Christmas Tree in Inkscape, then imported that SVG into EasyEDA. I’ve used both Eagle and KiCad in the past, but EasyEDA’s approach to user-driven libraries, and integration with LCSC has made it my go-to for simple projects like this. I elected to use 3 WS2812b-mini addressable RGB LEDs per board, and connect each board at the corners with 3-position pin headers. When diagramming out the path the signal would take, I determined that each of the 3 corners of my tree would need to act as either an input or output depending on the position in the overall arrangement, given that I was planning to power the tree from a bottom corner and didn’t want any “horizontal” connections, only “vertical” connections (ie, the signal had to go up and down the tree rather than across). To accomplish this, I put a small solder bridge connection on each corner which could select between input and output. I’ve gotten into the habit of putting solder bridges into my PCBs for customizations like this, or to change functionality by bypassing certain components. It’s given me a higher success rate on rev 1.0 boards rather than requiring multiple iterations. I planned to drive the whole assembly from an external Arduino, which I knew could drive WS2812 chains of a pretty reasonable length without any issue. For the first pass, I ordered 10 boards with the goal of making a 9-member Sierpinski triangle. The next logical step up is 27 members, which was a bit more than I planned to commit to, and might be a bit too large for my apartment. As a final touch, I added a small hole to the top so that the board could be hung like an ornament, in the event that I send these boards to friends and family.
Overall, it worked great! I had trouble soldering the WS2812b-minis by hand because the leads go under the component, and so I wound up with a few bad modules on my first attempt. After resoldering the LEDs on the bad modules, it worked flawlessly! I plan on pinning this to a sheet of foamcore and mounting it to the wall. Once the holidays are over, I can unmount it from the foamcore, toss the old sheet, and just store a small pile of PCBs. I was planning on writing some firmware myself, but found that the FastLED TwinkleFOX example worked perfectly out of the box!
All design files are available on Github. If you decide to make any yourself, drop me a note! Thanks for reading :)