Friday, 25 July 2014

power - Driving proportional valves from microcontroller


I am looking to drive a current regulated proportional (solenoid) valve that needs up to 85mA @ 24V from a microcontroller.



So far I found this circuit that looks pretty straightforward: enter image description here


What are other low cost options? Is there such a thing as a programmable current source that I can drive through SPI or I2C? So far I wasn't able to find one.



Answer



I would drive the valve by PWM with a low side switch. All you need is the transistor and the flyback catch diode. The solenoid coil has significant inductance, so will smooth out the current on its own. I'd stay above the audible range, but most likely the solenoid will "see" only the average well below that frequency. At 25 kHz PWM frequency, for example, you get 40 µS per pulse. That is quite a long time for a modern microcontroller, so you will have plenty of resolution and lots of cycles to compute how long the next pulse should be.


At your voltage and current, you can use something like the IRLML0030 as the low side switch and directly drive it from a digital PWM output of the microcontroller. Don't forget the reverse diode across the coil. A Shottky would be good. 30 V 1 A Shottkys in SMA packages are plentiful and cheap.


You say you want to control the current, but is that really just a internal parameter of a larger control system? For example, are you really trying to control pressure, flow rate, or something else? If the solenoid drive is inside a larger feedback loop, then you can just make the PWM duty cycle proportional to the signal. It won't be completely linear, but plenty close enough for the outer feedback loop to work with and eventually control the desired parameter correctly.


I actually did exactly that once in a real commercial product that controlled the pressure on the output of the valve. I did compensate the duty cycle based on the measured power voltage, since that could vary widely in my case. That means the outer control loop computes the desired solenoid drive level, and the low level code computed the PWM duty cycle from the desired drive level and the actual supply voltage.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...