Back to Sensors & Actuators Series

Pneumatic Actuators: Cylinders, Rotary & Vacuum

April 10, 2026 Wasil Zafar 18 min read

The workhorse of factory automation — compressed air driving fast, clean, forceful linear and rotary motion. Master cylinder types, valve control, proportional pressure regulation, and embedded code.

Contents

  1. Overview & Types
  2. Working Principle
  3. Pneumatic Specifications
  4. Valve & Control Hardware
  5. Control Methods
  6. Code Example — Arduino & ESP32
  7. Real-World Applications
  8. Advantages vs. Alternatives
  9. Limitations & Considerations

Overview & Types

Pneumatic actuators convert compressed air into mechanical motion. They deliver high speed, clean operation, and exceptional force-to-weight ratio—making them the backbone of factory automation, packaging machinery, and robotic grippers. With no electrical current in the actuator itself, they are inherently safe in explosive or wet environments.

Key Insight: Pneumatics offer the fastest actuation in industrial settings. A pneumatic cylinder can extend its full stroke in under 100 ms, with force outputs from 10 N to 50 kN—all from a simple 5/2-way valve command. The trade-off is compressibility: air is spongy, making precise position control harder than hydraulics.

Types

  • Single-Acting Cylinder: Air pressure extends the piston; a spring returns it. Simple, fewer ports, but force is available in one direction only. Used in clamping and stamping.
  • Double-Acting Cylinder: Air pressure drives the piston in both directions. Most common type. Full force available on both extend and retract strokes.
  • Rodless Cylinder: Piston is coupled to an external carriage via magnetic or mechanical linkage. Long stroke in a compact envelope. Used for linear transport systems.
  • Rotary Actuator: Converts air pressure to rotary motion (rack-and-pinion or vane type). Typical rotation: 90°, 180°, or 360°. Used in valve actuation and part orientation.
  • Vacuum Generator (Venturi): Uses compressed air flowing through a venturi nozzle to create vacuum suction. Drives vacuum cups for pick-and-place operations.
  • Air Muscle (McKibben Actuator): Braided mesh sleeve contracts when inflated, mimicking biological muscle. Used in soft robotics and rehabilitation devices.
  • Pneumatic Gripper: Parallel or angular jaw grippers actuated by miniature pneumatic cylinders. Standard end-effector in robotic assembly.

Working Principle

Linear Cylinder

  1. Air Supply: Compressed air (4–8 bar / 60–120 PSI) from a compressor feeds through tubing to a directional control valve.
  2. Valve Activation: A solenoid-operated valve (e.g., 5/2-way) directs air to one side of the piston while venting the other side.
  3. Extension: Pressure on the bore side pushes the piston and rod outward. Force = Pressure × Bore Area.
  4. Retraction: Valve switches, air enters the rod side, pushing the piston back. Force is slightly less due to rod cross-section reducing effective area.

Force Calculation

F = P × A

Where: P = gauge pressure (Pa or PSI), A = piston area (m² or in²).

Example: 40 mm bore at 6 bar → A = π×0.02² = 0.001257 m² → F = 600,000 × 0.001257 = 754 N (170 lbf)

Retract force: subtract the rod area. For a 16 mm rod: Arod=π×0.008²=0.000201 → Fretract=600,000×(0.001257−0.000201)=633 N

Pneumatic Specifications

ParameterMini CylinderStandard CylinderHeavy Duty
Bore Diameter6–16 mm20–100 mm125–320 mm
Stroke5–50 mm25–500 mm50–3000 mm
Operating Pressure2–8 bar1–10 bar2–16 bar
Force (@ 6 bar)2–120 N190–4,710 N7,360–48,250 N
Speed50–500 mm/s50–1,500 mm/s50–1,000 mm/s
Operating Temp−20°C to +80°C (standard seals)
Port SizeM3, M5G1/8, G1/4G3/8, G1/2, G1

Valve & Control Hardware

Directional Control Valves

  • 3/2-Way Valve: 3 ports, 2 positions. Controls single-acting cylinders. One port to cylinder, one to supply, one to exhaust.
  • 5/2-Way Valve: 5 ports, 2 positions. Controls double-acting cylinders. Two cylinder ports, one supply, two exhaust.
  • 5/3-Way Valve: 5 ports, 3 positions (centre closed, exhaust, or pressure). Allows mid-stroke stopping.

Solenoid Valve Driver

Most pneumatic solenoid valves operate at 24 V DC (industrial) or 12 V DC. Drive with MOSFET or relay from microcontroller GPIO. Include flyback diode across coil.

Speed Control

  • Flow Control Valve (meter-out): Restricts exhaust air to control piston speed. Meter-out gives more stable control than meter-in.
  • Proportional Valve: Electronically variable flow rate. Enables velocity profiling with analog or PWM control input.

Position Sensing

Magnetic reed switches or Hall-effect sensors mount on the cylinder barrel to detect piston position. Magnetized pistons trigger the sensors without contact.

Control Methods

Binary Control (Bang-Bang)

Standard approach: valve fully open in one direction or the other. Cylinder moves at full speed to end stops. Simple, fast, and reliable for 90% of pneumatic applications.

Proportional Control

Using proportional valves or pressure regulators, intermediate positions and controlled speeds are possible. Requires position feedback (linear encoder or LVDT) and PID control loop.

Cushioned End-of-Stroke

Built-in cushioning at stroke ends decelerates the piston gradually, reducing impact and noise. Adjustable via needle valve on the end cap.

Code Example — Arduino & ESP32

Arduino: Double-Acting Cylinder with Reed Sensors

