MeanWell LED Drivers: 3 in 1 Dimming Function.

Gromax 3590B

Active Member
No. Don't do that. A transistor switching is not good. There is a reason they have an inductor on the output of an LED driver.
Why not? The data sheets of the hlg drivers says the the drivers can dim through resistance (10K-100K+), voltage (1V-10V) or a 10V PWM signal with a frequency between 100Hz and 3KHz. The PCA9685 PWM chip is set to 1KHz and outputs 5 volt, 12 bits PWM. I use that signal to switch the 10 volt + dim wire to the 0 volt - dim wire through a very fast switching transistor that can handle the voltage, amperage and switching frequency. Totally legit. I never had any problem with this setup. I guess there is a capacitor in the driver that smooths out the 10V PWM signal to a flat voltage between 0 and 10 volt. I never dim lower than 12%. If u mean that the leds are the inductor on the output of the driver i can say that my inductor is always on when the driver is powered.
 
Last edited:

wietefras

Well-Known Member
If ever there was an appropriate time to use the quote condenser tags. But as far as sunrise/sunset, maybe changing the spectrum would help but starting and ending with reduced brightness would likely be pointless. For reptiles and fish maybe, so eyes won't get blasted, but plants don't seem to mind full light instantly.
Well there is two sides to it. On the one hand it's sunrise/sunset is supposed to reduce the risk of bud rot. So that would be related to not blasting the plants from dark or leaving them at full transpiration and then killing the light all of a sudden.

I agree I don't see much gain there. I usually donl't have rot issues anyway.

Personally I'm thinking of using the same DLI. So the same amount of light over the whole day, but then a bit less at the start and end of the day and then some more in the middle.

From the charts from my Arduino/RaspPi monitoring, I think it's likely that the plants could deal with a bit more light in the middle of the day while they do seem to be struggling a bit at the start and end. So overall I hope it will improve photosynthetic efficiency by using the same amount of light "better" during the day.
 

VegasWinner

Well-Known Member
Why not? The data sheets of the hlg drivers says the the drivers can dim through resistance (10K-100K+), voltage (1V-10V) or a 10V PWM signal with a frequency between 100Hz and 3KHz. The PCA9685 PWM chip is set to 1KHz and outputs 5 volt, 12 bits PWM. I use that signal to switch the 10 volt + dim wire to the 0 volt - dim wire through a very fast switching transistor that can handle the voltage, amperage and switching frequency. Totally legit. I never had any problem with this setup. I guess there is a capacitor in the driver that smooths out the 10V PWM signal to a flat voltage between 0 and 10 volt. I never dim lower than 12%. If u mean that the leds are the inductor on the output of the driver i can say that my inductor is always on when the driver is powered.
you need to use a mosfett style transistor for dimming like an n-channel 60v 16A TO-220 mosfett google that style like I use for dimming leds if you want a part number let me know.
 

TimoTapani

New Member
C1 = Electrolytic Cap 85°C , 47 uF ,16/25 V
C2= Ceramic or MTK/MTP 100 nF
Sorry guys, but just can't get this worked out by myself. The diagram refers to capacitors "Ci" and "Co" while these values are given for caps "C1 and C2". Manufacturers datasheet recommend 330nF for Ci and 100nF for Co. Which cap is which?
 

Timothypaul26

Well-Known Member
If ever there was an appropriate time to use the quote condenser tags. But as far as sunrise/sunset, maybe changing the spectrum would help but starting and ending with reduced brightness would likely be pointless. For reptiles and fish maybe, so eyes won't get blasted, but plants don't seem to mind full light instantly.
Plants can "see" in a sense. 'Ref secret life of plants' They don't have eyes, so they can't see as we would, but having the lights ramp up and ramp down helps them not get blasted by 100% light after sleeping all night. I have not read that plants set to first light spectrum, but I'd be interested in reading up on that. But if it were true the light in morning and evening are more red than the afternoon sun. So I would think if that were the case you'd get a lot more stretch. 1 thing I (and many others) have found is that with LED lights you can play with your spectrums to prevent or induce stretch by adding more blue or red respectively. Other benefits to using dimming, is that there is less startup stress on your system voltage, more energy efficient, and you can use for different stages of growth, seedlings, clones veg etc...
 

