Skip to content
All articles

FRC Pneumatics: How to Design, Wire, and Program a Pneumatic System

9 min read·

Push a button, and a piston shoots out in a fraction of a second with hundreds of pounds of force. No gears to strip, no motor to burn out, no PID loop to tune. That is the appeal of pneumatics in FRC: clean, fast, two-state motion that is almost impossible to break. This guide walks you through the whole system, from picking pneumatics over a motor, to the legal components, to wiring it safely, to controlling it in code with WPILib.

When to use pneumatics (and when not to)

Pneumatics shine when a mechanism only needs to be in one of two positions: deployed or retracted, gripper open or closed, hood up or down. According to the FIRST Pneumatics Manual, a pneumatic actuator moves simply and reliably to two locations without the sensors or current limiting a motor needs to hit a hard stop. They are also durable: you can stall an air cylinder against a load indefinitely with no damage, which is exactly what burns out a motor.

The catch is that pneumatics are binary. If you need a mechanism to stop at an arbitrary angle, hold a precise height, or move at a controlled speed, a motor (with an encoder) is the right tool. Air also runs out, you carry a fixed amount of stored pressure into a match, so a mechanism that actuates dozens of times can starve the system. The rule of thumb: pneumatics for fast on/off motion, motors for position control. For the motor side of that decision, see the Mechanical track.

How strong are they? The Pneumatics Manual notes a 2 inch bore cylinder can apply up to 188 pounds of force at 60 psi, with no gearing or leverage at all. Force equals piston area times pressure, so bore size and pressure are your two design knobs.

The core components

An FRC pneumatic system splits into a high-pressure side (around 120 psi) and a working-pressure side (under 60 psi). The FIRST Pneumatics Manual lists the required parts on the high-pressure side:

ComponentJob
CompressorCompresses air to store in the system
Pressure relief valveVents excess pressure; must connect directly to the compressor via hard fittings
Air storage tank(s)Hold compressed air for use during the match
Pressure switch / analog sensorTells the controller when to run the compressor
Pressure gauges (x2)One for stored pressure, one for working pressure
Vent plugManually releases all stored pressure
Primary regulatorSteps pressure down from stored (120 psi) to working (60 psi)

On the working-pressure side you have the parts that actually do work: the solenoid valves that switch airflow, the pneumatic actuators (cylinders), and optional extras like manifolds, downstream regulators, and one-way flow controls that throttle a cylinder's speed in one direction without reducing its force.

One important spec from the manual: solenoid valves typically need a minimum of 15 to 30 psi to actuate reliably (an additional regulator placed after the solenoid can bypass this minimum). If you regulate working pressure too low to save air, your valves may not shift.

The pressure limits and safety

These numbers are not suggestions, they are inspected at every event, and getting them right keeps people safe. Per the FIRST Pneumatics Manual and the FRC Game Manual:

  • Stored pressure must be no greater than 120 psi. The pressure switch and compressor closed-loop control keep the system at or below this; during validation the compressor should shut off by roughly 110-120 psi, and the relief valve should begin relieving around 120-125 psi so the system never significantly exceeds 125 psi.
  • Working pressure must be no greater than 60 psi, provided through a single primary adjustable, relieving regulator. Additional regulators may sit downstream.
  • All high-pressure components must be rated to handle the full stored pressure the system can reach (the ~120-125 psi at which the relief valve operates). Check the rating of every fitting, tank, and tube on the stored-pressure side.
  • The pressure relief valve must be connected and calibrated, and your system must have a vent plug, a stored-pressure gauge, and a working-pressure gauge.

Always vent the system with the vent plug before you work on it, and never point a cylinder rod or an open fitting at anyone. Compressed air is energy, and a 188-pound piston does not care that you forgot to dump pressure.

The control module: REV Pneumatic Hub vs PCM

The brain of the system is a CAN-based pneumatics controller that runs the compressor and switches the solenoids. There are two legal options.

The REV Pneumatic Hub (PH, part REV-11-1852) is the modern choice. Per the REV Pneumatic Hub documentation, it provides 16 solenoid channels (up to 16 single-acting solenoids, 8 double-acting, or a mix), switches user-selectable 12 V or 24 V solenoids, and supplies up to 15 A continuous to the compressor (with a 200 mA limit per solenoid channel). Its standout feature is a built-in analog pressure sensor port (for the REV-11-1107 sensor) alongside the digital pressure switch input, which lets you read actual PSI in code and set custom compressor thresholds. It also has a USB-C port that works with the REV Hardware Client for bench testing without a roboRIO.