// Double-acting pneumatic cylinder control with end-stop sensors
// Wiring: Valve coil A → Relay 1 (D4), Valve coil B → Relay 2 (D5)
// Reed sensor extended → D2, Reed sensor retracted → D3

const int VALVE_EXTEND  = 4;  // 5/2 valve coil A
const int VALVE_RETRACT = 5;  // 5/2 valve coil B
const int REED_EXT      = 2;  // Extended position sensor
const int REED_RET      = 3;  // Retracted position sensor

void setup() {
    Serial.begin(9600);
    pinMode(VALVE_EXTEND, OUTPUT);
    pinMode(VALVE_RETRACT, OUTPUT);
    pinMode(REED_EXT, INPUT_PULLUP);
    pinMode(REED_RET, INPUT_PULLUP);

    // Start retracted
    retract();
    Serial.println("Pneumatic Cylinder Controller Ready");
}

void extend() {
    digitalWrite(VALVE_RETRACT, LOW);
    delay(50); // Prevent cross-flow
    digitalWrite(VALVE_EXTEND, HIGH);
    Serial.println("EXTENDING...");
}

void retract() {
    digitalWrite(VALVE_EXTEND, LOW);
    delay(50);
    digitalWrite(VALVE_RETRACT, HIGH);
    Serial.println("RETRACTING...");
}

void stop() {
    digitalWrite(VALVE_EXTEND, LOW);
    digitalWrite(VALVE_RETRACT, LOW);
    Serial.println("STOPPED (exhaust blocked)");
}

void loop() {
    bool atExtend  = (digitalRead(REED_EXT) == LOW);
    bool atRetract = (digitalRead(REED_RET) == LOW);

    // Auto cycle: extend → wait → retract → wait
    extend();
    while (digitalRead(REED_EXT) == HIGH) delay(10);
    Serial.println("Fully extended");
    delay(2000);

    retract();
    while (digitalRead(REED_RET) == HIGH) delay(10);
    Serial.println("Fully retracted");
    delay(2000);
}

ESP32: Proportional Pressure Control

// ESP32 controlling proportional pressure regulator via DAC
// Wiring: DAC output (GPIO25) → Proportional valve 0-10V input
//         (via op-amp level shift 0-3.3V → 0-10V)
// Pressure sensor (0-10 bar, 0.5-4.5V) → GPIO34 (ADC)

#include <Arduino.h>

#define DAC_PIN       25   // DAC output (0-3.3V)
#define PRESSURE_PIN  34   // Analog pressure sensor input

const float TARGET_PRESSURE = 4.0;  // bar
const float MAX_PRESSURE = 10.0;    // sensor range
const float Kp = 50.0, Ki = 5.0;
float integral = 0;
unsigned long lastTime = 0;

void setup() {
    Serial.begin(115200);
    analogReadResolution(12);
    dacWrite(DAC_PIN, 0);
    lastTime = millis();
    Serial.println("Proportional Pressure Controller");
    Serial.printf("Target: %.1f bar\n", TARGET_PRESSURE);
}

float readPressure() {
    int raw = analogRead(PRESSURE_PIN);
    float voltage = (raw / 4095.0) * 3.3;
    // Sensor: 0.5V = 0 bar, 4.5V = 10 bar
    return ((voltage - 0.5) / 4.0) * MAX_PRESSURE;
}

void loop() {
    unsigned long now = millis();
    float dt = (now - lastTime) / 1000.0;
    lastTime = now;

    float pressure = readPressure();
    float error = TARGET_PRESSURE - pressure;

    integral += error * dt;
    integral = constrain(integral, -50, 50);

    float output = Kp * error + Ki * integral;
    int dacVal = constrain((int)output, 0, 255);
    dacWrite(DAC_PIN, dacVal);

    Serial.printf("P: %.2f bar | Err: %.2f | DAC: %d\n",
                  pressure, error, dacVal);
    delay(50);
}

Real-World Applications

Factory Automation

  • Pick-and-place with vacuum grippers
  • Clamping fixtures in CNC machines
  • Packaging and labelling machines
  • Sorting and diverting on conveyors

Robotics & Medical

  • Soft robotic grippers (McKibben muscles)
  • Dental drills and surgical tools
  • Pneumatic prosthetics
  • Automated door closers

Advantages vs. Alternatives

vs. ActuatorPneumatic AdvantagePneumatic Disadvantage
Electric MotorHigher speed, simpler mechanics, explosion-safeNeeds compressor, less precise position control
HydraulicCleaner, lighter, safer (no oil leaks), fasterLower force density, air is compressible
Linear ActuatorMuch faster stroke speed, higher cycle rateBinary positioning (without proportional valves)
SolenoidMuch longer stroke, higher force capabilityRequires air supply infrastructure

Limitations & Considerations

  • Compressor Required: Needs compressed air infrastructure (compressor, filters, regulators, dryers). Adds cost and noise.
  • Air Compressibility: Air is spongy — precise position control requires proportional valves, feedback sensors, and sophisticated control loops.
  • Noise: Exhaust air creates loud bursts. Use silencers/mufflers on exhaust ports in noise-sensitive environments.
  • Air Quality: Moisture and particles in compressed air cause corrosion and seal failure. Install filters, regulators, and lubricators (FRL unit).
  • Energy Efficiency: Pneumatics is typically 10–20% energy efficient (compressor losses, leaks, throttling). Far less efficient than electric actuators for many tasks.
  • Limited Stiffness: Holding a specific position under varying loads is difficult due to air compressibility. Hydraulics or electric actuators excel here.