MeanWell 3-in-1 dimming

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.

It works!

• Add a 7.5V Zener diode between DIM+ and DIM- with a suitable resistor? Oct 1, 2019 at 11:55
• Makes sense. 2 you could solve with a depletion MOSFET like BSS126. Oct 1, 2019 at 12:23
• Oh! That complicated things. You can pair an Vishay VOM12xx with said depletion MOSFET and solve it. Oct 8, 2019 at 16:34
• Neat! If you check the pull-up current comming from the MeanWell DIM pin (should be stated in the datasheet or equivalent circuit, otherwise measure it) and the Rdson at 0 V Vgs, what voltage do you get? Can you help the situation by adding a resistor in parallel to the BSS126 transistor to decrease the on-state resistance or parallel two BSS126? Apr 28, 2020 at 18:27
• Thanks for the feedback. Mean Well's configuration is simple and versatile. Apr 29, 2020 at 12:13

2) I need dimming to be 0% when microcontroller is powered off.

This becomes a bit non-standard immediately. If the driver outputs 0 % even at say 0.7 V, you may be able to cheat around this with a BJT pulling itself up until your MCU can take over and somehow defeat that. A NC relay comes to mind too if you can accept that.

If 0 V is required on the DIM pin when your MCU is not powered, this is an expensive and obscure solution but solid-state.

simulate this circuit – Schematic created using CircuitLab

You need negative voltage to turn off the depletion MOSFET, but the Vishay VOM1271 can be used "upside down". Again, obscure and expensive solution.

• Many thanks for the answer! With regard to "expensive and obscure solution" comment. The straightforward alternative I can see is to go with extra 10V supply and control it from MCU with either voltage or PWM output. I'm not sure it will be cheaper. Oct 16, 2019 at 11:31
• BJT approach won't work; according to this graph the output is non-zero at about 0.3V Oct 16, 2019 at 11:50
• If it fits your budget and requirements, there you go! 0.3 V will be very difficult. Perhaps some super low Vgsth N-MOSFET. Also, I forgot a pull-up in the schematic. Oct 16, 2019 at 14:27
• No, you need negative gate voltage to turn off a depletion MOSFET. Oct 16, 2019 at 16:21
• Yes, but a full MOSFET driver is overkill and you still need to generate negative voltage. Feel free to separate the grounds if you wish with the optocoupler. Oct 17, 2019 at 9:10