I've got a constant current MeanWell LED driver that has 3-in-1 dimming (100k potentiometer, 0-10V signal or 10V PWM), and would like to control the dimming with a microcontroller.
I found a few suggestions online, the simplest one is feeding a PWM signal to an optocoupler connected to directly to driver's DIM+ and DIM- (without any external power supply).
This works because apparently MeanWell dimming circuit looks like this (courtesy of https://www.eevblog.com/forum/projects/mean-wells-2-in-1-dimming/msg1835957/#msg1835957)
simulate this circuit – Schematic created using CircuitLab
However I have a couple of additional requirements
1) I need to limit the maximum brightness to about 75%. Just limiting duty cycle is not enough - I want the driver to never output more than 75% of rated current even in case of software bug/controller failure.
2) I need dimming to be 0% when microcontroller is powered off.
If I was using the single optocoupler schematics, I could use 75K resistor in series with opto output, but requirement (2) means I have to invert the output somehow with a BJT/MOSFET.
Could you please suggest a schematic and help with components choice?
PWM frequency doesn't need to be high (100-200 Hz is enough). The driver I'm using is ELG-100-C350B https://www.meanwell.com/Upload/PDF/ELG-100-C/ELG-100-C-SPEC.PDF
FINAL UPDATE:
I created a test PCB that comprises of two dimming channels, one of which is limited by 7.5V Zener diode. The only change from the answer below is that resistor values for R3 and R4 should be > 500K.