I'm currently learning how to make a circuit for CAN-BUS communication and came across the schematics of the Sparkfun CAN-BUS shield for Arduino (can be found here). I'm a little puzzled by this section that shows a 100 ohm resistor and a 560 pF capacitor going to the ground from CANH and CANL lines of the MCP2551 transceiver. The other circuits I've seen do not have this, what is it's purpose?
1 Answer
This is a termination intended to avoid the reflection of signal pulses the end of a transmission line. (to be more precise: the rising / falling edges of the signal like to be reflected)
The simplest type of termination is a resistor between transmission line and ground. In case of differential signals, it's often a single resistor between both lines, but connecting each line to ground via a separate resistor would be fine, too.
However, this causes permanent currents over the signal lines, even when no data is transmitted. In case of CAN, one standard for voltage levels is (2.5V; 2.5V) and (1.5V; 3.5V) for the two data lines. Connecting each to ground via 100 Ohm results in a current of 25mA+25mA=50mA or 15mA+35mA=50mA. In terms of power, this is is 0.125 to 0.145W. And as you need termination on both ends of the transmission line, you can double these values.
The capacitor only allows some current to flow when signal levels change and so saves some power.
Typically, the need of termination depends on length of transmission lines and bit rate. At 125kBit/s, a bit has a duration of 8µs and can travel about 1.8km through copper during that time. If your transmission lines are long ( let's say more than 10% of that value, i.e. 180m), you definitely need termination.
However, on test rigs on my desk, where CAN bus cables were less than 2m, I observed that communication only works with at least one terminator connected for a certain brand of PC-CAN interface. Other PC-CAN interfaces were able to communicate even without any termination in that test rig. My advice is to always use terminators for CAN buses.
Further more, I wrote that you need one terminator on each end of the transmission line. They are sometimes build into CAN bus devices like PC-CAN interfaces, which are intended to be at one end of the transmission lines. Adding an extra terminator at that end may distort the signals and communication does not work. Therefore (and for the case where this devices are not at the end), their internal terminator can often be switched off.
-
\$\begingroup\$ I assume such termination is necessary for the CAN-BUS to operate properly and the schematics I've seen that do not include this are incomplete? \$\endgroup\$ Commented Oct 26, 2015 at 14:41
-
1\$\begingroup\$ I've just extended my answer. In short: Yes and No. The clean way is to always have one terminator on both ends of a transmission line (sometimes, it also works without any). Terminators can be included in the device, or you need to attach them to the transmission line separately. It depends a little on your use-case. If your transmission line is very short, one terminator may be sufficient, and if you consider your arduino as "master" or "first device", it may make sense to include a terminator on this board. \$\endgroup\$– sweberCommented Oct 26, 2015 at 14:53