A cubic array of LEDs; to Octo or not; and other Q's wrt architecture and programming

Status
Not open for further replies.

mummyboy

Active member
All,

I'm about to embark on a n00b project, that is, one obviously beyond my skills but where i expect to learn a lot anyway, and i have some questions. I hope to create a cubic array of lights which will be used first for general eye candy like 'fire', and second to create a 'tornado and other animated stuff (3dtv?)

After going back and forth I'm currently thinking on ws2811 pixels (instead of ws2801) because there's much in the way of ancillary pieces (octo, fadecandy, etc. program code etc.) and they're lower cost too. Thoughts on this selection? Its not too late for me to change this. I plan on using around 512 pixels (or multiple) each separated by approx. 4" and distributed as an 8 x 8 x 8 cube.

Im wondering whether it's better to use one continuous strand of pixels folded in 3D to create 8 planes or alternately use a separate string for each planar surface, or use 64 separate vertical strings. Thoughts? One string is obviously easier to configure but i cant get my head around the programming task and wonder if it'll be significantly more difficult (or easier) to create the animated effects and whether performance will be an issue. 64 vertical strings is more complex to set up (need to break out 64 power and data connections, aggregating cables etc. ) but may be easier programming 'cause all pixels fit nicely into a cubic data structure. Thoughts?

Im planning to use Teensy 3.1 to control the whole thing and wonder if ill need to use the Octows2811 too? If i use one Octo i can have each output support one planar surface for a total of 8 surfaces. If i want to use 64 strings i'll need 8 Octos, correct? Do i need one Teensy for each Octo or can a single Teensy 3.1 drive multiple Octos? Cost is an issue so id like to keep the number of bits used in check. My n00b understanding is that i can attach 8 strings directly to the Teensy and forego the Octo, correct? I know I'm missing something here and hope to get some clarity. The Octo presumably offers performance advantages but does it make the programming task easier too? For this application is the Octo strictly necessary? How should i consider performance issues?


Thanks all,

Mb
 
My n00b understanding is that i can attach 8 strings directly to the Teensy and forego the Octo, correct?

This used to always work with the older strips. Well, at least for some definition of "work"... the 3.3V signal going to 5V LED strips had very little margin for noise. If your wires were longer than a few inches, it was tricky to find the right impedance matching resistors for best signal quality. But if you overcame those minor issues, it worked.

Today, many of the new WS2812B strips do not accept 3.3V signals. But some still do. Even for those that do, it's more reliable to convert the signals to 5V. That's why we started making the OctoWS2811 Adaptor board. It increases the signals to 5V and has the 100 ohm resistors that perfectly match CAT6 cable.


The Octo presumably offers performance advantages but does it make the programming task easier too?

On the software development side (actually using the library), OctoWS2811, NeoPixel and FastSPI_LED all work about the same way. You call functions to set the color of pixels in memory, and then you call a leds.show() function to cause all the LEDs to update.

If you're looking to create fast animation, OctoWS2811 is a little easier, because your code gets to run while the library is updating the LEDs (and it updates 8X faster, because it's 8 lanes in parallel). With the others, the library hogs the CPU until it's done updating the LEDs. If you don't care about really fast animation, they're all about the same.

For this application is the Octo strictly necessary? How should i consider performance issues?

The update time is 30 us times the strip length. This is always true, since the WS2811 LEDs use 800 kHz data and there's 24 bits per LED. 24 bits at 800000 per second is 30 us per LED.

If all 512 are in a single strip, that's 15.36 ms. So the question is how long would your code take to compute the next frame? It really depends on how complex your animation is, and how good your programming skills are. If you can compute the next frame in 5 ms (which is probably pretty doable without really difficult coding), then you'd be able to update the animation at about 49 Hz using NeoPixel or FastSPI_LED. With OctoWS2811, the LEDs update in only 1.92 ms, and that happens during the 5 ms you're computing the next frame, so you can achieve an update rate of 200 Hz, using essentially the same programming, just a different LED library and 8 vs 1 data paths.

