Half of 'the code is broken' reports are really electrical. Two failure families dominate: brown-outs and CAN bus problems. Both have clear signatures once you know them.
Brown-out thresholds#
The roboRIO uses a staged brown-out scheme to protect itself from low battery voltage. The exact second-stage threshold differs by hardware:
- On both the roboRIO 1.0 and 2.0, when voltage drops below 6.8V the 6V rail on the PWM pins begins to drop.
- The roboRIO 1.0 enters the brown-out protection state at 6.3V (fixed): PWM outputs are disabled. WPILib motor controllers send a single neutral pulse, then the output is cut.
- The roboRIO 2.0's default brown-out level (Stage 2) is 6.75V, and it is software-configurable via
RobotController.setBrownoutVoltage().
When this happens mid-match your robot goes limp for a moment and the driver swears the code froze. It didn't -- the hardware protected itself.
How to confirm a brown-out#
Three independent signals:
- The DS CAN/Power tab increments the 12V fault counter by 1.
- The DS records a brown-out event in the DS log.
- The DS Log Viewer marks it with a bright orange line on the voltage graph.
How to prevent brown-outs#
- Use a fully charged, healthy battery (measure resting voltage and internal resistance with a tester before each match).
- Set current limits on motors -- e.g.
config.smartCurrentLimit(40)on a SPARK, orCurrentLimitsConfigswithSupplyCurrentLimiton a Talon FX -- so several mechanisms can't all spike at once. - Ramp demand instead of slamming to full output; avoid commanding every motor to peak simultaneously.
CAN bus faults#
The CAN bus is a daisy chain; problems show up as devices going missing or comms lagging.
- High CAN utilization (CAN/Power tab >90%): too many high-rate frames. Lower status-frame periods on devices you don't read often, or reduce excessive signal refresh rates.
- Duplicate CAN IDs: two devices of the same type with the same ID on the same bus is a hard fault -- one or both behave erratically or vanish. Every device of a given type needs a unique ID; check with the vendor tools (Phoenix Tuner X, REV Hardware Client).
- A loose connection anywhere breaks the chain past that point; constructors for some pneumatics/CAN devices can even throw if the bus is disconnected at boot, so wrap them in try/catch and, more importantly, verify wiring.
- Missing termination: the CAN bus needs a 120-ohm terminating resistor at the end of the chain (the PDP/PDH provides a built-in terminator) or you'll see flaky communication.
The discipline#
Maintain a written CAN ID map for the whole robot, label every device, and re-run a device scan in Phoenix Tuner X / REV Hardware Client after any rewiring. Most 'random' CAN failures are a duplicate ID or a loose connector, and both are found in minutes with the vendor scan tools.
the part worth keeping
Key takeaways
- Below 6.8V the PWM 6V rail drops; the roboRIO 1.0 disables outputs at a fixed 6.3V, while the roboRIO 2.0 default is 6.75V (configurable) -- the code didn't crash.
- Confirm brown-outs three ways: 12V fault counter, DS log event, and the orange line in the DS Log Viewer.
- Prevent brown-outs with healthy batteries, motor current limits, and ramped (non-simultaneous) demand.
- CAN faults are usually duplicate IDs, loose connectors, missing 120-ohm termination, or high utilization -- diagnose with Phoenix Tuner X / REV Hardware Client and a written ID map.
Programming, Controls & SensorsCommon Mistakes and Troubleshootinglesson 4 of 5
Keep going
Take the quiz+10 XP with an accountMore in Common Mistakes and Troubleshooting
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
- docs.wpilib.orgWPILib: roboRIO Brownout and Understanding Current Draw
- docs.wpilib.orgWPILib: FRC CAN Device Specifications (Addressing)
- docs.wpilib.orgWPILib: Robot Battery Basics
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.
- 8 min readFRC CAN Bus Explained (and How to Fix Common Problems)How the FRC CAN bus works, the daisy-chain wiring with 120-ohm termination, avoiding device ID conflicts, and fixing the most common CAN failures./blogread it
- 7 min readFRC Brownout: Why Your Robot Goes Limp and How to Actually Fix ItThe exact roboRIO brownout voltage stages, how to spot one in the Driver Station log, and the fixes ranked by payoff: current limits, battery health, gearing, and compressor scheduling./blogread it
- 18 min readFRC Power Transmission: Chain vs Belt, Sprockets, Pulleys, and TensioningA practical FRC guide to moving power from motor to mechanism: #25 vs #35 chain, HTD/GT2 belts, sprocket ratios, center distance, tensioning, and failure modes./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
01What is the first thing that happens as battery voltage drops below 6.8V on the roboRIO?
02Which of these is one of the three independent signals that confirm a brown-out happened?
03What does a CAN bus need to avoid flaky communication from missing termination?
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