Pneumatics
Description
Pneumatics are a great way to control mechanisms on robots. They are often favorable to motors because they require less power, are usually easier to control, and cost less.
Control Hardware
There are two options for controlling pneumatics on the robot:
- CTRE Pneumatics Control Module
- Addressed in code as
frc::PneumaticsModuleType::CTREPCM
- Addressed in code as
- REV Robotics Pneumatics Hub
- Addressed in code as
frc::PneumaticsModuleType::REVPH
- Addressed in code as
On 1511, we typically use the CTRE Pneumatics Control Module on our robots.
Compressor
The compressor is a device that compresses air to a high pressure, which is then stored in a tank.
By default, the compressor on the robot will be set to “Closed Loop” mode. You probably shouldn’t change this. In closed loop mode, the compressor will automatically turn on when the pressure in the tank is below a certain threshold, and will turn off when the pressure reaches ~120 psi.
If you want to check the status of the compressor or turn it on or off, you can use the frc::Compressor class.
Solenoids
Solenoids are used to control the flow of air in a pneumatic system. They are typically used to control the actuation of pistons on the robot. Solenoids are controlled directly by the PCM or PH. There are two types of solenoids:
- Single Solenoid
- Single acting solenoids have one output port and operate in one direction. These solenoids are typically used in situations where an external force, such as a spring or gravity, provides the return action of the cylinder. They can also be used in pairs to act as a double solenoid.
- Double Solenoid
- Double acting solenoids have two output ports and operate in both directions. These solenoids allow for the extension and retraction of the cylinder, both with air pressure.
Single Solenoid
Single solenoids can be controlled using the frc::Solenoid class.
Double Solenoid
Double solenoids can be controlled using the frc::DoubleSolenoid class.