PWM range

Hello, I’m trying to connect 24V led to my esp32 but can’t make it work properly.
I’ve try different system, with optocoupler, IRFZ44n and TIP120. But the best result I got is that led turn on only at half the slider and are completely turn on way before the end, so I have almost no ability to dim the strip. (This was thanks to a optocoupler but I had to change the PWM frequency to 150 Hz because the default 19KHz was to much for it).
All other circuit was flickering, especially when using breath mode, or was just not able to turn leds completely on or off.

Can anyone share a scheme for a 24V strip circuit ? if it can use IRFZ44n or TIP120 it could be great.

By the way, my esp is also connected to ws2812b led and they work perfectly fine. Also I’ve already use IRF’s with arduino so I don’t understand why it’s not working here, maybe the problem come from somewhere else.

Thanks

Hello there,
analog LEDs with WLED really just need a N-Mosfet + (usually) a gate resistor. I don’t know about circuits with optocouplers.
It’s crucial that you match the attributes of the Mosfet to your application. Especially make sure Vgs(th) is under 3,3V as that’s the maximum digital output of ESP32, Vdss is over 24V when using 24V LEDs and that Rds(On) is low enough for your total load.

Here’s the circuit that I use on my custom PCB:

I additionally use a mosfet driver IC, but one could also just short the IO-Pin to the gate resistor. I use these parts:

The circuit works perfectly fine, driving (at the moment) ~7A of 24V CCT High Power LEDs at 78125 hz PWM frequency. Due to the mosfet driver IC even higher PWM frequencies would be possible but I haven’t tested more than 100khz (which worked).
I guess those aren’t Aliexpress-available parts and they are no replacement for you TO-220 parts, but maybe the schematics or the attributes of the parts may help you.

Okay, thanks, I’ll check to use a mosfet driver, but I can’t weld SMD parts, so I’ll try to find a different one.

You are using MOSFET that requires quite high gate voltage to fully open. Use one of the recommended MOSFETS from KB. What you want is MOSFET that opens with 3V at gate.

https://kno.wled.ge/basics/getting-started/

Yes I have IRLZ44N on the way but I don’t have them now. But thanks for this link, I was looking for something like this.

I just remembered that you will also need a second resistor, a pull-down resistor for the mosfet gate to discharge, when you don’t use a mosfet driver like in my schematics above.

That is included in the KB link above.

I am using this one successfully, directly on esp32 output.

http://www.aosmd.com/pdfs/datasheet/AOD4184A.pdf

1 Like

this one is very interesting solution why nobody talk about this module?

Specs for that MOSFET look OK (not spectacular) for a direct 3.3V drive.
If you include a levelshifter in your setup (to bring the drive voltage up to 5V). those devices become a better choice.

The maximum current ratings need to taken with a grain of salt.
The spec sheet for that MOSFET say you’re realistically limited to something like 10A of current and depending on the LED voltage it can be much less to stay in the Safe Operating Area (at 100% brightness).

Overall they may work reasonably well depending on your setup.

The module I bought claim that the tigger voltage is from 3.3 -20V

https://a.aliexpress.com/_mtxswXV

I tested it works without logic shifter

As I mentioned, they may work depending on how much current you need them to provide in worst case.

In general raising the gate trigger voltage (which the levelshifter will do), improves the current the devices can carry (within limits).