Skip to content
Programming, Controls & Sensors·Lesson 25 of 51

Absolute Encoders: Duty-Cycle, Analog, and the REV Through Bore

Encoders that know their angle the instant they power on, and why that matters for arms and swerve.

Sign in to track progress, earn XP, and save lessons.

An absolute encoder 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

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

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

WPILib documents several magnetic absolute encoders: the Thrifty Absolute Magnetic Encoder, Team 221 Lamprey2, US Digital MA3, AndyMark Mag Encoder, and the CTRE CANcoder (which is CAN-based, covered next).

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

  • 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.

Lesson quiz

Required

Answer all 3 questions correctly to complete this lesson.

1.A duty-cycle (PWM) absolute encoder like the REV Through Bore in absolute mode encodes the shaft angle in what way on its signal wire?

2.An analog absolute encoder reports the shaft's absolute position to the roboRIO using what kind of signal and port?

3.Compared to an incremental quadrature encoder, what is the main advantage of an absolute encoder such as the REV Through Bore in its absolute mode?

Answer every question to submit.