LED strip is very dim when dimmed with octocoupler

I want to PWM a 24V/100W LED strip with an ESP32.

I set up the ESPHome LEDC output component, which works well. I purchased the 24V version of this optocoupler, and its indicator LED lights up according to the chosen PWM value, but my LED strip is extremely dim, and the light of the LEDs is barely visible.

When directly connected to the power supply, the LEDs are blindingly bright.

What’s wrong with my setup?

Go back to basics, instead of PWM configure the output on the ESP as a simple on-off GPIO output. When the output is on, does the LED strip light the same brightness as when the strip is directly connected to the power supply?

If not the problem is with the optocoupler. If yes, post the yaml for your PWM light.

Unless I am misunderstanding, the device specs say

maximum Output current 50MA.

100W at 24v requires a little over 4000mA.

I am with @nickrout on this one. The pwm output on an esp is pretty low power. Do you have a schematic?

Ah - didn’t even look at the specs. @nickrout is right - you won’t get enough current through your optocoupler.

Use the optocoupler output to drive a mofset, or spend $5-10 on a PWM DC driver board designed for those currents: Arduino Compatible 24V 5A MOS Driver Module (Jaycar XC4488) | Little Bird

Thanks, guys!

The MOSFET PWM search on AliExpress yields quite a few relevant results, with boards like the suggested one selling for less than $1 apiece.

If these MOSFET boards are so much more performant and cheap, when does it make sense to use an optocoupler?

Before we answer anything else, what exactly is the led strip?

I use about 2 meters of this:
Super Bright White LED Strip - 2835SMD High CRI 90 Quad Row Flexible LED Strip Lights - 24VDC IP20 17,650 lm/Roll

Ok, so analog led strip.

No I don’t think you need the optocoupler.

The esp gpio is 3.3v out (not 5v), so bear that in mind.

Other than that, look for quality. For example, these have a good report A Closer Look at the H801 LED WiFi Controller - Tinkerman and work for up to 5 strips

Thanks, but I’ll use a generic ESP32 board because I want to use it for various purposes.

I’m still interested in which use cases an optocoupler board is a better choice than a MOSFET board.

I set up something similar recently. Each row of led is basically an led strip.

Used mosfets and a pca9685. Was keen on the pca9685 to help save esp32 pins. I was able to power directly from the esp32 5v, but another power supply would be easy to include.

You use optos when there is a need to electrically isolate two systems from each other. This could be needed for security reasons (to prevent electrical shock) or i.e. because the ground levels of both systems cannot be connected because they are not potential free.

1 Like

Let me share my findings with you, guys, as the boards I ordered from AliExpress have arrived.

The following 400W FET board works perfectly with my LED strip. I added a screw terminal at J1.

For some reason, the following board didn’t make my LED strip light up at all. The FET was bent in the envelope, but that shouldn’t make it non-functional.