0 Introduction

With the rapid development of automobile industry, the configuration of automobile electronic control system is constantly upgraded, which makes the electronic components on the vehicle more and more, and its interconnected network structure more and more complex. The huge wiring burden caused by the cable connection mode used in the past is easy to cause the vehicle body to be overweight and the line to be worn and aged. In this case, it is necessary to introduce standard bus technology, so as to reduce the body weight and improve the communication reliability between various electronic control components. In the 1980s, according to the different functional requirements of vehicle communication networks at different control levels, SAE (SOCIAL V of auto mobile Engineering) divided them into three categories: A, B and C. Class A is a low-speed network, and the data transmission rate is usually 1 ~ 10KB / s. LIN bus communication network belongs to this kind. LIN bus is generally used in low-end systems that do not require high performance, bandwidth and complexity, such as door control module, seat adjustment, lamp control and communication between sensors and actuators in air conditioning system. Because of its low cost of LIN bus, it can also be used independently in a body control network that is not particularly complex.

1 Introduction to LIN bus protocol

In 1998, the Lin protocol standard was jointly proposed by Audi, BMW, Mo Torola, daimlerehrysler, VCT, Volvo and volkswa Gen based on the existing protocols of class a network. LIN bus is widely used in the network structure of automotive electronics. It is based on the general UART / SCI interface and uses single line signal transmission. The slave node can realize self synchronization without crystal oscillator or ceramic oscillator, so the cost is low. LIN bus network adopts single master and multi slave mode. Figure 1 shows the structural diagram of UN bus network. It is composed of one master node and one or several slave nodes, and bus arbitration is not required. The LIN bus protocol is based on the physical layer in the ISO reference model. The data link layer adopts NRZ (not re turn zero) coding mode, and the level is divided into implicit level (‘1 ‘) and explicit level (‘0’).

Design of LIN bus communication module for automobile door control system

1.1 physical layer

LIN bus generally adopts single bus (12V) serial communication. The maximum bus length can reach 40m and the maximum transmission rate can reach 20KB / s. usually, three baud rates of 2.4kb/s, 9.6kb/s and 19.2kb/s are used for data transmission. Because the number of slave nodes is not only limited by the number of identifiers, but also limited by the physical characteristics of the bus, too many nodes will inevitably reduce the network impedance, resulting in poor communication conditions, so the protocol stipulates that the number of nodes on a LIN bus network cannot exceed 16.

1.2 data link layer

A message frame of LIN bus protocol consists of message header and response. Figure 2 shows the message frame structure of LIN bus protocol. Generally, the message header is sent by the master node, and the response is sent by a master node or a slave node. The data communication in LIN bus network is initialized by the master node sending a message header. The message header contains a blank field, a synchronization field and an identifier field, while the response includes 1 to 9 byte fields (0 ~ 8 data fields and a checksum field). The byte field is separated by the interval between bytes, and the message header and response are separated by the intra response interval. Their minimum length is 0.

Design of LIN bus communication module for automobile door control system

The blank field in the message header enables the node to identify the beginning of a message. The blank field consists of a dominant level (‘0 ‘) lasting 13 bits or longer plus a recessive level (‘1’) lasting more than 1 bit. The synchronization field is one byte long (ox55), which can be used to synchronize the clock of the master and slave nodes.

The format of identifier field is shown in Figure 3. It defines the message information with a length of one byte, in which the first 6 bits are identifier bits, 26 = 64 identifiers can be defined (4 identifiers are reserved as command and extended frame identifiers), and the last 2 bits are parity bits.

Design of LIN bus communication module for automobile door control system

The identifier is used to define the transmission direction of the data and the length of the data field in the response, and judge whether the message is related to itself according to the identifier, so as to respond to the message and communicate. When the message header sent by the master node is accepted by the relevant slave node and the identifier is determined, the slave node is required to send data. If the master node wants to receive the data sent by the slave node, this identifier needs to be defined as the receiving identifier. For the slave node, it needs to be defined as the sending identifier, and vice versa.

The length of the data field in the response is determined by the 4th and 5th bits (id5 and ID4) of the identifier bits, which divide all identifiers into four groups. Each group has 16 identifiers, which represent 2, 4 and 8 data fields. The data field is transmitted from low to high, including the data to be transmitted by each node. The checksum field is the inverse of the sum of all bytes in the data field. When the node receives data and performs verification, the sum of all data bytes and the bytes of the checksum field must be 0xff.

2 design of Lin communication system in door control

This design scheme mainly uses Infineon xc886 single chip microcomputer as the master node controller and Infineon’s tle7259 chip as the Lin drive module, so that the master node door controller can communicate with three slave node door controllers (tle7810) through LIN bus. As the master node, in this door control system, all windows can be raised and lowered through the driver’s side button switch, and the rearview mirror can be adjusted and the central door lock can be controlled. Figure 4 shows the structural block diagram of the door control system.

Design of LIN bus communication module for automobile door control system

