Building A Website-Controlled Christmas Tree

Back in the day, Christmas lights were simple strings of filament bulbs, and if you really splashed out, you could get some that flashed. These days, we expect a lot more capability out of our blinking decorations. [JT] has put together a rather nifty website-controlled setup for his own tree.

The setup is a little different than builds you may be used to. The website runs on a cloud-hosted virtual machine on Digital Ocean, rather than running locally. This allows anyone on the web to visit the site, and use the interface to control the lights on the Christmas tree. An image of the tree is used as the interface, and allows users to set the color of each individual LED on the tree. The LEDs themselves are driven from an NodeMCU ESP8266, which uses its WiFi connection to query the website itself and grab the color data as needed. [JT] has also included a secondary interface, where the chat of the Youtube livestream can be used to control the LEDs, too.

It’s a build that’s a touch more complicated than most typical online LED blinkers, but one that teaches useful skills in interfacing on the web and using virtual machines. We’ve seen other builds in this genre too; even some that are reactive to “Christmas fever” itself. Video after the break.

Continue reading “Building A Website-Controlled Christmas Tree”

Simple Christmas Tree Christmas Tree Ornament

When the only tool you have is a hammer, every problem looks like a nail. An LED ornament for the Christmas tree can be built in any manner of simple, easy implementations. You certainly don’t need an ARM Cortex M4 CPU running at 120MHz having a mouthful of three letter features like FPU, ETM, ETB, ECC, RWW, TCM, EIC, AES, CAN bus and much, much more. But [Martin Held] built a super simple LED Christmas tree ornament using the ATSAME51 series micro-controller, which he regularly works with and had on hand, and lots of bi-color LEDs. He already had schematic symbols and programmers for the device from other projects where he uses it more extensively, so putting it all together in time for the festive season was that much faster for him, despite the fact that the micro-controller was most likely the cheapest part of the BOM, besides the passives.

At this point it might be tempting to argue that it would have been so much simpler to use addressable LED’s, such as the WS2812B or the APA102C. You can drive them using a more basic micro-controller, and not require so many GPIO pins. But using such “smart pixel” LED’s for hand assembled prototypes can sometimes lead to unexpected results. If they are not stored in sealed tape/reel form, then storage conditions can have an adverse effect leading to dead pixels. And, they need a specific baking procedure before being soldered. Doing that for a few LEDs at home can be tricky.

So for the LED’s, he again went a bit off the beaten path, selecting to use three different color styles of bi-color LED’s with easy to hand-solder, 1206 footprints. This allows him to get a fairly random mix of colors in the completed ornament.

The LED array is pseudo-charlieplexed. One terminal of each LED goes to a GPIO pin on the micro-controller and the other terminal of all the LED’s are connected to a single complimentary pair of N-channel/P-channel MOSFETs — connected in totem-pole fashion. Depending on which MOSFET is switched on via a GPIO pin driving the gate pin high or low, the second terminal of each LED gets connected to either supply or ground. In combination with the GPIO pins being driven high/low, this allows the bi-color LED to be biased in either direction. Getting each LED to emit one color is simple enough — setting all LED GPIOs low, and MOSFET gate GPIO high will bias the LEDs in one direction. Reverse the GPIO logic, and the LEDs will be biased in the other direction. If this is done slow enough, the two colors can be differentiated easily. If the driving logic is made fast, changing states every 10us, the two separate colors merge to form a third hue. With some clever bit of code, he also adds some randomness in the GPIO output states, resulting in a more appealing twinkling effect. [Martin] does a detailed walk through in the video embedded below.

If you have the same bunch of parts lying around and wish to replicate the project, be warned that the KiCad source files will need some work to clean up errors — [Martin] was in a hurry and knew what he was doing so there are some intentional mistakes in the schematic such as using the same symbol for the N-channel and P-channel MOSFETs, and uni-directional LED symbol in place of the bi-directional one. And for programming, you will need one of these pricey pogo-pin style cables, unless you decide to edit the PCB before sending off the Gerbers.

