back
The Chaos Display
Got Pike?
Or, how to display videos on randomly organized xmas lights.
distributed under the terms of the GPL license.


I really liked the QC Co-Lab Lightwall project, but I don't have the patience to build a perfectly aligned matrix of lights. So I set out to write some software that can do roughly the same thing, but using randomly placed light instead.

The Software

The software is relatively simple, but took some experimentation to get working. The hardware fairly similar to the QC Co-Lab Lightwall project. I use a teensy to drive the lights, a raspberry pi to drive the teensy and a wifi bridge to get access to it from inside the house. After throwing the lights on the tree (literally!) I put my cellphone on a tripod (using one of these) and ran a webcam program on it, then I ran the acquire program from the tarball below which turns on one light at a time and takes pictures of it. This takes like about 45 minutes for the 300 lights that I have. (currently, I'll probably have more next year.)

After capturing a whole bunch of pictures, I run it through the solve program, which uses a non-negative-least-squares. First it the 7 pictures that go with a particular light (each in a different color), and calculate where in the picture that particular light is. After that, the NNLS algorithm is used again to invert the light->pixel into pixel->light map. This takes about 30 minutes on a fast computer.

The third step is to run some video through the 'video' program. It will read the solution produced in the previous step and do a simple matrix multiplication for each frame/color to map it into light colors. The output file contains the raw data for the lights and could potentially be fed directly to /dev/ACM0 with cat. I usually use the "play" program instead to make sure I initialize the lights properly.

The tarball contains some python hacks for creating the video sequence as well. Beware, there is no readme file or step-by-step instructions, if you can't figure out how it works, you probably don't want to use my software anyways. :)

The Build


Rats nest (click for high res)
Basically I cut the cords, extended all the wires and crimped on molex connectors so that everything wouldn't have to be hooked up together all the time. Originally I was planning to use an ATX power supply to drive the lights, but when I hooked up the lights to the ATX power supply, the 5v rail dropped down to less than 4 volts and the PSU turned itself off, so I had to go back and use the original power supplies that came with the lights. The whole thing is housed inside a cheap ammo box, which is pretty much water proof. However, I had to cut a hole to get the cables in and out, and even though that hole is well covered by the lid, the water finds its way into the box. Currently the water collects in the bottom, which doesn't bother the original wall warts very much, but could have been a real problem for the ATX power supply. I need to drill some holes in the bottom of the box to let the water drain out. For now I just empty out the box every few days. Maybe next year I'll build something that is properly waterproof. (The water-proof connectors are like $20 per light string though, which is why I just cut a hole this time.)

It's not pretty, but luckily you can't see the box when it's dark.

The Result

As you can see, it's not perfect, some lights are acting kind of random. I'm thinking that doing some filtering on the images might solve some of these problems, or perhaps it would be better to simply map a light to a single pixel. (It would certainly require less cpu cycles..) But for now I'm just going to sit back and hope people enjoy my tree.

The Download

If you want to see my code, it is available here: chaosdisplay.tar.gz

The Credits

This project is based on the great work of those who hacked GE color effect lights before me:

The End

Problems? Questions? Suggestions? Mail me at hubbe@hubbe.net.


This page has been accessed 3,399 times since December 22nd, 2018.
Last modified: December 22nd, 2018 - Design by Monica & Fredrik Hübinette