Connecting LED Strip to Pixelblaze

Once our Pixelblaze is configured for a local WiFi network and type of LED strip, the next step is to actually make that electrical connection. It is also time to unplug the Pixelblaze from our computer, because once our LED strip is connected we will need more power than what a computer USB port can safely deliver.

SK9822 5m60 LED strip package

For this particular project, my Pixelblaze will be controlling one of these (*) built from SK9822 LED modules, they are signal compatible with APA102 which is one of the control data types supported by Pixelblaze. This strip is 5 meters long with 60 LED modules per meter for a total of 300 pixels. That’s more LEDs than what I can track in my head, but well within a Pixelblaze’s ability as it could drive thousands of LEDs.

SK9822 5m60 LED strip wires

This particular package had a label which described the role of each wire. Not all of them have this information presented, and we have to determine 5V and GND rails using a meter. But even when we have a convenient label this time around, it is still worthwhile to double check. Not every LED strip vendor follows wiring convention: the red wire is not always 5V and the black wire is not always GND. Getting it wrong could destroy both our LED strip and our Pixelblaze. [UPDATE: Good news! Pixelblaze V3 features reverse polarity protection so it would gracefully tolerate reversed +5V / GND without damage, until we realize our mistake and rewire it correctly.]

Thankfully these strips were designed to be cut to length, with solderable pads for each of the four lines. This means we have conveniently accessible pads to check for continuity between a GND pad and (what we believe to be) GND wire, and 5V pad to 5V wire.

SK9822 5m60 LED strip connector on PixelblazeV3Thankfully it is less critical to get data and clock lines right. A mixup would mean nonsensical patterns or no patterns at all, but no permanent damage. For this particular strip, the data and clock lines were inverted from the order on Pixelblaze circuit board hence the yellow/green crossover visible in this picture.

The row of headers visible on the right is an expansion bus, capable of hosting the optional sensor expansion board which I plan to incorporate into this project down the line.

Because I had configured my strip settings to be at low (10%) brightness, I could power this entire rig with a portable USB power bank advertised to deliver up to 2A. This was enough to verify I could run prebuilt patterns on my newly connected LED strip. But how much more power might this setup draw? Time to do some math and figure it out.

SK9822 5m60 LED strip with PixelblazeV3 on USB power bank

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Pixelblaze Project Begins With Initial Setup

A Pixelblaze is a small board who generates data signals for a color LED strip to display interesting dynamic patterns. These patterns are described via a program written in a web-based editor running on the Pixelblaze itself. It is a nifty little self-contained unit for projects that involve a large number of individually addressable LEDs. I have a prototype Pixelblaze V3 on hand for a candidate project. I’ll be using my blog here to publish a first draft of Pixelblaze general setup and configuration information, as well as documenting my work to apply a Pixelblaze to a specific LED project.

The first thing to do with a freshly unpacked Pixelblaze is to connect it directly to a computer’s USB port. A standard computer USB port will not provide enough power to drive a large LED strip, but it is a stable and known power source. It is useful for verifying a Pixelblaze was undamaged in shipping and for performing initial setup.

Ubuntu WiFi selection

Less than a minute after being plugged in, a new Pixelblaze would show itself as an open WiFi access point our device could connect to.

Pixelblaze network connect

Once connected, open a web browser and try to load any URL, we will be redirected to Pixelblaze WiFi Settings menu. The browser will complain there’s no internet access but this is expected: we’re just using this to connect to an actual WiFi access point. Select the network we want to use and login.

Optional: check the discovery service box. Because after this step is complete, Pixelblaze will not longer be an open access point: it would have joined the new network. To reconnect to Pixelblaze and resume setup, we will need to know its IP address. If this is not possible (or just inconvenient) check the discovery service box. This is an optional feature to let a Pixelblaze announce its address on a network.

Pixelblaze discovery

Once Pixelblaze’s own WiFi access point disappears, our device can rejoin the original network and visit to see addresses for discovery-enabled Pixelblaze on the same network.

Pixelblaze connected

If discovery is not enabled and the Pixelblaze IP address is known, we can point our web browser to that address. Or if discovery is enabled, we can clicking “Open” from the Pixelblaze Discovery Service list. Once a Pixelblaze is configured for a WiFi network, the “Saved Patterns” menu is where it will start.

Change to Strip Settings menu to configure our Pixelblaze for our LED strip.

Pixelblaze Strip Settings

Name: This will show a Pixelblaze default name, we can optionally replace it with a friendlier one.

Brightness: This is a slider bar that defaults to 100% brightness. In the case of most LED strips, this will be a blindingly bright setting that consumes a lot of power. For our initial test and experimentation, we don’t need to blind ourselves or burn that much power. Move that slider lower: somewhere in the 10-20% range will still be easily visible.

LED Type: Change this to match the communication protocol used by the LED strip that the Pixelblaze will be driving. If the modules on a LED strip is not on the list, check online to see which of the listed modules are compatible and select that. Example: SK9822 LEDs are compatible with APA102, so we can select APA102 for LED strips that use SK9822 modules.

Pixels: Change this to match the number of modules on the LED display that the Pixelblaze will be driving. Example: a 5 meter long strip with 60 LEDs per meter will have a total of 5 * 60 = 300 pixels.

Data Speed: Leave this setting alone for now.

Color Order: Leave this setting alone for now.

Once the Strip Settings have been updated to match our intended LED output device, we shift our focus to hardware. Unplug the Pixelblaze from our computer, and warm up our soldering iron, it’s time to connect LED strip to Pixelblaze.

Shine At Supercon: Pixelblaze Cube

When I was working on my time-lapse camera badge hack for last year’s 2017 Superconference badge, I had the luck to meet Ben a.k.a Electromage, creator of Pixelblaze. He was sitting across the table from me and had to stare at the backside of my Luggable PC Mark II for most of the weekend. Our paths crossed again earlier in 2018 at the Bay Area Maker Faire, where I was working for Tindie‘s booth and he stopped by to drop off a sample Pixelblaze unit as he sells on Tindie. After my booth shift was over, I stopped by his booth set up to promote Pixelblaze and was impressed by what I saw.

I don’t recall anything demonstrating Pixelblaze at Supercon 2017, but Ben brought a nice attention-pulling demo for Supercon 2018: a sound-reactive LED cube controlled by Pixelblaze with optional sensor expansion board. It was sitting in front of him on the badge hacking bench as he worked most of the weekend on that ESP32 mesh network. Here’s a view of the cube looking down the length of the bench at all the other badge hackers.

Pixelblaze Cube

The cube’s five visible sides each had an 8×8 = 64 LED array, and they react to changes in sound volume. The microphone is part of the sensor expansion board and is paired with its own processor to dynamically adjust to local ambient noise level to pick out sharp changes. All that audio processing was required, Ben explained, because electronic microphones don’t react to sound the same way human hearing does. His algorithms make the sensor board act similarly to how a human being perceive sound. All this is necessary so a Pixelblaze program reacting to sound would “look right” to a human observer.

After seeing Pixelblaze in action at Bay Area Maker Faire, I added “play with Pixelblaze” to my electronic to-do list. Seeing this sound-reactive demo cube in action at Supercon 2018 promoted it higher on my list. And now, thanks to an unexpected series of events and Ben’s generosity, I now have one on hand I could play with.

My first challenge: I don’t have an individually-addressable LED strip/array to use with this Pixelblaze. Reading Pixelblaze documentation I learn the APA-102 series of LED modules are the best match for Pixelblaze capabilities, so I’ve ordered a meter long strip to start. I’m looking forward to seeing what I can do with it.