Connecting 2 Solenoid Valves for Double Acting Pneumatic Devices

Hello everyone!

I've been looking online for tips on how to program a double acting air cylinder and compact rotary air actuator at the same time using Arduino UNO.

I come across this link that I was planning on using for the basis of my circuit design.

However, I am wondering. The example in the link below would be for one solenoid valve. I have a couple of questions.

  1. Since the valves require 12V of power each, would that mean I would need to hook two separate power supplies on the opposite power rails of the breadboard? Or can I wire it to power both valves adequately using one power source? I already know the Arduino Uno will need to be powered separately from a wall outlet, and that's the easy part in my eyes.

  2. Could two digital signals be fed through the TIP 120 transistor to complete one cycle of the air cylinder? If not, then I imagine I'll need a second for each valve. Or if I simply switch the voltage signal from high to low (via Arduino sketch), will the air cylinder will revert back to its original retracted state by default?

Thanks in advance!

Got a link to a datasheet?

See link below for the solenoid valves I want to work with.

You will require 4 valves for a double acting cylinder.

Edit

Cross post.
Sorry using one of those you only need one.

You can get single solenoid spring return ones as well which can be had quite cheaply from chinese vendors.

dsaenz13:
Hello everyone!

I've been looking online for tips on how to program a double acting air cylinder and compact rotary air actuator at the same time using Arduino UNO.

I come across this link that I was planning on using for the basis of my circuit design.

Controlling A Solenoid Valve With Arduino - BC Robotics

However, I am wondering. The example in the link below would be for one solenoid valve. I have a couple of questions.

  1. Since the valves require 12V of power each, would that mean I would need to hook two separate power supplies on the opposite power rails of the breadboard? Or can I wire it to power both valves adequately using one power source? I already know the Arduino Uno will need to be powered separately from a wall outlet, and that's the easy part in my eyes.

  2. Could two digital signals be fed through the TIP 120 transistor to complete one cycle of the air cylinder? If not, then I imagine I'll need a second for each valve. Or if I simply switch the voltage signal from high to low (via Arduino sketch), will the air cylinder will revert back to its original retracted state by default?

Thanks in advance!

Using the valve in your second link you could use one output pin on your arduino and using external electronics switch both solenoids.

I am unsure why you need a double solenoid valve though.

Either way the solenoids should be controlled by a transistor and they should have a separate supply from the arduino, the solenoids should also have a snubber diode across the solenoid coil.

I would suggest using a digital FET rather than a TIP120.

dsaenz13:
low (via Arduino sketch), will the air cylinder will revert back to its original retracted state by default?

Thanks in advance!

It sounds that you have little knowledge of pneumatics.
I would suggest you do a little more research.
Control with Arduino is quite easy.

I built a pcb drill using a nano, once i understood the pneumatics the use of Arduino was redundant.

Your solenoid valve looks fine. Pretty expensive though; you can find much less expensive options (~$30). Be aware that it's a pilot activated valve; you have to have at least 29 PSI of pressure on it in order to actuate it. Don't bother trying to test it until you have air pressure piped to it - it won't move.

You do need two transistors/etc., one for each coil. The valve will not "return" to any position when you de-energize either coil on it. It's a pilot operated valve and the air pressure forces the "spool" to stay in position when the coils are de-energized.

Another option is to use a relay board; a board with four relays would be quite cheap and let you avoid messing around with most of the soldering and transistors and diodes and stuff. Yourduino.com has a nice tutorial on using these relay boards.

Chagrin:
Another option is to use a relay board; a board with four relays would be quite cheap and let you avoid messing around with most of the soldering and transistors and diodes and stuff. Yourduino.com has a nice tutorial on using these relay boards.

I believe the relay will be the simplest option and allow me to hook all my components without fear of messing them up from an incorrectly set up circuit. I found a promising looking relay below, rated up to 30V DC/10 A.

https://www.amazon.com/SainSmart-101-70-101-4-Channel-Relay-Module/dp/B0057OC5O8

So, if I were to hook that relay up to a single 12V DC power source, would it be sufficient enough to supply power to the two solenoid valves rated at 12V DC? They are going to be activating at different times, per my code that I will post below. I'm assuming one channel will be sufficient for the air cylinder and rotary actuator.

