Skip to main content

Command Palette

Search for a command to run...

CAN (Controller Area Network)

Updated
β€’3 min read

πŸ“˜ CAN (Controller Area Network)

1) Concept

CAN is a multi-node serial communication bus designed for reliability and real-time messaging in embedded systems. It is used in automotive ECUs, industrial control, robots, drones, medical devices, and aerospace.

Multiple devices share one bus and communicate using message IDs.

Unlike UART or SPI, CAN is not point-to-point β€” it is a shared bus network.


2) Physical Layer (Differential Signaling)

CAN uses two wires:

LineMeaning
CAN_HDifferential High
CAN_LDifferential Low

Differential signaling provides:

  • High noise immunity

  • Long cable tolerance

  • Stable operation in harsh environments

This is why CAN is strong in automotive + industrial fields.


3) Message-Based (No Device Addresses)

CAN does not use device addresses. Instead, messages are identified by message IDs.

Example:

IDMeaning
0x100Motor speed status
0x200Sensor temperature
0x301Brake command

All nodes receive all messages, and each node decides whether to accept or ignore based on ID filtering.

This is publish-subscribe communication at the hardware level.


4) Arbitration (Collision-Free Bus Access)

If multiple nodes transmit at the same time, CAN resolves conflicts using bitwise arbitration:

  • IDs are compared bit-by-bit

  • Lower ID value = Higher priority

  • Higher priority frame continues; others automatically back off

Example:

Message IDPriority
0x001Highest
0x123Medium
0x3FFLow

This ensures real-time guarantee:

Critical messages always win the bus.

5) Data Structure

A CAN frame includes:

[ID][Control][Data (0–8 bytes)][CRC][ACK][EOF]

For Classical CAN, max payload is 8 bytes.

For CAN FD (Flexible Data Rate), payload can be:

8, 12, 16, 24, 32, 48, 64 bytes

and data phase bitrate can be much faster.


6) Data Rates

TypeMax BitrateNotes
Classical CAN~1 MbpsStandard automotive control
CAN FDData phase up to 5–8 MbpsUsed in modern vehicles and robotics

If you’re doing new development, CAN FD is the correct choice.


7) Why CAN Is Strong

FeatureBenefit
Differential busNoise immune, reliable
Arbitration mechanismReal-time communication guaranteed
CRC + ACK-handlingHigh data integrity
Multi-node shared busWiring cost is low
Widely standardizedInteroperability across vendors

In short:

CAN = Real-time, reliable, hardened communication bus.

8) Example Topology

     Node A
       |
Node B─+─Node C──── Termination (120Ξ©) at both ends
       |
     Node D

Only the ends of the bus have 120Ξ© terminators.