Controlling a 24V pneumatic valve to arduino?

Hi everyone, I'm looking to connect an industrial 24V valve which controls air pressure to a chamber with an arduino. Is this possible? I've attached a picture of the wiring diagram and valve.

My guess is that it would need a seperate 24v PSU for the valve, then the input voltage (0-10v) would need to run through some sort of voltage divider to bring it to 0-5v, and into an analog IN on the arduino?


The device in the datasheet can use 10V control signals or 20mA current loops - which exact version have you got?

Setpoint: 4...20mA (not 0...10V)
Feedback output: 4...20mA

It seems wise to me to first study the behaviour of the valve on the bench using a PSU and physical switches/buttons. When you are sure about how everything works, you can hook it up to your uC via optoisolators.

I'm not familiar with optoisolators. I'll definitely want to test it disconnected from the intended pump first to check everything.
.. as my voltage is 24V I shouldn't damage anything with testing? main thing at this stage is to get it working without damaging the valves electronics.

You will most certainly fry your arduino if you try to make it handle 24V directly. You will also fry it if you try to make it read a feedback voltage that can go as high as 10V. A voltage divider will work in this case to bring the range down to 0-5V, or aven a tad lower, if you don't trust the maximum voltage to actually top at 10V.

Sorry I meant 24V PSU to the valve, the arduino would be powered with 5V which is seperate.
The voltage divider is what I'm wondering about now, if the signal going back into the arduino is 4-20mA then is a voltage divider required?

The best interface I can think of would be:

  1. Controller with 24V ps
  2. Arduino with 5 to 12v ps
  3. both of the above MUST have a common ground.

Setpoint:

  • Arduino output "analogout" (I forget the command).
  • RC filter on this output. The analog output is really a PWM output and needs to be filtered to become a DC voltage
  • An opamp capable of being powered by 32 volts. (24 + some safety margin). Something like an LM324 (aka LM2902)
  • Various capacitors on the opamp (+V, maybe a feedback cap to slow down any spikes)
  • Set amplifier gain to ~2.5.
  • The output of the opamp will be approx 0 to (2.5 x 4)

Feedback:

  • Feedback will need a resistive divider with a 0.1µf cap before going into an analog input.

Current loop, 4 - 20 mA, can be fed through a resistor lower value than 250 Ohm. That gives voltage lower than 5 volt. For a 3.3 volt controller use a resistor value less than 165 Ohm. Controller GND and signal GND of the 24 volt equipment needs to be connected.