# MeanWell PWM dimming

I have similar situation, described here: MeanWell 3-in-1 dimming So, I need to control MeanWell power by PWM signal from Arduino. I tried to simulate scematics, given as answer in that topic, but it seems doesn't work (in simulator).

Schematics:

Results:

As author of that topic mentioned in one of comments, Vg is about -0.47V, which is not enough to close BSS126. One extreme change is to remove 750k resistor.

Schematics:

Results:

As you can see in this case Vg = -1.4V, which is still less, than required to close BSS126 comletely. I guess because of that maximum Vdim+ is not higher than 5.6V.

I'm quite bad at electronics and already spent a lot of time fighting with this schematics and trying to get 10V if there is no input signal for optocoupler. Can someone advise, what is wrong with this schematics and how to make it work? The goal is to have 0V when there is no input signal and 10V when input signal is 5V.

My MeanWell device is XLG-240-M-AB. When nothing is connected to DIM+ and DIM-, voltage is 14.4V. When I connect resistor 99.7 kOhm, voltage is 9.62V. Which means (if I'm not mistaken) that internal resistor inside MeanWell (please refer to schematics in topic, which I refered to previously) is about 50 kOhm

• This will not work, due to the fact that the pullup is useless in this situation connected to drain. Connect pullup to some stable rail, because drain goes down, every time You turn on a mosfet. Commented May 5, 2021 at 17:22
• What way do you want it to work when your microcontroller is powered down? Full current or zero current? Commented May 5, 2021 at 17:23
• @fifi_22, sorry, what do you mean by saying "Connect pullup to some stable rail"? Do you have link to any example schematics?
– Alex
Commented May 5, 2021 at 17:25
• It’s not an NPN OPTO, but a FET, is pin4 to gate and pin 3 gnd? Open circuit voltage at IF = 10 mA, 8.4 V typical • Short circuit current at IF = 10 mA, 15 μA typical and I assume power FET is a low side driver Commented May 5, 2021 at 17:26
• Thanks to @TonyStewartEE75 I noticed that my VOM1271 doesn't have enoug input current. I increased it to 10 mA and now both options of scematics, provided by me above, started working. 1st gives 8.3V, 2nd - 8.7. Stil lower than 10V. Any ideas how to increase it to 10V (if it is possible)?
– Alex
Commented May 5, 2021 at 20:28

Figure 1. Input circuitry of some Mean Well LED PSUs. Image source: LEDnique.

This circuit can be driven by a potentiometer, a 0 - 10 V (or 1 - 10 V) source or a PWM signal but the end result is always the same: an analog voltage reaches the IN control pin. See my linked article for more detail.

Connect your opto-isolator's collector to CONTROL+ and the emitter to CONTROL- and you should be able to control the brightness by PWM control of the opto-LED.

simulate this circuit – Schematic created using CircuitLab

Figure 2. Microcontroller interface.

If the GPIO is 100% off the PSU will be 100% on. You can't easily invert that action. (More on this later.)

simulate this circuit

Figure 3. The simplest, no-nonsense method is to use a relay which when de-energised with loss of microcontroller power short-circuits the Mean Well control inputs.

• Thank you for answer, but if I'm not mistaken if GPIO is not connected, it will mean that DIM+ and DIM- are totally disconnected, which will lead to 100% power of PSU. I need opposite behavior - 0% PSU when GPIO is 0
– Alex
Commented May 5, 2021 at 17:35
• I stated that. The rice is cooked so I've got to eat that first. Commented May 5, 2021 at 17:36
• I just wanted to mention that I already have tiny board with optocoupler and I can successfully make what you suggested (0 at GPIO -> 100% on PSU). The problem is that I need opposite :)
– Alex
Commented May 5, 2021 at 17:46
• See the update. Commented May 5, 2021 at 18:25
• Hm. Do you suggest to use relay instead of optocoupler, right? I've never used relays before. Will they produce noise if PWM frequency is 500-1000 Hz? My fans make noice in this case.
– Alex
Commented May 5, 2021 at 19:39