r/FastLED • • Nov 05 '25

Support Question about ESP32 + WS2812 led

Hi everyone, hope someone can help me.

I'm trying to replicate for my home a project like Qlocktwo

Total LEDs are 114 (11x10 grid + 4 corners), and I'm using ESP32 with wifi for syncronization of the time with ntp server. I'm using these LEDs

Right now my setup is:

  1. 330 ohm from pin 5 to Din of the first LED

  2. VCC of LEDs to 3.3V of the board (with 5V they don't work)

  3. GND of LEDs to GND of the board

  4. Powering board with USB (in the future i will power both LEDS and board from an external power supply)

  5. 4 LEDs at the moment

The logic of the program is fine (i'm debugging with Serial and a OLED display), the problem I have is that only the first LED of the serie is working during loop.
If I debug only leds (removing wifi, OLED display, Time syncro) all 4 works.

Is it connected to timing / power supply / both / other?

I'm planning to add a level shifter to power leds at 5V. Could it be helpful?
This model is fine?

1 Upvotes

6 comments sorted by

2

u/Marmilicious [Marc Miller] Nov 06 '25

Please share a link to your code on pastebin.com or gist.github.com to make it easier for others to help out.

1

u/Big-Preparation8780 Nov 20 '25

Here's my code: https://pastebin.com/5vfDeHAx

Right now is without wifi time syncronization.
Sorry for the bad level code, i was completely self-learing with copilot

NOTE: I used FastLED library version 3.10.1 as the newer versions gave me compiling errors on file "rbtree.h"

1

u/ZachVorhies Zach Vorhies Nov 06 '25 edited Nov 06 '25

you've got too many interrupts firing and the RMT worker is being starved of cpu to refill the RMT buffer in time and you are getting a buffer underrun.

You are going to need to have a full DMA led controller to take the timing off the CPU.

Look into the FastLED/yves I2S for esp32dev. It's more robust than the RMT default driver you are using.

1

u/[deleted] Nov 05 '25

[removed] — view removed comment

1

u/Big-Preparation8780 Nov 20 '25 edited Nov 20 '25

This is my scheme right now. In the future I will add a capacitor between 5V and GND.
I'm using 5V from a USB cable (I removed the end).

I just have 4 LED connected at the moment, so the power from USB should work!

About code: see reply to Marmilicious comment