Skip to content

Building a Reliable CAN Bus

learnfrc.com
learnfrc.comAuthor
Veer Bajaj
Veer BajajMaintainer

A CAN bus is a single chain (a ‘daisy-chain’), not a star or a loop. It must have exactly two endpoints, each capped with a 120-ohm terminating resistor. The roboRIO has one built-in terminator; the PD (PDH/PDP) contains the other. So the standard layout is:

roboRIO - > motor controller -> motor controller -> … -> PD

with the roboRIO and the PD at the two ends.

  • Use 22 AWG twisted pair - twisting CANH and CANL together rejects electrical noise.
  • CANH (yellow) connects to CANH, CANL (green) connects to CANL, all the way down the chain.
  • At the roboRIO spring terminals, strip about 5/16 in (~8 mm).
  • Keep every junction solid - a single intermittent CAN connection can knock out every downstream device.

Every device on the bus needs a unique CAN ID :

  • CTR devices (Talon FX/FXS, Talon SRX, Victor SPX): set IDs in Phoenix Tuner X.
  • REV devices (SPARK MAX, SPARK Flex, PDH): set IDs in the REV Hardware Client.
  • Defaults to remember: PDP = ID 0 , PDH = ID 1.

Duplicate IDs cause erratic behavior, so plan an ID scheme (for example, drivetrain motors 1-4, arm 5-6) and label each controller.

With the robot off, measure resistance across the CANH/CANL pair. A healthy, properly terminated bus reads about 60 ohms (two 120-ohm resistors in parallel). If you read ~120 ohms, one terminator is missing or disconnected; if you read very high resistance, the bus is open somewhere.

  • Intermittent device dropouts - usually a loose connector or a cold crimp.
  • Whole bus (or downstream segment) down - a break in the chain, or a shorted device.
  • Wrong/duplicate IDs - devices fight over the same address.
  • Missing termination - flaky communication at high bus traffic.
  • CAN is a daisy-chain with the roboRIO and PD at the two terminated ends (120 ohms each).
  • Use 22 AWG twisted pair; CANH-to-CANH (yellow) and CANL-to-CANL (green).
  • A healthy bus measures ~60 ohms across CANH/CANL with the robot off.
  • Give every device a unique ID via Phoenix Tuner X or REV Hardware Client (PDP=0, PDH=1).

This lesson was adapted from learnfrc.com.