Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A Controller Area Network, or CAN bus, is a communication system that lets many electronic modules share data over the same two wires. It is widely used in cars, mobile robots, industrial machines, and competition robots because it is reliable, compact, and resistant to electrical noise. Instead of running a separate signal wire for every sensor and actuator, designers connect many nodes to one shared backbone.

This reduces wiring weight and makes large robotic systems easier to build and diagnose.

CAN uses a twisted differential pair called CAN_H and CAN_L, where information is carried by the voltage difference between the two wires rather than by one wire measured alone. Every node can listen to every message, and message identifiers decide both the meaning of the data and which message wins if two nodes transmit at the same time. This priority process is called arbitration, and it allows important messages such as motor safety commands to get through first without destroying lower priority messages.

Termination resistors at the ends of the bus help prevent signal reflections, which is critical for clean communication at high speed.

Key Facts

  • CAN uses two signal wires: CAN_H and CAN_L.
  • Differential voltage is measured as Vdiff = V(CAN_H) - V(CAN_L).
  • A typical high speed CAN bus uses 120 ohm termination at each physical end of the backbone.
  • The equivalent resistance of two 120 ohm terminators in parallel is R = 60 ohm.
  • Message arbitration is based on the identifier, where a lower numeric ID usually has higher priority.
  • Bit time is related to bit rate by Tbit = 1 / bitrate.

Vocabulary

CAN bus
A shared communication network that lets multiple electronic control units exchange short messages over the same two-wire link.
Differential pair
A pair of wires that carries a signal using the voltage difference between them, which helps reject electrical noise.
Node
Any device connected to the CAN bus, such as a motor controller, sensor module, battery controller, or main robot computer.
Arbitration
The process that decides which CAN message continues transmitting when multiple nodes start sending at the same time.
Termination resistor
A resistor placed at each end of the CAN backbone to match the cable impedance and reduce signal reflections.

Common Mistakes to Avoid

  • Putting termination resistors on every node is wrong because only the two physical ends of the backbone should normally be terminated. Extra terminators lower the bus resistance and can weaken the signal.
  • Treating CAN_H and CAN_L as independent data lines is wrong because CAN uses the voltage difference between the pair. Measuring only one wire can give a misleading picture of the actual signal.
  • Making long unterminated stubs to each device is wrong because stubs can create reflections and timing errors. Keep branches short and place nodes close to the main backbone when possible.
  • Assuming messages are addressed to one device like a normal serial link is wrong because CAN messages are broadcast with identifiers. Nodes decide which messages to accept by filtering IDs.

Practice Questions

  1. 1 A CAN bus has two 120 ohm termination resistors, one at each end of the backbone. What equivalent resistance should you measure between CAN_H and CAN_L when the system is powered off?
  2. 2 A robot CAN network runs at 500,000 bits per second. What is the time for one bit in microseconds?
  3. 3 Two motor controllers try to transmit at the same time with message IDs 0x120 and 0x080. Which message wins arbitration, and why is this useful for safety-critical robot communication?