I'm having trouble with a circuit I'm building using WS2812b LEDs. The 41 LED pixels are connected to the D3 pin of a Wemos D1 Mini. They are powered by a sufficient strong power source, with a power injection after 20 LEDs.

Actually, they work great. At least, they do when they're supposed to show a single color at full brightness. But when I dim them, even just one or more, they start flickering at random places. Same when I light a few leds instead of all of them.

I'm using the FastLED library. I've had succes before without using a level shifter.

Any idea on what's going on?


  • \$\begingroup\$ Friendly reminder that we are not mind-readers, and there is very little information to work with. What software are you using? How long cables are you using and since the WS2812B requires a 5V data signal in and the Wemos D1 hs 3.3V data signal out, are you even using a voltage level converter for data pin? \$\endgroup\$
    – Justme
    May 18 at 11:59
  • \$\begingroup\$ You're right, I forgot these details in my original post. I edited it: I'm running the FastLED library. I don't use a level shifter. The data line is about 1m from the Wemos to the first LED. I did read indeed on a lot of websites that cables shouldn't be too long, but nowhere what is considered to be long... \$\endgroup\$ May 18 at 12:17
  • \$\begingroup\$ I lowered the voltage to 4.7V and now it seems to work more stable. The closer to 5V I go, the more flickering occurs... \$\endgroup\$ May 18 at 12:38
  • \$\begingroup\$ I'm really confused that it all works fluently when at a lower voltage, this feels counterintuitive. @user263983 What do you mean exactly? That a level shifter would solve the issues? Could I also use a pixel to boost the signal instead of a level shifter? (I don't have one at hand.) \$\endgroup\$ May 18 at 13:22
  • \$\begingroup\$ Deleted previous comment because of error. Meant level shifter is must to be applied. User Justme has a right point. At 5V power, minimum level of logical "1" is 3.5V. 3.3V is pretty close, but not enough. \$\endgroup\$
    – user263983
    May 18 at 18:27

The most obvious issue is that you have connected together a device with 3.3V data output and a device that expects 5V data input. They are not compatible without a level shifter in between.

When you lowered the 5V supply down, it also lowers down the data input voltage requirement so that is why it works better with a 3.3V output.

The WS2812b datasheet says the Vih is 0.7 times the supply voltage. The fact that it has worked for you without a level shifter before is pure luck due to manufacturing tolerances and differences between batches of components. It may or may not work when used outside the specifications, while operation is guaranteed only when used within specifications.

  • \$\begingroup\$ This makes a lot of sense. Thanks for patiently learning me this. However, why would you say it works without flickering when it's on full (white) brightness? Obviously I'm going to add a level shifter, but I have no idea where to start. How and where can I find resources to select the correct one? \$\endgroup\$ May 18 at 20:27
  • \$\begingroup\$ No idea why it is more stable when all LEDs are fully on. Maybe there is so much current flowing in wires that supply voltage goes down and it can read 3.3V signal better. Where to start? Did you try what comes up if you type "WS2812B level shift" to your favourite search engine? \$\endgroup\$
    – Justme
    May 18 at 20:42
  • \$\begingroup\$ An update on this project: I added a level shifter, or something that should pass as a level shifter between the Wemos and the first LED, but still no luck. It's the 74HTC245, but they still flicker. I did notice however that when at least one channel is either full on or full off (0 or 255), it all works. But when it has a value 0-255, it starts flickering. \$\endgroup\$ May 24 at 18:01

Your question misses quite some detail about the circuit, but this seems to be one of the cases where mind-reading actually works.

I feel that you're using a custom assembly of LEDs (or a very cheap commercial strip) and forgot to add the required decoupling capacitors next to each LED.

  • \$\begingroup\$ I'm sorry if I missed to include necessary information. It's just that I don't know what I'm looking for exactly. You're right in assuming they're fairly cheap (I bought them from AliExpress), but I believe there is a small capacitor on each pixel. \$\endgroup\$ May 18 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.