Number of LEDs per OctoWS2811 output

theovn

New member
Hello everybody. I am a programmer that have dabbled a very little bit with microcontrollers and new to the Teensy world.

I'm planning a small/medium sized LED project: a grid made up of LED strings (not strips) consisting of about 2000 LEDs. The LEDs will be controlled programatically (code running on the Teensy) and not from an external source. The size of the grid to be ±5x4 meters (±16x12 feet) with pixels every 10cm (4inches) (50x40 LEDs).

I am planning to use a Teensy 4.1 with the OctoWS2811 Adaptor, and to get 4x 5V-WS2811 strings of 500 LEDs (they have additional power inputs every 100 LEDs). I would have preferred 12V strings but I understand that the strings may require a 12V data signal making them incompatible with the OctoWS2811 Adaptor?

I assume one would attach each of these strings to a separate output channel on the OctoWS2811 Adaptor, i.e. 500 LEDs per output channel? I understand that the OctoWS2811 library will hookup the 4 channels and make it available as continuous addressable space.

I am wondering, though, what factors determine the maximum number of LEDs per output channel as well as over all 8 channels – hard cap on the number of LEDs, the length of the string cable (in my case ±50m/164feet, or something else – without having to use additional components?

Thank you in advance for your advice.
 
The 12V LEDs usually have 5V control signals. I’ve used them with an OctoWS2811 myself. As for max. LED limits, the main restriction, really, is the frame rate. Because each pixel takes a fixed amount of time to refresh, the more pixels you have, the slower the total refresh time.

The other restriction is memory. The OctoWS2811 driver (see the examples here), for RGB pixels, needs two int[] buffers having a size of LEDsPerPin*6. That’s 2*4*LEDsPerPin*6 bytes.

Hope that helps a little.
 
Thank you very much. That makes sense.

I wonder if the the memory restriction could be lessened using a PSRAM chip? Or is this chip's memory a separate type that is too slow? Thanks again.
 
On older Teensy 3.x, each pin was limited to 1365 LEDs, and the output had a fixed set of 8 pins which gives a maximum of 10920 LEDs per Teensy. The 1365 limit is rooted in use of a single DMA transfer which could at most output 32K bits, which becomes 1365 LEDs when each LED needs 24 bits.

EDIT: originally this message said OctoWS2811 on Teensy 4.1 could handle longer than 1365 LEDs, but that statement was incorrect. The maximum number of LEDs per pin is the same as Teensy 3.x, 1365 RGB or 1023 RGBW.

But on Teensy 4.x you're also not limited to only 8 pins. In theory you could create a pinlist which uses all the digital pins. In Arduino, click File > Examples > OctoWS2811 > Teensy4_PinList to see how.
 
Last edited by a moderator:
But do keep in mind the communication is 800 kbits/sec, so each LED on a strip takes 30 us. You also need to allow 300 us between frames. If you want to achieve 30 Hz refresh rate, that translates to a maximum of 1100 LEDs per pin. If accurate refresh rate is important, even though Teensy 4.1 is very fast, probably wise not to push too close to that limit to give your code some "breathing room" for code to consume a small amount of them time per update.
 
PSRAM shouldn't be needed.

Even if you connect 1000 LEDs to all 42 pins, that's only 42,000 LEDs. So each buffer only needs to be 126,000 bytes. You can still easily fit the drawing buffer into the extremely fast DTCM (RAM1) memory to enjoy the fastest possible access for doing whatever animation or other work is need to compose each frame, and put the display buffer into RAM2 for DMA access.

But supplying enough power to light up that many LEDs... now that is going to be a huge project. If each LED can use 1/4 watt, you'd need to design 10 kW power delivery! You'll need special industrial-scale AC mains power service long before a PSRAM chip is required.
 
Back
Top