I NEED HELP 5V TO 10V PWM

alesh

Well-Known Member
It's not just PWM though. You can also give it a 1-10V signal. ie 5V is 50% then. So if you do PWM at 5V how is it going to know that you mean 100% from 5V PWM or 50% from 5V in the 1-10V range?

My fan has the same specs (0-10V, 10V PWM or a pot meter) and when I measured the voltage it simply converted the 10V PWM into a voltage between 0 and 10V (or actually 1-10V for these drivers). That's a very simple conversion and it makes it really easy to work with all three incoming types of signal.

I'm not just guessing here, I actually built a fan controller that does this using a tiny Arduino (like in the photo a bit higher, but then on a PCB and in a box and a temp/RH sensor connected).

Makes sense that the Mean Well drivers work the same seeing how they have the same specs.

It's really is not TTL. How would a 0-10V signal or a potmeter work with a TTL input? It really only works with a 0-10V signal internally. The 10VPWM and resistor input are both converted to a voltage in that range.
Thanks for the explanation it makes sense and you're right. It also explains why it's required to have exactly 10V.

I used PWM from Arduino to dimm LDD buck drivers. Their PWM input is different from the dimm input on MW AC drivers as I'm reading in the data sheet.
 

wietefras

Well-Known Member
A resistor and a capacitor (low pas filter) is enough to turn a PWM signal into a voltage between 0 and the PWM voltage. It's a common trick to get an actual analog signal out of an Arduino instead of the PWM they normally produce.

You need to pick the resistor and capacitor to match the PWM frequency, but it's a pretty broad range usually. Or in this case Mean Well chose the filter and we need to match our PWM frequency to their specs.

For a proper PWM only signal 5V would probably have sufficed yes.
 

wietefras

Well-Known Member
I tried my fan controller on the Mean Well and it didn't work.

Thing is, my fan has a GND, 10V and PWM line (and tacho). The Mean Well only has a 10V and PWM line (DIM+ and DIM-). I think I'm missing the common ground needed for my fan controller circuit, but it could also be an issue with the ULN2003A which I took from the stepper motor driver. I had some issues with the fan too that it would only run if an led was connected to the output of the PWM signal.

I'd basically would want to mount a switch between the DIM+ and DIM- lines to create the PWM effect. How would one do this? It just needs to open and close, because the DIM lines already give you the 10V.

So something like this with the switch controlled by the PWM signal of the Arduino:
Dim Switch.png
I tried this:
ULN2003A.png

With the Arduino connected to IN1 and GND and on the other side DIM+ to COM and DIM- to OUT1. This didn't work which makes sense because I guess the electiricity probably has to flow from OUT1 to GND. With the fan I have GND connected to GND, 10V to COM and the PWM output to OUT1. The Mean Well driver is missing a common ground.

Maybe some other digital "switch" like the ICL7667 would work better?
 

Isawthelight

Well-Known Member
I tried my fan controller on the Mean Well and it didn't work.

Thing is, my fan has a GND, 10V and PWM line (and tacho). The Mean Well only has a 10V and PWM line (DIM+ and DIM-). I think I'm missing the common ground needed for my fan controller circuit, but it could also be an issue with the ULN2003A which I took from the stepper motor driver. I had some issues with the fan too that it would only run if an led was connected to the output of the PWM signal.

I'd basically would want to mount a switch between the DIM+ and DIM- lines to create the PWM effect. How would one do this? It just needs to open and close, because the DIM lines already give you the 10V.

So something like this with the switch controlled by the PWM signal of the Arduino:
View attachment 3577167
I tried this:
View attachment 3577168

With the Arduino connected to IN1 and GND and on the other side DIM+ to COM and DIM- to OUT1. This didn't work which makes sense because I guess the electiricity probably has to flow from OUT1 to GND. With the fan I have GND connected to GND, 10V to COM and the PWM output to OUT1. The Mean Well driver is missing a common ground.

Maybe some other digital "switch" like the ICL7667 would work better?
I bet an optocoupler like a PC817 would work as the PWM switch in you diagram. Blue Dim+ wire connects to PC817 pin4 & White Dim - connects to PC817 pin 3. PC817 pin 1 connects to Arduino +5Vdc and Pin2 connects to /PWM signal via 330 ohm resistor. PC817 is cheap at Amazon. http://www.amazon.com/WYPH-PC817-PC817C-PC817-1-OPTOCOUPLER/dp/B00RMVEF24/ref=sr_1_4?ie=UTF8&qid=1453506432&sr=8-4&keywords=optocoupler
 

wietefras

Well-Known Member
Indeed. Haven't gotten around to trying it, but I found an optocoupler in the Arduino starter kit. Don't remember the which model that is, but I guess it doesn't matter much. Apart from being able to work with 10V on the output of course.

There are plants under the light now, so I guess it will have to wait till they are done.
 

VegasWinner

Well-Known Member
Hey guys, I have been looking through @stardustsailor 's old threads trying to find the answer and avoid making this post. But I am having a little trouble deciphering the lingo.

