LIN bus based motor Brushless DC Motor Controller

With the power of auto parts, automation constantly improve and motor vehicle noise, electromagnetic compatibility, high-efficiency requirements, permanent magnet brushless DC motor is replacing the permanent magnet brush DC motors. Permanent magnet brushless DC motor with small size, long life, efficiency high, Jiegou simple, reliable and good You Dian, Li Yong Ta parts of a vehicle driven by the implementation of Yuan Jian Ke effectively improve automobile parts Xingneng. For example, in Freightliner's M2 series of commercial vehicles, brushless motor drive the air conditioning system blower to better regulate the air supply rate.

As the vehicle bus technology has matured, more than motor vehicle control unit means moving from traditional centralized control to distributed bus control wiring changes. Distributed bus control can reduce the wiring harness, reduce costs, ease of all motor vehicle control units and other electronic control units together to form a comprehensive and coordinated control system, the control unit to improve reliability, reduce redundant sensors and corresponding hardware and software configuration, to achieve information exchange and resource sharing. The commonly used vehicle bus, including CAN, LIN, etc., which LIN applications for low-speed situations. LIN bus design is based on brushless DC motor controller, the controller described in the literature MC68HC908MR16 SCM, PC33896 front drive, MC33399LIN transceiver core composition, at low cost, good control performance.

2 LIN bus based control system for brushless DC motor?

LIN bus is a new low-cost car body bus, in 1999 by the European car manufacturers Audi, BMW, Daimler2Chrysler, Volvo, Volkswagen, VCT and other companies and semiconductor manufacturers Motorola LIN association composed of introduction into use since 2003 .

LIN-bus serial communication protocol, it has the following characteristics: single-master multi-slave organization (ie no bus arbitration); based on common UART / SCI 接口 of low-cost hardware, low-cost software, or as pure state machine; from the machine nodes do not need to quartz or ceramic resonator that can be achieved self-synchronization; to ensure signal transmission delay time; low-cost one-way communication medium, communication rate up to 20kb / s. A LIN network consists of a master node, up to more than 15 from the nodes. All nodes have a mandate from the machine, from machine to receive the task and send the task into the task, the master node and a host task. LIN network communication is always initiated by the host task, the task master to transmit a message frame header, the message frame header including the synchronization interval field, simultaneous field and identifier field; tasks from machine to respond to messages, message responses, including 2 , 4 or 8 bytes of data field and checksum field, message frame header and the message to respond to the composition of the complete message frame.


LIN bus as the CAN bus, mostly used for body control. Body network connection objects are the main seats, doors, air conditioning and instrumentation display system. LIN bus based fully automatic air conditioning system block diagram shown in Figure 1. Central air conditioning control unit from which CAN / LIN gateway and the role of LIN master node, the other units from the node, divided into sensor nodes from the node and the execution from. Sensor from the node temperature, humidity, sunshine intensity state of the environment value is sent to the master node, master node status according to these values, and the driver set the inside temperature and other parameters of integrated decision-making, to execution to convey control commands from the node, the Executive from node corresponding action according to the command. This air conditioning system of effective distributed control nodes, reducing the car to install wiring harness, while true automatic control, making coordination of air-conditioning system components to run, so to achieve and maintain indoor temperature settings on the driver to create a comfortable indoor environment. As the brushless DC motor has good speed performance, so some of the implementation of air conditioning systems as the drive from the node to its components, such as compressors, blowers, cooling fans and so on. The slave nodes and master nodes are formed based on the LIN bus brushless DC motor speed control, the master node through the decision-making algorithm for a given motor speed, speed feedback and control algorithm is composed from the node to complete, from the node that is on the controller to be designed.

LIN bus based motor Brushless DC Motor Controller

3, controller hardware structure

Controller block diagram shown in Figure 2, the figure includes: power management module, MC68HC908MR16 MCU control module, PC33896 pre-driver module, three-phase full-bridge FET module, MC33399LIN physical layer communication module.

