13 Min Read • Updated June 2026

How CAN Bus Works: Controller Area Network Protocol in Automotive & Robotics

Every modern car has 70+ computers talking to each other over a 2-wire CAN bus. From ABS brakes to engine management, discover how CAN's elegant differential signaling, priority arbitration, and robust error detection make it the backbone of embedded automotive networking.

AY
Updated June 1, 2026
CAN bus network diagram showing multiple ECUs connected to CAN-H and CAN-L twisted pair with 120 ohm terminators
Signal Type

Differential pair (CAN-H and CAN-L)

Max Speed

1 Mbps (classic CAN) / 8 Mbps (CAN FD)

Bus Topology

Multi-master, multi-drop linear bus

Max Nodes

110 nodes (at 1 Mbps) on one segment

Arbitration

Non-destructive CSMA/CA by message ID

Applications

Automotive ECUs, robotics, industrial PLCs

What Is CAN Bus?

Direct Definition: CAN (Controller Area Network) is a robust, multi-master serial communication bus standard (ISO 11898) designed to allow microcontrollers and embedded devices to communicate with each other without a host computer, using differential signaling on a twisted pair of wires (CAN-H and CAN-L).

Developed by Bosch in 1983 and standardized in 1993, CAN was created to solve a specific automotive engineering problem: as modern cars added more and more electronic control units (ECUs), connecting them all with individual wires became impractical. A 1980s luxury car might need over 2km of wiring — a CAN bus replaces this with a simple 2-wire network.

Today, CAN is used far beyond automotive: robotics (ROS2 CAN drivers), industrial automation (CANopen), medical devices, and aerospace all rely on CAN's exceptional noise immunity and fault-tolerant design.

Differential Signaling: Why CAN Is Noise-Immune

Unlike single-ended protocols (UART, I2C), CAN uses two complementary wires:

Bit StateCAN-H VoltageCAN-L VoltageDifferential (H−L)
Dominant (0)3.5V1.5V2.0V
Recessive (1)2.5V2.5V0.0V

Electrical noise from the engine or other interference adds equal voltage to both wires simultaneously — so the difference (H−L) stays the same, making CAN effectively immune to common-mode electromagnetic interference (EMI). This is why CAN is trusted in harsh automotive and industrial environments.

CAN Data Frame Structure

A CAN data frame consists of multiple well-defined fields:

  1. SOF (Start of Frame, 1 bit): Dominant bit signaling frame start, synchronizes all nodes.
  2. Arbitration Field (11 or 29 bits): The Message ID. Lower ID = higher priority. All nodes transmit simultaneously; arbitration determines winner without data loss.
  3. RTR (Remote Transmission Request, 1 bit): Distinguishes data frames from remote frames requesting data.
  4. DLC (Data Length Code, 4 bits): Specifies payload length (0–8 bytes for classic CAN).
  5. Data Field (0–64 bytes): The actual payload — sensor readings, commands, status bytes.
  6. CRC (15 bits + 1 delimiter): Cyclic Redundancy Check for error detection.
  7. ACK Field (2 bits): Receiving nodes pull this dominant to acknowledge receipt.
  8. EOF (7 bits): End of frame marker — 7 recessive bits.
CAN bus standard 11-bit data frame structure diagram detailing SOF, Arbitration, Control, Data, CRC, ACK, and EOF fields

Fig 1: Standard CAN Data Frame — SOF, Arbitration (Message ID), Control, Data, CRC, and ACK fields

Arduino CAN Bus with MCP2515

The MCP2515 is an SPI-connected CAN controller IC paired with a TJA1050 CAN transceiver module. Widely available for under $2:

// Arduino CAN Bus Sender using MCP2515
// Library: mcp_can by coryjfowler
#include <mcp_can.h>
#include <SPI.h>

MCP_CAN CAN(10); // CS pin = D10

void setup() {
  Serial.begin(115200);
  if (CAN.begin(MCP_ANY, CAN_500KBPS, MCP_8MHZ) == CAN_OK) {
    Serial.println("CAN bus initialized at 500 kbps");
  }
  CAN.setMode(MCP_NORMAL);
}

void loop() {
  byte data[4] = {0x01, 0x02, 0x03, 0x04}; // 4-byte payload
  
  // Send with arbitration ID 0x123, standard frame (11-bit ID)
  byte result = CAN.sendMsgBuf(0x123, 0, 4, data);
  
  if (result == CAN_OK) {
    Serial.println("CAN frame sent successfully");
  } else {
    Serial.println("Error sending CAN frame");
  }
  delay(100); // 10 Hz transmission rate
}

Frequently Asked Questions

What is CAN bus and why is it used in cars?

CAN bus replaces heavy wiring harnesses in vehicles — instead of direct point-to-point wiring between every ECU, all modules share a single twisted pair. A modern car has 70+ ECUs communicating on multiple CAN buses.

How does CAN bus arbitration work?

CAN uses CSMA/CA — multiple nodes can transmit simultaneously. Each monitors the bus while transmitting. When a node detects a dominant bit where it sent a recessive bit, it loses arbitration and backs off. The lowest Message ID always wins.

What is the difference between CAN and CAN FD?

Classic CAN: 1 Mbps max, 8 bytes max data. CAN FD: 8 Mbps data-phase speed, 64 bytes max data. CAN FD was developed for automotive ADAS sensor data and OTA firmware updates.

What is OBD-II and how does it use CAN?

OBD-II is the standardized vehicle diagnostic interface (under-dashboard port). It provides access to the vehicle's CAN bus. Scanners send standard PIDs over CAN to request engine RPM, coolant temperature, fault codes (DTCs), and more.

What termination resistors does CAN bus need?

CAN bus needs 120Ω resistors at each physical end of the bus. These match the cable's characteristic impedance and prevent signal reflections. Without them, high-speed communication errors and noise are common.

📚 References & Sources

Was this article helpful?

Tap a star to rate — no account needed

Related Resources