Balance Pneumatic Hab Level 3 Mechanism

Hi! We use three giant pneumatic pistons to raise ourselves up to the height of the Hab platform 3. One issue that we have is that these pistons are not balanced. The two we have in the front are hooked up to the same solenoid and are fine. The issue is that it doesn’t go up at the same time as the back piston, and so we always fall over. What is a way to balance it, outside of what the driver can do?

My first thought is to try it programmatically. What does the kOff state represent on a double solenoid? Does it stop a piston midway?
Option 2 is to keep triggering the pistons in opposite directions, up and down, until it levels out. We have a navX to find the imbalance. Would that be accurate, would it take too long, or would it use a lot of air pressure? (If the front is too high, switch direction, bring the front down momentarily, then back up once level)

Our final solution is to make all hoses the same length and piston the same height off the ground. Not preferred because this has to be done at a regional.


While the problem you’re reporting isn’t intuitively obvious, it is to be expected with a multi-cylinder pneumatic lift if you do not have some sort of active balancing going on.

As normally plumbed, using a double solenoid to provide fine control for balancing a multi-cylinder lift is far from the optimal solution. When plumbed normally, switching a 5-port solenoid (whether single or double) will result in venting the pressure on the recently pressurized side of the cylinder, and charging the other with pressure. This is likely to result in over-correction, and is certainly wasteful of the energy in the pressurized air.

A better solution is to use twice as many 3-port [single] solenoid valves. (note that a 5-port valve may be converted to a 3-port valve by plugging an output). This will allow you to stop sending air to the side which is progressing too quickly, without actually relieving the air in the system and back-charging the other side to force it down.

Anyway, the inherent problem with an non-detail controlled climb: Once one side gets a bit ahead, the load tilts toward the side which is behind. This almost inevitably results in an even greater force on the lagging/lower side, which ends up in a “death spiral” positive feedback loop.


KOff will not stop the piston mid way it will just disable the coils on the solenoid. I would not recommend trying to toggle the pistons, you will eat through your air very fast especially if they are a large bore. The issue is likely due a greater load being applied to the rear piston since there is only one. The best fix for that is to regulate the front pistons down from 60 psi if you have the extra force. It would be helpful to know the piston bore size and the weight distribution on your robot.

Another option is to use a 5 port, 3 way solenoid with a closed option to accomplish something similar, I believe.

Whichever way you do it, make sure you follow R93A. In particular, make sure when you open the pressure vent plug, the pneumatic system is completely depressurized. Relevant thread and post:

I also particularly liked the mechanical solution from hrench in that thread.

1 Like

We tried a similar setup, controlling the solenoids to keep the robot level. We determine the tilt angle via the built-in accelerometer of the roborio, basically Math.atan2(accel.getY(), accel.getZ())). That provides a good angle measurement while the robot stands still or is rising up, but as soon as we turn a solenoid off to correct for getting out of balance, the ‘jerk’ results in a comparably large amount of acceleration, resulting in confused tilt angle readings. We’re trying to work around that by ignoring large tilt angle readings, assuming they are the result of acceleration jumps in response to turning solenoids off/on, but that of course means we’re not able to control the tilt angle for some time. Better would be a sensor that determines tilt angle which is not based on acceleration.

Do you guys have a gyro on the bot? IMUs like the NavX or the PigeonIMU have the ability to measure pitch and roll.

What about using a string potentiometer on each piston? Attach it to your frame and run the string to the “foot”. It will give you an absolute reading of the extension for that piston, and shouldn’t be impacted by sudden starts and stops.

Our gyro is currently the ADXRS450 which doesn’t help with tilt angle. Thanks for the NavX or string pot hints.

Would flow control valves help?

Flow control valves will help, but they’ll be unlikely to ever ‘get you there’.

Robots aren’t balanced. Even identical cylinders aren’t equivalent.

You need a feedback system of some sort.


We use two cylinders at the front of our bot to assist in the climb and had a balance problem. It is probably a crude solution, but we just added the valves and adjusted until it worked. If looking for a quick-easy-something to try, it is worth a shot.

I remember a wise engineer once told me “Gravity is constant; friction is not”. Flow control valves could work, but might need constant readjustment as conditions change.

This English chap built a DIY string pot onto a pneumatic cylinder to measure it’s position:

Op do you have a video of this happening?

Don’t have video currently. Will attach if received

Thanks for that suggestion! It’s what we want to try first after unbag.

Hey @ivermani there are solenoids out there that you can put on each end of the cylinders to regulate the air flow into one air intake for the cylinder, you can put these on each cylinder, run a couple tests and adjust how much air goes in if you don’t have an even weight distribution, also, if you do have an even weight distribution, even if you don’t your main problem could be that you need one more cylinder on the one side, While the side with all of the cylinders operate faster and stronger, the opposite side is struggling to lift and it falls over, adding another cylinder would certainly help if it all doesn’t work evenly, you can always go back to my first suggestion. This is nothing by program and you cannot stop a piston midway or operate it up and down until it levels out. This is all how the cylinder performs and what it can do.

We had this issue so we used the guess and check theorem until it worked.

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