Design of Automobile Combination Dashboard Based on CAN Bus

1 Overview

This article refers to the address: http://

Controller Area Network (CAN) is a serial communication network that supports distributed and real-time control. Its main feature is to work in multi-master mode, based on message ID and using non-destructive bus arbitration technology for priority. Arbitration, serial communication, and event-triggered type greatly reduce the number of harnesses. The CAN bus protocol was originally proposed by the German company BOSCH in the 1980s and used in automobiles. In 1993, the international standard ISO 11898-1 was formed. Due to its high performance, high reliability and unique design, CAN has attracted more and more people's attention and has been widely used in automotive electronic control. It has become the main communication method in the whole vehicle network.

In the car dashboard control system developed for a company, due to the need of vehicle network informationization, it is hoped to use the bus method to attach the instrument panel to the communication network. Through the demand analysis, the system adopts NEC's special vehicle instrument control. UPD780822 chip, UPD780822 is an 8-bit microcontroller developed by NEC for automotive instrumentation. It has the following main features: 4-channel high current output stepper motor controller, and can be used to drive cross-coil; support 34 × 4 LCD driver, can display total mileage, subtotal mileage, can also display gears and clock And other signals; with UPD780822 has a CAN channel, supports CAN2.0A and CAN2.0B; can also automatically retransmit in case of error, respond to remote frame automatic transmission; support multiple messages, 16 message buffers, can be flexibly configured to receive filtering ; has 8 channels of 10-bit A / D, 3 serial ports and low voltage protection. These features are practically used in automotive instrumentation. The system block diagram is shown in Figure 1:


figure 1

The CAN bus transceiver uses Infineon's TLE7259G, which is a CAN bus transceiver designed by Infineon for the in-vehicle network. The device has a very low electromagnetic radiation and high resistance to common mode interference differential receiving circuit. Does not affect the bus state, bus plug-in protection for the automotive environment, overheat protection, ground and power short-circuit protection.

2. Demand Analysis and Design of Vehicle CAN Bus Instrument System

The vehicle instrument system based on CAN bus mainly requires the following two functions: (1) Receive real-time data of various types of vehicles through CAN bus, such as vehicle speed data, engine speed data, cooling water temperature, fuel level, and various alarm lights. Wait;

(2) Process the data received by the CAN bus, drive the stepper motor in time, turn on or off the relevant LED lights, and drive the LCD to display the mileage data. UPD780822 integrated CAN controller supports 4 kinds of frames, 1 data frame; 2 remote frame; 3 error frame; 4 overload frame. In this paper, only the 1 and 2 frame formats are used, where 1 is used to receive information from the node, and 2 is used to request a node to send data. The schematic diagram is shown in Figure 2.

figure 2

The topology of the vehicle instrument system based on CAN bus is shown in Figure 3. The data required by the instrument panel comes from multiple nodes. It is divided into high-speed CAN and low-speed CAN in the vehicle CAN network. The real-time performance of the vehicle instrument display system is not It is very high, so the node of the instrument panel is placed in the low-speed CAN network, and its communication with the high-speed CAN network is realized by the high-low speed CAN gateway.


image 3

For node message design In this application, the communication protocol is provided by the OEM manufacturer, so this CAN communication mainly distributes message messages according to the protocol. UPD780822 supports 16 channels of receive buffer and 2 channels of send buffer, and each channel of data can be up to Up to 8 digits, the message is distributed as shown:

3. software design

The software of this system is all implemented in C language. UPD780822 has 2K internal RAM and 90KB Flash. The development environment is NEC integrated IDE. It includes PM Plus compiler, QB780822 simulation environment, QB780822 supports software and hardware simulation, we use hardware. In-line simulation, the emulator is NEC's IEQUB78082.

3.1 program flow chart is as follows


3.2 CAN receiving program

In order to facilitate the porting and modification of the program, the receiving program defines a structure, and some of the codes are as follows:
Unsigned char InputCAN( unsigned char msg_num )
{unsigned char p;p=0;RUN = 0x01; /* starts receiving */
If(Receive_message[1].DSTAT.DN==1){p |= 1;
Buf_Speed=((int)Receive_message[1].DATA[0]<<8)|Receive_message[1].DATA[1];//Receive vehicle speed data Buf_Speed
Receive_message[1].DSTAT.DN=0;Receive_message[1].DSTAT.MUC=0;}
RUN = 0x01; /* starts receiving */
If(Receive_message[2].DSTAT.DN==1){p|=2;
Buf_Rpm=((int)Receive_message[2].DATA[0]<<8)|Receive_message[2].DATA[1];//Receive speed data Buf_Rpm
Receive_message[2].DSTAT.DN=0;Receive_message[2].DSTAT.MUC=0;}
RUN = 0x01; /* starts receiving */
If(Receive_message[3].DSTAT.DN==1){p |= 4;
Buf_Fuel=((int)Receive_message[3].DATA[0]<<8)|Receive_message[3].DATA[1];//Fuel Data Buf_Fuel
Receive_message[3].DSTAT.DN=0;Receive_message[3].DSTAT.MUC=0;}
RUN = 0x01; /* starts receiving */
If(Receive_message[4].DSTAT.DN==1){p |= 8;
Buf_Winker=((int)Receive_message[4].DATA[0]<<8)|Receive_message[4].DATA[1];//Water temperature data Buf_Water
Receive_message[4].DSTAT.DN=0;Receive_message[4].DSTAT.MUC=0;}
RUN = 0x01; /* starts receiving */
If(Receive_message[5].DSTAT.DN==1){p |= 16;
Buf_Winker=((int)Receive_message[5].DATA[0]<<8)|Receive_message[5].DATA[1];//Receive alarm light and indication signal Buf_Winker
Receive_message[5].DSTAT.DN=0;Receive_message[5].DSTAT.MUC=0;}
RUN = 0x01; /* starts receiving */
If(Receive_message[6].DSTAT.DN==1){p |= 32;
Buf_CanData=((int)Receive_message[6].DATA[0]<<|Receive_message[6].DATA[1];//Receive other data Buf_CanData
Receive_message[6].DSTAT.DN=0;Receive_message[6].DSTAT.MUC=0;}
RUN = 0x01; /* start receiving */
Return p;//1: vehicle speed signal, 2: speed data; 4: fuel data 8: water temperature data 16: alarm light indication data 32: other data other: receiving data is invalid
}

4. Conclusion

Since the CAN bus is used in the instrument system, the number of communication cables between the instrument panel and other electronic devices on the vehicle and the number and types of connectors are greatly reduced, and the robustness of the system is improved, and the system makes full use of the vehicle network. Advantages, realize data sharing, reduce system cost, and provide control accuracy of automobile instruments. This CAN communication software has been verified to meet the communication requirements of automotive instruments. In view of the application advantages and development prospects of CAN, and considering that it has not been abroad Stereotypes, there are also many application gaps in China. On the basis of introduction, digestion and absorption, China's auto industry can cooperate with CAN promotion work to develop CAN technical standards in line with national conditions and form a car control network system with independent property rights.

Beard Cover

Beard Cover,PP Beard Cover,Snood Cover

Room 401-2, Unit 61, Tianan Cyber City, No. 55 Changshan Road, Jiangyin City , http://www.chnonwoven.com