Our team is having issues with the Drivetrain. We have a West Coast style drivetrain and it worked for months, we have no clue what changed. Here is some of the troubleshooting methods we have done:
- Verify that each motor works.
With the robot on a stand and wheels clear, we went through each gearbox and disconnected all but one motor on each side from their speed controllers. Each motor was able to drive the gearbox by itself, it appears that all motors are running and there are no electrical disconnects.
With Digital Multi-Meter, measured resistance across each of the 3 pairs of windings on the motors, all read ~0.3 Ohm. Motors seem to be fine. - Verify that it isn’t a code issue.
Ran robot with latest code. With current limiting on, it stutters when accelerating. With current limiting off, it also stutters but appears to be browning out (recreating the problem we are trying to solve).
Loaded an old version of code from AZ East regional, even reverting to the joysticks! Problem persists, it doesn’t appear to be a code issue. - Validation that battery to Power Distribution Panel wiring is solid.
Noted that the positive terminal of the wiring into the PDP was (every so slightly) loose. Removed terminals from PDP and inspected for arcing, but terminals were clean.
Suspecting possible main breaker failure, bypassed the main breaker with a new one. Tested again, problem persists, so not the main breaker. - Verify that each motor works under load.
Reran the individual motor test, but this time under load. With robot on the ground and pushing against an obstacle, the robot is able to slip the wheels on the carpet with a single motor on each side. However, one motor on each side was unable to do so. When testing the suspect motors, the robot is able to drive, but at considerably less power.
At this point, we have identified one set of motor / speed controller on each side of the robot that is unable to supply full power. If we remove these suspect motors from power, the robot should be able to run??? Conducted another test with the suspect motors disconnected from their speed controllers but all other motors connected. The robot seemed to be running just fine! At this point, we hypothesize that the suspect motor (being in brake mode) is providing excessive resistance to the gearbox when plugged in. Unsure if it’s one bad motor on each side of the robot, or one bad speed controller. Interestingly, it’s the same motor on each side. - Identify suspect speed controllers.
Plugged into speed controllers via USB-C. Blinked each one to identify which speed controller was suspect on each side of the robot. We found speed controllers 1 and 4 were the suspect ones. This is weird, since they are apparently the lead speed controllers on each side of the robot, while 2 and 3 are following 1, 5 and 6 are following 4. - Change lead speed controllers to verify that 1 and 4 are indeed bad.
Repeated the single-motor-under-load test after adjusting the lead speed controllers to 2 and 5. Each single motor was able to slip the wheels with the robot pushing against an obstacle. It appears that the issue is gone! - Change lead speed controllers back to 1 and 4 to verify.
Repeated the single-motor-under-load test after putting the lead speed controllers back to 1 and 4. The issue is gone! This is perplexing, because all of the code is still the same, all of the wiring is the same, and all of the CAN configuration is the same.
However, the day after this the issues came back and here are some notes we took:
We added the speed controller outputs to the SmartDashboard as a graph to compare their outputs.
The left side controllers tend to have outputs that track together fairly well.
The right side followers have wildly different output voltages compared to each other and the right lead controller. The only time they tracked together was when we disconnected the lead speed controller & motor.
Here is the code:
We are currently using the branch: state_champs
Does anyone have any advice or anything we could try doing?