2.1 interface design between xc886 and UN drive module

Xc886 single chip microcomputer of Infineon company is a high-performance 8-bit microcontroller based on 8051 industrial standard architecture. It is internally integrated with CAN controller and supports UN communication. It also includes two UARTS (one of which is used to support Lin) and two separate 16 bit timer capture / comparison units (CCU), which can flexibly generate PWM signals. In addition, it also integrates high-precision 8-channel 10 bit ADC, four general 16 bit timers and programmable 16 bit watchdog timer (WDT), and supports on-chip debugging. Xc886 contains a variety of power saving modes, which is very suitable for various automotive body control networks, industrial and agricultural equipment control, building lighting control, intelligent sensors and industrial automation.

Tle7259 chip of Infineon company is selected as the Lin drive module in the system. It has the function of bus grounding short circuit protection and is suitable for the on-board system communication network with transmission rate of 2.4 KB / S ~ 20 KB / s. At the same time, the device also has strong anti-static discharge (ESD) characteristics and excellent anti electromagnetic interference (EMI) ability. Its slope control mechanism based on fixed slope can also achieve superior EMC performance in a wide frequency band. In the design scheme of xc886 as the LIN bus master node controller, a 1K Ω resistor and a reverse diode must be connected between the LIN bus pin and INH pin of tle7259 chip, and tle7259 must be configured as the master node driver module. Figure 5 shows the interface circuit of the system Lin driver module.

Design of LIN bus communication module for automobile door control system

Tle7259 chip has three working modes: waiting mode, normal mode and sleep mode. After power on. The chip immediately enters the waiting mode, and then can be set to 1 through the EN pin to enter the normal mode. In normal mode, xc886 single chip microcomputer can input the data stream to be sent at TXD Lin pin and convert it into LIN bus signal through tle725 chip to control the conversion rate and waveform, so as to reduce electromagnetic radiation (EME). The output pin (bus) of LIN bus can be pulled to high level through an internal terminal resistance. Tle725 chip can detect the data flow at the input pin of LIN bus and send it to xc886 MCU through pin RXD Lin. In the normal mode, setting the EN pin to 0 can make the chip enter the sleep mode. At this time, the quiescent current does not exceed 8 ma. The user can also wake up through LIN bus or local pin (wk) to re-enter the waiting mode.

2.2 software implementation of master node in Lin communication

The software is modularized in C language and easy to maintain. In this design scheme, the transmission rate of LIN bus is set to 20 kbit / s, which can communicate between a single master node and three slave nodes, and the length of data field is set to 2 bytes. The first byte is used to send the master node control command or receive the slave node status information. The last byte is reserved and can be used for user expansion.

The master node usually sends control commands to the slave node, mainly including window lifting control, door lock command and rearview mirror adjustment control. Table 1 lists the data field definitions of the control commands. When the window control part sends the window no action command (bit2 is 0), the judgment of the last two bits (Bit1 and bit0) can be ignored and the window remains unchanged. When the rearview mirror part sends the rearview mirror no action command (bit6 is 0), the judgment of the three rearview bits (bit5, bit4 and bit3) is ignored. At this time, the left and right rearview mirror motors do not act, and the rearview mirror position remains unchanged. The central locking part (bit7) is used for the state comparison of the central locking. If the bit data are the same, the central locking state will be maintained. If the bit data are different, the central locking motor will be driven for corresponding action.

Design of LIN bus communication module for automobile door control system

The status information is generally fed back from the slave node to the master node for fault diagnosis, mainly including the short circuit and open circuit information of window lifting motor and relay. Table 2 lists the data field definition of status information. When the master node receives the status information. If a fault is found, the master node controller will flash the indicator light or give an audible alarm.

Design of LIN bus communication module for automobile door control system

After the primary node is initialized, the system will be in a waiting state and check whether there is data transmission demand. The main program checks the key parameters of the master node controller every 10 ms. When there is a key action on the master control board at the driver’s side, the system will convert the corresponding key data into control commands and send them to the slave node controller through LIN bus; If there is no key action, it is required to feed back the state information from the node and analyze its working state. Fig. 6 shows the program flow chart of its main node.

Design of LIN bus communication module for automobile door control system

3 conclusion

This paper introduces the design method of LIN bus communication module of door control system based on xc886 single chip microcomputer of Infineon company, and briefly analyzes its hardware design and software structure. The control system of window, rearview mirror and central door lock developed by LIN bus technology reduces the cost and improves the system performance due to the use of 8-bit single chip microcomputer with low power consumption. It is the development direction of automotive electronic technology. The system program is written in C language, which has good readability and maintainability. In fact, the development of bus technology is a major driving force to promote the progress of automobile electronics, and the wide use of bus technology further promotes the investment of automobile manufacturers in bus development. Therefore, the development of automobile bus is bound to occupy a more important position in the future automobile industry.

Leave a Reply

Your email address will not be published. Required fields are marked *