Controlling a 5V proportional Valve with PWM

Hello!

I'm new to electronics and Arduino.

My current project is to control the pressure in a jar by manipulating the pressure of air entering the jar using a proportional valve. A sensor within the jar will give the barometer readings to my arduino.

The valve is a 5V proportional valve from Parker: http://ph.parker.com/us/12051/en/hf-pro-miniature-proportional-valve/920-000047-001

Can anyone guide me to do this? I have used pwm previously but only to control LEDs. I am not entirely sure the valve is working at this point.

Thanks.

1 Like

Just to add, the valve is 5V DC and only has two wires with no marking. That has me a little confused too.

The information from the website say the valves can be manipulated with PWM.

This is quite a challenging project for someone who describes him/herself as "new to electronics".

You will need to build or buy a valve controller, as a simple PWM output will not work. At the very least, you will need a transistor amplifier.

A suggested constant current drive circuit is shown in the valve data sheet.

Unfortunately this circuit requires an accurate, variable control voltage signal, which the Arduino Uno can't provide, so you will also need to build or buy a Digital to Analog Converter (DAC).

I am not entirely sure the valve is working at this point.

Simply apply the design voltage to the coil terminals (5, 12 or 24 V) and it should open. Which version did you buy?

1 Like

unibrow:
Hello!

I'm new to electronics and Arduino.

My current project is to control the pressure in a jar by manipulating the pressure of air entering the jar using a proportional valve. A sensor within the jar will give the barometer readings to my arduino.

The valve is a 5V proportional valve from Parker: http://ph.parker.com/us/12051/en/hf-pro-miniature-proportional-valve/920-000047-001

Can anyone guide me to do this? I have used pwm previously but only to control LEDs. I am not entirely sure the valve is working at this point.

Thanks.

A simple valve will NOT allow you to control pressure. You need a pressure regulator which uses a spring loaded diaphram to control a valve using the air volume. It also has a port to bleed off air that is greater than the pressure setting.

If you have a jar that leaks air, then you can somewhat the pressure by adjusting the valve, but only to the point where the air coming in matches the air leaking out.

Paul

I see you posted while I was editing.

The 5V valve requires up to 465 mA, which the Arduino cannot provide. If you want to use a PWM output to control the valve, you will need a logic-level MOSFET or a Darlington transistor like the TIP120 to handle the current and a flyback diode to prevent voltage spikes from destroying your circuitry. Look up DC motor control for examples.

However, that won't control the pressure, only the flow into the chamber. You will need a fast pressure sensor with feedback to the Arduino (probably a PID loop) to accomplish pressure stabilization, together with another valve to let excess gas out of the chamber to reduce the pressure.

A simple valve will NOT allow you to control pressure.

The "suggested" Valve Control Circuit in the valve data sheet is more than a simple valve. It combines the valve with a PWM driver to comprise a CLOSED LOOP SYSTEM.

There is a Control Signal ("VC"), a feedback signal (VF)and PWM driver signal (VPWM).

That being said, I it is obvious this is more than a "simple valve".

Whether or not the OP is willing or able to implement such a circuit is another issue. For the sake of discussion , I didn't see a flyback diode across the coil but maybe it doesn't need it due to the fact it is High Side switched. (Anyone ?)

The design in the data sheet is surprisingly bad, for a couple of reasons, one of which is the missing flyback diode.

Obviously, the coil should not be in the feedback loop.

If you put the coil in the collector of the TIP120 and added a flywheel diode it would probably work OK

Allan

jremington:
This is quite a challenging project for someone who describes him/herself as "new to electronics".

I'm a mechanical engineer so maybe I'm not so new.

Paul_KD7HB:
A simple valve will NOT allow you to control pressure. You need a pressure regulator which uses a spring loaded diaphram to control a valve using the air volume. It also has a port to bleed off air that is greater than the pressure setting.

If you have a jar that leaks air, then you can somewhat the pressure by adjusting the valve, but only to the point where the air coming in matches the air leaking out.

Paul

Hello Paul, I plan to seal the jar (on the right) apart from a small crack as shown in the sketch below.

My intent is for the valve to change position based on the pressure difference between the two environments.

Do you think this can not be done with this valve?

Thanks.

raschemmel:
The "suggested" Valve Control Circuit in the valve data sheet is more than a simple valve. It combines the valve with a PWM driver to comprise a CLOSED LOOP SYSTEM.

