ESP32 FastLED, and APA106 noise

Hi All,

I've been wrestling with this for some time, but I think I finally have a handle on it. With 16 LEDs, I get lots of flashing. I tried all of the suggested software fixes including delay(1) before fastLED.show(), yield(), etc., with no resolution.

The ESP32 is connected to the LEDs through a 74HC125. Today I realized that it could be a hardware issue, so I checked the data in line on a scope, and saw lots of noise. I added a 470pf cap on the data line between the ESP32 to the 74HC125 to ground, and the LEDs are now working perfectly. After doing further research, I see that a resistor is sometimes recommended in series with the microcontroller data out line.

I have to finalize a pc board, so I'm wondering if I should stay with the 470pf cap, or do further testing with a resistor between the ESP32 and 74HC125.

Advice is appreciated. Thanks.

Schematic please.

Easier to draw this, to isolate problem. I'm just guessing on the resistor value. The capacitor value is 470pf.

OK.

  • use 74hc14, or 74hct14, in preference to 74hc125. 74hc(t)14 has Schmitt Trigger inputs which will deal better with 3.3V signal from esp. use 2 x inverters in series, so signal not inverted
  • 150R should be between buffer chip and led strip, close to the first led. also a little low, change to 330~470R
  • 470pF should be 470uF and across power wires going to strip, close to first led, not on data wire
  • 0.1uF bypass cap needed for buffer chip, close to power pins of chip
  • your schematic does not show how buffer chip is powered, should be 5V not 3.3V

The 74HC125 is powered by 5v, and it does have a bypass cap on it. Sorry for not showing that. Also, there is a large electrolytic on the power supply. I will make all of the changes that you suggest. Thank you.