As you can see, 512 LEDs in the region where the single signal, CPU hogging libraries start to become slower, and just at the beginning of where OctoWS2811 isn't "overkill". You can probably use either approach. Hopefully this explanation helps with understanding the performance issues.
 
Paul, thanks that helps quite a bit. I'll be using 2811 parts, do the same voltage cautions apply? I have no way of knowing whether ill get older or newer parts so i guess i have to assume the worst case. Tho for practical purposes maybe it doesn't matter since i intend to use > 512 LEDs and maybe i should expect to need the higher perf Octo provides and plan accordingly.

As for programming; does the octows2811 library supplant fastled, neopixel etc? Can they be used in conjunction with one another?

Also, the Octo, seems to mount directly onto Teensy 3.1 w/ pins. Does that leave room for other pin outs? I'd like to add several analog pots to control intensity, speed and color range.

From the various intros I've read i get that each time an LED is altered in any way *all * of the LEDs in the chain must be updated in succession, correct? Is this also true If only one of the LEDs on one of the Octo channels is changed, do all of the channels do need to be updated?

Because of the cubic form this piece aims to take -where each strand is folded and has x, y, and z aspects-i was thinking I'd create a cubic array structure and update the array, then map the array to the folded strands and write. Does this make sense?

Mb
 
And one more thing ...

The sample code advocates using 100ohm resistors on the pins that feed the LED strands. I thought the Octo obviated
the need for these resistors. Did i misread/misinterpret something?
 
Oh, so many questions. I'm going to answer some quickly. Hopefully this helps, but you really do need to dig into these details a bit and ultimately make the decisions regarding your project. I can't answer every question at every step along the way of this project.

Paul, thanks that helps quite a bit. I'll be using 2811 parts, do the same voltage cautions apply?

Yes. Buy the $10 OctoWS2811 adaptor board and follow the guidelines on its page. Don't be cheap and try to save $10. That board was designed based on the common troubles from well over 100 of these large LED projects I've helped people troubleshoot since releasing the library in early 2013. That $10 will very likely save you a lot of frustration.

There are a LOT of very old threads on this forum where you can read about the troubles many large LED projects have experienced. That $10 board doesn't guarantee success - you still have to do a lot of things right with power delivery and wiring - but it will automatically solve some of the really thorny problems. I made that product because so many people had so many issues with the signal quality. Do yourself a favor and take advantage of all that painful learning experience from first year of OctoWS2811-based projects. It's only $10.

As for programming; does the octows2811 library supplant fastled, neopixel etc? Can they be used in conjunction with one another?

Usually you'd use one of these 3 libraries. There's no reason to use more than one.

From the various intros I've read i get that each time an LED is altered in any way *all * of the LEDs in the chain must be updated in succession, correct?

Yes, that's how the WS2811 controller works.

Is this also true If only one of the LEDs on one of the Octo channels is changed, do all of the channels do need to be updated?

Yes, with OctoWS2811, all 8 channels update simultaneously.

Because of the cubic form this piece aims to take -where each strand is folded and has x, y, and z aspects-i was thinking I'd create a cubic array structure and update the array, then map the array to the folded strands and write. Does this make sense?

No, actually, I have absolutely no mental picture of what you're trying to describe.

I suspect you might be trying to "over think" this project. You're only talking about 512 LEDs. I know that probably seems like a lot, but really it's a fairly small project relative to OctoWS2811's capability. Because each of the 8 segments will be only 64 LEDs, OctoWS2811 will transfer all 1536 bytes of data in only 1.92 ms.


The sample code advocates using 100ohm resistors on the pins that feed the LED strands. I thought the Octo obviated
the need for these resistors. Did i misread/misinterpret something?

The adaptor board has the recommended 74HCT245 buffer and resistors. It's designed to work with CAT6 cable, which gives excellent signal quality.

I highly recommend you use the $10 adaptor board and follow all the wiring recommendations, especially having the Teensy ground and LED power ground meet at or near the LED data inputs.
 
Status
Not open for further replies.
Back
Top