Design and Implementation of an Online Vehicle Lighting Diagnostic System Based on LIN Bus
2026-04-06 07:40:08··#1
1 Introduction Automotive bus technology is one application of fieldbus. Initially, fieldbus was only used for industrial control. A fieldbus is a bus-type topology network applied at the lowest level of production. The current problem to be solved in automotive body control networks is to establish a unified, low-cost low-end communication network standard. LIN exists as an auxiliary bus to CAN, realizing the hierarchical structure of the body control network and achieving body control network implementation at a lower cost. The goal of the LIN bus is to provide low-end communication between body network module nodes. Compared with CAN, LIN uses low-cost hardware slave nodes, thereby reducing the cost of the hardware platform. In addition, LIN can fully meet the transmission rate requirements of most low-end applications. Therefore, LIN achieves network communication between switching devices at a lower cost, effectively supporting the control of distributed electromechanical nodes in automotive applications. 2 Hardware Circuit Design 2.1 System Design Concept The LIN slave node processes the control signals sent by the master node and measures the status of the headlight drive circuit. When the slave node receives the message information, it sends corresponding control signals to the headlights and analyzes the status of each lamp. If a fault occurs, it generates a data message and sends it to the master node. After detecting a signal sent by the master node, the LIN slave node first identifies the message frame to see if it belongs to it. If it does, it first determines if the message is a query message; if so, it returns a response message. If it is a control message, it controls the corresponding vehicle light and measures and processes the potential of the measurement point on the vehicle light drive circuit to check for faults. If a fault occurs, it sends information to the master node via the LIN bus. Figure 1 shows the hardware circuit design of the LIN node. 2.2 Component Introduction The basic LIN node circuit mainly includes an MCU, a LIN transceiver, a power supply module, and a vehicle light drive circuit. 2.2.1 MCU Control Unit The MCU used in the design is the MC68HC908QL4. It integrates a SLIC (Slave LIN Interface Controller) module, which can generally be used as an SLIC port. The main features of this device are: independent LIN message identifier, 8-byte message buffer; automatic baud rate adjustment and frame synchronization; automatic processing and correction of UN synchronization intervals (SYNCH BREAK) and synchronization fields (SYNCH BYTE); a maximum of two interrupts generated for LIN messages without errors; complete LIN error detection and reporting; high-speed LIN reaching 83.33 Kb/s to 120 Kb/s; enhanced detection including ID generation. By simply setting the corresponding registers according to the module's needs, data can be automatically transmitted and transmitted according to the LIN bus protocol. This reduces the software development difficulty compared to the microcontroller in the SLIC module. The MCU module connection is shown in Figure 2. 2.2.2 The LIN transceiver uses the TJAl020 as the LIN transceiver. The TJAl020 is the interface between the LIN master/slave protocol controller and the LIN physical bus, mainly used in vehicle secondary networks. Its baud rate is 2.4 to 20 Kb/s. The data stream input to the TXD pin of the controller is converted into a LIN bus signal by the LIN transceiver, and the transceiver controls the conversion rate and waveform to reduce extremely low electromagnetic emissions (EME). The output pin of the LIN bus is pulled high through an internal terminating resistor. The transceiver detects the data stream at the input pin of the LIN bus and sends it to the microcontroller through the RXD pin. The main features of TJAl020 are: a baud rate of up to 20Kb/s and extremely low electromagnetic emissions (EME); high electromagnetic interference immunity (EMI) and a low slope mode to further reduce EME; wake-up source identification for local or remote use; extremely low current consumption in sleep mode, enabling local or remote wake-up; data transmission timeout function; short-circuit protection for the LIN bus to the battery and ground; bus termination and battery pins to prevent 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 low-power, low-dropout regulators LTll2l-5. The LT1121-5 is selected, and by inputting a low level to SHDN, it can enter a stop mode. In this mode, the quiescent current is only 16μA, thus reducing power consumption when there is no activity on the bus. Furthermore, this device also prevents reverse current flow between the input and output power supplies, even without adding a diode at the output. Figure 4 shows the power module circuit. 2.2.4 The headlight drive circuit uses the BTS724G power driver to drive 21W and 5W headlights. This driver is an N-channel MOSFET power transistor designed by Infineon, integrating a charge pump, current drive, and fault feedback function for detecting load current (including overload, overtemperature, and short circuit). The BTS724G uses 12V or 24V load control and is suitable for various resistive, inductive, or capacitive loads, especially for loads with high inrush current such as headlights. It can be used as an alternative control method to relays and fuses. The BTS724G also features multiple protection functions, including short-circuit protection, overload protection, overvoltage protection, over-temperature shutdown, grounding and power failure protection, electrostatic discharge protection, and reverse power connection protection. Figure 5 shows the drive circuit. 3. Software Design The vehicle lighting control system mainly performs two functions: first, it enables LIN sub-nodes to control the vehicle lights; second, it diagnoses vehicle light faults. In control, the system fault is determined by analyzing the bus potential and the potentials of the input, output, and fault diagnosis pins in the drive circuit. Software design is crucial for the LIN bus nodes to effectively and in real-time complete communication tasks. A structured programming approach offers good modularity, portability, and modifiability. LIN information reception uses an interrupt method. When the MC68HC90-8Q14 controller detects an information frame that meets the node's requirements, it first determines what kind of information frame the local node received. If it is control information, it receives 2 bytes of data; if it is query information, it sends the local node's vehicle light status back to the master node in the form of an information frame to reflect the node's status. Then, if a data frame is received, the corresponding information is read from the data register (SLCDx) in the SLIC module. Finally, the headlights are controlled based on the relevant bits in the data information. After the control signal is sent, the potentials of the input, output, and fault diagnosis pins of the headlight driver chip are collected. The potentials are analyzed to determine if a fault has occurred. If a fault occurs, a fault message is sent. Figure 6 shows the program flowchart. 4 Conclusion This paper introduces a LIN bus-based online headlight diagnostic system and provides a simple analysis of the hardware modules and software architecture. The LIN bus system has the characteristics of simple structure, reliable performance, and low price, and is an inevitable trend in the development of automotive electronics technology. Currently, how to use bus technology to improve vehicle performance and reduce manufacturing and maintenance costs has become a hot topic for automobile manufacturers in China.