Electronic – Driving WS2812b with STM32 and PWM strange behavior

pwmstm32ws2812b

First of all I want to say that I'm a complete beginner in circuit design but I really want to do one thing. I'b trying to drive WS2812b LED strip using STM32F103 chip. Since WS2812b use 5V and MCU works on 3.3V I use logic level shifter. Here is a scheme:
enter image description here

Here is my LED strip connection sketch diagram:
enter image description here

Here is WS2812b scheme:
enter image description here

MCU generates data stream using PWM. The strip is only 5 LEDs but I use only one for test.
I've connected Logic Analyzer (saleae16) to the data line(2) and I see that data is Ok, i.e. I see 24 waves, each one with period=1,25 us, as required in the datasheet. I have reset time=50us before and after the data sequence.

But the LED doesn't work. I've tried everything. And I was really racking my brain when suddenly found that if I shortly connect additional power wires 1 and 3 (you see them on the scheme) the LED suddenly begins to glow. I can't really explain it. Sometimes, maybe once in 10 the circuit works without this trick. I just switch the power off and then on and it works.

How do I fix this issue? I really hope that someone will help me.

Here is a project schematics.

Best Answer

Additional power wires are set to supply external power to the LED strip.
1. not to overload the controller if it is low-power, and.
2. if several LED bands are connected in series - supply external power to subsequent bands. otherwise, due to the voltage drop in the thin wires of the strips, the latter in the circuit will not receive enough power and will either light up barely or not at all.