I previously asked a question on github regarding the ability to "strobe" using the

I previously asked a question on github regarding the ability to “strobe” using the WS2812 LEDs. I basically want to strobe at 100 Hz (10ms period per color update). On top of that, I also wanted to apply a 10/90 duty cycle factor so that comes out to 1ms for ON (color) time and 9ms for OFF (black) time.

Though, based on the 400 Hz (2.5ms period) upper limit of the WS2812, it seems that even if the Atmel+FastLED can send updates of show(color)-delay(1)-show(black)-delay(9), the WS2812 may “miss” some of those show(black) updates because of its 2.5ms period minimum. The previous delay(1) between the show(color) and show(black) is only ~1ms long while the WS2812 update period is 2.5ms so there could be unpredictable behavior (in my case, it seems to “flicker” unevenly).

I looked around and it seems the APA102 may be able to do this with ease since its PWM is 20 KHz, way more than enough to handle it since its granularity is 50us.

Is my understanding correct here?

Yes, your analysis of why you’re getting uneven flicker sounds correct.
APA102 would be good. Remember you’ll probably want to use a level shifter with APA102 strips (74HCT245 is recommended).

I’d also consider the SK9822 which is very similar but can handle much faster data rates.

https://www.google.co.uk/amp/s/cpldcpu.com/2016/12/13/sk9822-a-clone-of-the-apa102/amp/

@Jeremy_Spencer Just for clarity: “can handle much faster data rates” then the WS2812, correct?
(The SK9822 is 4x slower then the APA102 according to that link.)

In my tests it’s more like four times faster, I’ve had them working at 128 Mhz data rate.

Defined at that speed but I didn’t measure the actual speed. But they do seem to be able to handle much higher rates than the APA102s.

They do get a little unreliable at that speed though! I read on here domehwere that the default FastLED speed is twice the APA102 default.

One day I’ll do a proper back to back test with a teensy3.6 (it’s the fastest board I own).

Ah cool, thank you for the info. Well yes, plenty fast enough then. :slight_smile:

@Jeremy_Spencer be aware that FastLED will let you set any data rate that you want and it will silently cap it at the underlying hardware’s top SPI data rate - which for the teensy 3.0/3.1/3.2 is ~24Mhz. I suspect the 3.5/3.6 don’t get much faster.

I asked this same question on th Arduino forums and got a conflicting answer:

===========

The datarate to the WS2812 is 400KHz, up to 800 KHz:
“Send data at speeds of 800Kbps.”
Each display needs 24 bits of data. 20 LEDs need 480 bits of data.
480 bits/800000 bits/second = 600uS to send out.
100 Hz = 10,000uS. You can update the string 10,000/600 = 16+ times in each period of the 100 Hz duty cycle. Seems enough time to do the 10/90 duty cycle you started with.

============

I’m not sure what’s the correct answer anymore…

Don’t conflate data rate - which is how quickly you can push data to the leds with the led chipset’s own internal refresh rate and pwm clock which is a different thing. The refresh rate of the 2812s is only 400hz (so a full pwm cycle for a 2812 takes 2.5ms).

Also - ws2812’s get really unhappy if you update them more than 400 times per second - you get all sorts of weird flickering.

Phew, that’s what I thought too. Thanks for clarifying.

In my case, I can update 100 times a second and it looks fine. As soon as I apply a 10/90 duty cycle is where it gets weird flickering (1ms/9ms). It might be common to assume that a 25/75 duty cycle could work (2.5ms/7.5ms) but that would violate the Nyquist Rate. I think the lowest it can go is actually around 8 or 9ms.

Thanks @Daniel_Garcia

Just bought some APA102C’s today and confirmed they don’t have any flicker issue!!