WS2812B flickers sometimes and I have no idea why.

Hello everybody. Im currently setting up my own "Ambilight" with WS2812B LED strips and I don't know what I am doing wrong so I hope you can help me.

So let me explain my setup real quick: I have a 5m long WS2812B strip, which receives its power from a 50W power supply. Im aware that thats not enough, but Im not planning on having to use so much power. I measured the output voltage and its constantly at 5V, so theres no error. The same power supply also powers an voltage regulator, which outputs 3.4-3.6V (its a really cheap one and its almost impossible to regulate it to exactly 3.3V, but I also dont think that thats an issue). This then goes into an ESP8266-01, which has a self written sketch on it, where I basically execute the rainbow example provided by Adafruit.
The data goes out of the ESP to the strip. (Yes, I included an 300Ohm resistor). So yea, thats my setup in a nutshell.

The problem is that the effect plays properly, but sometimes for a split second all pixels are lighting up in the wrong color. Then the effect continues playing as desired. I also tried other effects and the issue persists. And I highly doubt that theres a software issue because I can basically copy any code examples and still get the same issues. I also tried adding the capacitor, but that doesnt change anything either. (I also think my power supply already deals with that, but Im not sure.)

So what do you guys think? Any ideas what could be wrong? Im really at a loss here and its really frustrating. If you want pictures or similar: Im currently not home, so I cant take them right now, but I can post them later on if needed.

I personally think that the data voltage might be too low. (3.3V)
Or maybe theres too much noise influancing the data cable? If thats even possible...

Anyways, Im looking forward for any answers. Thank you! :slight_smile:

Does it flicker if LEDs lighted up but you are not changing their color/brightness?

I personally think that the data voltage might be too low. (3.3V)

Put two gates of a 74HC04 in series at the ESP output. Ground the other gates unless you can find a use for them.

I would recommend 74hc14. As with 74hc04, you must use two gates in series. The important point is to power the 74hc14 with 5V so that it outputs a 5V data signal to the strip. The 74hc14 has Schmitt trigger inputs, which should be less likely to have problems reading the 3.3V signal from the esp. That's why they were recommended to me by another forum member, and I found this to work well. Don't forget to put a 0.1uF cap close to the chip's power pins.

No experience with addressable LEDs on an ESP8266.
But doesn't the ESP8266 want time for itself during WiFi updates.
A yield() could be needed in the code (which OP didn't post).

First of all: Thanks to everyone for so many ideas! And yes, my code has yields() in it, so thats not the culprit. I might try passing the data from an Arduino, since those outputs are 5V, if Im correct. And if it works I know I have to buy these two inverters as suggested.
Again, thanks a lot.

Little update: I tested it with my Arduino which has 5V and it works with no errors! So most likely the voltage is too low. I bought the inverters and hopefully it will work when they arrive in the next few days. Again, thanks :slight_smile:

When you say “bought the inverters” which sort of implies you bought more than one, I trust that you understand that the 74HC14 (or 74HC04) is a chip containing six inverters so that for any given data connection to the strips, you use two of those six inverters cascaded. If you only need to drive one strip, then each of the other four inverters not required needs its input connected to ground (or Vcc) and its output not connected.

One chip can drive up to three strips. Of course, having spares for other projects is an excellent idea. :grinning:

Haha, yes I do x) I just thought I could buy a few more for future projects, since they only cost me like 0.50€ per piece.