Creating an animated LED light wall with Raspberry Pi, Python, and APA102

This project was another large window installation for the Urban Art project in Great Falls, Montana.  I wanted to create something with LEDs that would have visual impact similar to the 1 meter POV displays, but with no moving parts.

Overview

The wall consists of 4 foam panels, each having 70 APA102 RGB LEDs. Together, these form a wall of 20×14 LEDs, which are controlled by a Raspberry Pi model 2b and a custom hat with a 3.3 to 5v level shifter and incoming power connections. A Python daemon running on the Pi cycles through plugin modules, each creating a different animated effect. Currently the plugins include: color plasma, blue rain, fireworks, wave, bouncing blobs, and growing “orbs” (see photo gallery.

Construction

Soldering jig

Most of the physical construction time was cutting and soldering the 280 LED modules into strings of 4 conductor wire.  I purchased 110 feet of the multicolored wire, and cut segments that would space the LEDs at around 4 inches apart.  These were soldered in a custom jig I created with the CNC that allowed me to push the stripped wire ends into guides that aligned the soldering points perfectly.  The soldering took several weeks, but without that jig, it may never have been completed.

The strips were mounted onto 1/2 inch foil-faced foam insulation using the adhesive strip on the back of the LEDs.  At first I assumed that the insulation foil was conductive, so I also put a rectangle of kapton tape behind each LED. This later proved to be unnecessary as the foil was not conductive. The strips were wired in a serpentine pattern, starting at the bottom middle, then going up the left side, down the right side, and ending again in the bottom middle.  This allowed me to reconfigure the squares into a long strip at a later date.

To power each strip, I ran a bus of 2×12 gauge wire up each side of each panel, and connected them all with hobby XT-60 connectors.  At peak brightness the wall could draw over 15 amps at 5v, so larger gauge wire was necessary.

The LEDs and Raspberry Pi were powered by an inexpensive 5v 30A power supply purchased on Amazon.

Software

The software used a technique I learned on the 1 meter POV display that allowed me to draw on the display using the PySDL library.  This means that new display mode plugins are quick and easy to create. At startup, the script uses Python’s ctypes module to create a raw SDL pixel buffer in RAM. Then, PySDL can write into this buffer using easy functions like line(), rect(), etc. Then, in the display function, the code translates that buffer into the necessary byte sequence for the LED strips. Because of the arrangements of the strips, I had to send the left half first, from the bottom up, while reversing the order of even horizontal rows.  Then the right half is sent, from top to bottom, again reversing the order of the even rows.

Double buffering allows a smooth cross-fade between effects.  During transitions, two plugins are both drawn, then alpha blended in a secondary buffer behind the scenes.

Current Home

The display currently lives high on the wall at the Bozeman Makerspace in Bozeman, Montana.  We frequently turn it on for ambiance or when we have visitors.

Leave a Reply

Your email address will not be published. Required fields are marked *