Controlling a proportional valve using a microcontroller board

Thread Starter

enoob

Joined Jan 6, 2017
22
Dear All,

This is my first post here. I am looking to make a proportional valve controller for regulating the flow in 2 separate channels.
The channels are supplied by the same pump and I just want to place 2 valves on each channel to proportionally control the flow.
Since I am new to microcontrollers, I came here looking for some help on getting started with this project.

The valves I am looking to use are from Clippard (http://www.clippard.com/products/electronic-valve-proportional).
My specifications are selected from this page (http://www.clippard.com/cms/wiki/evp-selection-tips).

0-20 V, 218 Ohm coil, max. 0.093 A for the valve which has max. flow rate of 22 l/min and max. pressure handling of 100 psig.
1800 mbar pressure from the pump with free flow rate 13 l/min.

It says on the valve page that I can use proportional as well as PWM control. Which microcontroller board would be best for such an application (for both proportional and PWM)?
Any help with the circuit will be greatly appreciated.

Thank you so much for your time. :)
 

ronv

Joined Nov 12, 2008
3,770
Dear All,

This is my first post here. I am looking to make a proportional valve controller for regulating the flow in 2 separate channels.
The channels are supplied by the same pump and I just want to place 2 valves on each channel to proportionally control the flow.
Since I am new to microcontrollers, I came here looking for some help on getting started with this project.

The valves I am looking to use are from Clippard (http://www.clippard.com/products/electronic-valve-proportional).
My specifications are selected from this page (http://www.clippard.com/cms/wiki/evp-selection-tips).

0-20 V, 218 Ohm coil, max. 0.093 A for the valve which has max. flow rate of 22 l/min and max. pressure handling of 100 psig.
1800 mbar pressure from the pump with free flow rate 13 l/min.

It says on the valve page that I can use proportional as well as PWM control. Which microcontroller board would be best for such an application (for both proportional and PWM)?
Any help with the circuit will be greatly appreciated.

Thank you so much for your time. :)
If I were to do it I would use PWM. Almost all the micros can output PWM. I'm not a micro guy but if your not going to do a lot of other stuff with one I would buy one that takes the least amount of "stuff" to program it. I had one all picked out a few months ago, but cant remember the name now. I bet one of the micro guys can.:oops:
Edit:
Maybe it was this one.
http://www.digikey.com/en/product-highlight/a/arduino/uno-mcu-board
 
Last edited:

DNA Robotics

Joined Jun 13, 2014
571
PWM is easy on Arduino and there are sample programs in the IDE
analogWrite()
Description
Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to analogWrite(), the pin will generate a steady square wave of the specified duty cycle until the next call to analogWrite. The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz. Pins 3 and 11 on the Leonardo also run at 980 Hz.

You do not need to call pinMode() to set the pin as an output before calling analogWrite().

Syntax
analogWrite(pin, value)

Then a IRL520 N channel, logic level MOSFET on the ground side of your valves will handle up to 100 volts & 10 amps.
 

Thread Starter

enoob

Joined Jan 6, 2017
22
Thanks guys (ronv, DNA Robotics and dannyf) for some of those pointers. From what I understand, Arduino Uno seems to be a good starting point. I noticed that pins 3, 5, 6, 9, 10 and 11 can provide PWM output with a maximum of 40 mA. Also, the operating voltage of these pins is 5 V which I guess is supplied from the USB connection to the computer. Is the PWM a current signal or a voltage signal?

Is that where the MOSFET comes in to amplify the signal? This may sound silly but I'm not really sure whether the pins I mentioned only give current outputs. My valve specifications say 0-20 V with max. current of 0.093 A (93 mA) so what is the MOSFET amplifying? Current or voltage?

Sorry for all the possibly stupid questions. :p
I'm new to this kind of stuff although I find it fascinating.
 

MaxHeadRoom

Joined Jul 18, 2013
21,268
PWM outputs a varying pulse width voltage, (0 to +v) which results in a mean level of current, saw tooth in shape, the level of which depends on the pulse width.
Max.
 

ronv

Joined Nov 12, 2008
3,770
PWM is easy on Arduino and there are sample programs in the IDE
analogWrite()
Description
Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to analogWrite(), the pin will generate a steady square wave of the specified duty cycle until the next call to analogWrite. The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz. Pins 3 and 11 on the Leonardo also run at 980 Hz.

You do not need to call pinMode() to set the pin as an output before calling analogWrite().

Syntax
analogWrite(pin, value)

Then a IRL520 N channel, logic level MOSFET on the ground side of your valves will handle up to 100 volts & 10 amps.
Hi DNA,
The one I was thinking of was kind of like a souped up basic stamp, where all you had to do was plug it into a usb port for programming and debug. Is the UNO the same way?
 

ronv

Joined Nov 12, 2008
3,770
Thanks guys (ronv, DNA Robotics and dannyf) for some of those pointers. From what I understand, Arduino Uno seems to be a good starting point. I noticed that pins 3, 5, 6, 9, 10 and 11 can provide PWM output with a maximum of 40 mA. Also, the operating voltage of these pins is 5 V which I guess is supplied from the USB connection to the computer. Is the PWM a current signal or a voltage signal?

Is that where the MOSFET comes in to amplify the signal? This may sound silly but I'm not really sure whether the pins I mentioned only give current outputs. My valve specifications say 0-20 V with max. current of 0.093 A (93 mA) so what is the MOSFET amplifying? Current or voltage?

Sorry for all the possibly stupid questions. :p
I'm new to this kind of stuff although I find it fascinating.
Yes, the FET lets you use the higher voltage and current.
The pins output a voltage from 0 to 5 volts with a maximum current of 40 ma.
 

Attachments

DNA Robotics

Joined Jun 13, 2014
571
The one I was thinking of was kind of like a souped up basic stamp, where all you had to do was plug it into a usb port for programming and debug. Is the UNO the same way?
Yes, and a lot of Arduino UNOs come with a USB cable but they are just the standard or a mini.

Getting Started with Arduino
https://www.arduino.cc/en/Guide/HomePage

The Arduino Software (IDE) allows you to write programs and upload them to your board.The free IDE comes with plenty of sample programs that you can mix & match to do whatever you want. If you buy "Shields" (that is what they call accessories that fit the main board) like the LCD board, the vendor supplies the driver code & libraries to make it work.

Some of the knock off UNO boards need special drivers. Let us know if you have any "issues". Even the Sparkfun Red board needs their driver. You can get them cheap on EBay BUT, I waited 6 months for a heart beat pulse sensor from China.
 

ronv

Joined Nov 12, 2008
3,770
Yes, and a lot of Arduino UNOs come with a USB cable but they are just the standard or a mini.

Getting Started with Arduino
https://www.arduino.cc/en/Guide/HomePage

The Arduino Software (IDE) allows you to write programs and upload them to your board.The free IDE comes with plenty of sample programs that you can mix & match to do whatever you want. If you buy "Shields" (that is what they call accessories that fit the main board) like the LCD board, the vendor supplies the driver code & libraries to make it work.

Some of the knock off UNO boards need special drivers. Let us know if you have any "issues". Even the Sparkfun Red board needs their driver. You can get them cheap on EBay BUT, I waited 6 months for a heart beat pulse sensor from China.
How about PICAXE?
 

Thread Starter

enoob

Joined Jan 6, 2017
22
Thank you all. :)

I have decided on the following options and I would be grateful for any reviews of the same.

Option 1: Use the 0-5 V input on a valve configured to handle 0-5 V DC (instead of the valve mentioned in my original post). However, from my understanding of Arduino PWM, the current will also vary with the duty cycle thereby leading to a minimum of 0 to a maximum of 40 mA (for 100% duty cycle). Please correct me if I'm mistaken. The problem is that for the sample curve shown, 40 mA seems to have 0 flow rate which is useless for me. I was planning to build a voltage buffer but from theory, I see that the current gain is constant and pretty high since beta is almost always ~100.
The input current-flow rate curve for a sample valve is on this page (http://www.clippard.com/cms/wiki/evp-selection-tips) and I only need to raise the current to around 100 mA to 150 mA (for my setup). Can I use a simple resistive current divider after the PWM output of the Arduino before the voltage buffer stage to lower the current seen by the base of the BJT to about 1 mA to 1.5 mA (while routing the larger current branch down to ground)? This will probably allow me to be fine with a current gain of 100.

Option 2: Use the originally mentioned valve and boost the 0-5 V PWM (both voltage and current, less so for the current as you can see in the link that the current handling capability of the valve reduces for higher voltages) using a common emitter configuration and again use the previously mentioned current divider before the amplifier stage to limit the current.

Also, do I need to connect a flyback diode for this type of valve?
 

ronv

Joined Nov 12, 2008
3,770
Thank you all. :)

I have decided on the following options and I would be grateful for any reviews of the same.

Option 1: Use the 0-5 V input on a valve configured to handle 0-5 V DC (instead of the valve mentioned in my original post). However, from my understanding of Arduino PWM, the current will also vary with the duty cycle thereby leading to a minimum of 0 to a maximum of 40 mA (for 100% duty cycle). Please correct me if I'm mistaken. The problem is that for the sample curve shown, 40 mA seems to have 0 flow rate which is useless for me. I was planning to build a voltage buffer but from theory, I see that the current gain is constant and pretty high since beta is almost always ~100.
The input current-flow rate curve for a sample valve is on this page (http://www.clippard.com/cms/wiki/evp-selection-tips) and I only need to raise the current to around 100 mA to 150 mA (for my setup). Can I use a simple resistive current divider after the PWM output of the Arduino before the voltage buffer stage to lower the current seen by the base of the BJT to about 1 mA to 1.5 mA (while routing the larger current branch down to ground)? This will probably allow me to be fine with a current gain of 100.

Option 2: Use the originally mentioned valve and boost the 0-5 V PWM (both voltage and current, less so for the current as you can see in the link that the current handling capability of the valve reduces for higher voltages) using a common emitter configuration and again use the previously mentioned current divider before the amplifier stage to limit the current.

Also, do I need to connect a flyback diode for this type of valve?
If you take a look at the circuit in post #8. The FET can take more current that your valve needs, so the micro delivers almost mo current.
The way the PWM works is that the resistance of the 5 volt valve is 13.5 ohms. So when the PWM is on 100% the valve sees the full 5 volts. From ohms law 5 /13.5 = 370ma. The max current for the valve.
If the PWM duty cycle is 50% the average voltage will be 2.5 volts, so 1/2 the current.
Edit:
Yes, you need a flyback diode as shown.
 
Top