Gyroscopes - Hardware

הערה

This section covers gyro hardware. For a software guide to gyros, see Gyroscopes - Software.

Gyroscopes (or ”gyros“, for short) are devices that measure rate-of-rotation. These are particularly useful for stabilizing robot driving, or for measuring heading or tilt by integrating (adding-up) the rate measurements to get a measurement of total angular displacement.

Several popular FRC® devices known as IMUs (Inertial Measurement Units) combine 3-axis gyros, accelerometers and other position sensors into one device. Some popular examples are:

Types of Gyros

There are two types of Gyros commonly-used in FRC: single-axis gyros, three-axis gyros and IMUs, which often include a 3-axis gyro.

Single-axis Gyros

The Analog Devices 1-axis Gyro plugged into the SPI port of the roboRIO.

As per their name, single-axis gyros measure rotation rate around a single axis. This axis is generally specified on the physical device, and mounting the device in the proper orientation so that the desired axis is measured is highly important. Some single-axis gyros can output an analog voltage corresponding to the measured rate of rotation, and so connect to the roboRIO’s analog input ports. Other single-axis gyros, such as the ADXRS450 pictured above, use the SPI port on the roboRIO instead.

The Analog Devices ADXRS450 FRC Gyro Board that has been in FIRST Choice in recent years is a commonly used single axis gyro.

Three-axis Gyros

This is the ADIS16470 :term:`IMU` plugged in to the SPI port.

Three-axis gyros measure rotation rate around all three spacial axes (typically labeled x, y, and z). The motion around these axis is called pitch, yaw, and roll.

The Analog Devices ADIS16470 IMU Board for FIRST Robotics that has been in FIRST Choice in recent years is a commonly used three-axis gyro.

The 3 axis: yaw, pitch, and roll and how they relate to robot movement.

הערה

The coordinate system shown above is often used for three axis gyros, as it is a convention in avionics. Note that other coordinate systems are used in mathematics and referenced throughout WPILib. Please refer to the Drive class axis diagram for axis referenced in software.

Peripheral three-axis gyros may simply output three analog voltages (and thus connect to the analog input ports, or (more commonly) they may communicate with one of the roboRIO’s serial buses.