Course contentsShow
← Embedded Systems & Computer Architecture
Lesson 382 of 9365. Communication Protocols and Data TransferFree lesson

Principles of Differential Signaling in CAN

Analyze how using voltage differences between two wires enables reliable communication in electrically noisy industrial environments by canceling out common-mode interference.

In this lesson, you will learn how CAN (Controller Area Network) uses two-wire differential signaling to maintain reliable communication in environments rife with electrical noise.

Beyond Single-Ended Signaling

Up until now, we have studied protocols like SPI and I2C, which are typically "single-ended." In these systems, a logic 1 or 0 is determined by the voltage of a single signal line relative to a shared ground. While efficient, this is vulnerable in industrial settings—long wires act like antennas, picking up electromagnetic interference (EMI) from motors or high-voltage lines. This noise can push a signal voltage across the threshold, causing a bit error.

The Power of Differential Pairs

CAN solves this by using two wires: CAN_H (High) and CAN_L (Low). Instead of looking at the absolute voltage of one wire, the receiver measures the difference between them:

V_diff = V_CAN_H - V_CAN_L

If a motor creates an electrical spike, that noise usually couples onto both wires equally. This is called "common-mode interference." Because the receiver only cares about the difference between the wires, the noise is mathematically canceled out:

// Example: Noise pulse of 1.5V added to both wires
// Before noise: V_diff = 3.5V - 1.5V = 2.0V
// With noise:   V_diff = (3.5V + 1.5V) - (1.5V + 1.5V) = 2.0V

Dominant and Recessive States

In CAN, we don't think in terms of 0 and 1 as strictly as we did with SPI.

  • Recessive: Both wires are held at the same voltage (usually 2.5V). The difference is 0V, representing a logical 1.
  • Dominant: CAN_H is driven higher and CAN_L is driven lower. The significant voltage gap between them represents a logical 0.

Because the logic is based on the gap rather than a fixed potential, the system is incredibly robust. Even if the entire bus fluctuates due to external interference, the relative distance between the two wires remains stable, allowing the transceivers to interpret the data correctly even hundreds of meters away from the source.

Key Takeaway: Differential signaling ignores common-mode noise by measuring the voltage difference between two wires, ensuring data integrity in electrically harsh industrial environments.