• Inventory
  • Products
  • Technical Information
  • Circuit Diagram
  • Data Sheet
Technical Information
Home > Technical Information > Automotive Electronics/Intelligent Driving > Application of CAN Bus in Automotive Body Control

Application of CAN Bus in Automotive Body Control

Source:ryyhf
Category:Automotive Electronics/Intelligent Driving
2023-05-28 17:02:58
28
Introduction

Since the 1980s, with the wide application of integrated circuits and single-chip computers in automobiles, more and more electronic control units have been used in automobiles, such as electronic fuel injection devices, anti-lock brake devices (ABS), airbag devices, electronic control doors and windows devices, and active suspension. In this case, if the routine wiring method is still used, that is, one end of the wire is connected with the switch and the other end is connected with the electrical equipment, it will lead to a sharp increase in the number of power cables on the car, making the quality of the power cables account for about 4% of the overall vehicle quality. In addition, the increase of electronic control system improves the power, economy and comfort of the car, but the accompanying increase of complex circuit also reduces the reliability of the car and increases the difficulty of maintenance. For this reason, there is a growing call for the reform of automotive electrical technology. Therefore, a new concept - vehicle controller local area network CAN arises at the historic moment.

CAN is short for Controller Area Network. It was developed by Bosch Company and several semiconductor manufacturers in Germany. CAN bus is a serial multi-master controller LAN bus. It has high network security, communication reliability and real-time, and is simple and practical, with low network cost. It is especially suitable for automobile computer control system and industrial environment with bad temperature, strong electromagnetic radiation and strong vibration.

Technical features of CAN bus

CAN bus can effectively support distributed control or real-time control. The communication media of this bus can be twisted pair, coaxial cable or optical fiber, and its main features are as follows:

_CAN bus is a multi-master bus, each node can send information to other nodes on the network at any time, without dividing master from slave:

_CAN bus uses unique non-destructive bus arbitration technology, high priority nodes transmit data first, so it has good real-time performance;

_CAN bus has the functions of point-to-point, point-to-multipoint and global broadcasting to transmit data;

_CAN bus uses short frame structure with up to 8 valid bytes per frame, short data transmission time, CRC and other verification measures, and very low data error rate;

_When a node on a CAN bus has a serious error, it can be detached from the bus automatically, while other operations on the bus are unaffected.

_When the CAN bus system is expanded, new nodes can be directly hung on the bus, which results in fewer lines, easier system expansion and flexible modification.

_CAN bus can have a transmission rate of up to 1 Mb/s and a direct communication distance of up to 10 km (rate below 5 kbps);

_The number of nodes on a CAN bus depends on the bus driver circuit. 110 can be reached in standard frames (11-bit message identifiers), but not in extended frames (29-bit message identifiers).

CAN Control Design of Body System

CAN Bus Network System Architecture

The control units of modern automobile punishment include engine control module, transmission control module, multimedia control module, airbag control module, air conditioning control module, cruise control module, body control module (including lighting indication and windows, wiper, etc.), anti-lock brake system (ABS) anti-slip control system (ASR), etc. The complete automobile CAN bus network architecture is shown in Fig. 1.

Hardware architecture of CAN node

In this system, CAN nodes use:

The circuit structure of ECU (AT89C51) + CAN controller (SJA1000) + CAN transceiver (PCA82C250) is described below as its chip:

(1) CAN controller

For further expansion of the system, the chip SJA1000 supporting CAN 2.0B communication protocol is selected. SJA1000 is a CAN controller produced by PHILIPS that supports both CAN 2.0B and CAN 2.0A. It is fully compatible with CAN controller PCA82C200 which only supports CAN 2.0A in hardware and software.

(2) CAN Transceiver

PCA82C250 is a CAN controller and physical bus interface chip introduced by PHILIPS, which provides differential transmission and reception to the bus. It is fully compatible with ISO 11898, and has three different working modes: high speed, slope control and standby, which can be selected according to the actual situation.

(3) Single-chip AT89C51

AT89C51 is a single-chip computer of ATMEL company. It is an 8-bit CMOS microcontroller with low power consumption, high performance and 4 KB flash memory. It is fully compatible with industry standard MCS-51 instruction system and pin. The advantage of AT89 series is that its in-chip flash memory can be programmed and erased 1000 times, and the data is not easy to lose. The data can be saved for 10 years.

The basic methods of CAN bus controller, bus driver and single-chip computer connection are shown in Figure 2.

CAN Application Layer Protocol in Body Control Module

Agreement Principles

This agreement follows the CAN2.0B specification. According to the characteristics of the body control module, each node has its own fixed identification address, and the number of nodes is less than 64. At the time of design, the central control module can be set as the main node, while the door, electric seat module and self-test sub-module can be set as the slave node. This agreement accomplishes the following functions:

(1) broadcasting of specific information;

(2) Connection between master and slave nodes;

(3) Information exchange (including fault information) between master and slave nodes.

This protocol uses the frame priority principle to assign identifiers. The high four bits in each frame identifier represent the frame type. Different frame types have different priority. Priority determines the sending order of various information frames in the same situation. The 29-bit identifiers in the protocol are assigned as follows:

Frame Type (4 bits) + Destination Address (6 bits) + Source Address (6 bits) + Command (or Status, Report) Attribute (13 bits) [or Data Attribute + Segmentation Flag + Segmentation Symbol (13 bits in total)].