The older CTRE Pneumatics Control Module (PCM) controls 8 solenoid channels (8 single-acting or 4 double-acting) and uses a digital pressure switch only, with no analog sensing. It still switches 12 V or 24 V solenoids via a jumper. Both modules drive the compressor automatically once your code creates a solenoid or compressor object.

FeatureREV Pneumatic HubCTRE PCM
Solenoid channels16 (8 double)8 (4 double)
Analog pressure sensorYes (built-in port)No
Solenoid voltage12 V / 24 V (switch)12 V / 24 V (jumper)
Default CAN ID10
WPILib enumPneumaticsModuleType.REVPHPneumaticsModuleType.CTREPCM

Remember: all solenoids on a single module must be the same voltage.

Single vs double solenoids

A single-acting (single) solenoid has one electrical signal. Energize it and air flows; cut power and it springs back to its default state. This is your "default safe" choice, because when the robot is disabled the mechanism returns to a known position.

A double-acting (double) solenoid has two electrical signals, forward and reverse, and holds its last commanded position when power is removed. It needs an active signal to change states. Use a double solenoid when you want a mechanism to stay put even when disabled, like a climber that should not drop. In WPILib these map directly to the Solenoid and DoubleSolenoid classes.

Wiring it safely

Per the WPILib guide on Wiring Pneumatics with the REV Pneumatic Hub:

  • The PH connects to the roboRIO over the CAN bus and gets 12 V power from the Power Distribution Hub (a 20 A port is recommended when the PH runs a compressor) or from the PDP.
  • The compressor wires directly to the PH's compressor connectors (use 18 AWG or larger for long runs).
  • The digital pressure switch connects to the digital input terminals with no polarity. The optional analog sensor (REV-11-1107) connects to analog port 0.
  • Each solenoid channel is a numbered terminal pair; single-acting valves use one pair, double-acting valves use two. Set the 12 V / 24 V voltage switch correctly before powering on.

For the broader robot electrical layout, see the Electrical track.

Programming pneumatics with WPILib

The WPILib pneumatics API keeps this refreshingly simple. You construct a Solenoid or DoubleSolenoid with the module type and channel(s), then call set().

A single solenoid in Java:

private final Solenoid m_solenoid = new Solenoid(PneumaticsModuleType.REVPH, 0);

m_solenoid.set(true);   // energize
m_solenoid.set(false);  // de-energize
m_solenoid.toggle();    // flip current state

A double solenoid uses forward and reverse channels and the DoubleSolenoid.Value enum, kForward, kReverse, and kOff:

private final DoubleSolenoid m_double =
    new DoubleSolenoid(PneumaticsModuleType.REVPH, 1, 2);

m_double.set(DoubleSolenoid.Value.kForward);
m_double.set(DoubleSolenoid.Value.kReverse);
m_double.set(DoubleSolenoid.Value.kOff);

Note from the docs: because a DoubleSolenoid defaults to kOff, you must set() it once before toggle() will work.

Controlling the compressor

The WPILib pressure docs explain that the Compressor runs in closed-loop mode by default, automatically filling the system when the pressure switch closes, and the docs explicitly recommend that teams not change this setting. You construct it with the module type:

private final Compressor m_compressor = new Compressor(PneumaticsModuleType.REVPH);

The control methods are:

  • enableDigital() — closed-loop control off the digital pressure switch (works on both PH and PCM).
  • enableAnalog(minPressure, maxPressure) — uses the REV analog sensor to run the compressor between a custom PSI window (PH only).
  • enableHybrid(minPressure, maxPressure) — combines the analog sensor and the digital switch (PH only).
  • disable() — turns closed-loop control off.

Useful readbacks include getPressure() (PSI from the analog sensor, PH only), getCurrent(), getPressureSwitchValue(), and isEnabled(). For more on structuring this as a subsystem in command-based code, see the Programming track.

Putting it together

A solid first pneumatic system is one compressor, one relief valve hard-fitted to it, a storage tank, a primary regulator set to 60 psi, two gauges, a vent plug, a pressure switch, and one double solenoid driving one cylinder, all run by a REV Pneumatic Hub. Get that working on a bench board first, leak-test it, and only then move it onto the robot. From there, adding a second cylinder is as easy as teeing into the pressure line and adding a few lines of code.

Ready to wire it up the right way? Start with the LearnFRC Electrical track.

Keep reading

Learn every department of FRC — free

393+ structured lessons, quizzes, and team tools. Built by an FRC student, for the community.

Browse the guides