Timothypaul26

Well-Known Member
Sorry guys, but just can't get this worked out by myself. The diagram refers to capacitors "Ci" and "Co" while these values are given for caps "C1 and C2". Manufacturers datasheet recommend 330nF for Ci and 100nF for Co. Which cap is which?
Which manufacturer are you referring to? The load of your system is really what is going to determine what size you're going to need. If you have data from a manufacturer saying to use a certain size for a system, I'd trust that is a good starting point.
 

BobCajun

Well-Known Member
Sorry guys, but just can't get this worked out by myself. The diagram refers to capacitors "Ci" and "Co" while these values are given for caps "C1 and C2". Manufacturers datasheet recommend 330nF for Ci and 100nF for Co. Which cap is which?
I don't know what you're trying to do but this program may be helpful, if not for this then for something else later.
 

TimoTapani

New Member
Which manufacturer are you referring to? The load of your system is really what is going to determine what size you're going to need. If you have data from a manufacturer saying to use a certain size for a system, I'd trust that is a good starting point.
I don't know what you're trying to do but program may be helpful, if not for this then for something else later.
I'm sorry, the question was bit short and hazy. I hoped that the link to the post which I'm replying to would do all the referring, but it's so small that even myself I couldn't find it. (first post here) :)

I'm trying to build an apparatus that SDS described on pages 1 and 2 (of this thread) which should allow me to control MeanWell dimming with Arduino. Actual part I was referring to is L78M10CV/LM7810 (Sorry, can't post link to sheet as a noob, but you'll find it in seconds. I'm looking at STMicroelectronics' sheet). SDS has copied few diagrams from that datasheet, but the picture and explaining text "doesn't meet".

SDS says that those capacitors aren't neccesarily needed, but since they are virtually free, I would like to have them there to hopefully lenghten the lifecycle of the dimmer. Actually I build already one circuit and it do work, but response to PWM is quite strange and I'm thinking if my capacitors are mixed up. Driver responds 10% PWM with <5% power and same "low side behaviour" goes on until 25% PWM when driver gives out 15% power. In between it's quite linear, but on the end it goes logathritmic again and every percent of 90-100% PWM raises output power by 2-5%.

Should I sort this out by software or hardware approach?
 

wietefras

Well-Known Member
You don't need an extra 10V powersource. If you go through the thread you will find solutions where only a transistor and a resistor are needed.
 

TimoTapani

New Member
You don't need an extra 10V powersource. If you go through the thread you will find solutions where only a transistor and a resistor are needed.
Ok, I must have missed them while concentrating on finding info on capacitors. After second reading I found it and yes, actually I did that already by accident but wouldn't wan't to test my luck to operate it in a way, that I don't understand. I mean I was uploading a new sketch, external 12V unplugged. I was surprised that dimming started working only with usb power, but couldn't understand why. So you're saying that SDS got it wrong from the beginning and the 10V external power has no added benefit at all? Since parts cost about 1 USD and I thought that it'll be the best way to do it, I didn't want to take any shortcuts, which those simpler circuits seemed.

Weell, since I got parts already is there any point to go with VegasWinner's off-switch, as that was my next goal: To have some hardware safety mechanism if Arduino goes out for some reason. If still keeping up external 10V as an option and after looking again and again those pictures, I'm beginning to be more sure of that I got capacitors mixed up and bigger electrolytic one should be on Vo side of L78M10CV.

Is there any other possible explanations on logathrimic response of the driver than capacitors?

