Skip to content
learnFRC.org
programminglesson20 min

CAN Bus & Device Configuration

Wiring topologies, CAN 2.0 vs CAN FD, 120-ohm termination, device discovery, unique IDs, motor inversions, and sensor phasing.

What you will learn

  • Verify linear CAN bus termination resistance (60 ohms total).
  • Scan the bus in Phoenix Tuner X and assign unique device CAN IDs.
  • Test motor inversion and verify sensor phasing matches physical motion.

The Controller Area Network (CAN) bus links every motor controller, absolute encoder, and gyroscope across the robot using a two-wire differential pair (CAN High / Yellow, CAN Low / Green).

Before tuning control loops, you must verify electrical bus integrity, assign unique device IDs, and confirm motor direction and sensor phasing.


FRC robots use two primary CAN standards:

  1. roboRIO CAN 2.0 Bus: Operates at 1 Mbps. The bus originates at the roboRIO and terminates at the Power Distribution Hub (PDH) or Pneumatics Hub (PH) with a built-in 120 Ω termination resistor.
  2. CANivore CAN FD Bus: Operates at 5 Mbps with Flexible Data-Rate. Used for high-bandwidth Phoenix 6 devices (Kraken X60, CANcoder, Pigeon 2.0).

A properly terminated CAN bus must have two 120 Ω resistors in parallel, producing an equivalent resistance of 60 Ω:

  • Turn off main robot power.
  • Place a digital multimeter across the yellow (CAN H) and green (CAN L) wires.
  • If the meter reads 120 Ω, one termination resistor is missing or disconnected.
  • If the meter reads 0 Ω, the yellow and green wires are shorted together.
  • If the meter reads 60 Ω, termination is correct.

2. Device Discovery & ID Assignment in Tuner X

Section titled “2. Device Discovery & ID Assignment in Tuner X”

Factory-new motor controllers and sensors default to CAN ID 0. When two devices share ID 0, their CAN arbitration headers collide, causing intermittent drops.

  1. Connect your laptop to your CANivore or roboRIO via USB.
  2. Open Phoenix Tuner X and select your active bus.
  3. Select Refresh. All connected devices will appear in the device list.
  4. If configuring new hardware, connect devices one at a time:
    • Select the device in Tuner X.
    • Click Blink to confirm which physical motor blinks its status LED.
    • Enter your assigned CAN ID (e.g., 11 for Intake Roller, 12 for Intake Pivot).
    • Click Apply.
  5. Repeat for all actuators and sensors until no devices share ID 0.

Mechanisms must follow a standard coordinate convention: positive software output must produce upward or forward mechanical movement.

  1. Open the device’s Control tab in Tuner X.
  2. Select control mode Duty Cycle (Open Loop).
  3. Enter +0.10 (10% forward voltage) and select Enable.
  4. Observe physical mechanism movement:
    • Linear Elevator: Carriage must travel upward.
    • Rotating Arm: Pivot must rotate upward.
    • Flywheel: Rollers must spin in the direction that discharges the game piece.
  5. If the mechanism moves in reverse:
    • Navigate to Config -> Motor Output.
    • Change Inverted from CounterClockwise_Positive to Clockwise_Positive.
    • Click Apply and re-test.

Closed-loop feedback requires that the sensor reading increases as the motor moves in the positive direction. If motor and sensor directions are inverted relative to each other, closed-loop feedback becomes positive feedback, driving the motor at maximum voltage away from the target (a “runaway” condition).

  1. With motor output disabled, move the mechanism forward or upward by hand.
  2. In Tuner X, watch the Position reading in the Plot or Signals tab.
  3. If the position reading decreases as the mechanism moves forward:
    • For internal motor encoders: ensure motor inversion was configured first.
    • For external CANcoders: open the CANcoder configuration, change SensorDirection to Clockwise_Positive, and apply.
Never Invert in Java to Fix Sensor Phasing

Do not try to fix sensor phasing by multiplying encoder values by -1 in Java. Always configure physical sensor direction directly on the CANcoder hardware using Tuner X.


  • Symptom: Motors jitter, CAN frames drop, and Tuner X reports bus utilization over 85%.
  • Cause: Too many devices transmitting default 10 ms status frames on a single 1 Mbps roboRIO bus.
  • Fix: Move Phoenix 6 devices to a CANivore (CAN FD 5 Mbps), or reduce update frequencies on unused status signals using Phoenix 6’s setUpdateFrequency() API (for example, motor.getPosition().setUpdateFrequency(10.0) or BaseStatusSignal.setUpdateFrequencyForAll(10.0, ...)).
  • Symptom: Motor controller status LED blinks alternating red and orange.
  • Cause: Hardware has detected a CAN bus-off condition or missing termination resistor.
  • Fix: Check that both green and yellow wires are seated firmly in WAGO or Molex connectors.

Before moving to closed-loop tuning, verify this checklist:

  • Multimeter measures 60 Ω across CAN H and CAN L with power off.
  • Tuner X discovers all connected devices with zero duplicate IDs.
  • Commanding +0.10 duty cycle produces positive physical mechanism travel.
  • Manually moving the mechanism in the positive direction increases the position reading.

Verified Sources & Standards

Evergreen Standard Verified: Sep 25, 2026