EN

RS-485 and CAN buses

Length, termination, biasing and bit timing

RS-485 and CAN are the two most widely used differential buses in industry and cars. Data travels over a twisted pair as the voltage difference between two wires, so noise affecting both equally cancels out and hundreds of metres can be reached. For them to work properly, three things must be respected: a daisy-chain topology, termination at the ends and a relationship between speed and length.

RS-485

In RS-485 the nodes hang in line from a twisted pair with a termination resistor equal to the cable impedance (120 Ω) at each end. When nobody transmits, the bus floats; a pair of biasing resistors (one to positive on A and one to ground on B, at a single point) sets an idle state of at least 200 mV so that receivers do not read noise.

RS-485 bus
bit/s
m
V
Ω

CAN

In CAN the bus is also a twisted pair terminated with 120 Ω at each end, but arbitration is bit by bit: every node must see each bit at the same time, so the signal must travel to the end and back before the sample point. That is why the maximum length drops sharply as speed rises. The bit time is divided into quanta (tq) and set with a prescaler and two segments.

CAN bus
m
MHz
%
ns

RS-485 versus CAN

RS-485CAN
Bus accessMaster-slave: one asks and the others answerMulti-master with arbitration by identifier priority
Speed and distanceUp to 10 Mbit/s over a few metres; 1200 m at 100 kbit/s or less1 Mbit/s at about 40 m; 50 kbit/s at 1 km
Error detectionProvided by the protocol (Modbus CRC)Built in: CRC, acknowledge and automatic retransmission
Nodes32 unit loads (256 with 1/8 transceivers)Up to about 110 in practice
ProtocolsModbus RTU, Profibus DP, BACnet MS/TP, DMX512CANopen, J1939, DeviceNet, NMEA 2000

Related: UART and baud rate, crystal oscillator, TVS protection and optocouplers.