Browse Wiki

CAN Bus Communication

How the Solterra charger uses CAN bus to communicate with the battery BMS - the protocol, state handshaking, message flow, and what happens when the communication link breaks.

What is CAN Bus?

CAN (Controller Area Network) is a robust, differential serial bus originally designed for automotive applications. It allows multiple devices - charger, BMS, vehicle controller - to share a single 2-wire bus (CAN_H and CAN_L) and communicate using message IDs with built-in error detection.

In the Solterra charger context, CAN enables the charger to receive real-time battery status from the BMS and for the BMS to command the charger with exact voltage and current limits - enabling safe, efficient, closed-loop charging that voltage-only chargers cannot achieve.

Standard CAN 2.0B / ISO 11898
Typical speed 250 kbps - 500 kbps
Wires CAN_H + CAN_L (+ GND)
Termination 120 ohm at each end
Max nodes ~110 on one bus
CAN_H CAN_L 120ohm 120ohm CHARGER BMS VCU / DISPLAY Differential pair - CAN_H and CAN_L carry mirror-image signals. Noise cancels at the receiver.
Twisted Pair Note

1 twist per 25 mm is recommended for most applications.

CAN Bus Twisted Pair Design Guide

Controller Area Network (CAN) bus uses a differential signaling scheme over a two-wire bus: CANH and CANL. The physical layer specification expects these two wires to be twisted together as a twisted pair, because that geometry is fundamental to the bus's noise immunity and signal integrity at higher bit rates.

CAN bus depends on common-mode noise rejection. Any electromagnetic interference from motors, inverters, ignition systems, or nearby harnesses tends to couple equally onto both CANH and CANL when the wires remain close and consistently twisted. The CAN transceiver reads only the differential voltage CANH - CANL, so identical noise on both wires cancels at the receiver.

Without twisting, the two conductors can take slightly different physical paths, pick up unequal noise, and lose the symmetry that differential signaling relies on. Twisting also reduces the loop area between CANH and CANL, which lowers radiated emissions and makes the pair less vulnerable to magnetic-field induction.

Parameter Typical Requirement
Twist rate 10-40 twists per metre with a common target around 20-30/m
Lay length 25-100 mm per full twist
Consistency Twist rate must stay uniform along the cable run

A tighter twist improves noise immunity, but it also increases stiffness and cable cost. For automotive CAN based on ISO 11898-2, harness teams often target roughly 25-33 twists per metre for medium-speed buses, and tighter rates when the harness runs near traction inverters or other high-EMI zones.

CAN bus has a 120 ohm characteristic impedance target. The twist rate, conductor size, insulation thickness, and dielectric material all combine to set that impedance.

  • Typical wire gauge: 0.22 mm² to 0.5 mm² (AWG 24 to AWG 20) for most automotive and industrial applications
  • Characteristic impedance: off-the-shelf CAN cables are typically pre-characterised to the required 120 ohm target
  • Termination: both ends of the bus must use 120 ohm resistors between CANH and CANL to prevent reflections
Type Use Case
UTP (Unshielded Twisted Pair) Most automotive and industrial CAN runs in typical EMI environments
STP (Shielded Twisted Pair) Preferred near traction inverters, motor drives, or antenna systems; shield should be grounded at one end only to avoid loop currents

In EV charging and powertrain harnesses, STP is commonly preferred where the CAN run passes close to power electronics. UTP remains acceptable in lower-noise zones such as BMS-internal harnesses or instrument clusters.

  • Stubs must be minimised: keep branches under 30 cm at 500 kbit/s, and under 10 cm for CAN FD at 2 Mbit/s
  • Do not untwist at connectors: keep the pair twisted as close to the pins as possible
  • Keep the same pair together: CANH and CANL must remain on the same twisted pair from node to node
  • Respect bend radius: excessive bending can distort the twist geometry and shift local impedance
Standard Scope
ISO 11898-2 CAN high-speed physical layer, including transceiver and cable expectations
ISO 11898-3 CAN low-speed fault-tolerant physical layer
SAE J1939-11 Heavy-vehicle CAN physical layer using shielded twisted pair and 120 ohm impedance
IEC 62228 EMC requirements for CAN transceivers
CiA 601 / CiA 603 CAN FD physical layer recommendations

The twisted-pair requirement in CAN is not just convention; it is the physical mechanism that makes differential signaling work reliably in noisy electrical environments. The practical priorities are: match 120 ohm impedance, keep a consistent twist rate, minimise stubs, and use shielded cable when the harness runs near inverters or high-current switching stages.

Charger-BMS Communication Flow

When AC power is connected, the charger follows a strict communication sequence before delivering any charge current.

Charger-BMS State Machine

A cleaner state view of the charger logic: listen first, validate CAN and battery voltage, use activation only when needed, then branch clearly into charging, completion, or fault.

