I have successfully been able to control the actuation of a pneumatic solenoid over USB. Using a laptop, an Arduino, an external power supply, compressed air and a pneumatic solenoid I am able to inflate and deflate links on command. By switching open and closed the exhaust port of a Venturi vacuum generator with a solenoid it is possible to switch between positive and negative pressure (fill and vacuum). With a form of feedback either at the joint or in an end effector, actuation of any vessel can be safely automated.
Control Circuitry:
Code:
//specify the digital ports to which the solenoid circuits are connected
int solenoid1 = 2;
int solenoid2 = 3;
//set the threshold analog value to switch, 0-1023
int threshold = 650;
void setup() {
// initialize the serial communication:
Serial.begin(9600);
//set up digital i/o pins
pinMode(solenoid1, OUTPUT);
pinMode(solenoid2, OUTPUT);
}
void loop() {
// send the value of analog input 0:
Serial.println(analogRead(0));
int sensorValue = (int)(analogRead(0));
delay(5); //update interval in ms
if (sensorValue > threshold){
digitalWrite(solenoid1, HIGH);
digitalWrite(solenoid2, LOW);
}
else{
digitalWrite(solenoid1, LOW);
digitalWrite(solenoid2, HIGH);
}
}