Electronic – Current Controlled Output Using PWM

current-sourcedc/dc converterdriverpwm

I am looking to control a proportional valve with a PWM signal that will correlate into exact current amounts (for example a 25% duty cycle will output 200mA, and a 90% duty cycle will produce let's say 1A).

What kind of hardware will this require?

Can I use an LED Driver (they seem to be current control outputs)?

I have seen and read about dc-dc converters being used, but I am not sure I understand how they achieve constant current source.

Best Answer

Yes you can use a PWM regulator suitable for LEDs to drive a solenoid but don't forget to put a flyback diode in place across the solenoid to restrict back emfs damaging the chip.

You can also use any regular adjustable buck regulator as a constant current source too. Imagine it was a linear fixed voltage regulator of 2.5V and you put a 25 ohm load across the output - the current into the regulator would be 100mA plus what the linear regulator might need internally. Basically a linear voltage regulator can act as a constant current source but, in this example wastes 250 mW in the resistor.

A lot of linear (yes I'm still talking linear at the moment) are adjustable with a sense/feedback pin that needs about 1V from a potential divider attached to the output. Well. if instead of the regular pot divider you used a LED/solenoid/load from the output and a 10 ohm resistor to ground, the adjustable regulator will attempt to put 1 volt across the 10 ohm resistor by lifting its output voltage and forcing 100mA thru the LED/solenoid/load. This time power loss is down at 100 mW.

It's the same for an adjustable buck regulator - pick one that needs a small Feedback voltage level (some as low as 0.6V) and put the load from the bucks inductor-output to the FB point and 6 ohms down to ground - you get 100mA.

However, you want to control things with PWM and this is a different deal entirely. I would seriously still consider voltage controlling the solenoid because it will have resistance that converts volts applied to current through the coil. Use a synchronous buck regulator made from two mosfets - use a driver on the mosfets to be able to control the top-switch much more easily and feed it PWM. The inductance of the solenoid should keep the current fairly "dc" in nature.