LIN bus based motor Brushless DC Motor Controller

Hall sensor rotor position, which is three pulse width of 180 ° (electric angle), each difference 120 ° (electric angle) of the signal. Microcontroller timer input capture unit to capture changes in position signal to achieve the stator winding current commutation, to ensure that the stator and rotor magnetic field produced by permanent magnetic field to maintain the vertical relationship between the average in order to facilitate the greatest torque. Meanwhile, 2-for-timer to record the time interval between, calculate the motor speed, calculated according to the target speed and the speed difference between the PWM duty cycle regulation by PI algorithm to control motor speed. Target motor speed, start / stop, forward / reverse and other information from the LIN bus message frame.

3.1 Power Management Module

Hyundai Motor's internal electrical loads increase, the next car will be using 42V 12V electric system to replace the existing electricity supply system. But to fully realize this shift, there are many problems unresolved, 现 mainly 42V / 12V 的 dual power supply Lai Zuowei one kind of Guodufangan. We designed the controller to consider this trend, in 12V motor applications, the controller uses a single 12V power supply; in 42V motor applications, the controller using 42V / 12V dual power supply. While the power management module contains a 12V / 5V power regulator chip LT1211.

3.2 MCU Module

SCM SCM module MC68HC908MR16 the core, it is a dedicated 8-bit microcontroller motor control. Working temperature range - 40 ~ 105 ℃, adapt to the working environment of the car. Chip with 12-bit, 6-channel PWM module, resulting in 6-channel PWM logic signals (6-channel can be set to 3 on the 22 independent or complementary); Timer A, 0, 1, 2, 3 channels are used to capture the location changes in sensor signals, the channel 3, channel 2 is responsible for recording the location of the signal moments of change; 10-bit A / D converter, conversion time for the 16 - 17μs, can quickly complete the battery voltage monitoring tasks; error signal input, for in overcurrent or overheating generate an interrupt context, and then blocked PWM output; unique fast 8-bit multiplication and 16-bit divide instruction, so it has high computing power, to complete a more complex control algorithms; 768B-chip RAM and 16kB on-chip Flash memory, with online programming capability and security features; system protection features, including the watchdog reset, low voltage reset increase against the program's stability and reliability.

3.3 The pre-driver module

Pre-driver module is the core of PC33896, it is a new dedicated to automotive 42V / 12V system of three-phase FET pre-drivers. Chip containing the DC / DC step-down circuit, the current sampling amplifier, SPI communication port, and various protection circuits. PC33896 received directly from the single chip 6-channel PWM logic signal, to convert to drive six FET gate drive signals. If the car system supply voltage is the new 42V electric system, the on-chip DC / DC down to about 15V or so to the FET gate drive circuit for saving a turn on and off by the dissipation of the power FET; if the vehicle power supply supply voltage is used in the existing 12V electrical system, some cases will be insufficient to drive the power FET gate voltage, then charge pump circuit will be upgraded to at least 10V or so, to ensure that the normal driver FET. Within the current sampling amplifier to measure the DC bus current. MCU port to send commands through the SP I, configuration PC33896 (such as DC / DC and charge pump working or not, the current amplifier magnification, etc.) and diagnosis of the fault.
.4 LIN physical layer communication module

MC33399 is for automotive applications, LIN transceiver chip, it constitutes a single chip SCI port the physical basis of LIN communication. It has two normal and sleep mode, the bus wake-up frames can be awakened from sleep mode.

4 Controller Software Design

As the hardware modules and embedded MCU PC33896 more powerful, single chip has sufficient resources to complete more complex control strategy, which greatly improved the performance of the controller.

4.1 Main program structure

