Modern brushless motors and CAN devices include encoders, so often you do not wire a separate sensor at all.
Integrated motor encoders#
- REV NEO / NEO Vortex brushless motors have a built-in hall-effect encoder read by the Spark MAX / Spark Flex controller. You access it via the controller's
RelativeEncoder(SparkMax.getEncoder()), in motor rotations by default; set a conversion factor for real units. - CTRE Falcon 500 / Kraken X60 integrate the encoder into the Talon FX. Phoenix 6 exposes it as the motor's internal rotor sensor with
getPosition()andgetVelocity()status signals.
Integrated encoders are convenient and high-resolution, but they measure the motor shaft, so you must account for the gear ratio to get mechanism units, and they are relative unless fused with an absolute sensor.
The CTRE CANcoder#
The CANcoder is a magnetic rotary encoder that reports absolute position and velocity over the CAN bus (CAN FD and CAN 2.0). Because it is absolute and on the bus, it is a standard azimuth sensor for swerve modules. You read it in Phoenix 6 with getAbsolutePosition() and configure a magnet offset and sensor direction in Phoenix Tuner X.
Sensor fusion in firmware: FusedCANcoder#
Phoenix 6 offers FusedCANcoder, a Talon FX feedback mode that fuses a CANcoder's absolute reading with the motor's internal rotor signal. You get the absolute knowledge of the CANcoder plus the high bandwidth and resolution of the rotor — ideal for swerve steering, where you want a correct boot angle and crisp control. This fusion happens on the device, not in robot code, so it is fast and consistent.
Important licensing caveat: FusedCANcoder (and the related SyncCANcoder) require a Phoenix 6 Pro license on the Talon FX. Without a Pro license the controller falls back to RemoteCANcoder (reading the CANcoder over the bus, without rotor fusion) and reports a UsingFusedCANcoderWhileUnlicensed fault. RemoteCANcoder still works for absolute feedback; you just lose the on-device fusion bandwidth benefit.
Choosing an encoder#
- Drivetrain wheels: integrated motor encoder (relative is fine; you zero odometry at start).
- Swerve azimuth: CANcoder (FusedCANcoder if Pro-licensed, otherwise RemoteCANcoder) or a Through Bore for absolute boot angle.
- Arms/wrists: an absolute encoder for boot position, optionally fused with the motor encoder.
Always verify your unit conversions on the bench: command a known move and confirm the reported distance/angle matches reality before trusting it in autonomous.
the part worth keeping
Key takeaways
- NEO/Vortex (Spark MAX/Flex) and Falcon/Kraken (Talon FX) include relative encoders on the motor shaft — account for gear ratio.
- The CTRE CANcoder is an absolute, CAN-based encoder, ideal for swerve azimuth.
- Phoenix 6 FusedCANcoder fuses absolute CANcoder data with the rotor on-device but requires a Pro license; unlicensed it falls back to RemoteCANcoder.
Programming, Controls & SensorsEncoders: Measuring Position and Velocitylesson 3 of 3
Keep going
Take the quiz+10 XP with an accountMore in Encoders: Measuring Position and Velocity
where this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- v6.docs.ctr-electronics.comCTRE CANcoder (Phoenix 6 docs)
- v6.docs.ctr-electronics.comPhoenix 6: TalonFX remote sensors (FusedCANcoder)
- docs.revrobotics.comREV: Using Encoders with the SPARK MAX
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 18 min readCTRE Phoenix for FRC: Kraken X60/X44, TalonFX, Phoenix 6, CANcoder & Pigeon 2A practical guide to the CTRE Phoenix ecosystem for FRC: Kraken X60/X44 motors, TalonFX, Phoenix 6 API, Pro/FOC licensing, CANcoder, Pigeon 2 & CANivore./blogread it
- 8 min readFRC Motors Compared: NEO vs Kraken X60 vs Falcon 500 vs NEO VortexCompare FRC brushless motors: REV NEO, NEO Vortex, Kraken X60, and Falcon 500. Exact specs, FOC explained, and which motor to pick for drivetrain vs mechanisms./blogread it
- 20 min readREV Robotics for FRC: NEO Motors, Spark MAX/Flex, PDH & MAXSwerveA practical guide to the REV Robotics FRC ecosystem: NEO, NEO Vortex and NEO 550 motors, Spark MAX and Spark Flex controllers, the PDH, and MAXSwerve./blogread it
answer sheet
Lesson quiz
All 3 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 3 answered
01Why must you account for the gear ratio when using an integrated motor encoder like the NEO's or the Falcon/Kraken's?
02In Phoenix 6, what units does a Falcon 500 or Kraken X60 (Talon FX) report its integrated encoder position in by default?
03The CTRE CANcoder is commonly used as the absolute steering sensor on swerve modules. Which description of the CANcoder is correct?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensorsopenclose
01 / prerequisites
02 / foundations-tools-and-first-program
03 / robot-program-and-command-based
04 / motors-and-control
05 / autonomous-trajectories-simulation
06 / sensing-fundamentals
07 / encoders
08 / gyros-imus-orientation
09 / closed-loop-control
10 / vision-pose-estimation
11 / worked-examples-mini-projects
- Not read yet:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not read yet:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not read yet:Mini-Project: A Teleop Swerve Drive Subsystem
- Not read yet:Mini-Project: An Autonomous Routine with PathPlanner
- Not read yet:Mini-Project: Vision-Aligned Scoring with Limelight
12 / common-mistakes-troubleshooting
13 / advanced-techniques-case-studies
- Not read yet:State-Space Control and Kalman Filtering
- Not read yet:Log Replay Architecture with AdvantageKit
- Not read yet:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not read yet:Robot Coordination, Alerts, and Operator Feedback
- Not read yet:Case Study: Hardening Software Before an Event