In principle, all commands or states, data, report attributes, except for periodically collecting and sending data (sending confirmation frames to ensure proper communication).

Frame Format Arbitration Field and Control Field Definition

The arbitration farm consists of a 29-bit identifier ID28-ID0 and SRR, IDE, and RTR. Registers 17-21 in SJA1000 are used to store the identifier for frame information in Extended Frame Format. When sending, SRR=1, IDE=1, RTR=1/0 (remote frame/data frame). ID28-ID25 in the identifier is the frame type (4 bits) of the exchange message for the body control module. ID24-ID19 is the address (or destination address) of the frame information user in the body control module. ID18-ID13 is the address or source address (6 bits) of the sender of frame information in the body control module. ID12-ID5 is the command, status, data or report attributes exchanged in the body control module (total 8 bits). The ID4 bits need to be marked as segments when additional commands or status, data or report attributes are needed. ID3-ID0 is a four-digit segment number for additional commands or status, data, and reporting attributes. ID3-ID0 control field and data registers 0-7 are valid when ID4=0. For remote frames, the values of ID4-ID0 and the control field can be ignored. The 16-bit lower 4-bit DLC3-DLC0 registers of SJA1000 can form a control field to determine the data frame length.

Body control module CAN2.0B communication message Convention

According to the node requirements of the body control module, the communication information frames are divided into six types listed in Table 1, where the priority is arranged from high to low in sequence number. The assignment of destination and source addresses is listed in table 2.


It works as follows:

(1) When starting or waking up, the status information is sent from the node to the main node, the main node sends the broadcast information remote frame (twice), and the broadcast information is the common information, including the speed signal, gear signal, ignition switch position signal, etc.

(2) Normally, the status of each port is inspected from within the node. If there is a failure, the failure code is sent to the main node three times. The main node receives three failure alarms and then responds. It stops sending from the node. Once the failure disappears, it sends normal information to the main node. There should be a failure table in the primary node for communication of the diagnostic module.

(3) After the primary node sends self-checking information separately, if each slave node is normal, normal information, status and data frame are sent. If there is a fault, the fault alarm frame is sent through the segmented data frame.

(4) After the node detects the change of the normal input signal (including the change of switch and analog sampling series), information is sent to the primary node through the report frame, which sends the command frame in response.

Newsletter Definition

Table 3 lists the communication message definitions of the central control module and the diagnostic module. In the table, AAAA is a segmented number that can be set when there are more than eight failure codes and up to 16 can be transferred × 8 byte code; BBBBBB is coded for each sensor, its response frame is a non-segmented data frame, and CCCCCC is the code to perform the corresponding action, such as the window rises to 00000001 and decreases to 00000010, which can perform up to 256 actions. The response frame is a remote frame and the request frame is a remote frame.

When the system is working normally, the communication protocol agreement of each node is listed in Table 4. Dddd in the table is the total number of segments contained in the segment start command; Eeee is a segment number of broadcast information, the length of data in the control field is the length of data in that segment, and the actual data in the data field broadcasted is defined in sequence as:

_Data register 1 = 8 bits higher in speed information;

_Data register 2 = 8 bits lower than the speed signal;

_Data register 3 = 8 bits higher engine speed signal;

_Data register 4 = 8 bits lower than engine speed signal;

_Data register 5 = ignition switch position, where 0 indicates key pull-out; 1 indicates that the key is in OFF; 2 indicates that the key is in ACC; 3 indicates that the key is in RUN; 4 indicates that the key is in START;

_Data register 6 = gear signal, 0 means blank; 1 represents the drive gear; 2 represents the drive gear; 3 means reverse file; 4 means parking gear;


_Data register 7 = remote control signal, 0 means remote control unlocks the main driving door; 1 indicates that the main driving door is locked by remote control; 2 means that all doors are unlocked by remote control; 3 means that all doors are locked by remote control; 4 Indicates remote control unlocking the gift box;

_Data register 8 for anti-theft mode; 0 means to enter the anti-theft mode, 1 means to remove the anti-theft mode;

_Data registers 9-16: Reserved.

Software process

Controllers should send data to the bus in the specified format and cycle, and also accept information from other controllers. Other controllers on the bus retrieve the desired message individually as needed. For receiving data, the system is implemented by interruption. Once an interrupt occurs, the data to be received is automatically loaded into the corresponding message register. A screening filter can also be used to selectively bit-by-bit compare the identifier of the received message with the identifier set in advance at the initialization of the receive buffer. Only messages with matching identifiers can enter the receive buffer, and those that do not meet the requirements will be screened out of the receive buffer. This reduces the CPU's burden on processing messages. In addition, different data should be placed in different message registers, so in the receive interrupt service program, it is easy to determine which receive message caused the interrupt, and its program flow chart is shown in Figure 3.

Concluding remarks

As a reliable automobile calculator network bus, CAN bus has been applied in advanced automobiles, enabling all automobile computer control units to share all information and resources through CAN bus in order to simplify wiring, reduce the number of sensors, avoid duplication of control functions, improve system reliability and maintainability, reduce costs, better match and coordinate various control systems. With the development of automotive electronics technology, CAN bus communication protocol with high flexibility, simple extensibility, excellent anti-jamming and error correction capability will be more widely used in automotive capacitance system.



Source:Xiang Xueqin