[Martin] built just three of these bespoke ornaments, retaining one and giving away the other two to a neighbour and a co-worker. But if you would really like to build a tree ornament with addressable LEDs, then check out the Sierpinski Christmas Tree which can be cascaded to form an array of tree ornaments.

Continue reading “Simple Christmas Tree Christmas Tree Ornament”

The Internet Of Christmas Tree Watering

There’s nothing quite like a real Christmas tree, but as anyone who’s had one will know there’s also nothing like the quantity of needles that a real tree can shed when it runs short of water. It’s a problem [RK] has tackled, with a Christmas tree water level monitor that has integration with Adafruit’s cloud service to give a handy phone notification when more watering is required.

The real interest in this project lies in the sensor development path. There are multiple ways of water level sensing from floats and switches through resistive and light scattering techniques, but he’s taken the brave step of using a capacitive approach. Water can be used as a dielectric between two parallel metal plates, and the level of the water varies the capacitance. Sadly the water from your tap is also a pretty good conductor, so the first attempt at a capacitive sensor was not effective. This was remedied with a polythene “sock” for each electrode constructed with the help of a heat sealer. The measurement circuit was simply a capacitive divider fed with a square wave, from which an Adafruit Huzzah board could easily derive an amplitude reading that was proportional to the water level. The board then sends its readings to Adafruit.io, from which a message can be sent to a Slack channel with the notification enabled. All in all a very handy solution.

Plant care is a long-running theme in Hackaday projects, but not all of them need a microcontroller.

Tiny Tree Is A Thermometer For Christmas Fever

Tired of the usual methods for animating all those RGB LEDS for your holiday display? How about using trendiness in a non-trendy way?

[8BitsAndAByte] caved in to increasing holiday madness and bought the cutest little Christmas tree. A special tree deserves special decorations, so they packed it with NeoPixels that turn from red to green and back again one by one. Here’s where the trendiness comes in: the speed at which they change is determined by the popularity of “Christmas” as a search term.

The NeoPixels are controlled by a Raspberry Pi 3B+ that uses PyTrends to grab a value from Google Trends once an hour. The service returns a value between 0 to 100, where 100 means the search term is extremely popular, and 0 means it’s probably the dead of January. Each NeoPixel is wired to the underside of a translucent printed gift box that does a great job of diffusing the light.

You know how Christmas trees have a tendency to stick around well into the new year? This one might last even longer than usual, thanks to the bonus party mode. Press the arcade button on the box cleverly disguised as a present, and the lights change from red to green and back at warp speed while the speaker inside blasts the party anthem of your choice. Be sure to check out the demo/build video waiting for you under after the break.

How could this little tree get any more special? Well, a rotating platform couldn’t hurt.

Continue reading “Tiny Tree Is A Thermometer For Christmas Fever”

Learn Arduino In Time And In Tune For Christmas

If you’re one of the lucky ten thousand today who still haven’t tried programming electronics with the Arduino platform, this detailed guide by [Dafna Mordechai] should hopefully give you enough incentive to pick it up now and make a simple bit of Christmas-themed decoration with it.

The guide isn’t exactly aimed at complete ground-up beginners but it does give some pointers on where to look up whatever information you don’t have in order to follow along. Other than that, it’s very simple and has well-detailed steps, showing you how to turn a breadboard into a simple animated arrangement of LEDs in the shape of a Christmas tree, along with a piezo buzzer playing “Jingle Bells”. If you’ve never done this sort of stuff before, [Dafna] explains in pretty good detail which part of the code does what, making it pretty simple if you want to play around with it and customize it to your taste.

Once you’ve gotten the hang of the basics of Arduino, why not try a project that’s a little more elaborate? Without having to stray too far from your comfort zone, you can easily build a kid’s toy full of switches and lights or even a very extra clock that has no shortage of lights and dials.

Old Christmas Tree Gets A New Spin

