This year, I wanted to make something for my family for Christmas. The idea was to create an interactive festive ornament that would somehow allow us to stay connected, even though we all live apart. I was particularly inspired by projects like Good Night Lamp, Ambient Kettle and ESP8266 Christmas Ornaments. By October, I'd whittled down my design. Each ornament would be a small LED Christmas Tree that would each be connected to a server. Each tree has a small button that when pressed, makes the tree flash in a 'festive' animation. At the same time, the other trees in the family will also flash with the same animation. The trees are configurable and can be any colour chosen when idle.

You can see the trees in action in the video below:

A video of the IoTrees in action.

The Design

Around the same time that I had the idea for this project, I came across @mohitbhoite on instagram and immediately knew how I wanted to build the trees. I really love the simplistic, but stylish aesthetic of the free-form wiring that Mohit had used, and I thought that it could be used in a similar way to build a Tree shape.

A few sketches later, I realised that I really just needed to start playing with the materials to see what they could do, so I ordered a pack of brass rod, some 8mm NeoPixels and got to work.

The design is quite simple, the tree has two central spines for both the + and - which then connect to the + and - of each NeoPixel via horizontal bars. The edge of the tree is then the data line that goes up the left and down on the right. The brass rods for Data, + and - (And a spare for symetry) are fixed to 4 holes in the middle of the wooden base. A final brass button is also inlaid into the wooden base to allow the tree to be triggered.


Inside the base is an Wemos D1 mini (A fantastic little ESP8266 board) and an Adafruit Capacitive touch sensor breakout which does all of the hard work for you.

After a lot of prototyping, re-building, tweaking of designs etc.. I was able to get this working:


The Build

Once the prototype was complete, I started working on the final versions that I was going to give to my family, the build is separated into three parts; the Base, the Tree and the Controller.

The Base

The Bases were cut out of small pieces of White Oak, approximately 20x100x60mm. The space for the controller was hollowed out using a pillar drill, though a CNC router would have been far more appropriate. I then tidied them up with a chisel before getting them cut to size (many thanks to my Dad and his workshop!). I also cut a small ledge into the opening and cut a 3mm acrylic sheet to fit it so that it would keep the electronics inside tidy.

The Tree

As I was building 4 trees, I found a few ways to speed the build up, mainly through pre-bending as much of the brass rod as possible so that it was all ready to go when I got to soldering it. I also used graph paper (with 5mm spacing) and a fairly basic jig to help solder the brass and NeoPixels together consistently.

Once each horizontal beam was soldered, and the central columns had the 90 degree ledges attached, I then used two of the bases to maintain consistent spacing for the central columns whilst I soldered the horizontal pices on. Sadly I don't have any photos of this step as I was just a tad preoccupied!

Finally, the last and hardest step was to solder each of the 35mm diagnonal data lines to each of the NeoPixels Din and Dout pins. This really took a while as slight differences in each of the trees and hoizontal bars meant that each diagonal piece had to be a sligtly different leg/shape. Being careful to avoid any solder bridges at each NeoPixel was also a challenging task, but with a bit of patience and a good soldering iron, it only took about two hours to finish all of the trees.

The Controller

Once the trees were complete, all that was left was to attach them to the base and connect the Wemos D1 Mini and Capacitive breakout. You can see the result below, it looks like (and is) a mess, but it's a mess that works which is all that matters! I took advantage of the extension pinout on the capacitive breakout to connect it to the drawing pin that I had glued into each tree base.

Once I was sure that everything was working correctly, I used some small self-tapping screws to attach the two boards to the base so that when the power cable was plugged in and removed, it wouldn't move them.


Firmware and Cloud service

Once the trees were all built, I flashed them with the firmware, tested them, took some photos and then packed them up ready for Christmas.

I might post another entry about the code on a later date, but the principle is pretty simple.

Each tree is subscribed to a command topic on an MQTT server (In this case, I'm using the IBM Watson IoT Platform). On that topic, it can recieve either configuration commands to change the idle colour and animation, or "cheer"commands that will trigger it to play the cheer animation for a few seconds (In this case a red and green chase).

When the capacitive button is pressed on top, the trees send a "cheer" event to the MQTT server which is then passed on to a Node-Red server that then sends the relevant cheer commands to the other trees in the family. I'm also logging the event in a cloudant database and I plan to expose the list of "cheer" events on a web page at some point so that my family can look to see who sent cheer and when, in case they missed it when it was sent, or were wondering who sent the cheer.