Unable to see all SparkMaxs on CAN Bus

Hey guys,

We’ve completed wiring our bot, be we are having pretty severe issues on our CAN network that’s preventing us from connecting.

In short, we have 14 SparkMaxs on our robot currently, however we are only able to see 11 of them. 4 of them, spread out across the entire CAN bus (9, 11, 13, 14), are invisible. We are using the REV Spark Client to see all the devices, and they are all on firmware 1.5.2. We can connect to the ones that are not showing directly via USB-C. When we do this, we can see that device only (not any other device, even though we should be able to). These devices that are only visible through direct USB-C connection are also updated with firmware 1.5.2 and have unique CAN IDs.

When we connect to these SparkMaxs via USB-C, the entire CAN Network appears to fail. All the other Sparks on the entire CAN bus start blinking random colors and the ones that we normally have to direct connect to blink a alternating red and yellow (which we see means indicating CAN fault on the blink code page). If we simply connect to a non-“broken” SparkMax, we can see all the other non-“broken” motor controllers without the whole CAN bus faulting and PCM flashing. We see the whole CAN Bus, and the LEDs of all the motor controllers and PCM appear normal and do not show any signs of an error.

We can deploy our code fine, but once again, if we try running the motor controllers which are invisible to us on the CAN network, then the entire CAN network appears to crash once again. Otherwise, if we do not run these motors, everything else runs fine and the CAN bus does not show any apparent faults.

Is it possible that these are simply faulty Sparks? If it is a CAN issue, shouldn’t the PCM and all the Spark’s immediately flash red/error colors as soon as I turn on the robot? If there is a bad connection anywhere along the CAN network, shouldn’t I not be able to see anything at all?

Any help with resolving this issue would be very much appreciated. Thank you!

When you initialize them in code, do you get an error saying that it can’t find the spark max(es) in question? Have you tried resetting them? Follow this tutorial for the ones that are acting up and see if it solves the issue! Is there a way to unbrick a Spark Max?

Sounds to me like you have some swapped can wires somewhere. Do you have the network terminated correctl?

I would also try to remove al the devices you can see from the CAN bus, and just leave one or more of those you can’t. Sometimes things aren’t addressed what you think they are, but at least this will reduce the number of variables in your problem.

Yes, the CAN wires going to one of our Sparks was switched. Switching them back to what they’re supposed to be corrected this issue. Thank you!