THE GOAL: use a 0-5v pwm signal from a controller like an arduino to control an led driver like an HLG with a 0-10v dimming lead.

OPTION 1: use a OP amp like a Texas Instruments LM324 to boost the 5v signal to a 10v signal via a separate 12v dc power source adjusted down to 10v.
View attachment 3574155
OPTION 2: use a mosfet or transistor like LM317T to do something?
View attachment 3574160

if you can help me, please respond as though you are talking to someone with next to no circuit building experience. Thank you!
Option is closest.Linear. I would go with a 1k resistor at the base, and no resistor on the collector. Use a 12v battery and a 2.2k resistor and you have a solution or else you can use no resistor and a 9v battery or a 10v wall wort. Both will work and you only need two components costing about $0.25. peace.
 

Yesdog

Well-Known Member
Option is closest.Linear. I would go with a 1k resistor at the base, and no resistor on the collector. Use a 12v battery and a 2.2k resistor and you have a solution or else you can use no resistor and a 9v battery or a 10v wall wort. Both will work and you only need two components costing about $0.25. peace.
So is this circuit possible with just the DIM+ lead as the 10v power supply? DIM+ as Vcc (10), DIM- as out?

Like this:

 
Last edited:

VegasWinner

Well-Known Member
The signal needs a 10v source or else the driver runs backwards. You also need a pulldown resistor 1k to reverse the pullup resistor in the driver. It is easier to use stepper motor driver 10v pwm from 5v pwm with a 10v power source. If you don't use a 10v power source you have to invert the signal to compensate.
 

Yesdog

Well-Known Member
Put it into LTSpice and do a transient analysis simulation.
So I tried one of those... shitty free simulations, but I think I'm having issues modeling what kind of circuit the actual... dimmer leads are? It looks to me like its a 10v+ lead and and a 0V- sink (input? is this even a ground?). Do i treat that as a voltage source? Or is this damn thing more like a voltmeter?

I already blew up a transistor.. also burned a spot in my desk from the 185V output of this scary fucking driver lol. No idea what happened, but it just shorted itself out randomly when i was testing. Guessing it arc'd off my desk somehow.

Is there any reason not to use an optocoupler?
 

Yesdog

Well-Known Member
The signal needs a 10v source or else the driver runs backwards. You also need a pulldown resistor 1k to reverse the pullup resistor in the driver. It is easier to use stepper motor driver 10v pwm from 5v pwm with a 10v power source. If you don't use a 10v power source you have to invert the signal to compensate.
I got a model of both your circuits working in the simulator, seems to all check out fine. I'm just super confused why I need a voltage source? I've seen some other circuits that show that, but like.... if you can just change the resistance between DIM+ and DIM-, isn't that its own voltage source and circuit? I also don't care much about inversion, I can just invert the PWM value from software- no problem. I just want to get the simplest and safest circuit done, without killing myself in the process lol.

EDIT: unless its actually inverting to -10V and not just the signal? Fuck me, this shit is hard.
 

Yesdog

Well-Known Member
Optocoupler really does sound ideal- it's essentially like a relay right?
 
Last edited:

wietefras

Well-Known Member
@Yesdog, You can also use a single transistor, but two should be fine too. In the end an optocoupler is just a transistor. On the switching side anyway. Still I liked the decoupling of the optocoupler better than using a standard transistor.

Indeed you don't need an extra 10V source. Not sure why he keeps insisting that you do.
 

VegasWinner

Well-Known Member
I have used it too but it goes backwards on hlg drivers which is why you need a positive 10v signal to drive down with a pulldown resistor to compensate the pullup resistor. I have tested the circuit with and without the 10v. The easiest solution for multiple channels is to use stepper drivers cheap only $4. Cost that much to build the components without a pcb board.
 

Yesdog

Well-Known Member
I have used it too but it goes backwards on hlg drivers which is why you need a positive 10v signal to drive down with a pulldown resistor to compensate the pullup resistor. I have tested the circuit with and without the 10v. The easiest solution for multiple channels is to use stepper drivers cheap only $4. Cost that much to build the components without a pcb board.
So when you say backwards, do you mean it just inverts the PWM duty cycle? Or like.... does the driver actually flip polarity on its outputs? Inversion I can deal with- but flipping polarity just... sounds like something the driver should protect itself against? AKA impossible?

This, minus the 10V suppy, is everything you need actually. The driver supplys the 10V, the transistor chops it and the internal circuit in the driver smooths it to a analog signal.
I used that circuit successfully with the Meanwell ELG series.
@Yesdog, You can also use a single transistor, but two should be fine too. In the end an optocoupler is just a transistor. On the switching side anyway. Still I liked the decoupling of the optocoupler better than using a standard transistor.

Indeed you don't need an extra 10V source. Not sure why he keeps insisting that you do.
Ok, cool... so it sounds like im on the right track then, so If i go the single transistor route, this should really be about it right? The shared ground should drain any additional current from the base, but still leave an unimpeded path from the DIM+ to the DIM- when the base is hot?

EDIT: (the 'common' ground here would be the arduino/pi ground) and yes, it will invert the duty cycle

 
Last edited:
Top