Concerning timing with a large number of LEDs.

Concerning timing with a large number of LEDs.

I’m planning a new project and want to get some details ironed out before purchasing hardware. I will be running about 700 LEDs from a single controller, and I want to make sure I won’t run into issues with timing. The plan is to use an ESP826 NodeMCU board (80k RAM, 80 MHz clock) to drive ~700 WS2812B LEDs in series. However, at 30us per LED it’ll take 21ms to write data. I believe the max data rate is 800 kb/s, which would give me 38 FPS (? correct me if I’m wrong please). Higher is better, but I think this would be sufficient. I’m a little worried about interrupts too, as these are disabled while data is being pushed, and I want the code to be responsive to button presses.

So, are these WS2812B LEDs a good choice? Am I going to run into other issues with timing? The alternative is using APA102 or SK9822 LEDs. These are a little more expensive, and maybe a little less supported(?), but I wouldn’t mind if they’re better for this application. While I’m here, is the ESP826 a good board to use? It’s got great specs for a low cost, but I’m open to alternatives. Thank you all.

I recommend using parallel output – that is, divide the LEDs into sections, attach each section to a separate pin, and use FastLED to send the data on each pin simultaneously. Even with just two groups you get twice the performance.

As far as microcontrollers, I am somewhat biased (since I worked on the driver) but I really like the ESP32. It is essentially the successor to the ESP8266. It is dual core, 160/240 MHz each, more memory, more pins, more everything. The best part is that you can run interrupt-sensitive code, like WiFi support, on one core, and FastLED stuff on the other core.

@Sam_Guyer Good advice, thank you. It might be overkill, but it’s not much more expensive either. Either way, these ESPs seem like much better tech for the money compared to arduino/others. Same library support for the ESP32 vs ESP8266? Not that I’ve used either yet, but should I have have any concerns about libraries and compatibility using these newer microcontrollers and newer LEDs vs the tried and true arduino/WS2812s?

@Dylan_Lovinger I have been using esp8266 and esp32 to drive large ws2812 arrays without issues.
(Btw 1/21ms is 47fps). I like the fact that the WiFi is integrated with those boards. For library support I would say it depends what you want to do. But I have personally had no issue in that area too.
For esp8266i have nodemcu Rev1 check this link https://youtu.be/YQadLyBwz3M

For what it’s worth, I just brought up an array of 768 pixels, and when I ran them serialized on ESP8266, I got 27ms per frame. The refresh rate was not great, so I cut it in 3, I’m now doing 3x parallel output, and my refresh rate is down to about 9.5ms, or about 100Hz.
@Sam_Guyer is correct that ESP32 is a better chip, although library support on it is also more “new” for some libs, so do a bit of research, or just get one of each like I did and try your code on each chip.
ESP32 is totally awesome for giving you a traceback with code line numbers if you crash (ESP8266 kind of does too, but ESP32 is better there).
Sadly, teensy 3.1 is supposed to be a good chip too, but I had clear problems with the new IDE and teensy support, including hangs at each upload, and other unpleasantness. The total lack of debugging with it even though the actual chip actually supports it, is also very disappointing. Serial.print only takes you so far, especially when you have memory corruption that in turn crash Serial.print