Application scheme of car lamp diagnosis system based on MC68HC908QL4 chip and LIN bus

The on-line diagnostic system of car lamp based on LIN bus is introduced and the hardware module and software structure are briefly analyzed. LIN bus system has the characteristics of simple structure, reliable performance and low price, which is an inevitable trend of the development of automotive Electronic technology. At present, how to use bus technology to improve vehicle performance and reduce manufacturing and maintenance costs in China has become a focus of attention of automobile manufacturers.

Authors: Lu Luoxian, Zhuo Wei

1 Introduction

Automotive bus technology is one of the applications of field bus, which was originally only used for industrial control. The so-called field bus is a bus topology network applied in the bottom layer of production. The current problem to be solved in the automotive body control network is to establish a unified and low-cost low-end communication network standard. LIN exists as an auxiliary bus of CAN to realize the hierarchy of the body control network and realize the body control network at a lower cost. The goal of the LIN bus is to locate the low-end communication between the body network module nodes. Compared with CAN, because LIN adopts the slave node of low-cost hardware, the cost of the hardware platform is reduced. In addition, LIN can fully meet the transmission rate requirements of most low-end applications. Therefore, UN realizes network communication between switching devices at a lower cost, effectively supporting the control of distributed mechatronic nodes in automotive applications.

2 Hardware circuit design

2.1 System Design Ideas

The LIN slave node processes the control signal sent by the master node and measures the state of the lamp driving circuit. When the slave node receives the message information, it sends out corresponding control signals to the lights, and analyzes the status of each lamp. If a fault occurs, a data message is generated and sent to the total node. After the LIN slave node detects the signal sent by the master node, it first identifies it through the message frame to see if it belongs to its own message information. If it belongs, first determine whether the message is query information, if so, return a response message, if it is control information, control the corresponding lamp, and measure and measure the potential of the measurement point on the lamp drive circuit. to be processed. to see if it fails. In the event of a failure, information is sent to the master node via the LIN bus. Figure 1 shows the hardware circuit design of the LIN node.

2.2 Device introduction

The basic LIN node circuit mainly includes MCU, LIN transceiver, power module and car lamp driving circuit.

2.2.1 MCU control unit

In the design, MCU selects MC68HC908QL4. It integrates a slave LIN interface control module SLIC (Slave LIN Interface Controller), in general, SUC can be used as SCI port. The main features of this device are:

With independent LIN message identifier, 8 B message buffer area;
Automatic adjustment of baud rate, frame synchronization;
Automatic processing and correction of UN sync interval (SYNCH BREAK) and sync field (SYNCH BYTE);
Up to two interrupts are generated for LIN messages without errors;
Full LIN error detection and reporting;
High-speed LIN reaches 83.33 Kb/s “120 Kb/s;
Enhanced detection and its including ID generation.

As long as the corresponding registers are set according to the needs of the module, the data can be automatically carried out and sent according to the LIN bus protocol. Compared with the single chip microcomputer of the SLIC module, this reduces the difficulty of software development. The connection of the MCU module is shown in Figure 2.

2.2.2 LIN transceiver

Select TJAl020 as the LIN transceiver, TJAl020 is the interface between the LIN master/slave protocol controller and the LIN physical bus, and is mainly used for the vehicle sub-network. Its baud rate is 2.4- 20 Kb/s. The transmit data stream input by the controller at the TXD pin is converted into a LIN bus signal through the LIN transceiver, and the transceiver controls the conversion rate and waveform to reduce extremely low electromagnetic emissions (EME). The output pins of the LIN bus are pulled high through an internal termination resistor. The transceiver detects the data flow at the input pins of the LIN bus and sends it to the microcontroller through pin RXD. The main features of TJAl020 are:

With up to 20Kb/s baud rate and extremely low electromagnetic emission (EME);
With high immunity to electromagnetic interference (EMI) and low slope mode can further reduce EME;
Have a wake-up source to identify local or remote;
With extremely low current consumption in sleep mode, local or remote wake-up can be achieved;
It has the function of sending data timeout;
Short circuit protection of LIN bus to battery and ground;
Features bus termination and battery pins to protect against transients in automotive environments.

Figure 3 shows the LIN module circuit design.

2.2.3 Power Module

In this design, the voltage regulators of the LIN modules all use micro power consumption, low dropout voltage regulators LTll2l-5. Select LTl121-5 to enter the stop mode by inputting a low level to SHDN. At this time, the quiescent current is only 16μA, so when there is no activity on the bus, the purpose of reducing power consumption can be achieved; in addition, the device also has the ability to prevent The function of input and output power supply reversal can prevent the reverse current flow even without adding a diode at the output end. Figure 4 shows the power module circuit.

2.2.4 Driving circuit of car lights

The power driver BTS724G is used to drive 2l W and 5 W lights. The driver is an N-channel MOSFET power transistor designed by Infineon, which integrates a charge pump, current driver, and has a fault feedback function for detecting load current (including overload, overheating and short circuit). BTS724G adopts 12 V or 24 V load control, suitable for various resistive, inductive or capacitive loads, especially suitable for loads with high inrush current such as car lights, and can be used as an alternative control method for relays, fuses, etc. BTS724G also has a number of protection functions such as short-circuit protection, overload protection, over-voltage protection, over-temperature shutdown, ground and power failure protection, electrostatic discharge protection and power supply reverse connection protection. Figure 5 shows the drive circuit.

3 Software Design

The lamp control system mainly completes two functions: one is to realize the control of the lamp by the LIN sub-node; the other is to diagnose the fault of the lamp. In the control, it is judged whether the system fails by analyzing the bus potential and the potential of the input, output and fault diagnosis pins in the drive circuit.

To make LIN bus nodes complete communication tasks effectively and in real time, software design is the key. The structured programming scheme has better modularity, portability and modifiability.

The reception of LIN information adopts the interrupt method. When the MC68HC90-8Q14 controller detects the information frame that meets the requirements of the node, it first determines what information frame the local node has received. If it is control information, it will receive 2 bytes of data. information; if it is query information, the state of the lights of the local node is sent back to the master node in the form of an information frame to reflect the node status. Then judge, if the data frame is received, read the corresponding information on the data register (SLCDx) in the SLIC module. Finally, control the lights according to the relevant bits in the data information. After sending the control signal, the potentials of the input, output and fault diagnosis pins of the light driver chip are collected accordingly, and the potential is analyzed to determine whether there is a fault. If a fault occurs A fault message is sent. Figure 6 shows the program flow chart.

4 Conclusion

The on-line diagnostic system of car lamp based on LIN bus is introduced and the hardware module and software structure are briefly analyzed. The LIN bus system has the characteristics of simple structure, reliable performance and low price, which is an inevitable trend of the development of automotive electronic technology. At present, how to use bus technology to improve vehicle performance and reduce manufacturing and maintenance costs in China has become the focus of automobile manufacturers.

The Links:   SEMIX303GB12E4 IRG4BC20UPBF