Getting started with matrix layouts

I’m new to PixelBlaze, and I’m trying to determine if it’ll be the right platform for me.

I’m ideating a LED cloak / coat. Presuming it’s a coat, I was thinking it will LEDs run vertically radiating down from the PixelBlaze somewhere near the nape of my neck, and also a few strips running down the front.

This means there will be 8 different strings of LEDs and I want them to behave as a single matrix.

Is that possible? How? Is there any examples you can point me to? For a variety of wiring reasons, I’d prefer to NOT have these LEDs be a single string, as opposed to multiple, but would consider changing that if it’s the only option available.

I’m finding things like https://twitter.com/im889/status/1013107786551472128/photo/1 via Google but that’s pretty vague.

I’m fairly sure it’s possible, but difficult, with an Arduino and FastLED, but I’d like to try with this framework for simplicity’s sake.

Hi Zachary!

Pixelblaze has a mapper, which lets you write patterns in terms of x and y (and optionally z), instead of just the pixel index.

You write a map in JavaScript, which just assigns each pixel a position in space. Then you write your patterns in terms of “world coordinates” between 0 and 1 for each dimension.

Here’s a screenshot of the Mapper tab, which helpfully comes preloaded with an example map generator for a matrix. You can imagine how this would be your cloak or coat.

Pixelblaze’s web editor has docs built-in; you can preview the Mapper’s docs here.

For example code for matrices, the pattern database has a few - look for ones with “matrix” in the title, or ones that implement render2D. This thread is also helpful.

Regarding wiring, if you’re OK with using the slower WS2812s (Neopixels) over the APA102/SK9822 strips, using the 8 channel driver might make for simplified wiring.

If you make this, post some pics in Show and Tell!

That’s amazingly helpful and specific. I’m used to just looking at documentation and that was confusing in this case as least as far as I had determined. Thanks.

Two follow up questions:
Can I use that 8 channel driver with similar but nicer pixels, like WS2813 and WS2815, as well as WS2812?

For that mapper function, I just read the content at the link and I can’t determine if it works with multiple types of wiring setups — I’m sure it would work with a single strand that snakes or zig-zags back and forth, but will it work with multiple (e.g. 8, here) different strips the way I described laying them out? A zigzag pattern will be extremely tricky to wire for this project.

Thanks again — and if I can build this with Pixelblaze I’ll definitely show off the result here!

Look like the 8ch output expander driver is definitely WS2813 capable - check out the description where it lists a few. It doesn’t list WS2815, but I thought the data lines on those were still 5V so I don’t see why not.

I found this thread really helpful for understanding how the driver/expander works. I’m pretty sure that you wouldn’t have to wire it zigzag.

Edit: The screenshot of the expander setup in the thread above shows how you set up indexing into each of the 8 strips that would be wired hub-and-spoke. Even so, the mapper should be agnostic to wiring because you’ll write patterns in terms of x and y, not index.

1 Like

Thanks a lot for the links – WS2813 and WS2815 are, as far as I know, very similar except one takes 12v power in and the other takes 5v power in.

We’re probably at the point where you’ve taught me enough to know that I should just buy a PixelBlaze 2.0 and that expander board and breadboard this up and see what happens, plus figuring out what type of case I can make or buy for it to add as much durability / dust-proofing as possible – I’d love an IP67 project…

1 Like

Yep, @jeff guesses right. The expander board supports all of the common ws281x chipsets and clones that operate at the 800KHz data rate. These are mostly compatible with a few variations, and Pixelblaze and the Output Expander use timing that are broadly compatible. Even 12V LEDs use 5v data signaling.

Keep 12v separate, and feed 5v for Pixelblaze + output expander. The GND (or negative) will be shared across both.

@BanhammersWrath made a pretty sweet 3d printable case that might be inspiring, but it didn’t have IP67 in mind. You might find it useful as a reference though.

Any 3-D printed case is IP67 with enough glue and tape added. :grinning: I just want something that can go to Burning Man and hold a project together durably when it gets banged around. That’s really IP52 or something silly.

Two questions on it for @wizard or for @BanhammersWrath :

Is there room within the case design for the 8 channel output expander board? I could obviously print one and find out experimentally, but might as well just ask.

Any chance you could change your listing on Prusa to include the words “Pixelblaze” and “enclosure” for other people? I actually tried Googling for this extensively before asking (and looked on Thingverse directly as well), and with Pixelblaze as two words I came up empty. (Also the word “case” instead of also “enclosure” doesn’t help, because things like “is pixelblaze code case sensitive” comes up instead of talking about physical cases.

@ZacharyRD Good tips, I updated the titles and tags to reflect Pixelblaze and Enclosure for easier searching. I don’t have them up on Thingiverse due to reliability issues (couldn’t access to upload at the time) but i’ll mirror to there too later today.

At the moment there isn’t a case model that fits the channel output expander board but i’m guessing I can easily make one that does. Do you intend on using only a PB + Channel Expander or do you also intend on using the sensor board too?

@BanhammersWrath – You are amazing! I’m planning to do just the channel output expander board and base board, sans the Sensor Expansion to get the proof of concept working, because, frankly, working with sensor boards on Arduinos is a pain in the neck, and I haven’t used a PixelBlaze setup before now.

However, I’m buying all three boards right now, and if it’s as easy as the website makes it sound, I’d love to get it working with either a sound or acceleration sensor onboard by Burning Man.

Therefore, would it be too much of a pain in the ass to answer “both” options? I have access to a 3-D printer, but near zero design skills to tweak designs.

Sealing dust ingress is the easy part, if the case is the right size and has holes in roughly the right places, so that it has the durability of the 3-D print instead of the durability of, well, a bare circuit board.

Hopefully this is useful to a lot of people – for my last project, I used a Circuit Playground Express in large part because Adafruit sells a nice plastic enclosure for it for just $5. ( https://www.adafruit.com/product/3915 btw; highly recommended).

(And sorry it took me a week to reply)

Thank you so much in advance!

A post was merged into an existing topic: New to pixel mapping - map a cylinder