int VALVE1 = 3; //First output valve for air cylinder
int VALVE2 = 6; //Second output valve for air cylinder
int VALVE3 = 9; //First output valve for rotary actuator 
int VALVE4 = 11; //Second output valve for rotary actuator
int E_COUNTER = 13; //Pin output to control digital counter for number of cylcles completed.

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize all pins as an output.
  pinMode(VALVE1, OUTPUT);
  pinMode(VALVE2, OUTPUT);
  pinMode(VALVE3, OUTPUT);
  pinMode(VALVE4, OUTPUT);
  pinMode(E_COUNTER, OUTPUT);
  digitalWrite(VALVE1, LOW);   // Ensure the air cylinder does not activate immediately when rig is powered up
  digitalWrite(VALVE2, LOW);   // Ensure the air cylinder does not activate immediately when rig is powered up
  digitalWrite(VALVE3, LOW);   // Ensure the rotary actuator does not activiate immediately when rig is powered up
  digitalWrite(VALVE4, LOW);   // Ensure the rotary actuator does not activiate immediately when rig is powered up
  digitalWrite(E_COUNTER, LOW); //Ensure the counter does not accidentally count an extra cycle upon start up
  delay(2000);                 // wait for 2 seconds prior to start
}

// the loop function runs over and over again forever
void loop() {
  
  digitalWrite(VALVE3, HIGH);    // Activate rotary actuator to open the handle from the door.
  delay(1000);                 // wait 1 second to allow handle to be released from latch
 
  digitalWrite(VALVE1, HIGH);   // Activate air cylinder to push the now unlocked door open to full width.
  delay(1000);                 // Allow door to be opened far enough before controlling rotary actuator again
  digitalWrite(VALVE3, LOW);   // Stop supplying air to this valve.
  digitalWrite(VALVE4, HIGH); // Supply air to this valve to return the rotary actuator to its original position, allowing the handle to re-engage with the latch when door closes.

  delay(2000);                 // Allow door to settle against the door stop
  digitalWrite(VALVE1, LOW);   // Stop supplying air to this valve.
  digitalWrite(VALVE2, HIGH); // Supply air to this valve to retract the cylinder. The door closer will handle closing the door on its own.

  
  digitalWrite(E_COUNTER, HIGH);   // Send signal to the counter to add one tick to the current total number of cycles.
  delay(200);                      // Gives time for controller to process signal
  digitalWrite(E_COUNTER, LOW);    // Send signal to the counter to add one tick to the current total number of cycles.
  delay(3000);                     // Allows door to close completely and prepare for next cycle.

}

I am also going to connect a battery powered digital counter to the relay so that it may receive signals from the Arduino. Those batteries will provide 3V to the counter only, and the two wires coming out of it could go to the relay. Will connecting this counter to the relay interfere with it's operation? Or would that need to be connected via breadboard directly to the Arduino instead?

dsaenz13:
digitalWrite(VALVE3, LOW); // Stop supplying air to this valve.

You will need an extra valve to accomplish that.

EDIT.

Double acting cylinders are meant to be operated to the end stops with a valve like that.
positional control requires a proportional valve which is very expensive.

Using your method with an extra valve may work but if there is a lot of dead space in the pipework expect overshoot

To prevent the door flying open uncontrollably you will likely also need flow restrictors (needle valves)

http://www.ebay.co.uk/itm/12V-24V-220V-5-Way-2-Position-1-4-1-8-Solenoid-Valve-Pneumatic-Air-Control-/162216028156

Tenth of your price :slight_smile:

Example of flow restrictor

http://www.ebay.co.uk/itm/Pneumatic-Throttle-Valve-1-8-BSP-to-6mm-pipe-Air-speed-control-OEM-/121361655638?var=&hash=item1c41b7e756:m:mEIgaMfF7sU0iuqD_Ak99NQ

The logic for controlling these relays is backwards; setting the pin LOW turns the relay on and setting it HIGH turns the relay off. Be sure to check the tutorial I linked above with emphasis on the part that starts with "IMPORTANT NOTE". Also read the part that explains "optical isolation".

These are "pilot operated valves"; the proper actuation sequence for switching a valve will be to 1) energize the solenoid 2) wait a short moment 3) de-energize the solenoid. Then to switch the valve to the original position you need to 4) energize the OPPOSITE solenoid 5) wait a moment 6) de-energize the opposite solenoid. That's probably confusing to hear right now but it'll be apparent when you get your hands on one and start messing with it.

The valve is always on in one position or another, there is no off position.

If you use a seperate 3 way valve as well this will shut off the air and depressurise the system.

This makes the cylinder much easier to move.
In an emergency that might be useful to allow manual opening.