Tis The Season

’Tis the season for soldering! At least at my house. My son and I made some fairly LED-laden gifts for the immediate relatives last year, and he’s got the blinky bug. We were brainstorming what we could make this year, and his response was “I don’t care, but it needs to have lots of LEDs”.

It’s also the season for reverse engineering, apparently, because we’re using a string of WS2812-alike “fairy lights”. These are actually really neat, they look good and are relatively cheap. It’s a string of RGB LEDs with drivers, each dipped in epoxy, and run on a common three-enameled-wire bus. Unlike WS2812s, which pass the data on to the next unit in the line and then display them with a latching pulse at the end of a sequence, these LED drivers seem to count how many RGB packets have been sent down the wire, and only respond to their own number.

This means that if you cut up a string of 200 LEDs, it behaves like a string of 200 WS2812s. But if you cut say 10 LEDs off the string, where you cut them matters. If you cut it off the front of the string, you only have to send 10 color packets. If you cut them off the other end, you need to send 290 dummy packets before they even start listening. Bizarre, but ’tis the season for bizarre hacks.

And finally, ’tis the season for first steps into “software architecture”. Which is to say that my son is appreciating functions for the first time in his life. Controlling one LED is easy, but making a light show is about two more abstraction layers on top of that. We’ve been having fun making them dim, twinkle, and chase so far. We only have two more weekends, though, and we don’t have a final light show figured out yet, but after all, ’tis the season for last minute present hacking.

A Hacker’s Christmas Story

Twas the night before Christmas, and because I decided to make everyone’s presents myself this year, I’m still working like mad to get everything done before the big deadline. Why do I do this to myself? Well, partly because I enjoy the process.

My wife had this idea that we can make the older folks some fun decorative blinky things, and picked some motives. My son then drew them out on paper, and I scanned those drawings in and traced them over in CAD. We then cut the shapes out of wood on the CNC router, which turned out to be incredibly successful. (Now that I’ve done it, I wouldn’t be surprised if all of those “quirky” decorative objects that the Swedish flat-packers sell aren’t initially sketched out by third graders.)

Then my son painted them, and it’s my job to insert the twinkling. I bought some of those three-wire “fairy lights” for the purpose, and they’re really fun to hack on. They’re like WS2812s, only instead of using four pins and shifting the data downstream, they’re on a bus, each with a hard-coded address – they know where they are in the string and each LED only listens for the Nth set of 24 bits. This means sending 200 color codes just to light up the 4 LEDs in Aunt Micki’s decorative tree, but so be it.

Last stop, and still to do as of the 23rd, route out some kind of wooden battery case, wedge in the LiPo and the charging circuits, and solder on an on/off switch. It’s down to the last minute, but isn’t that always the way?

Definitely would have been easier just to order something online. But is that the spirit of giving? No! The DIY way brings the family together, gets me some quality time with the CNC machine, and tones up my FreeCAD skills. My son even looked over my shoulder as we were coding some of the LED animations. And nothing says Christmas like hand-coded blinkies.

Happy Holidays, y’all!