Hi everyone, i've recentloy posted a diagram showing a esp32 connected to a pc817 octocoupler then to an ESP32, @Wawa did correct me about the value of a resistance (100ohm was too low) so i changed the circuit, tried it yesterday with a friend's driver as mine is waterproof so it would be a pain to use for testing (no clips, no nothing) and it lit the LED this time but it would nearly instantly shutdown, we tried a few times, changing the brightness value would lit the LED again but they again shut almost immediatly, so i figured/assumed we triggered one of the protection mecanism of the driver (it has plenty : OVER CURRENT, SHORT CIRCUIT , OVER VOLTAGE , OVER TEMPERATURE)
Im using ESPHOME as the software as indicated in this video with this configuration :
Hello again, I don't have a LED to test yet but i measured with a voltmeter the output of the octocoupler and what i got was value ranging from 0v to 3.3v i think that's what's to be expected, or should it goes from 0-10v ?
You didn't give the exact model of the LED driver but typically they work (nominally) 0-10V and they have a built-in pull-up resistor (which should work with the circuit you have).
If I'm right... You should get about 10V across the dimming terminals without the opto-isolator connected, and you should get full-brightness. And if you short those terminals together it should go off.
Can you turn it on & off by writing high & low instead of using PWM?
BTW - The opto-isolator is an inverter so 100% PWM should turn the power supply off.
Multimeters can't reliably measure PWM. As you may know, PWM switches between (about) zero and full voltage so when you vary the PWM you vary the duty-cycle and the average voltage, but it's still switching between zero and maximum. Some meters will give you the average but you can't rely on it.
When you directly dim an LED with PWM it's not really dimming. It's switching quickly on & off and if it's off half of the time it appears to be half-brightness to the eye... Well it will actually appear to be just-slightly dimmed our eyes aren't linear, but the concept is the same. The output of the Mean Well probably is actually dimming (lowering the DC current) even though it's controlled with PWM.
thanks for those info, i will get some standalone LED to do the tests wawa told me to in very few days, i just thought about using the meter to see if i can figure out why they went off when i tested it but my understanding is so low it wasnt usefull at all
I got LED in the mail this morning, tested and it works fine at dimming the LED, it's inverted but it dims the LED properly.
@Wawa what do you by mean by "If that works, then it must be the dimmer."
It's a standard meanwell driver my friends has the AB, i have the B model (both have 3 in 1 dimming 0-10v,PWM signal and resistance) can you explain a bit further please ?
Edit: I just went back to the youtube video where i found the explanaition for this circuit, who found it here (lol the loop is complete :p) and i just saw he added this in the comment section :
Something I need to correct in the video - at [11:33](https://www.youtube.com/watch?v=cEy5go2eZtY&t=693s) I said that it didn't matter which way you plug the dim+ and dim- wires into the output of the optocoupler. This is incorrect.
put the Dim- on the optocoupler emitter pin (with the orientation I have it in the video, it would be the top right pin) and the Dim+ on the collector pin (shown top left in video). So, if it doesn't work quite like you expected, try flipping your dim wires on your opto output!