Circuit Checking Dimming MeanWell Driver with esp32

Hi i know this topic has been asked and answer several times but i just wanted to check my you guys my circuit because im not really good with electricity stuff, way more with coding, so here's my circuit, just to clarify im aiming to remotely control the dimming/brightness of a 480w LED boards run by a meanwell driver that has the famous 3-in-1 dimming (PWM, 0-10v, and capacitance) method, model : HLG-480-4B

here is a ref to the manual mentionning the dimming methods : https://www.meanwell-web.com/content/files/pdfs/productPdfs/MW/HLG-480H/HLG-480H-spec.pdf

Back to my circuit :slight_smile:
I've checked that the octocoupler is set properly as in the picture using the little mark on it.
I have a 100 omh between the gpio23 and the pc812, and i see on the picture (i found it online and edited few words) that there's a second resistance on the Dim(+) wire after the octocoupler.

So i'd ask 2 questions:

First, is my circuit OK ? and (ok that will be 3 questions) is the resistance value enough ?

And second, do i need the second resistance on the Dim+ wire ? and what purpose does it serve ? i've never seen or read mention of adding a resistance in that place when doing such project.

Thanks for taking the time to read me, moreso if you take time to reply,

Any help will be appreciated,
Thanks in advance.

PS: I've followed what's in this video : Automate Your Grow with Home Assistant #7: Dimming & Scheduling Your Grow Light - YouTube, so double shoutout to wawa i guess :slight_smile: and the author says in the video that the dim wire polarity does not matter, is this right ?

pwm_esp32 (1)

100 ohm is too low for a 3.3volt-logic ESP pin.
That would be 3.3volt - 1.3volt (LED) = 2volt/100ohm = 20mA pin current.
Not a big problem for the LED, but in general 3.3volt logic should be kept well below 10mA.
220ohm is the minimum value, and 330ohm would be better.

The collector resistor is not needed/wanted. DIM pins can be safely shorted to each other.
Leo..

1 Like

Ok thanks will modify the circuit tomorrow and repost for validation if thats ok ?

I've changed the circuit, here's the modified one, is it possible for anyone to validate it please ?

I'm adding a zoomed view of the octocoupler so you can check that i positionned it correctly (mark on f6)

Thanks alot for your time, i really appreciate your helps. :slight_smile:

is the format a problem, do you want me to repost as a diagram instead ?