The Controller Area Network, most commonly known as CAN bus, is the backbone of communication in modern vehicles. It’s a robust and efficient system that allows various components within a car to communicate with each other without a central host computer. When diving into automotive diagnostics and On-Board Diagnostics II (OBD2) systems, understanding CAN High and CAN Low is crucial. This article will explore the fundamentals of CAN bus, focusing on the significance of CAN High and CAN Low in OBD2 communication, and why this knowledge is essential for anyone working with vehicle diagnostics and repair.
What is CAN Bus?
CAN bus, short for Controller Area Network, is officially defined as a network of independent controllers designed for secure communication. Developed initially by Bosch and Intel in 1990, it has become an indispensable standard in automotive and other industries due to its reliability and efficiency. The International Standards Organisation (ISO) further standardized CAN under ISO 11898, structuring it according to the Open System Interconnect (OSI) model.
The OSI model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers.
While CAN Bus is defined within ISO 11898, this standard primarily addresses the lower two layers of the OSI model – the Physical and Data Link layers. For higher-level functionalities, extensions to the CAN standard, such as CAN Open and SAE J1939, have been developed. However, these often require specialized and sometimes costly software to interpret and utilize fully.
CAN Bus Physical Layer: CAN High and CAN Low
At the heart of the CAN bus physical layer are two dedicated wires responsible for communication: CAN High and CAN Low. These wires are meticulously engineered to ensure robust and noise-resistant data transmission.
In its idle state, the CAN bus maintains both CAN High and CAN Low wires at 2.5V. However, during data transmission, the voltage levels shift to create a differential signal. The CAN High line voltage increases to 3.75V, while the CAN Low line voltage decreases to 1.25V. This creates a 2.5V voltage difference between the two lines.
This differential signaling is a key feature of CAN bus, making it exceptionally resilient to electromagnetic interference, inductive spikes, and other forms of electrical noise prevalent in vehicle environments. Unlike single-ended communication systems, the CAN bus is not sensitive to common-mode noise that affects both lines equally. Twisting the CAN High and CAN Low wires into a twisted pair further enhances its robustness.
To ensure proper signal transmission and prevent reflections, the CAN bus lines must be terminated at each end with a 120 Ohm resistor. This termination is crucial for maintaining signal integrity, especially in longer bus lengths.
Power supply for CAN bus modules can be implemented in different ways. It can be supplied through separate wires, resulting in a 4-wire system (2 for CAN signals, 2 for power), or integrated into the same cable as the CAN bus lines, resulting in a more compact 4-wire cable combining both power and signal.
The electrical interface for CAN bus is typically managed by a dedicated CAN Transceiver chip. This chip handles all the intricate electrical signaling, voltage level shifting, and physical layer protocols, simplifying the design and implementation of CAN bus systems.
Data Transmission and CAN Protocol
The Data Link Layer of the CAN bus protocol operates on a principle of distributed communication, meaning there is no central master controlling the bus. Every module or node on the CAN bus has equal access to transmit and receive data. Each module is assigned a unique CAN ID, which can be either 11-bit (in CAN 2.0A) or 29-bit (in CAN 2.0B) format. This ID serves as both an identifier for the message’s source and a priority indicator. All modules on the bus listen to all transmissions, but will only process messages with their designated ID or a broadcast ID.
The CAN standard specifies a maximum data throughput of 1 Mbit/s. Commonly used data rates in automotive and industrial applications include 125 Kbit/s for CAN Open and 250 Kbit/s for SAE J1939. The maximum permissible communication distance on a CAN bus is inversely related to the bit rate. At 1 Mbit/s, the maximum distance is approximately 40 meters, increasing to 250 meters at 250 Kbit/s, and reaching up to 1 kilometer at 10 Kbit/s.
CAN Frame Structure Explained
Communication on the CAN bus is structured around frames, with the format strictly defined by the CAN standard. There are several types of frames, including data frames, error frames, and remote frames. Each frame type adheres to a specific structure, containing fields for synchronization, identification, data, and error detection.
The ID field within a CAN frame serves a dual purpose. First, it identifies the intended recipient node for the message (addressing). Second, it determines the message priority through a process called arbitration. CAN bus uses a bitwise arbitration mechanism. During bus arbitration, nodes transmitting simultaneously compare their IDs bit by bit. A dominant bit (logic 0) overwrites a recessive bit (logic 1). Therefore, an ID with more leading zeros has a higher priority. For example, an ID of 0000… will always take priority over 0001…. This priority scheme ensures that critical messages are transmitted first. It is essential that each node on a CAN bus network has a unique ID to prevent arbitration conflicts.
Besides the ID field, CAN frames include a Cyclic Redundancy Check (CRC) for error detection, an Acknowledgment (ACK) field to confirm successful reception, and various control bits that manage frame formatting and transmission. These technical details are typically handled transparently by the CAN controller hardware.
CAN Data Fields and DLC
A standard CAN data frame can carry up to 8 bytes of data. The DLC (Data Length Code) field in the control section of the CAN frame specifies the precise number of data bytes contained within the frame. Remote frames, used to request data from another node, do not contain a data field, and in this case, the DLC is set to zero. It’s worth noting that CAN FD (Flexible Data-Rate) , a more recent extension of CAN, allows for significantly larger data fields, up to 64 bytes, for applications requiring higher data throughput.
Components of a CAN Bus System
A functional CAN bus system is composed of several key elements at each node:
- CAN Transceiver: This component is responsible for the physical layer interface, handling the electrical signaling on the CAN High and CAN Low wires. It converts digital signals from the CAN Controller into differential voltages for transmission and vice versa.
- CAN Controller: The CAN Controller manages the Data Link Layer protocols. It handles frame assembly, transmission, reception, error detection, and arbitration. It relieves the microcontroller from the complexities of the CAN protocol.
- Microcontroller: The microcontroller serves as the main processing unit for the node. It interfaces with sensors, actuators, or other peripherals, gathers data, and instructs the CAN Controller to transmit relevant information onto the bus. It also processes received data and controls node functions based on CAN messages.
These components can be implemented individually or integrated into single-chip solutions. Many modern microcontrollers incorporate a built-in CAN Controller, and some even include an integrated CAN transceiver, simplifying system design and reducing component count.
Designing a CAN bus system is relatively straightforward due to its distributed nature and the built-in arbitration mechanism. Each node is assigned an ID that dictates its message priority. Most CAN Controllers offer standard interfaces like I2C and SPI to communicate with the host microcontroller. From a software perspective, microcontroller code primarily needs to initialize the CAN controller and provide raw data for transmission. The CAN controller handles the intricacies of frame formatting, message transmission, and error management, abstracting away the lower-level complexities. The system designer typically focuses on the higher application layer, defining the meaning and interpretation of the data exchanged on the CAN bus.
PC Interfaces for CAN Bus Analysis
In many CAN bus systems, particularly during development, diagnostics, and monitoring, a PC interface node is essential. This allows for data analysis, system configuration, and control from a computer. While standalone CAN bus modules exist, a PC interface offers greater flexibility and processing power for complex tasks.
Products like CANUSB serve as a CAN bus to USB interface, supporting both CAN 2.0A and CAN 2.0B protocols (11-bit and 29-bit IDs). While CANUSB may not natively support higher-level protocols like CANOpen or J1939 without additional software, it provides a versatile solution for connecting a CAN bus network to a PC via USB. This enables diagnostics, control applications, and real-time monitoring of CAN bus traffic. Similarly, CAN232 provides an RS232 to CAN bus interface for systems utilizing serial communication.
CAN FD: Faster and More Data
CAN FD (CAN with Flexible Data-Rate) represents the latest evolution in CAN bus technology. It retains the fundamental principles of standard CAN, including the message format, ID scheme, and arbitration mechanism, but introduces significant enhancements in data throughput and data payload size.
A key improvement in CAN FD is the увеличенный data field size within each message, expanding from a maximum of 8 bytes in standard CAN to up to 64 bytes in CAN FD. This allows for transmitting significantly more data per message, boosting overall system efficiency, especially in applications requiring high bandwidth.
Furthermore, CAN FD supports higher data transmission speeds, reaching up to 5 Mbit/s, compared to the 1 Mbit/s limit of standard CAN. This increased speed enables faster communication and reduced latency in time-critical applications. Implementing CAN FD necessitates using a CAN FD compatible CAN Controller and a suitable PC interface that supports the CAN FD standard. Dual USB CAN FD Analyser adapters are available for connecting PCs to CAN FD networks, facilitating development and analysis of these high-speed systems.
CAN Bus and OBD2: Clearing the Confusion
It’s a common misconception that CAN bus and OBD2 are interchangeable terms. While CAN bus is a communication protocol, OBD2 (On-Board Diagnostics II) is a standardized system and connector mandated for all modern vehicles for diagnostics and emissions monitoring. OBD2 defines a 16-pin connector, typically located near the steering wheel inside the vehicle cabin. This connector serves as the physical interface for accessing vehicle diagnostic data.
The OBD2 connector utilizes several different communication protocols across different pins, depending on the vehicle manufacturer and model year. These protocols include:
Pin | Signal | Description |
---|---|---|
2 | J1850 Bus+ | |
4 | CGND | Chassis Ground (GND) |
5 | SGND | Signal Ground (GND) |
6 | ISO 15765 CAN High | J-2284 CAN High |
7 | ISO 9141-2 K-LINE | Tx/Rx K-Line |
10 | J1850 Bus- | |
14 | ISO 15765 CAN Low | J-2284 CAN Low |
15 | ISO 9141-2 L-LINE | Tx/Rx L-Line |
16 | +12v | Battery Power (+12V) |
Among the five protocols defined within the OBD-II standard, ISO 15765, which is CAN for vehicles (specifically ISO 15765-4 CAN), is particularly relevant to this discussion. Other protocols include J1850 PWM (used by Ford), J1850 VPW (used by General Motors), ISO 9141-2 (used by Chrysler), and ISO14230 KWP2000 (used in some European and Asian vehicles). Notably, since 2008, all new vehicles sold in many regions are mandated to support the CAN protocol (ISO 15765) on the OBD2 port. This means that while older protocols may still be present in older vehicles, CAN is the dominant and future-proof communication standard for automotive diagnostics.
Therefore, when you see CAN High and CAN Low referenced in the context of OBD2, it refers specifically to pins 6 (CAN High) and 14 (CAN Low) of the OBD2 connector, as defined by the ISO 15765 standard.
While a CAN bus interface like CANUSB can physically connect to the CAN High and CAN Low pins on an OBD2 connector, simply establishing a physical connection is insufficient for meaningful vehicle diagnostics. To effectively interrogate a vehicle’s systems via OBD2, specialized software is required to interpret the CAN messages according to the OBD2 standards and manufacturer-specific protocols. OBD-II scanners or scan tools utilize predefined PID (Parameter ID) codes, standardized by SAE J1979, to request specific diagnostic information from the vehicle’s control modules. These scanners handle the complexities of protocol translation and data interpretation, presenting users with human-readable diagnostic information.
In conclusion, understanding CAN High and CAN Low is fundamental to grasping the physical layer communication within OBD2 systems. While CAN bus technology is the communication backbone, OBD2 provides the standardized connector and diagnostic framework for accessing vehicle data. For effective automotive diagnostics, both a solid understanding of CAN bus principles and the proper OBD2 diagnostic tools are essential.
CANUSB – USB to CAN bus interface.