A couple of Christmases ago, [Nick] got tired of trying to evenly decorate his giant fake tree and built an MDF lazy Susan to make it easy as eggnog. But what’s the point of balanced decorations if one side of the tree will always face the wall? This year, [Nick] is giving himself the gift of a new project and motorizing the lazy Susan so the tree slowly rotates.

The saintly [Nick] decided to do this completely out of the junk box, except for all the WS2811 RGB LEDs on order that he hopes to synchronize with the tree’s movement. He started by designing a gear in OpenSCAD to fit the OD of the bearing, a task made much simpler thanks to the open-source gear libraries spinning around out there.

It was hard to get slow, smooth movement from the NEMA-23 he had on hand, but instead of giving up and buying a different motor, he designed a gear system to make it work. Our favorite part has to be the DIY slip ring [Nick] made from a phono connector to get around the problem of powering a rotating thing. This is a work in progress, so there are no videos just yet. You can watch [Nick]’s Twitter for updates.

[Nick] didn’t specify why he chose to use WS2811s, but they have gotten pretty cheap. Did you know you can drive them with VGA?

Via Adafruit’s CircuitPython newsletter

IPv6 Christmas Display Uses 75 Internet’s Worth Of Addresses

We’ve seen internet-enabled holiday displays before, and we know IPv6 offers much more space than the older IPv4 addressing scheme that most of us still use today, but the two have never been more spectacularly demonstrated than at jinglepings.com. The live video stream shows an Internet-connected Christmas tree and an LED display wall that you can control by sending IPv6 ICMP echo request messages, more commonly known as pings.

Reading the page, you quickly parse the fact that there are three ways to control the tree. First, you can type a message in the box and press send – this message gets displayed on the crawl at the bottom of the LED screen.  Second, you can light up the tree by sending a ping to the IPv6 address 2001:4c08:2028:2019::RR:GG:BB, where RR, GG, and BB are 8-bit hex values for red, green, and blue. This is a neat abuse of the IPv6 address space, in that the tree has 224 (around 16.8 million) IPv6 addresses, one for each color you can set. We were impressed by this brute-force use of address space, at least until we read on a little further.

You can also make your own drawings on the LED wall, again by sending pings. In this case, the address to set a pixel to a particular color is: 2001:4c08:2028:X:Y:RR:GG:BB, where X and Y are the pixel coordinates. This seems easy enough: to set pixel (10, 11) to magenta, the RGB value (0xFF, 0x00, 0xFF), you’d simply ping the IPv6 address 2001:4c08:2028:10:11:FF:00:FF. Having  an array of addressable LEDs is commonplace in hacker circles today, although each of them having their own live IPv6 address on the Internet seems a little excessive at first. Then it hits you – each LED has an IPv6 address for every possible color, just like the tree: 16.8 million addresses for each LED. The LED display is 160×120 pixels in size, so the total number of IPv6 addresses used is 160x120x224, which is 75 times larger than all possible IPv4 addresses!  This is a hack of monstrous proportions, and we love it.

In case you’re not running IPv6 yet, we’ve got you covered. To send individual pings using your browser, you can use a site like Ipv6now. If you want to send pixels to the display wall, you’re better off using a 6in4 tunnel that lets you access IPv6 sites using your current IPv4 connectivity.  Hurricane Electric offers a free 6in4 tunnel service that we’ve found useful. Then it’s just a matter of writing some code to send pixel values as pings.  The python scapy module is perfect for this sort of thing. But, first you’ll have to fill out the form on jinglepings.com and wait to get your IPv6 address whitelisted before you can draw on the display; evidently the usual bad actors have found the site and started drawing inappropriate things.

If you think this use of addresses seems wasteful, you needn’t worry. There are around 3.4×1038 IPv6 addresses, enough for 1027 such displays. We’re going to go out on a limb here and say it: nobody will ever need more than 2128 IP addresses.

If you’re looking to build an LED holiday display on a smaller budget, check out this one that re-purposes normal LED strings.

Thanks to [Ward] for the tip!