How many WS2812b's can a Propeller drive?
emiljt
Posts: 45
in Propeller 1
I'm sorry if this has already been asked (I tried looking first).
I'm curious how many ws2812b's a Propeller cog can drive at a decent frame rate (say 30fps)? I found an article talking about a 16Mhz Arduino running 1,000+ at 30fps, but I'm brand new to the Prop, so I'm just guessing when I assume one cog could handle this as well. How many of these have you guys driven with a Prop and what did you use to do it (PASM, C, Spin, one of the library drivers)?
I'm curious how many ws2812b's a Propeller cog can drive at a decent frame rate (say 30fps)? I found an article talking about a 16Mhz Arduino running 1,000+ at 30fps, but I'm brand new to the Prop, so I'm just guessing when I assume one cog could handle this as well. How many of these have you guys driven with a Prop and what did you use to do it (PASM, C, Spin, one of the library drivers)?
Comments
Some quick math:
Each pixel/led takes 24 bits of data.
Each bit of data takes 1.25µs (That isn't a propeller limitation, it is required by the ws2812b)
So it takes 30µs / pixel / frame.
If you want 30 fps, then you have approximately 33333µs to send data, so you can control ~1100 LEDs on a single line, just like the arduinos that you mentioned.
However, all of that is assuming you only are using 1 output line. If you have 2 data busses, you could get double that, etc. A single cog, with code written in assembly, could probably control 4 lines fairly easily, though I will admit that I don't have any example code to back that up.
The bigger issue is how you are generating this data. If it is a simple pattern that you can generate on the fly, then you could probably get all 8 cogs running, each controlling 4 output lines. If you need to generate the data in a second helper cog, then the limitation will be more based on how you transfer and store the data. I can give more insight here if you give more details on what your end goal is.
800kHz bitrate
24 bit/pix
30 f/sec
==> just above 1000 on one pin
at 80MHz => 100 Clocks/bit = 25 instruction / bit - easily sufficient to send in PASM
but you could as easily handle byte/word/long reads from memory and parallel output
on 8/16/24/32 pins with 1000 LEDs each
so the question is more where to get the data from
RAM = 32kB
so 1000 pix * 24 bit => 3kB
so RAM should be good for 10 000 pixels for picture frame buffer
how do you update it?
you want to play video? from SD?
there e.g Tachyon gives sustained read rates at around 250kB/s (old version 2.7 I think)
thats almost 3000 pixels/second at 30fps
I haven't used that many, but your question made me curious
so I just ran some numbers ...
I only used Tachyon on a few hundred LEDs to play with
Interrested to hear from people who actually implemented it how many they can drive
EDIT: @bobjr hey bob - didn't see your message ...
With a 24b Data to the LED, why do they need dithering ?
"Fadecandy's temporal dithering algorithm can create super-smooth fades and nuanced colors at a remarkably wide range of brightness levels. The controller hardware updates every LED about 400 times per second to rapidly oscillate between nearby brightness levels for each color primary, gaining some additional brightness precision. This precision gets even higher when averaging over time or space, meaning that larger or more diffuse sculptures achieve even higher levels of precision in low-brightness colors. In addition to this dithering algorithm, the Fadecandy firmware's 48-bit color processing pipeline includes gamma correction, white balance, brightness control, and keyframe interpolation."
I know when I played with some APA parts and used the HSV colorspace the fades were a bit lacking. Especially if you allow for some form of global brightness control. Think very subtle fades where you don't want people to see the steps. FastLED also has the capability to do some temporal dithering.
Interesting, maybe that 'remarkably wide range of brightness levels' is the key here, meaning 8 linear bits per colour are not enough.
Does that mean we will see 3 x 12b LED strings next ?
I think more practically, a 7 cog, 28 driving pin * ~1000 leds long would be the way to go and simplify wiring.
The data is packed 4 leds to 3 longs, so I used spin to do the heavy lifting on the writing side
You could do temporal dithering on the data in the hub ram using another cog.
Let me tidy it up a bit and post tonight
you can feed in power everywhere,
does not need to run through all the 1000s of LEDs
it is just the data line, that is cascaded
and yes - draws a lot of power
In it, the planets (each representeed by a led color) chase along a big arc led strip representing the ecliptic.
I'll tidy the driver bit of this up at some point, and stick it in the obex
Sounds pretty cool. Do you have a video of it in action?
What got my thinking about this though was a new Space Invaders game I saw at an arcade. I'm not really into arcade games, but the screen on this was AMAZING to see in person. When I took a closer look, they seemed very similar to the ws2812 (if not the ws2812). rawthrills.com/games/space-invaders-frenzy/
I think that the WS2813 is supposed to work similarly to a WS2812 but allow a single LED to fail and not disrupt the remainder of the strip. "Dual-signal wires version, signal break-point continuous transmission."
http://www.szledcolor.com/download/WS2813 LED.pdf
These days first thing I often do is stick the strip down to Aluminum strip, eg 10x3mm. Then you have a 'cane' that keeps things working as they're used for various projects. Its still possible to bend the cane if required.
I have been using Adafruits OctoWS2811 Adapter to send data to multiple strips via cat 6. I power the strip from a power supply closer to the strip location.
https://www.adafruit.com/product/1779