CAN Wiring - TAMSFormers5212/TAMSformers-Database GitHub Wiki
Controllable Access Network (CAN) is a networking system first invented for automotive use. It has since been adapted to FRC because of its potential to be robustly made and simplification of previous wiring schemes. CAN uses a high and low wire, usually yellow and green, to sind signals down the CAN network.
CAN gives a considerable number of benefits over previously used signal methods like PWM. The biggest is the ability to daisy chain all CAN devices into one loop. This makes wiring much simpler as you no longer have to route every device back to the roborio. Instead, they go around once for every motor. Additionally, CAN only uses 2 wires compared to PWM's 3. CAN wires are also twisted to even out the external electrical interference. CAN also lets you attach more devices. With PWM, you would be limited by the number of PWM ports on the roborio, but CAN can be attached to dozens of devices at a time.
CAN wires, like other signal wires, are very small. As a result, care needs to be taken when placing them so they won't rip or disconnect during competition.
Strain relief is the process of tying the wire to something more secure such as dedicated ziptie mounts. larger wires (typically power wires), or anywhere unlikely to move to break. This puts the force into the larger body instead of the small CAN wires. This should be done wherever possible to prevent the wires from swinging freely, but it is especially important where connectors are.
The first weakpoint is usually the connectors between segments of wire.
Since we've pretty much only used SparkMaxes, our CAN wiring is mostly segments of the included CAN wire, terminated in PWM style Molex connectors. These connectors are not very good at holding together when a force is applied, so we always use the REV (or old VEX) retention clips.
Though these clips generally keep the pins together, on very strong impacts these can come loose or the wire could even break. As a result, strain relief is an important step for all small wires.
One of the more "safe" methods of connecting wires together is to simply not have to use a connector. In the case of needinng to extend a wire, you could just replace it with a longer wire. In many cases though, you will still have to connect additional wires. Soldering is a method of melting a conductive solder compound over the wires to connect them. This makes it almost as good as if there wasn't a connection there. However, this requires practice, time, and safety precautions to do.
If you are experienced in soldering this may be an optino if time is plentiful and the situation needs a more custom approach.
Wagos, or lever nuts, are popular for power wires due to how easy they are to use compared to other options like andersons. They also come in smaller sizes which are suitable for CAN wires. These are most helpful when you need to fix a connection quickly. However, they can be less secure than the other two methods, take up more space, and cost more.
You will need to start the CAN chain at the roborio. The roborio has a specific CAN terminal with two weidmuller push style terminals. You'll start by putting in the two wires to the respective high and low terminals.
Then, you'll connect this with you first CAN device. The CAN wire will go into the device and then come out again. That end will connect to the next CAN device and so on. SparkMaxes come with a unique CAN wire with an extra loop that keeps the CAN chain connected even if the connector gets pulled out of the motor controller.
The CAN chain will go throuhg every CAN device before ending at the PDH. There are Wago lever nut terminals for the end of the CAN chain.