Advice Needed - ESP32 D1 Mini to 24v WS2811 RGB

hey y’all! created this account tonight after three full weeks of bashing my head on this. enjoyed the ups and downs of mosfets and PWM to get two 24v CCT strips working on my ESP32 D1 mini from AZ Delivery

but.

dear god. I have tried everything for the WS2811 5 meters of DC24V 720 Black PCB. I have tried resistors and mosfets and first a low power bi directional level shifter and latest a more purpose built unidirectional level shifter (74AHCT125N). I have tried with the chip connected to a 24v → 5V usb plug, I have tried controlled directly with an adjustable power supply.

I have seen every kind of crazy behavior except the right behavior. Last night jacked into the USBs 5v pin to my 74AHCT125N and got the closest to finished but only when my multimeter’s ground pin was connected to the ground power distribution block (V+ not connected to anything) but as soon as I pulled it off, back to light spasms

tonight i tried with the adjustable power supply so everything except the strip ran on 5V. broke out my last new ESP32 and tested three different 74AHCT125N in case of a dud. and behavior was honestly worse, no movement in the lights at all, just sitting in the wrong random mix of colors. When I unplugged the data from the level shifter, back to spasms, spasms stop when plugged back in but no control, couldnt even get them to change with flicker like I could in all the other setups.

so. for the sake of my sanity. I would deeply appreciate any and all feedback. for the first few weeks this steep curve from “never soldered” to “ahh yea check line 67 for the VGS(th) on the MOSFET datasheet” was fun and challenging. but now i am broken.

And to anyone considering this setup. I have seen one post where people seem to have figured this out (arduino - Level shifter for a WS2811 LED strip - Electrical Engineering Stack Exchange), and a few amazon reviews on the 74AHCT125N, but i have tried and tried and tried everything they talk about and still havent won.

to all yall who have won many of these battles, hats off to ya

Here is a link to my setup, I am a complete novice so be blunt and ask anything that might help clarify! I really appreciate the support Setup Pic

Your setup looks OK in general, the breadboard wiring is reasonably tight and neat, but I noticed some things your Setup Pic:

  1. There doesn’t seem to be a link from the “Left” V+ bus bar and the “Right” one. That means your pin 4 on the '125 is floating. You can either connect up the bus or just move pin 4 to GND, either keeps the pin from floating and generating noise.

  2. You need the 100nF (0.1uF) ceramic bypass capacitor near pin 14 to ground.

  3. I’d remove the output resistor completely.

  4. Try to keep the use of Dupont connectors down to an absolute minimum (0 is best). My experience is that it’s better to simply use lengths of solid wire like the formed jumpers you have. Keep them as short as you can. That works well for the bus bar (V+, GND) links too.

  5. You can do a “static” test of the '125 by setting it up as normal and removing the GPIO input and LED output wires. Connect the input to GND and measure the output which should be <0.8V. Connect the input to 3.3V and measure the output as >3.5V. That will at least show you’ve got things wired (mostly correct)

  6. Try and keep the 5V supply reasonably close to the breadboard, I’d suggest a USB or 5V 2A “wall wart” type supply for starters. You can try a 24V->5V buck converter after you’ve got things stable.

  7. Make sure you have common ground between the 24V “Power section” and the 5V “Data section”. I like to run an explicit ground line with the data line directly to the strip. The data wires need only be 20-24AWG size.

  8. What version of WLED are you running?

  9. Try limiting the WLED config to 20 or so LEDs to start, just to eliminate potential power issues. You can work up once your happy with the results.

Hey @divsys!

I really appreciate all of the advice! It really means a lot and reminds us why communities like this are so damn cool.

I played around with a couple of these points and the one that righted the ship was a direct connection from strip ground to 5V source ground. Even just doing it through the breadboard using two ground ports right next to each other wasnt enough. I obviously have no idea but it seems like other things on the ground line were contributing “noise” that was too much for the data lines sensitivity.

What a wild ride. I know grounding is incredibly important but this came down to very specific config with consideration for ordering. It sounds like your point 7 covers this. I basically had everything grounded to the bread board then back to the 5v buck converter then back to the 24v power supply. But my strip was going crazy until it directly touched the 5v ground.

I am now repackaging everything as efficiently as I can on a prototype PCB to go into the bar where these lights live. I am running this WS2811 with the level shifter as well as a 24v COB CCT with mosfets controlling the CW and WW PWM channels. Hoping all the specific requirements come together in harmony.

Re point 2, what is the purpose of the capacitor? I have seen some setups with and some without, and I managed to get my strip running in testing without one. I ordered some capacitors, never used them before, but I think they are a diff type, the black cylinders, not the ceramic button looking ones. Does that matter, and how come?

The 100nF ceramic decoupling capacitor is specifically for the levelshifter IC.
It’s job is to handling high frequency switching spikes that can occur on the IC’s power pins.

Without that cap, the chip can generate it’s own noise that can affect the data stream.
Has to be ceramic, not electrolytic (the black “cans”).
They’re very common in digital electronics, pretty cheap and should be easy to find.

In any setup, there’s always a way to make it “just work” without those extra bits.
If you want long term reliability follow the physics (and best practices), include that cap.

As always the devil’s in the details, glad you’re up and running.

yep that makes sense! I’ve just realized after chasing ghosts I have to know as clearly as I can what each component does and why it is the right or wrong one for the job. I appreciate the info!