Share this

Design of a LIN bus-based brushless DC motor controller for automobiles

2026-04-06 06:00:58 · · #1
1. Introduction With the increasing electrification and automation of automotive components and the growing demands for higher noise levels, electromagnetic compatibility, and efficiency in automotive motors, permanent magnet brushless DC motors are gradually replacing brushed permanent magnet DC motors. Permanent magnet brushless motors offer advantages such as small size, long lifespan, high efficiency, simple structure, and high reliability. Using them as drive actuators for automotive components can effectively improve their performance. For example, in Freightliner's M2 series commercial vehicles, brushless motors drive the blower of its air conditioning system, allowing for better regulation of airflow speed. Due to the increasing maturity of automotive bus technology, the control method for multiple motor units within a vehicle is shifting from traditional centralized wiring harness control to distributed bus control. Distributed bus control reduces wiring harnesses, lowers costs, and facilitates the integration of various motor control units and other electronic control units within the vehicle into a comprehensive and coordinated control system. This improves the operational reliability of each control unit, reduces redundant sensors and corresponding hardware and software configurations, and enables information exchange and resource sharing. Currently commonly used automotive buses include CAN and LIN, with LIN being geared towards low-speed applications. The author designed a brushless DC motor controller based on the LIN bus. This controller, based on the MC68HC908MR16 microcontroller, PC33896 preamplifier, and MC33399 LIN transceiver described in the literature, achieves good control performance at a low cost. 2. LIN Bus-Based Brushless DC Motor Control System. The LIN bus is a new type of low-cost automotive body bus. It was launched in 1999 by the LIN Association, a consortium of European automakers such as Audi, BMW, Daimler-Chrysler, Volvo, Volkswagen, and VCT, and semiconductor manufacturer Motorola. It has been in use since 2003. The LIN bus uses a serial communication protocol and has the following characteristics: single-master, multi-slave organization (i.e., no bus arbitration required); low-cost hardware implementation based on ordinary UART/SCI interfaces, and low-cost software or pure state machine functionality; slave nodes can achieve self-synchronization without quartz or ceramic resonators; guaranteed signal transmission delay time; low-cost single-wire communication medium, with a maximum communication rate of 20kb/s. A LIN network consists of one master node and a maximum of 15 slave nodes. All nodes have a slave task, which is divided into a receive task and a send task. The master node also has a master task. Communication on the LIN network is always initiated by the master task. The master task transmits the message frame header, which includes a synchronization interval field, a synchronization field, and an identifier field. The slave tasks respond with a message response, which includes a 2, 4, or 8-byte data field and a check field. The message frame header and response together form a complete message frame. The LIN bus, as a supplement to the CAN bus, is mainly used for vehicle body control. The main connected components of the vehicle body network include seat, door, air conditioning, and instrument display systems. The block diagram of a fully automatic air conditioning system based on the LIN bus is shown in Figure 1. The central air conditioning control unit acts as both a CAN/LIN gateway and a LIN master node, while other units are slave nodes, categorized as sensor slave nodes and execution slave nodes. Sensors at the slave nodes send environmental status values ​​such as temperature, humidity, and sunlight intensity to the master node. The master node makes a comprehensive decision based on these status values ​​and parameters such as the driver's set interior temperature, and transmits control commands to the slave nodes. The slave nodes then perform corresponding actions according to the commands. This air conditioning system effectively achieves distributed control of the nodes, reduces the wiring harness installed in the car, and achieves truly fully automatic control, ensuring that all components of the air conditioning system operate in coordination, thereby achieving and maintaining the interior temperature at the driver's set value, creating a comfortable indoor environment. Because brushless DC motors have excellent speed regulation performance, some slave nodes in the air conditioning system use them as drive components, such as compressors, blowers, and cooling fans. These slave nodes, together with the master node, form a closed-loop speed control system for the brushless DC motor based on a LIN bus. The master node sets the motor speed through a decision algorithm, while the speed feedback and control algorithm are handled by the slave nodes, which are the controllers designed by the author. 3. Controller Hardware Structure The controller structure block diagram is shown in Figure 2. It includes: a power management module, an MC68HC908MR16 microcontroller control module, a PC33896 pre-driver module, a three-phase FET full-bridge module, and an MC33399LIN physical layer communication module. Hall effect sensors detect the position of the motor rotor, providing three pulses with a width of 180° (electrical angle) and a phase difference of 120° (electrical angle). The microcontroller's timer input capture unit captures changes in the position signal, enabling commutation of the stator winding current to ensure that the magnetic field generated by the stator maintains an average perpendicular relationship with the rotor's permanent magnet magnetic field, thus facilitating maximum torque generation. Simultaneously, the time interval between two commutations recorded by the timer can be used to calculate the motor speed. Based on the difference between the target speed and the calculated speed, the PWM duty cycle is adjusted using a PI algorithm to control the motor speed. Information such as the motor's target speed, start/stop, and forward/reverse rotation is obtained from LIN bus message frames. 3.1 Power Management Module The electrical loads inside modern automobiles are constantly increasing, and future vehicles will use a 42V power supply system to replace the existing 12V power supply system. However, many problems remain to be solved before this transition can be fully realized. Currently, a dual 42V/12V power supply is mainly used as a transitional solution. The controller designed by the author takes this development trend into account. In 12V motor applications, the controller uses a single 12V power supply; in 42V motor applications, the controller uses a dual 42V/12V power supply. The power management module also includes a 12V/5V voltage regulator chip, LT1211. 3.2 Microcontroller Control Module The microcontroller control module uses the MC68HC908MR16 microcontroller as its core. It is an 8-bit microcontroller specifically designed for motor control. Its operating temperature range reaches -40 to 105℃, fully adaptable to the working environment inside automobiles. The chip features a 12-bit, 6-channel PWM module, generating 6 PWM logic signals (configurable as 6 independent or 3 pairs of complementary signals); Timer A's channels 0, 1, and 2 capture changes in position sensor signals, while channel 3 records the moment when the position signal from channel 2 changes; a 10-bit A/D converter with a conversion time of 16-17μs enables rapid battery voltage monitoring; an error signal input generates an interrupt in case of overcurrent or overheating, thus blocking the PWM output; unique fast 8-bit multiplication and 16-bit division instructions provide high computational power, enabling complex control algorithms; 768B on-chip RAM and 16kB on-chip Flash memory provide in-system programming capabilities and security features; system protection features, including watchdog reset and low-voltage reset prevention, enhance program stability and reliability. 3.3 Front-end Driver Module The core of the front-end driver module is the PC33896, a newly released three-phase FET front-end driver specifically designed for automotive 42V/12V systems. The PC33896 contains a DC/DC step-down circuit, a current sampling amplifier, an SPI communication port, and various protection circuits. It directly receives six PWM logic signals from the microcontroller and converts them into drive signals to power the six FET gates. If the automotive system uses the new 42V power supply, the on-chip DC/DC step-down circuit reduces it to approximately 15V for FET gate driving, saving power dissipated during FET turn-on and turn-off. If the automotive power supply uses the current 12V power supply, the voltage may be insufficient to drive the FET gates in some cases. In this case, the charge pump circuit boosts the voltage to at least 10V to ensure proper FET operation. The internal current sampling amplifier measures the DC bus current. The microcontroller can send commands via the SPI port to configure the PC33896 (such as whether the DC/DC and charge pump are operating, the current amplifier's gain, etc.) and diagnose its faults. 3.4 The MC33399 LIN physical layer communication module is a LIN transceiver chip for automotive electronics applications. It, along with the microcontroller's SCI port, forms the physical basis for LIN communication. It has two operating modes: normal and sleep. A wake-up frame on the bus can wake it from sleep mode. 4. Controller Software Design Due to the powerful embedded hardware modules of the microcontroller and the PC33896, the microcontroller has sufficient resources to implement relatively complex control strategies, thus greatly improving the controller's performance. 4.1 Main Program Structure The system program adopts a foreground/background structure. The foreground is the interrupt level, and the background is the task level. The task level consists of an infinite loop and a LIN communication service routine. The infinite loop contains a finite state machine and a 10ms service routine, as shown in Figure 3. Upon system power-up, after completing the initialization task, it enters the infinite loop. Once an SCI receive interrupt occurs, the interrupt service routine determines whether the received data is a synchronous interval field. If it is a synchronous interval field, the program does not return to the infinite loop upon exiting the interrupt service, but instead enters the LIN communication service routine to receive and process message frames. After completing the communication service, the program returns to the infinite loop. Based on the received message frames, the finite state machine switches to the corresponding state. To protect the motor, the transition between the forward and reverse states in the diagram is forced through an intermediate stop state transition. When an error event such as overcurrent or low voltage occurs, the controller enters an error state, shutting down all PWM outputs and recording the error code. After receiving a sleep frame from the bus, the controller enters a sleep state; the bus wake-up signal will reactivate the controller. In the forward or reverse state, the 10ms service routine within the infinite loop executes every 10ms, completing tasks such as motor speed calculation, PI control algorithm, and battery voltage reading. 4.2 Customization of LIN Communication Message Frames The LIN bus is a master-slave communication mode, and message frame customization is performed during the overall design of the LIN network software. The brushless DC motor controller in this paper is a slave node on the bus, and its response message frames are shown in Table 1. The identifier "0x3C" is the download command frame, used by the master node to broadcast commands and data to all slave nodes; the first data byte being "00" indicates a sleep frame. The identifier "0x3D" is an upload command frame, which triggers a slave node (addressed by a priority download frame) to upload data to the host. The identifier "0x20" is a brushless motor control frame, used by the controller to receive control information from the master node. The first data byte is "01" for forward rotation, "02" for reverse rotation, and "04" for stop. The third and fourth data bytes are the given values ​​for the motor speed. The identifier "0x21" is a motor status frame, used by the controller to transmit information to the master node. The first and second data bytes are the actual motor speed, and the third and fourth bytes represent the battery voltage. 4.3 Interrupt Service Routine in Software 4.3.1 Input Capture Interrupt (InputCapture ISR1) for Timers A0, A1, and A2 When timers A0, A1, and A2 detect a rising edge in the position signal, they trigger the input capture interrupt (InputCapture ISR1). The interrupt routine reads the current level of the three pins and, combined with the value read in the previous interrupt, queries the commutation table to complete the commutation. 4.3.2 Timer A3 Input Capture Interrupt (Input Capture ISR2) When Timer A3 detects a rising edge transition in the position signal of channel A2, it triggers an input capture interrupt (Input Capture ISR2). The interrupt routine reads the current value of the Timer A3 channel capture register, combines it with the value read in the previous interrupt and the overflow count of Timer A, and calculates the count of high-frequency clock pulses for Timer A within one position pulse cycle. The result is used for speed calculation. 4.3.3 Timer B Overflow Interrupt (TIMERB ISR) Timer B overflows every 10ms, triggering an interrupt. The interrupt routine sets the timerflag flag, allowing the 10ms service routine within the main program's infinite loop to be executed. The interrupts for Timer A3 and Timer B can be disabled in the LIN communication service routine, while the commutation interrupt is retained, thus ensuring communication reliability and stable motor operation. 5. Experimental Results Using the designed controller, a brushless DC motor (its specifications are equivalent to a brushless motor driven by a bus air conditioning blower with a rated voltage of 48V and a rated power of 150W) was used as the test object. The experimental diagram is shown in Figure 4. The controller in Figure 4 uses a dual-voltage power supply of 42V/12V. The master node of the LIN bus in Figure 4 is simulated by a PC, which is connected to the LIN bus via an RS232 serial port through an RS232-to-LIN interface card (PC card). The LIN communication software was developed using the LabVIEW interface environment. Actual operation results show that the motor can start and brake quickly, accurately and timely track the given speed of the master node, and the controller operates stably and reliably, meeting the requirements of real-time control. 6. Conclusion The brushless DC motor controller based on the LIN bus designed by the author has a simple hardware circuit structure, is compatible with the 42V power supply system of future automobiles, and has a high cost-performance ratio. Furthermore, since the LIN bus is an open protocol, this controller is not only suitable for the automotive electronics field but also for industrial control, home appliances, and other fields.
Read next

Energy-saving and light pollution reduction solutions based on LED facade lighting

The use of LEDs (Light Eraser Diodes) for facade lighting was relatively rare a few years ago, still considered a novelt...

Articles 2026-02-22
CATDOLL 123CM LuisaTPE

CATDOLL 123CM LuisaTPE

Articles
2026-02-22
CATDOLL 128CM Chu

CATDOLL 128CM Chu

Articles
2026-02-22