System 07
CAN bus
Two wires, driven differentially, terminated at both ends. Every frame carries an ID that is also its priority, and bit stuffing keeps every node in sync.
- Sheet
- 07 / 09
- Figures
- 2
- Interactive
- Yes
- Related notes
- 1
In a conversion, CAN is how the BMS tells the charger to stop, how the VCU asks the inverter for torque, and how the dash learns anything at all. It is two wires and a set of rules every node has to agree on: bit rate, identifiers, and how the bits inside each frame are packed.
Two wires, one difference
- Differential. A dominant bit (logical 0) drives CAN_H up to about 3.5 V and CAN_L down to about 1.5 V. A recessive bit (logical 1) lets both float to about 2.5 V. Receivers only look at the difference, so noise that couples into both wires equally cancels out. Keep the pair twisted.
- Terminated at both physical ends. One 120 Ω resistor at each end of the trunk, none on the nodes in between. With everything powered off, H to L should read about 60 Ω. 120 Ω means one end is missing; about 40 Ω means an extra one is fitted.
- One bit rate per bus. 500 kbit/s is common on drivetrain parts, but not universal. A node at the wrong rate does not just stay quiet: it can flood the bus with error frames.
- Short stubs. Run the trunk past each node and keep the drop to each one short, especially at higher bit rates.
CAN physical layer: CAN_H, CAN_L, and termination
This figure is interactive and needs JavaScript. The text description below covers the same content.
Text description
CAN uses two wires. Recessive (logical 1): both sit near 2.5 V and the difference is about 0 V. Dominant (logical 0): CAN_H rises to about 3.5 V and CAN_L falls to about 1.5 V, a difference of about 2 V. Receivers read a difference below 0.5 V as recessive and above 0.9 V as dominant.
A 120 Ω resistor terminates each end of the bus. With power off, the resistance between CAN_H and CAN_L should read about 60 Ω: two 120 Ω in parallel. 120 Ω means one terminator is missing; about 40 Ω means there is an extra one.
What a frame carries
A classic frame has an 11-bit identifier, a length code, up to eight data bytes, and a 15-bit CRC. The identifier says what the frame is, not who sent it, and it doubles as the priority: when two nodes start at once, the lower identifier wins arbitration without either frame being damaged. Bit stuffing adds an opposite bit after every five identical bits so receivers stay in sync, which means the same payload can take a different number of bits on the wire.
CAN frame builder: ID, DLC, data, CRC, bit stuffing
This figure is interactive and needs JavaScript. The text description below covers the same content.
Text description
A classic CAN data frame: start of frame, 11-bit identifier, RTR, IDE, reserved bit, 4-bit data length code, 0 to 8 data bytes, 15-bit CRC and delimiter, acknowledge slot and delimiter, and 7 recessive end-of-frame bits.
After five identical bits in a row, the transmitter inserts one bit of the opposite level so receivers can stay synchronised; receivers remove it. During arbitration every node transmits its ID; a dominant 0 overwrites a recessive 1, so the lowest ID wins without any collision.
Where builds go wrong
- No shared map. The bits only mean something if every node agrees on the identifiers and the packing. That map is a DBC file; the CAN and DBC note walks through one.
- Measure before you scope. Power off, meter across H and L. 60 Ω first, then look at signals.
- Bus load. Fast, full frames add up. Keep headroom: a bus that is busy most of the time delays low-priority frames, and that is where odd timeouts start.
- Read real traffic. Paste a DBC into the DBC reader to decode a frame, or replay a capture in the CAN log player.