Hi guys, I'm working on a custom project and having some issues with driving LED strips.
I'm using a custom board, which has an ESP32 and a level shifter (NXS0108PWJ).
The board takes 5V from a 6A supply, and has an onboard 3V3 regulator which powers the ESP. The level shifter gets both 3V3 and 5V of course. There is a Molex KK396 connector which has 5V, GND, and a data pin from the level shifter, which I am using to drive the WS2812b LED strip.
For the software I am running WLED.
The problem is: when I connect a LED strip, the correct number of LEDs light up (as configured in WLED), however they display random bright colours. The LED strip is connected via a cable I have crafted myself (crimped) with KK396 at one end, and JST-SM at the other (which matches what the strip is delivered with).
I have also crafted a short "test strip", which has wires soldered directly to it with a molex KK396 connector at the end. When I plug that in, IT WORKS. I have tried many other things, including crafting a few more molex<->jst cables, however the result is always the same.
I have also tried adding a couple caps to my 5V rail on the board, and a 220R resistors on the data line, strip side.
Using my scope to inspect the signal and power rail at the LED strip end, I see this (zoomed in) - red is VCC, blue is DIN, ~125ns/div:
Which honestly doesn't look very nice
I am thinking that I need more caps as it looks like the power supply is rippling pretty badly. But I don't understand why the ripple starts ~500ns sooner than the actual signal rising edge?
Any help and pointers much appreciated, with thanks.