Accelerometers are common sensors used to measure acceleration.
In principle, precise measurements of acceleration can be double-integrated and used to track position (similarly to how the measurement of turn rate from a gyroscope can be integrated to determine heading) - however, in practice, accelerometers that are available within the legal FRC price range are not nearly accurate for this use. However, accelerometers are still useful for a number of tasks in FRC.
The roboRIO comes with a built-in three-axis accelerometer <docs/software/sensors/accelerometers-software:BuiltInAccelerometer>
that all teams can use, however teams seeking more-precise measurements may purchase and use a peripheral accelerometer, as well.
There are three types of accelerometers commonly-used in FRC: single-axis accelerometers, multi-axis accelerometers, and IMUs.
As per their name, single-axis accelerometers measure acceleration along 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. Single-axis accelerometers generally output an analog voltage corresponding to the measured acceleration, and so connect to the roboRIO's analog input <analog-inputs-hardware>
ports.
Multi-axis accelerometers measure acceleration along multiple spacial axes. The roboRIO's built-in accelerometer is a three-axis accelerometer.
Peripheral multi-axis accelerometers may simply output multiple analog voltages (and thus connect to the analog input ports <docs/hardware/sensors/analog-inputs-hardware:Connecting a sensor to multiple analog input ports>
, or (more commonly) they may communicate with one of the roboRIO's serial buses <serial-buses>
.
The roboRIO has a built-in accelerometer, which does not need any external connections. You can find more details about how to use it in the Built-in Accelerometer section <docs/software/sensors/accelerometers-software:BuiltInAccelerometer>
of the software documentation.
Several popular FRC devices (known as "inertial measurement units," or "IMUs") combine both an accelerometer and a gyroscope. Popular FRC example include: