​Light ‘em up!

A project log for Waterfall Wall with LED Illumination

A translucent wall with custom shelves, a waterfall feature, and remotely-controllable lighting

infinityisinfinityis 07/15/2014 at 06:260 Comments

With the waterfall part of the project working reasonably well, I’ve moved on to the electronics side of the project, beginning with control of the WS2812B LEDs.

To power the LEDs, I found it convenient and cheap to use an ATX power supply. At full power, each LED can consume up to 50mA, so for 200 LEDs that means I would need at least 10A at 5V. An ATX supply that can do this can be purchased for as little as $14 or salvaged for free.

I plan to take apart the power supply later; if there is enough room inside, I may use it to house the final electronics as well. ATX power supplies need one of the pins pulled low to start operating (aside from standby power), so I created a shorting jumper by removing the ATX connector from an old motherboard and just soldering a wire to pull down the control pin. My preferred technique for connector removal is to add excess solder to the back of the thru-hole pins of the connector and slide a soldering iron back and forth along them to evenly heat up all the pins. After working it for a minute or two, the connector fell right out, and I used some desoldering braid to clean up the pins.

The next step was to find a good way to communicate with the WS2812B LEDs. I wanted to use the MSP430G2553 microcontroller, as it comes with the low cost MSP430 Launchpad. I found a few resources which helped--some used the same microcontroller but older versions of the LED (e.g. WS2811) and some used the WS2812B LED but also used a more advanced MSP430 microcontroller. I decided to use the code designed for the more advanced microcontroller and port it back to work with the MSP430G2553. As it turns out, there were some differences with register names and available clock settings, but after getting acquainted with the MSP430 communication protocols and making some edits to the code, it worked!

I've forked the original code and uploaded my changes to github here. Note that currently there is a limited to how many LEDs can be controlled because a buffer is used to store all the pixel data, and there is not much RAM for such a buffer on the MSP430G2553. I’m hoping when it is all working I can just stream the pixels in real time, mitigating the need for large data buffers.