There is a Control Signal ("VC"), a feedback signal (VF)and PWM driver signal (VPWM).

That being said, I it is obvious this is more than a "simple valve".

Whether or not the OP is willing or able to implement such a circuit is another issue. For the sake of discussion , I didn't see a flyback diode across the coil but maybe it doesn't need it due to the fact it is High Side switched. (Anyone ?)

I will try and implement the circuit, worst case I fail. Will I need to buy a special PWM driver?

Thanks.

allanhurst:
If you put the coil in the collector of the TIP120 and added a flywheel diode it would probably work OK

Allan

Hello Allan, my questions might be a reach. Which position would be ideal for the flywheel diode: where the valve coil currently is or in series with the LM358? Could you provide a circuit diagram?

Thanks.

Bit of a puzzle, here. I simulated the constant current coil driver circuit from the valve data sheet in two different configurations, using LTSpice.

The first is the manufacturer's design, and it performs better than I expected. The second simulation is with the coil in the collector circuit, with a flyback diode, and it oscillates at 29 kHz. I don't understand the oscillation, and wonder if it could be an artifact of the way LTSpice works (it is specialized for switching power supplies).

I could only guess at the inductance of the valve coil, and 1 mH may be too high (series resistance is 12 Ohms, as per the data sheet).

Screenshots of the schematic and coil current trace below. It looks like the manufacturer's design is OK.

MFR design:

revised:

In case it has not already occurred to you, you will need use a potentiometer in place of the boltage divider and step the voltage up starting at 0 V , and increnting it gradually until you obtain the target boltage and then do the math to derive the ratio of voltage to pressure so you can extrapolate the voltage needed to obtain a desired voltage.

jremington:
Bit of a puzzle, here. I simulated the constant current coil driver circuit from the valve data sheet in two different configurations, using LTSpice.

The first is the manufacturer's design, and it performs better than I expected. The second simulation is with the coil in the collector circuit, with a flyback diode, and it oscillates at 29 kHz. I don't understand the oscillation, and wonder if it could be an artifact of the way LTSpice works (it is specialized for switching power supplies).

I could only guess at the inductance of the valve coil, and 1 mH may be too high (series resistance is 12 Ohms, as per the data sheet).

Screenshots of the schematic and coil current trace below. It looks like the manufacturer's design is OK.

MFR design:

revised:

Don't know anything about SPICE, etc. The inductance of the coil, snubbed by the diode, will in fact oscillate with an extremely damped oscillation. The current induced by the collapsing magnetic field when the driving voltage disappears will be dissipated by the coil resistance, at the same time will induce a reverse current in the coil. All should go to zero in 1ms, or less.

Is this what you are seeing?

Paul

Is this what you are seeing?

No, the solid green bar in the lower photo is a steady-state oscillation of frequency 29 kHz, amplitude about 30 mA. Blowup below (vertical axis limits 420 to 560 mA).

If I make L1 = 0.1 mH, the amplitude increases, and also the frequency increases to 87 kHz, so the frequency does not depend linearly on L1.

I_L1.png

I_L1.png

1/ Yes - your second circuit is what I suggested.

2/ Try modelling the coil better- it's an inductance IN SERIES with it's resistance - in this case about 11 ohms. It is not a pure inductance.

Allan

2/ Try modelling the coil better- it's an inductance IN SERIES with it's resistance - in this case about 11 ohms. It is not a pure inductance.

As briefly mentioned in a previous post, the inductor is modeled as having a series resistance of 12 Ohms.

If you want to try it yourself, the LTSpice design file is attached (as .txt rather than .asc).

Edit: I just tried the simulation with a different model for the LM358 and that failed completely. So, I think the oscillation is an artifact of the op amp model.

valve_driver2.txt (1.8 KB)

1/ That's not what's shown on the LTSPICE circuit posted - it's a pure inductance.

2/ My PSPICE model with 11 ohms in series with 1mH shows no oscillation whatever. And I don't see why it should. Only a small (2mA, 1uS wide ) damped overshoot from 495mA at 60uS from a switched 0 - 0.5v step input to the opamp + input at t= 1uS . Damping factor i'd guess at about 0.4

Allan

1/ That's not what's shown on the LTSPICE circuit posted - it's a pure inductance.

The properties of the inductor include a 12 Ohm series resistance not shown on the schematic. See screen shot.

Would you please post your model for the LM358? Thanks!