Btw. I'd rather use 2N7000 Mosfet, but as far as I understand it's quite interchangeable with those suggested transistor solutions, except you don't need a resistor between gate and signal pin. Any arguments with this decision?
 
Last edited:

BobCajun

Well-Known Member
I don't know about all that but the Meanwells can't go below 10%, as you can see in that first post on pg 1, so I can't see how you got down to less than 5%. Your meter must be screwed up or something.
 

wietefras

Well-Known Member
So you're saying that SDS got it wrong from the beginning and the 10V external power has no added benefit at all? Since parts cost about 1 USD and I thought that it'll be the best way to do it, I didn't want to take any shortcuts, which those simpler circuits seemed.
I thought SDS later also added a schematic without the extra 12V source. Possibly in another thread though.

It's not just the parts, but also the extra wall wart or something to get that extra 10V (or 12V really). If you already have that available then I guess it doesn't matter much no.

Do you have a Mean Well driver that can dim to off?
 

TimoTapani

New Member
I don't know about all that but the Meanwells can't go below 10%, as you can see in that first post on pg 1, so I can't see how you got down to less than 5%. Your meter must be screwed up or something.
I was overwhelmed and scared myself too at the moment as I set PWM default to 10% on reboot. I was measuring power with kill-a-watt-like-device. With two hlg-240s I expected about 70W (w/ fans) on PWM 10% but got only 25W (including fans). On PWM 25% I got that expected 70W. From there it rose quite linearry 1%/1%, but as explained above, somewhere near 80% PWM it started to go off again. I assume that this is not normal behavior, so I'm about to ditch that design and try out the simpler method.

I got my "head around it" while doing little walk on fresh air and if there isn't substantially bigger risk of burning something with it, then it's good enough for me. After posting the last post I noticed that some of you guys have had some differing opinions of the best solution for this application. I maybe stirred the soup a bit, but I hope you forgive my ignorance.

Is there an easy way to do hardware minimum 10% to work with this transistor/mosfet between DIM+ & DIM-? Would just connecting both with 10kOhm* R paraller with transistor/mosfet S&D do the trick? Will it reduce my ability to reach maximum limits (along with cutting out 0-10%), like getting only 90% power? Or should I go with some kind of PNP-solution which allows flow through resistor only if there's no other flow at all between DIM+ & DIM-?

*)5kOhms for a pair
 
Last edited:

TimoTapani

New Member
I thought SDS later also added a schematic without the extra 12V source. Possibly in another thread though.

It's not just the parts, but also the extra wall wart or something to get that extra 10V (or 12V really). If you already have that available then I guess it doesn't matter much no.

Do you have a Mean Well driver that can dim to off?
I think it must be on another thread. I tried to read every SDS' post from this thread with extra attention on the first place since most of the other stuff on thread seemed concentrate on same question about how to wire a pot and some of the other I didn't understand at first glance. SDS seemed most reliable source of info and that's why I must have missed those simpler solutions. If SDS is still around it would be nice if he could edit this new solution to some of the earlier posts. I feel a bit misguided but not disappointed, since it has been an adventure. :)


Ofcourse it's easier without external power, but I do need to power Arduino and led fans anyway, so it's not a problem on that point of view. Problem is that the dimming works now with logarithmic curve. If the simple transistor/mosfet solution works linear and is as reliable, I'm happy to ditch extra parts.

I'm not sure, but I think it's not a dim to off -driver. It's about an year old hlg-240 (a pair actually). Next thing I think I need anyway to add is a SSR and RTC to replace timer and help Arduino know when it's daytime and when there's no need for PWM-signal. (I'm a bit afraid that feeding PWM-signal 24/7 to driver while cycled ON/OFF isn't doing good for the driver). Easier way would ofcourse include some photoresisting sensor, but I'm not too fond of adding extra wiring from room to outside controlbox and applying dozen kinds of analog filtering to it.