System platform structure before and after the procedure used. Reception is interrupt level, the background is the task level. Task-level by an infinite loop and pose a LIN communication service program. Dead cycle contains a finite state machine and a 10ms service procedures, finite state machine shown in Figure 3. System power, after the completion of initialization tasks into the dead cycle. SCI receiver interrupt event, the interrupt service routine to judge whether the received field sync interval. If the interval for synchronization field, program exit interrupt service Bingbufanhui Dao Xun Huan in death, but into LIN 通信 service procedures, Jin Xing Bao Wen Zhen's received and processed. After the completion of communication services, the program return to the endless loop. Based on the received message frame, finite state machine switches to the appropriate state. To protect the motor, Figure CKS transfer state and the conversion between inverted state through the middle of the cessation of compulsory state transition. In case of over-current or low-voltage error event, the controller to enter an error state, it is off to all PWM output, and record the error code. Controller receives the bus after the sleep frame into sleep state, the bus wake-up signal will be re-activated controller. Positive change in attitude or reverse state, the infinite loop within an interval of 10ms 10ms service program to perform a complete calculation of motor speed, PI control algorithm, the battery voltage reading and other tasks.

LIN bus based motor Brushless DC Motor Controller

4.2 LIN communication message frame for custom

LIN bus is a master and slave communication modes, packet frames in the LIN network software custom design hours. Man of the brushless DC motor controller is a bus from the node, which respond to the message frame as shown in Table 1. Identifier "0x3C" is a download command frame for the master node broadcasts to all commands and data from the nodes, of which the first data byte of "00" is the sleep frame. Identifier "0x3D" is to upload the command frame, it triggers a from the node (from a priority of the download frame addressing) upload data to the host. Identifier "0x20" is the Brushless motor control frame, the primary node for the controller to receive control information, the first data byte is "01" required motor is transferred, as the "02" is the reverse, for "04" is stop, third, fourth two data bytes is given the value of motor speed. Identifier "0x21" is the motor state of the frame, the master node for the controller to transmit information, the first and second data byte is the actual motor speed, third, fourth two bytes of the battery voltage.
4.3 software interrupt service routine

4.3.1 Timer A0, A1, A2 input capture interrupt (inputcap2ture ISR1)

When the timer A0, A1, A2 monitoring the position signal when there are edges, causing input capture interrupt inputcap ture ISR1. Interrupt the program by reading the three pins of the current level, combined with the previous break value in the read, check for the completion of the commutation table.

4.3.2 Timer A3 input capture interrupt (inputcap ture ISR2)

Timer A3 to A2 monitor the location of the signal with the rising edge of channel hopping, the cause input capture interrupt inputcap ture ISR2. Timer A3 interrupt program reads the current value of channel capture registers, combined with the previous break value in the read and the number of timer A overflow, calculate a position within the pulse cycle timer A high frequency clock pulse count, the results for speed calculations.

4.3.3 Timer B overflow interrupt (TIMERB ISR)

Timer B overflow interrupt every 10ms time, interrupt flag bit set procedures timerflag, allowing an infinite loop within the main program 10ms service program can be implemented.

Timer A3, Timer B interrupt service routine to allow the LIN communication was closed, but for the interruption was retained, thus ensuring the reliability of communication and motor stable.

5 results

With the designed controller, to a brushless DC motor (its size is equivalent to the rated voltage of 48V, 150W rated passenger car air conditioning blower drive brushless motor) as the test object, test plan shown in Figure 4.

LIN bus based motor Brushless DC Motor Controller

Figure 4 controller with 42V / 12V dual voltage power supply. Fig.4 Test diagram LIN bus master node by the PC machine to simulate it through the RS232 serial port via an RS232 interface card transfer LIN and LIN bus PC card connected to the LIN communication software developed using Labview interface environment.

The practical result shows: Electrical fast start, brake, accurate and timely tracking of the primary node for a given speed, the controller is stable, reliable, and able to meet the requirements of real-time control.

6 Conclusion

The LIN bus design is based on a brushless DC motor controller, the hardware circuit structure is simple and compatible with the future of electric vehicles 42V power supply system, with high cost performance. In addition, LIN bus is an open protocol, the controller is not only suitable for automotive electronics, can also be used for industrial control, home appliances and other fields.

Declined comment