Original post author: Ryan
After several months of hardware tinkering and programming, my hobby LED light project has come to a close. Jessica and I successfully displayed the lights on our backpack during the Electric Forest music festival last weekend.
I’ve posted several times about this project already, so this post will be a final summary focusing primarily on topics I haven’t yet discussed.
Hardware
Raspberry Pi 3B
I2c Hub
Adafruit LED hat
Two 64x32 flexible LED matrices
ADXL 345 accelerometer
Anker 20,000 megawatt-hr battery (total battery life was around 20 hrs)
Assembly
I arranged the 64x32 LED matrix panels side-by-side to form a square. I needed a way to hold the panels beside each other, so I designed a laser cut acrylic support panel (which I call “the belly”). The belly goes behind the lights and holds them in position. I also designed a second acrylic panel to sit in front of the lights and protect them (which I called “the lid”). While it would make sense to make the lid out of clear acrylic, I did some research online and chose to instead use a semi-transparent white acrylic that will gently defuse (blur) the light.
The LED lights need to be connected with the raspberry pi with a power cord, a 16-wire ribbon cable (for sending data to the LEDs), and a 4-wire ribbon cable (for communicating to the accelerometer). I ended up splitting the 16 wire ribbon cable into 16 individual wires to improve flexibility, then cut each of those wires to about 20 inches and fed them through a braided cable sleeve. Splitting the ribbon cable was tricky to do; if I were to do it again, I’d use one of the rainbow color ribbon cables which are supposedly easier to work with. Rather than plugging the wires from the Pi directly into the LED panels/accelerometer, I decided to make plugs on the perimeter of the lights for easy plugging and unplugging (which turned out to be a huge benefit).
Software
All code for this project is original aside from the physics toolkit and the framework for communicating with the lights, which use publicly available open-source python libraries.
The software running the lights operate in “stages”, which each have their own behaviors. The light patterns are generated in real-time for all stages. Some of the stages use the accelerometer, while others show randomly generated patterns. I originally wanted the lights to sync up with music using a microphone, but there were some significant hardware and software limitations that prevented me from implementing it in time.
One of the more interesting parts of the software are the cellular automation stages. These are the stages that look like waves, tie dye, and fire. These patterns are achieved by programming a set of rules that are followed by each individual light based on the status of its neighboring lights. For example, think of a crowd of people doing “the wave” at a sporting event; the crowd could theoretically do the wave with their eyes closed if each person who pops up tells their neighbor to the pop up. Cellular Automation is similar to that, but often follows much more complex rulesets.
Conclusion
That’s the full rundown. I was successful at getting the device through airport security on our way to Electric Forest (although the TSA agent initially thought I was being wise when I told him it was a “Raspberry Pi”). I also it through the venue security without issue; it probably wasn’t even in the top 20 strangest things that they encountered that hour. Once inside the venue, I was able to store it in a locker.
We used the lights for two out of the four nights at the festival. We didn’t wear it every night because we had to avoid crowded areas when wearing the lights (due to the bumping and jostling), which was a big limitation. Many other attendees enjoyed the lights and gave compliments. A few dozen attendees started tapping on the lights assuming it was a touch screen (maybe next year). It was fun for us to contribute to the the many other bright and colorful totems and outfits in the forest.
Comments