[SOLVED] Mosfet for controlling a dimmer

Hi all

I am struggling with this rather stupid issue for quite a while.

I am using a NodeMCU 1.0 and a MeanWell LED Driver to power a LED.

The MeanWell driver can be controlled having 0to10V input. (It already provides a 10V between Dim + and Dim -. Shorting those will turn of the lamp.

Now, I am using the PWM signal of the Node to control this mosfet.

However, I cannot figure out how to connect the Dim+ and Dim - to (V+,-,in,GND).

I thought, that connecting Dim+ to V- and Dim- to GND would be the most promising approach. (This has some influence on the brightness. However, it doesn’t matter what input I give to the Mosfet.)
Other combinations have no influence.

(If you scroll down on the BG page, you can see some close-up pictures. )

Another question: After analyzing the PCB, I couldn’t figure out what the VCC pin is connected to. For what is it used?


Thanks a lot for your support.

How to post an image

Hello gian131294,
I am not clear what you are trying to do. If you mean that the MeanWell LED driver expects 0V to 10V on the SIG pin then applying PWM to that pin will not give it 0V to 10V, or 0V to any other voltage. If you mean something else then please explain as I am confused by your question. A full schematic of what you are attempting would be a lot better than any number of words, hand drawn and photographed is fine.

Thank you.

Three problems.

  1. The IRF520 is not a logic level mosfet and will not fully turn on with the 3v3 drive provided by the NodeMCU. It’s useless at NodeMCU output levels.

  2. You have no pull up resistor to provide a signal to the led driver.

  3. You need a 10 volt power source in order to create a 10v PWM signal.

Since you need only a few milliamps to drive led driver PWM input, I would chuck the IRF520 module in the bin and start over with a simple bipolar NPN transistor (2N3904, 2N2222 or anything similar) and two resistors, a 330R base resistance a 10K for the pull-up. The connection diagram is shown below.

Y is from the output pin of the NodeMCU, Y bar is the output to the PWM pin of the MeanWell driver. The GND point needs to connect to both the 10 volt power source and the Arduino gnd. VCC is the 10 volt power source.

Since you need very little current for the led driver, an easy way to make a 10 volt source would be a 12 volt wall wart, resistor and 10 volt zener diode.

Thanks for your answer.

I've added some explanations to the picture.
The schematic is representing only the MosfetModul from the link in my first post. The sig pin is not on the meanwell. It is on the Mosfet module.
The meanWell part are the two Dim Squares. Dim + is pulled up by the meanwells internal circuit to 10V.
My aim is to use the mosfet as controlable resistor.
The meanwell would be connected with its dim+ and dim - to one of the V+,-,in,GND.

The nodeMCU is connected to the signal, Vcc,GND pin of the Mosfet Module.
I hope it is clearer now.

Thank you gian131294,
Sorry, I still don't understand, however, I think WattsThat has understood you and his answer is far more helpful than I am being, I think you should take his advice. I can't help much if I am unable to understand. Good luck with your project.

Thanks for your Reply

1)This is a good point The MeanWell has certain tolerances for turning off and maxing out. (approx. 0.5 V) (Maybe the range of the Mosfet is enough.

2+3) The MeanWell provides already a 10 V difference between Dim+ and - (I am assuming it has an internal pull up). I would like to use this. Otherwise, I would need another source.

I think, that I could adapt your approach without the external power source. By using Y_bar as GND (from Dim-) and Dim + as VCC and Y_Bar. However, I need to check if I have a transistor here.

@Watts and Perry

Thanks a lot!

I found a proper transistor. The solution of Watts was on the point. (Since the LED driver already provides the 10V I didn't need an power source.) This approach is much easier and more elegant than the one with the mosfet. (And works).

Is there a way to mark an answer as solution?

Is there a way to mark an answer as solution?

Yes, edit your original post and change the title to something like [SOLVED] Mosfet for controlling a dimmer

Thanks a lot