Normal pathActivation pathFault pathLight + dark mode
Rendering graph...
View Mermaid Code
%%{init: {
  "flowchart": {
    "nodeSpacing": 34,
    "rankSpacing": 56,
    "padding": 12
  }
}}%%
flowchart TD
    AC["STATE 0<br/>AC DETECTED<br/>AC input is connected"]
    LSN["STATE 1<br/>LISTENING<br/>Passive CAN listen window for 5 seconds"]
    HSK["STATE 2A<br/>CAN HANDSHAKE<br/>Read BMS voltage, limits, and charge request"]
    VCHK{"Battery voltage<br/>already present?"}
    ACT["STATE 2B<br/>ACTIVATION<br/>Pulse Vmax / Ilow for up to 10 seconds"]
    CHG["STATE 3<br/>CHARGING<br/>Closed-loop current and voltage control"]
    DONE["STATE 4<br/>CHARGE COMPLETE<br/>BMS stop command or current tapers to near zero"]
    FLT["STATE F<br/>FAULT MODE<br/>No CAN and no sensed voltage after activation"]
    NOTE1["PASSIVE LISTEN WINDOW<br/>No charge output is allowed during the 5 second listen window"]
    NOTE2["ACTIVATION RECOVERY PATH<br/>Used only when the BMS is asleep, isolated, or still holding the MOSFET open"]

    AC -->|T = 0| LSN
    LSN -->|CAN detected within 5 s| HSK
    HSK -->|Evaluate pack state| VCHK
    VCHK -->|Voltage present| CHG
    CHG -->|BMS stop command or current tapers| DONE
    LSN -->|No CAN after 5 s| ACT
    VCHK -->|0 V / MOSFET open| ACT
    ACT -->|Comms recovered and voltage sensed before 10 s| CHG
    ACT -->|10 second timeout| FLT
    NOTE1 -.-> LSN
    NOTE2 -.-> ACT

    class AC state-idle
    class LSN state-listen
    class HSK state-handshake
    class VCHK state-decision
    class ACT state-activation
    class CHG state-charge
    class DONE state-complete
    class FLT state-fault
    class NOTE1,NOTE2 state-note

    linkStyle 0 stroke:#6f665b,stroke-width:2px;
    linkStyle 1 stroke:#37d67a,stroke-width:2.4px;
    linkStyle 2 stroke:#7cb3ff,stroke-width:2.2px;
    linkStyle 3 stroke:#37d67a,stroke-width:2.4px;
    linkStyle 4 stroke:#37d67a,stroke-width:2.2px;
    linkStyle 5 stroke:#fa913c,stroke-width:2.4px;
    linkStyle 6 stroke:#fa913c,stroke-width:2.4px;
    linkStyle 7 stroke:#37d67a,stroke-width:2.5px;
    linkStyle 8 stroke:#f87171,stroke-width:2.4px;
    linkStyle 9 stroke:#8b96a9,stroke-width:1.8px;
    linkStyle 10 stroke:#fa913c,stroke-width:1.8px;
1
Passive Listening Phase (0-5 seconds)

Immediately upon AC connection, the charger enters a passive listening state. No output is produced. The charger listens on the CAN bus for messages from the BMS. This 5-second window allows the BMS to boot and establish communication before the charger acts.

2
CAN Handshake

If the BMS responds within 5 seconds, the charger reads the battery's current voltage, state of charge, and requested charge limits. If the battery voltage is already above the minimum threshold, the charger proceeds directly to normal charging. If battery voltage reads 0V (BMS MOSFETs are open), the charger initiates the Activation procedure.

3
Normal Charging - Closed Loop

During charging, the BMS continuously broadcasts charge parameters: max charge voltage, max charge current, and protection flags. The charger adjusts its output in real time to stay within these limits. This enables precise SOC-based charging profiles (CC/CV) and allows the BMS to reduce or stop charging if a cell approaches a limit.

4
Charge Termination

The BMS sends a stop-charge command when target SOC is reached, or the charger self-terminates when output current drops to near-zero at the CV voltage. The relay opens, output ceases, and the green LED lights constant - indicating charge complete and safe power-off.

BMS Message Types

Direction Message Purpose Key Data Fields Update Rate
BMS -> Charger Charge Request Max_V, Max_I, SOC, Status 1000 ms
BMS -> Charger Protection Flags OVP, OTP, OCP, CellBalance 1000 ms
Charger -> BMS Charger Status V_out, I_out, State, Fault 1000 ms
Charger -> BMS Heartbeat Alive counter 1000 ms
The exact CAN message IDs and byte mappings depend on the vehicle OEM protocol configured at the factory. Solterra chargers support configurable CAN maps - contact sb@solterratech.com for DBC file access specific to your application.

What Happens When CAN Fails?

CAN Lost During Charging

If the CAN link drops mid-charge, the charger has no updated setpoints from the BMS. Depending on configuration, the charger may continue at the last known setpoints for a brief timeout window, then reduce current to a safe minimum or stop entirely. A fault LED pattern will activate.

CAN Never Established

If 5 seconds pass with no CAN messages, the charger assumes either the battery is deeply discharged (BMS is off) or a wiring fault. It enters Activation Mode - pulsing Vmax/Ilow to try to wake the battery. If no voltage appears within 10 seconds, the charger enters fault mode. See the Activation page.

Common CAN Wiring Issues

  • CAN_H and CAN_L swapped (differential reversed)
  • Missing 120 ohm termination at one or both ends
  • Corroded or intermittent connector pins
  • Incorrect baud rate configured
  • Ground loop (CAN GND not tied to chassis)

Diagnosing CAN Issues

Measure between CAN_H and CAN_L with the bus active. Expect ~2.5V idle, swinging to ~3.5V (dominant) / ~1.5V (recessive). A flat line at 0V or 5V indicates a short or open fault. Use a USB-CAN adapter (SavvyCAN / ZCANPRO) to verify message traffic.

Tools: SavvyCAN | ZCANPRO | PCAN-View
Service check order: verify BMS power first, confirm about 60 ohm across CAN_H and CAN_L with the bus de-energised, then power-cycle all CAN nodes together if heartbeat messages or PDOs time out after startup.