Anyway, it would be cool, if Arduino just completely dies, then there would be some hardware safeset-level for lights. Either 10% or completely off.
 
Last edited:

BobCajun

Well-Known Member
I was overwhelmed and scared myself too at the moment as I set PWM default to 10% on reboot. I was measuring power with kill-a-watt-like-device. With two hlg-240s I expected about 70W (w/ fans) on PWM 10% but got only 25W (including fans). On PWM 25% I got that expected 70W. From there it rose quite linearry 1%/1%, but as explained above, somewhere near 80% PWM it started to go off again. I assume that this is not normal behavior, so I'm about to ditch that design and try out the simpler method.

I got my "head around it" while doing little walk on fresh air and if there isn't substantially bigger risk of burning something with it, then it's good enough for me. After posting the last post I noticed that some of you guys have had some differing opinions of the best solution for this application. I maybe stirred the soup a bit, but I hope you forgive my ignorance.

Is there an easy way to do hardware minimum 10% to work with this transistor/mosfet between DIM+ & DIM-? Would just connecting both with 10kOhm* R paraller with transistor/mosfet S&D do the trick? Will it reduce my ability to reach maximum limits (along with cutting out 0-10%), like getting only 90% power? Or should I go with some kind of PNP-solution which allows flow through resistor only if there's no other flow at all between DIM+ & DIM-?

*)5kOhms for a pair
Here's a page about problems dimming meanwells, if you haven't seen it yet. I would seriously just use a potentiometer. There's no efficiency increase from dimming with PWM like there is with a potentiometer. You're just flashing it on and off at full power very quickly. It might actually be easier on plants to use a potentiometer too. I'm just speculating. As for using the PWM, I have no further advice because I didn't have any problem with it myself, using an optocoupler. About the 10% though, a closed circuit (shorting) will produce that, because as I mentioned meanwells can't go below 10% no matter what you do, aside from cutting the power off with a switch on the AC input cord.
 

TimoTapani

New Member
Here's a about problems dimming meanwells, if you haven't seen it yet. I would seriously just use a potentiometer. There's no efficiency increase from dimming with PWM like there is with a potentiometer. You're just flashing it on and off at full power very quickly. It might actually be easier on plants to use a potentiometer too. I'm just speculating. As for using the PWM, I have no further advice because I didn't have any problem with it myself, using an optocoupler. About the 10% though, a closed circuit (shorting) will produce that, because as I mentioned meanwells can't go below 10% no matter what you do, aside from cutting the power off with a switch on the AC input cord.
Thank you for the effort. I'll dig in to that link little later. The reason I'm going for PWM is actually efficiency but from a bit another point of view: Easiest variabe for my setup to control heat (and humidity) is adjusting light. There's some swings from day to night, but also day to day. I feel that shooting full 100% (or even 110% with pot) is just waste and counterproductive, if Tamb is beyond 30C (for summer) or humidity exceptionally low (winter months coming). I have a vision that I could achieve best possible overall conditions, even while cutting a bit off of light level, with minimal equipment and effort. At this point you surely undertstand why I don't do it with pot.

Actually I did it alreay with pots. Got few working, but then got a batch of DOA pots or my soldering skills sucked bad that night, but I ran out of pots while trying to do the last driver and didn't want to buy more while I could go for my next goal: automation. (Best pot did do dimming, BUT it had some leak and shorted for a ms once now and then. Didn't even notice it at first, but started wondering why just one of the fixtures flickered and others won't. After desoldering all joints, the short was still there => it's inside the pot, I assume.

This starts to sound like I'm really bad at electronics or I have very bad luck. Probably bit of both. Last night I tried Timothypauls' circuit with just mosfet between DIM+ and DIM- (connected also to common ground). Results were veery confusing. At the beginning everything else worked as expected, but PWM didn't have any effect on power output. As testing other options I found combination that gave me control ... in region of 5-10%. Measured DIM-wires' voltage and it was about 1.3V at that moment (regardless of swithcing PWM-bytevalue between 200...100). If I remove connections to Fet, I get full 10V between DIMs. So my Mosfet seems to leak even while off and PWMing or pulldown resistor on gate doesn't do much difference. Maybe I've just killed it with some static discharge, so have to try again later with more attention.

