Absolute Encoders: Duty-Cycle, Analog, and the REV Through Bore
An absoluteencoder reports its angle immediately at power-on without needing to move to a reference. This is invaluable for mechanisms that must know their position before they move — swerve steering, arms, and wrists.
How absolute output is encoded
Section titled “How absolute output is encoded”Two common methods:
- Analog: the sensor outputs a voltage proportional to angle (0V-5V mapped across one rotation). You read it with WPILib’s
AnalogEncoder. - Duty cycle (PWM): the sensor outputs a steady square wave whose pulse width encodes the angle. You read it on a single DIO channel with
DutyCycleEncoder.
The REV Through Bore Encoder
Section titled “The REV Through Bore Encoder”The REV Through Bore Encoder (V1: part REV-11-1271; an updated V2 exists, REV-11-3174) is one of the most popular absolute encoders in FRC because it provides both outputs in one device (built around a Broadcom AEAT-8800 chip):
- Quadrature output (A, B, Index): 2048 cycles per revolution = 8192 counts per revolution at 4x decoding (incremental, high resolution for velocity and fine position).
- Absolute duty-cycle output: a 1025 microsecond period (~975.6 Hz) pulse, with pulse width from 1 us (0 degrees) to 1024 us (360 degrees), giving 10-bit resolution — read on one DIO line.
Its 1/2-inch hex through-bore (with inserts down to 3/8“ hex, 5 mm hex, or 1/4“ round) lets you slide it directly onto a shaft.
A common pattern: use the absolute channel once at startup to seed position, then use the high-resolution quadrature (or an integrated motor encoder) for fast feedback.
Other FRC absolute encoders
Section titled “Other FRC absolute encoders”WPILib documents several magnetic absolute encoders: the Thrifty Absolute Magnetic Encoder , Team 221 Lamprey2 , US Digital MA3 , AndyMark Mag Encoder , and the CTRE Mag Encoder (a duty-cycle/quadrature encoder, distinct from the CAN-based CTRE CANcoder, covered next).
Why absolute matters for swerve
Section titled “Why absolute matters for swerve”In a swerve module the steering (azimuth) angle must be known at boot so the wheels can snap to a known heading. Teams mount an absolute encoder (CANcoder or Through Bore) on each module and record a calibration offset so ‘forward’ reads zero.
Key takeaways
Section titled “Key takeaways”- Absolute encoders know their angle at power-on — essential for swerve steering, arms, and wrists.
- The REV Through Bore gives 8192-count quadrature AND a 10-bit duty-cycle absolute output in one device.
- A common pattern is to seed position from the absolute channel at boot, then rely on a high-rate incremental encoder.
This lesson was adapted from learnfrc.com.
