Hey y’all. Just got my first working version going on a project Ive been planning for a long time: a network-able RGB LED controller for the DIY venue I run with my friends.
Basically, we’re a bunch of students in central NY booking all the indie rock acts we can to play our basement. The DIY venue we all frequented when we were freshmen had a really radical DIY light controller that picked up sound and controlled the brightness of several strings of Christmas lights.
I wanted something similar for our space, but figured it’d be a good foray into some of the embedded computing concepts I’ve seen bouncing around here for a while. Some of this may be over explained for many, but I’m trying to be as beginner-friendly as possible, especially since we’re dealing with potential safety concerns. Feel free to skip all this instruction if you’re familiar with it. So here’s what I have so far:
1x Teensy 3.2 with the OctoWS2811 library
1x OctoWS2811 adaptor board
1x Raspberry Pi Zero (and a 5V, microUSB wallwart)
1x cheap 5V 10A power supply (note: the 20A version is less than $10 more, and you may need that headroom if you want to go truly grand in scale)
First, consider the scale you’re building on. Each LED at full white (red, green, and blue at full brightness) will consume ~60mA. I would budget for at very least 60x the number of LEDs you use. There is a way around this, however; you can just put a hard brightness limit on the LEDs in your code. I think I’m going to set mine up so that the “maximum” each LED can reach is ~70% of full brightness. Whatever you do, just budget in some headroom on power. Drawing 10A from a 10A-rated supply is possible, but could affect the lifespan/safety of the supply.
The power supply doesn’t come with a mains cable, so you’ll have to grab a spare power cable (preferably with ground), strip it, and grab some compatible crimp-on terminals for live/neutral/ground. I bring this up specifically because my safety guru (an electronics repairman named Tom) noted that without a proper crimping tool, you’re really better off soldering your wire to the connector then squeezing it down with pliers. Don’t skimp on the details with mains power.
From there, $5 in lamp cord from the hardware store and more screw terminals were all I needed to run the 5V DC to my LEDs. Here, you have choices. If you purchased non-individual LEDs, there’s probably a connector on each end of the LED strip. Mine has 3pin JST (5V/DATA/GND) and two additional bare wires for 5V and GND. I attached a 2pin molex connector from a kit Tom gave me instead of splicing my lamp cord straight to the light string.
I’m also toying with the idea of a power distribution box that takes a single molex connection to the power supply and breaks it out to several JST or molex plugs if I want to run multiple light strings. Wiring eight strings’ power in series seems like it could get hairy (read: hot wires).
On a final note, the OctoWS2811 page on pjrc.com tells us that signal ground and power ground should meet at the strip. I lucked out in that my strip already had two wires for ground, but you may need to splice them together inside a connector housing or however you may choose.
The 5V wallwart powers the Raspberry Pi and the Teensy (via the 5V and GND pins on the Raspberry Pi GPIO, which I’ve connected to the 5V and GND pads on the Octo board itself) directly for now, but I’m hoping to add a PowerBoost with a small LiPo cell so that the RPi can safely shut itself down after ~20mins in case of a power outage. The last thing I want is some shoegaze band with 14million watts of amplification causing a problem and knocking the whole system out until I reflash the RPi. This also limits downtime in case someone kicks a plug out. Otherwise we’d have to wait for the RPi to boot back up before the light show can continue.
Please don’t forget to cut the traces on the back of the Teensy in order to isolate the 5V input from USB. You could very easily fry your USB port or worse if you don’t do this.
The OctoWS2811 board is wonderful because it lets you take 2 CAT6 (or, in my case, leftover CAT5e from a spool I got from an IT friend for cheap) leads with RJ45 connectors and break them out to 4 strips each. There are two ways to go about this:
- build a small distribution box that takes an RJ45 in and breaks it out to your strips using JST or something else (just be sure to not run 5V back to the Teensy)
- or just cut one RJ45 plug off your cable and splice each twisted pair to the DATA and GND wires of each strip.
For my testing, I’ve got some breadboard jumpers cut and spliced to the ends of my CAT5e. I just slide the male pin into the JST connector on my LED strip. Once the parts arrive, I will be building a tiny RJ45 -> JST breakout box. The pinouts for the CAT6 cable can be found on the OctoWS2811 adaptor board page on pjrc.com.
I’ve made all the choices above in order to facilitate flexible installation. The 5V PSU can live fairly far away (I think probably 20ft, given our basement’s layout) since the low gauge lamp cord offers very little resistance. This means that I can find some little nook to screw down the power supply close to a free outlet, run the lamp cord to my power distribution, and not have to worry about someone in the crowd ever disturbing the most dangerous part of this whole setup.
The actual server-controller box is on its own power supply and can be connected via regular ethernet cable on a pretty long run. I really don’t want anyone thinking that the box with the dual “ethernet” jacks is some boutique SFF PC and walking away with it.
THAT’S IT, SO FAR
Seriously. I plugged in this setup as described with the BasicTest sketch from the OctoWS2811 library and the string lights up fine! I had to fiddle with the LED string type and double check some numbers, but it seems to be working.
I’m still ~700mi away from the house this will be installed in, so I think it’d be smarter to start looking in to how the actual software portion of this system will work.
Does anyone on here have any experience with NeoPixel/OctoWS2811 programming? I want to grab one of those cheap mic boards and maybe use Processing to convert that to color/brightness data. I’d imagine that it’d be fairly simple to have something abstract modifying the color values of each pixel, while the loudness data from the microphone could modify the brightness, but I’m very new to this.