It’s just two wires, what’s so hard about that? (Download our example drawing & guide here)
While CAN and CAN FD networks only consist of a few wires, there are a few gotcha’s to consider when working on a harness design for a network that needs to be robust and reliable. Below are three “gotchas” that are commonly encountered designing harnesses for vehicles and instrumentation networks.
- Improper terminations
- Network stubs or spur’s
- Lack of common ground
Improper Terminations
CAN and CAN FD networks require 120 ohm termination resistors at each end of a CAN bus network. However, given the robust nature of CAN it often “will work” with only one termination. This situation is typically seen on the bench with a very small length of wire (1-3ft) in low noise environments. For example, using development board and a CAN to PC interface (CANalyzer) or two nodes communicating on the bench with very little distance between them. This robustness can lead to the situation where a termination is forgotten or misplaced when a real-world harness is designed or perhaps when adding nodes to the network. Termination resistors may be built into the PCB, designed into the harness (in a connector, behind a wiring boot, etc), or a programmable part of the device (node). So, which nodes should carry the termination in the network? This question leads to the topic of wiring stubs/spur’s in a network.
Wiring Stubs or Spur’s
The purpose of the termination resistor is to ensure robust current flows throughout the network. The input impedance of CAN or CAN FD transceivers is relatively high (k Ohm’s) and building a robust network means ensuring a strong differential voltage be developed between CANH and CANL. The 60 ohm network impedance (120 ohms in parallel) provides a low impedance load for the transceivers to pump ample current through the network developing a strong differential voltage between CANH and CANL.
Ideally, each node in the network should benefit from the strength of this differential signal. A robustly designed harness should aim to properly “deliver” this signal to each node. One method for ensuring this to use daisy chain wiring topology where the currents flow to each node as close to the transceiver inputs as possible with no stubs or spurs. This means placing the terminations at the furthest points of the network and running pairs of wires directly from one node to the next.
Network stubs can be visualized as branches that lead to only one node, creating a “dead end” for current flow. The higher impedance in these stubs can introduce signal reflections that impact all nodes in the network causing instability of communications. The figures below illustrate two network designs, a design with a stub and a daisy chain design with terminations at the ends of the network.
There are conditions where a wiring spur is unavoidable. One example would be the addition of a temporary device such as a USB CANalyzer for troubleshooting the bus with the PC. Another example would be an unavoidable modification or branch in the harness where a stub cannot be avoided. In these cases it is best to only use the connection temporarily or keep the stub length to 0.3m or less (CAN guidelines, CAN FD may have further considerations).
Lack of Common Ground
Comments such as “CAN is only 2 wires” or “CAN bus is differential” imply that ground wire may not be needed as part of a harness. While in some cases connecting only 2 wires may anecdotally work, it is a mistake to think that the ground wire is never needed. Transceivers have common mode limits, and if they are exceeded due to floating references (differences in ground potential between nodes) the nodes will fail to decode 1’s from 0’s on the bus (bits). Within a vehicle harness carrying many signals, a ground is often included. This shared ground between nodes can be adequate so long as the individual nodes use this same reference (connector pin), however nodes may also have a dedicated digital/communications ground point (pin). When making a temporary connection to a network for troubleshooting such as a CANalyzer connected to a PC, it is important to run the ground wire as the PC is not likely to have a common reference to the vehicle (plugged into AC, or running on own battery).
Other Considerations
- Common practices used in communication networks such as twisting and shielding are also advised for use with CAN bus.
- Shielding can add extra weight and may not always be necessary depending upon the nature of the environment (perhaps needed in high-energy switching environment). It is also possible that shielding exists the larger branches of the harness that also encompass the CAN CAN FD wires.
- Shields should be grounded at one end (node) in order to prevent ground loops (assuming the shield is not used as the ground wire itself)
- Higher transmission rates used in CAN FD have introduced lower capacitance limits for networks