Hello and thank you for clicking on this post, it is greatly appreciated.
We had rewired our belly-pan for better wire management (photo pending) but when re-wiring the CAN (we had followed our programmers CAN ID’s for each spark max) it began to give weird issues. The sparks gave an orange/yellow error which indicated can fault was located somewhere with our two last sparks being blue and purple, meaning the loop broke. We resolved this issue through many attempts but a new one occurred this afternoon.
Our chassis sparks, the beginning of the loop, were correct but our hangar sparks were now orange/yellow, the last sparks of the loop. Im afraid that the can is switching places where it breaks, or it could be an internal wiring system error, as in the electronics wiring towards each other before and after sparks).
Our CAN-encoders also give a dim-green light, which indicates can loop is barely reaching through them (correct me if I’m wrong).
The loop starts from the PDP, into our first spark, middle of it is our encoders, back to our sparks and from our last spark into the pneumatic hub and finally to the roborio.
CAN doesn’t even know that they’re meant to be in a loop and the PDH and pneumatics hub have the same problem but sparks in the working loop are blue.
Is it possible that the can encoders play a part in the last two sparks giving can issues? Any help is appreciated
Can you draw a diagram of your CAN bus? I can’t quite follow the topology from your comment. A screenshot of Phoenix Tuner or REV Hardware Client showing devices visible on the bus would be beneficial. Also, the “start” of the bus is generally the roborio since that’s where all non-CAN communication connects in.
As for your issues, am I correct in assuming that the devices that work (valid LED code) are at the ends of your bus, and the “broken” ones are in the middle? If so, that sounds like a double-swap (check for yellow->green and green->yellow in your connectors immediately before/after the devices that aren’t working).
This is around the gist of our can wiring. I currently don’t have access to the Pheonix Tuner/Rev Hardware Client but I will get that to you as soon as I can. Oh thank you, I did not know that roborio is the start of can, I will get to changing that wiring and update the chart and link that to the end of this post.
It’s actually the “broken” ones are at the end of our loop, the last two sparks before the pneumatic hub.
Also question, do the CAN ID’s have a large importance?
No need to change the wiring or IDs. The IDs are logical, not physical, so as long as they’re unique (by device type. so you can have a roborio with ID 1, SparkMax with ID 1, and CanCoder with ID 1, but you can’t have 2 SparkMaxs with the same ID), you’re fine. The IDs have nothing to do with the physical topology of the bus.
Back to your issue though, the bus includes the roborio and PDP, so if the two SparkMaxes (18 and 19 in your drawing) are the only ones not working, then it’s definitely not a simple break in the CAN wiring (the Rio wouldn’t see anything past the break, which in this case would be everything except the pneumatics hub). I would be sure to check the wiring/connectors between 17-18 and 19-20 to look for swaps.
Thank you for your response! Here is the chart change for when we add the RIO to the start, would this help diagnose any problems or eliminate possible issues?
The numbering would be the CAN ID’s.
Sorry for a lead-on question here, what do you mean by swaps?
Again, no need to changing the wiring from how you had it before. There’s no “order” with CAN, so it won’t make much difference which way you wire it. The only real requirement is that there’s a 120ohm terminating resistor at the ends. The PDP and RoboRio both have this built-in, so it’s best to keep them at the ends (like you have it).
Apologies for not being clear. I was referring back to my first comment. By “swaps” I’m referring to when you flip the 2 wires. If you do this twice, the rest of the bus will work fine, but the ones between them will not.
Follow every wire from component to component, treating the yellow and green wires separately. Make sure that the yellow wires only go to the connectors marked “yellow” at both ends of each wire and the green wires only go to the connectors marked “green” at both ends of each wire. I agree with @Fletch1373 in thinking you may have a yellow wire going into a green connector and a green wire going into a yellow connector in at least one place.
Make sure there is no exposed conductor i.e. the insulation should go into each connector slightly at every point where a wire goes into a connector. Exposed conductors are inviting shorts that will take your CAN bus down.
Do a gentle “pull test” by pulling lightly on each and every wire, separately. Wires that where the stripped section is too short can pull out.
You should be spending a few seconds to do these checks after installing each and every wire. This sounds tedious and time consuming and it is. It will save you much more time by reducing or eliminating the time needed to troubleshoot your wiring.