CAN Health & Diagnostics
The CAN bus connects smart controllers and sensors (CTRE, REV, etc.). Healthy CAN means consistent telemetry and control.
1 Requirements
- Twisted‑pair 22 AWG (yellow/green)
- Exactly two 120 Ω terminators (RIO + last device)
- Phoenix Tuner X / REV Hardware Client / WPILib Glass
2 Ironclad CAN Layout (Example)
RoboRIO → PDH → TalonFX (Drivetrain) → TalonFX (Arm) → CANCoder → Pneumatics Hub
3 Wiring Rules
- Total length < ~5 m; avoid long stubs (> 6 in)
- Secure connectors (heat‑shrink/locking housings)
- Keep device count reasonable (< 63 IDs)
4 Diagnostic Tools
| Tool | Use |
|---|---|
| Phoenix Tuner X | CTRE device discovery, firmware, bus utilization |
| REV Hardware Client | SPARK MAX/PDH/PH firmware & status |
| WPILib Glass | CAN IDs, faults, PDP/PDH data |
5 LED Quick Reference
| Device | Normal | Fault |
|---|---|---|
| TalonFX | Blinking orange | Solid red/off |
| PDH | Green | Blinking red |
| CANCoder | Flashing green | No blink = no bus |
| SPARK MAX | Blinking cyan | Solid red |
6 Maintenance
- Update firmware before build freeze
- Check/retorque CAN terminals after transport
- Log device IDs and frame periods
Troubleshooting
| Symptom | Fix |
|---|---|
| Devices disappear intermittently | Re‑crimp connectors; replace suspect wire |
| Bus utilization > 90 % | Reduce periodic frames; remove debug telemetry |
| Duplicate IDs | Factory‑reset then re‑assign IDs |
| PDH CAN faults | Check termination and stub lengths |