Increasing and decreasing pneumatic pressure by the same amount

I am using Arduino Mega, MOS Module, Air valve FA0520D (2-way valve), and FA0520E (3-way valve). I would like to gradually increase and decrease the same amount of pneumatic pressure at a time of an actuator. The pressure is measured by the MPRLS pressure sensor. The following is the part of the code that I wrote to increase the pressure:

void loop() {
  float t_cycle = 100; 
  float ki = 0.1;  //The value of ki is randomly chosen from 0 to 1. 
  float t1i = ki*t_cycle; 
  float t2i = (1-ki)*t_cycle; 

tcaselect(0);
  float pressure_hPa_0 = mpr0.readPressure();
  float pressure_PSI_0 = pressure_hPa_0 / 68.947572932;
  float pressure_Set = 22; 

  //object is pressurized
  while (abs(pressure_PSI_0 - pressure_Set) > 0.25 && pressure_PSI_0 <pressure_Set ){
              tcaselect(0);
              pressure_hPa_0 = mpr0.readPressure();
              pressure_PSI_0 = pressure_hPa_0 / 68.947572932;
              Serial.print("Pressurized");
              Serial.print("\t");
             

              timer = millis();
              Serial.print(timer*0.001);
              Serial.print("\t");
           
              Serial.print(pressure_hPa_0 / 68.947572932);
              Serial.print("\t");
              
              Serial.println(' ');
              
              digitalWrite(5,LOW); // keep the 2-way valve off
              digitalWrite(3,HIGH); // turn on the 3-way valve
              delay(t1i); 
              digitalWrite(3,LOW); // turn off the 3-way valve
              delay(t2i); 
              digitalWrite(3,HIGH); //turn it on
             }
}

What is the way to increase the pressure from 14 to 22 with a certain amount of increment (i.e. 1)? How to select the amount of delay between the on and off of the 3-way valve to achieve it? Is there any other way to achieve it (like PWM/ PID control)?
Now, I have obtained random increments of pressure like these: 13.85,16.35,19.12,20.58,21.46,22.02 which are not consistent with every time I run the code or every time the loop runs (I decrease the pressure similarly and then increase the pressure again in this loop).
In addition, I connected the 3-way valve's common pin to the actuated object, the normally closed pin to the source air supply, the normally open pin to the 2-way valve, and the 2-way valve vents to the atmosphere.

Can you draw a pneumatic circuit diagram and add links to the valve data sheets?

I could not find the datasheet but these are the valves:
3-way: 6V Air Valve with 2-pin JST PH Connector [FA0520E] : ID 4663 : $2.95 : Adafruit Industries, Unique & fun DIY electronics and kits
2-way: https://www.amazon.com/Aexit-Electrical-Straight-Through-Pressure-Solenoid/dp/B07LFH1BSD
This is how all the parts are connected. I attached IMU to the actuated object to measure the bending angle due to the pressure.

How large is your supply tank for the new air and what is it's pressure. You need to study what you are attempting to create based on gas laws.

Supply air comes through a pipe and I can produce as much air pressure as I need.

Do I understand you right that the NC of the 3-way valve is the pressure inlet to increase the object pressure, the NO outlet is used to hold or decrease the pressure, depending on the 2-way valve state?

Air pressure is not your problem. Volume is your problem.

Yes! Please note that all of these are for the soft robotics application. I input air into a silicone robotic digit mimicking a human finger.

Then I see two phases: one where the finger bows much at small pressure difference, and another one when it applies pressure to the touched object without bowing much more. How do you want to determine the set pressure and the different time steps to let air into the finger?

Can you describe the intended actions more abstract, like take() and release()? Then find out which feedback and timing applies best to these actions. Once you know more about the mechanical/physical behavior of the finger you can determine better the procedure to reach some goal.

E.g. how long does it take to get the actual (stable) pressure in the finger after stopping inlet/outlet? During inflate/vent in progress?

Is PWM applicable to turn the digital valves into more analogue ones, for finer pressure increase/decrease tuning?

1 Like

You might consider something like a stepper motor controlling a regulator valve if pressure control is what you are really looking for. A regular valve wont control pressure.

If you have two tanks connected with a regular valve where on is at 100 psi and the other is at zero. Even if you only slightly open the valve, they will both equalize at the same pressure.

Using a regulator, you can adjust the pressure in the second tank to whatever you need…

My $0.02 :man_shrugging:t2:

That depends. Like electrical switches can come in break-before-make or make-before-break type.

Hi, @snowflake13

What is your primary feed back.
Which feedback are you using?

Do you want measured angle of the Actuator via MPU6050?
OR
Measured pressure from the controlled device output of the Actuator via MPRLS?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

1 Like

My actual objective is to measure the angle of the actuator via MPU6050 when it is pressurized as well as depressurized.
I failed terribly. The problem is, say robotic finger moves 20 degrees counter-clockwise when pressurized. When depressurized it reaches its initial position (0 degrees). This is verified by a camera reading. But the IMU cannot measure it. It measures 20 degrees counter clock pressurized motion (not always correctly though). But it never shows that it reaches 0 degrees when depressurized. I feel like I need to make the angular velocity for both pressurization and depressurization of the finger the same to make the IMU read the same amount of angular displacement.
This is my initial post in the forum:

But then why am I getting pressure increased from 14 to 22? For pressurizing the finger, I set the max. pressure as 22 and for depressurizing, I set the min. pressure as 14. And I am getting pressure within that range.

Absolute angles can be calculated from the accelerations vs. gravity. Rotational speed instead has to be integrated into angles, with high chance for instability and runaway.

I am using this source code to measure the angle: GitHub - rfetick/MPU6050_light: Lightweight, fast and simple library to communicate with the MPU6050
A complementary filter is used here to integrate the accelerometer's and gyroscope's readings.

There may be other ways. What is your air leakage rate?

Thank you. I found that the 3-way valve requires 0.15 sec. to make the finger pressurized (from 14 to 22). On the other hand, the 2-way valve requires 0.17-0.18 sec. to release pressure from the finger. Or, more specifically, the pressurized loop runs for 0.15 sec and the pressure release loop runs for 0.17-0.18 sec. To calculate this I removed the delay function from the code. So, it will only open the 3-way valve and keep it open until the pressure reaches to 22.
Is there any way I can make both the valve acquire and release pressure for same amount of time? Does that also depend on the length of the tube that connects the actuated object to the 3-way valve and the 3-way valve to the 2-way valve?
The following is my experimental settings:

Only if no other parameters are involved, like mechanical pressure on the finger.

Yes, the tubes contribute to the entire volume to consider.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.