We’ve been having a recurring issue where one of our sparkmax motor controllers stops functioning while driving for a few seconds. We’ve checked our can wiring multiple times and fixed any issues there. This issue typically happens after 2-5 minutes of driving and always occurs in the same motor controller. We’ve tried reassigning the CAN ID of the device, swapping in a different spark, and verified there are no obvious errors in our software that would cause the object to fail. Here’s a link to the console output we see when this error occurs
Let me know if you’ve seen this before or have any ideas. Thanks.
More detail on what all is on your CAN bus, how it is wired, and your CAN utilization might help. It is odd. Do you have termination on both ends of the bus? This is often at the RIO and the PDP. What topology is your bus?
7 spark max, 3 Victor srx, 2 Talons, the CTREPDP, and the PCM
We usually are around ~45-55% CAN bus utilization and sometimes reach ~70%, this comes from me just looking at the driverstation while the robot was driving around during practice
I believe we are, the bus starts at the RIO then ends at the PDP, the terminating resistor jumper was placed in the ON slot. I’ll check again today to make sure this is the case
Just the standard ring topology I believe. We start at the Rio, next to the pcm, then connect each motor controller together in series, then end at the PDP. The pcm is ID 0, the PDP is ID 1, the left drive sparks are ID 2,3. The right drive sparks are ID 4,5, then the rest of the controllers go up from there.
The device that fails always seems to be one of the left drive sparks which we have as ID 3. When we switched that device to CAN ID 15, we started getting the time out error on device 15.
When we switched back to ID 3, but swapped the left gearbox Neo andersons to the other left gearbox sparkmax, the error still occured on device 3.
When we switched which wago device 3 was connected to in the PDP the error still occured on device 3.
When we switched physically where device 3 was located in the bus the error still occured on device 3.
When we swapped out the sparkmax controller to a different one, checked the firmware was up to date and then assigned it to CAN ID 3, the error still occured on device 3
Checking how we have our bus set up now, device 2 and 3 (the left drivetrain sparks) are in a leader follower configuration but are not physically next to each other on the bus, could this be an issue?
We are looking to try a different spark again today and strip every unnecessary CAN message we are sending during operation out of the code. Not sure what else to try if anyone has any advice
I’d check for any possible loose power connection for that MAX. An intermittent connection could be causing it to reset sometimes. If that happens, you will often see timeouts. If you don’t find a suspect power connection, try swapping out that breaker, and/or switching the PDP channel you are using. Also worth doing a firmware update if not at 1.5.2, and perhaps a “complete factory reset” (you have to reassign CAN ID after doing this). Good luck!
We found that reducing CAN bus utilization of our robot solved the issue. If you have any follower devices, and you don’t care for its telemetry, you can reduce the rate at which those messages are sent. This can be done on CTRE devices as such: Common Device API — Phoenix documentation. Similarly on REV devices, follow: Control Interfaces - SPARK MAX.
It’s important to reduce the can utilization everywhere, not just the problematic device.