20,000 LEDs sounds like an amazing amount of blink. When we start to consider the process of putting together 20,000 of anything, and then controlling them all with a small piece of electronics the size of a postage stamp, we get a little bit dizzy.
To be fair, we’re not sure that [yves-bazin] has put together 20,000 LEDs yet, but he HAS demonstrated the feasibility of driving 20k LEDs all at once thanks to some editing of the FastLED I2S library and hardware GPIO expansion. The trick is in using a shift register to convert a single ESP32 pin into five outputs. Using sixteen GPIO pins, with each connected to a HC595 shift register, and all of them connected to the same 17th and 18th GPIO pins for latch and clock, those sixteen outputs are expanded to 80 outputs, which are used to drive strips of 256 WS2812s, yielding 20480 LEDs controlled. The shift register method allows the ESP32 to operate at five times the speed of the LED strip, so it can push out the bits on each pin for five strips, latch, and then repeat for each bit for 256 LEDs, then start over for the next frame.
[yves-bazin] hasn’t yet built the full 20,000 pixel display, though his videos do show off a 6,000 pixel video wall, but he’s able to demonstrate that his concept is working by plugging a smaller panel into each of the outputs successively to show that the correct signal is still making it out of the ESP32 for all 80 strips, at an impressive 130 fps.
The demonstration video is on reddit. Using the 74HC595 shift register for GPIO expansion is nothing new, and we’ve seen an ESP8266 with shift registers for 157 lights, but using it to control 20k LEDs is pretty impressive, especially now that there’s a library for it for ESP32. Bring your sunglasses.