I don't know if my "kill-a-watt" isn't telling me the whole truth on low powers (higher watts are atleast close to truth), but I have had many 5% (of total, with fans) power consumption states while testing these dimmers. For example yesterday's test, I had 160w total consuming fixture with HLG-120 1050mAh and got watts like 7-15 (with PWM 100...200). I'm just hobbyist and don't understand why, but just saying it happened.

Note to myself: Do tests again with new parts.

edit. digged in to link. Short conclusion: my dimmer is bad. Doublecheck last note. :)
 
Last edited:

BobCajun

Well-Known Member
Thank you for the effort. I'll dig in to that link little later. The reason I'm going for PWM is actually efficiency but from a bit another point of view: Easiest variabe for my setup to control heat (and humidity) is adjusting light. There's some swings from day to night, but also day to day. I feel that shooting full 100% (or even 110% with pot) is just waste and counterproductive, if Tamb is beyond 30C (for summer) or humidity exceptionally low (winter months coming). I have a vision that I could achieve best possible overall conditions, even while cutting a bit off of light level, with minimal equipment and effort. At this point you surely undertstand why I don't do it with pot.

Actually I did it alreay with pots. Got few working, but then got a batch of DOA pots or my soldering skills sucked bad that night, but I ran out of pots while trying to do the last driver and didn't want to buy more while I could go for my next goal: automation. (Best pot did do dimming, BUT it had some leak and shorted for a ms once now and then. Didn't even notice it at first, but started wondering why just one of the fixtures flickered and others won't. After desoldering all joints, the short was still there => it's inside the pot, I assume.

This starts to sound like I'm really bad at electronics or I have very bad luck. Probably bit of both. Last night I tried Timothypauls' circuit with just mosfet between DIM+ and DIM- (connected also to common ground). Results were veery confusing. At the beginning everything else worked as expected, but PWM didn't have any effect on power output. As testing other options I found combination that gave me control ... in region of 5-10%. Measured DIM-wires' voltage and it was about 1.3V at that moment (regardless of swithcing PWM-bytevalue between 200...100). If I remove connections to Fet, I get full 10V between DIMs. So my Mosfet seems to leak even while off and PWMing or pulldown resistor on gate doesn't do much difference. Maybe I've just killed it with some static discharge, so have to try again later with more attention.

I don't know if my "kill-a-watt" isn't telling me the whole truth on low powers (higher watts are atleast close to truth), but I have had many 5% (of total, with fans) power consumption states while testing these dimmers. For example yesterday's test, I had 160w total consuming fixture with HLG-120 1050mAh and got watts like 7-15 (with PWM 100...200). I'm just hobbyist and don't understand why, but just saying it happened.

Note to myself: Do tests again with new parts.

edit. digged in to link. Short conclusion: my dimmer is bad. Doublecheck last note. :)
Optocoupler instead of mosfet. No possible leaks or whatever, because the input and output sides are completely separate and the light that activates the output side can only be on or off. You used a complicated method instead of the easiest method there is. The optos cost like next to nothing too. All you need is arduino, 250 ohm resistor and opto. Simple as hell.
 

wietefras

Well-Known Member
You're just flashing it on and off at full power very quickly.
That's not dimming with PWM as we are discussing it here.

You can dim these drivers with a resistor, a PWM signal or a 0-10 voltage. The PWM signal and resistor are actually converted to a voltage inside the driver. So in the end they do exactly the same thing even.

So it's doesn't matter which method you use, these achieve exactly the same thing. Which is that the driver dims its output and the leds are NOT switched on and off at full power.
 
Top