Design of brushless DC motor control system based on MC9S12X128

Publisher:王大雷Latest update time:2012-02-27 Source: 21ICKeywords:MC9S12X128 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The brushless DC motor is a high-performance motor with the advantages of high efficiency, good reliability, simple structure, easy maintenance and small size. Compared with DC motors, brushless motors do not have brushes and commutators, but use electronic circuits for commutation. No sparks are generated during commutation, and there is no mechanical commutation loss. Compared with asynchronous motors, the rotor of brushless motors rotates synchronously with the stator magnetic field, so there is no rotor loss. Compared with synchronous motors, the control method of brushless motors is simple, and the characteristics of being easy to apply in engineering make them widely used in many fields.

There are many control schemes for brushless DC motors, such as the control system using DSP as the main controller in the literature, the control scheme using FPAG to control brushless motors in the literature, and the control scheme using MEGA8 single-chip microcomputer in the literature. These control methods can realize the control of the motor's forward and reverse rotation, start and stop, etc., but there are great differences in system implementation cost, control accuracy, operation stability and energy consumption of peripheral circuits. Using the control scheme of DSP and FPAG, the system has high control accuracy and good stability, and can be applied in industrial production. The disadvantage is that the cost is too high and it cannot be used in daily life on a large scale. Although the cost of MEAG8 control scheme is low, the performance of the system is much different from that of DSP and FPAG, and it cannot meet the requirements of industrial production.

In view of the above problems, a brushless DC motor control system with MC9S12X128 single-chip microcomputer as the core is proposed. The control system has low cost, and the control performance of the motor is not much different from that of high-end control schemes such as DSP and FPGA, and can be widely used in industrial production. The main control chip selected in this paper has rich A/D conversion and PWM channels, which is suitable for motor control. In order to reduce energy consumption and reduce the complexity and cost of the circuit, improve the reliability of the control system, and also to facilitate system maintenance and function expansion, the system hardware circuit adopts the principle of modular design, and each module circuit uses integrated chips as much as possible.

1 Principle of brushless DC motor control

The operating principle of brushless DC motor is basically the same as that of brushed DC motor, except that the commutation method of the motor is different. The brushless motor adopts electronic commutation, uses the rotor position sensor to detect the rotor position, and controls the conduction and shutdown of each power MOSFET connected to the armature winding through the commutation drive circuit to achieve the purpose of motor commutation. The armature winding Y-connected three-phase full-controlled bridge drive circuit is shown in Figure 1.


The commutation cycle of the three-phase full-controlled bridge circuit is 60° electrical angle. In each commutation cycle, only two power MOSFET tubes are turned on. One power tube is commutated each time, and each power tube is turned on for 120° electrical angle. In the figure, Q1~Q6 are power field effect tubes. When the AB phase needs to be turned on, only Q1 and Q6 tubes need to be turned on, and the other tubes are turned off. At this time, the current path in the circuit is: positive pole of power supply-Q1-coil A-coil B-Q6-negative pole of power supply. According to this conduction mode, there will be 6 phase modes: AC, BC, BA, CA, CB, AB, and the corresponding MOSFET tube opening order is Q1Q2, Q2Q3, Q3 Q4, Q4Q5, Q5Q6, Q6Q1. If this conduction order is specified as one forward rotation of the motor, the reverse rotation can be achieved by controlling the above MOSFET tube conduction order in reverse.

2 Main hardware circuit design of the control system

2.1 System hardware structure

The block diagram of the DC brushless motor control system is shown in Figure 2. The control system uses the MC9S12x128 microcontroller as the core control chip, which is responsible for processing the collected current and rotor position signals, implementing the motor control algorithm, generating the control pulses required for the rotation of the brushless DC motor, and interacting with the outside world. After setting the required speed by pressing the button, the main control chip generates a PWM signal of the corresponding frequency according to the given speed, controls the power tube switching time of the drive circuit, and makes the motor speed reach the expected value. The commutation moment of the brushless DC motor is determined by the position of the rotor, so a position detection circuit is added to the system to detect the position of the rotor. The position sensor uses a position Hall sensor. In order to ensure that the performance of the system will not be greatly affected when the armature current is overcurrent or undercurrent during the dynamic process of the motor, a current detection circuit is added. Through this circuit, the current flowing through the motor is sampled. Once an abnormal situation occurs, the main controller immediately takes corresponding measures to protect the control system and avoid accidents. The isolation circuit prevents the presence of inductive loads from generating a large number of interference signals, minimizes the impact of interference, and enables the system to operate stably for a long time. The function of the monitoring circuit is to keep the system working within the effective voltage and improve the reliability of the system. The RS232 interface and key interface circuit are used for motor speed regulation and control to meet various requirements for speed.


2.2

Main controller The quality of the main controller directly affects the performance of the entire DC brushless motor control system. After fully considering the implementation cost and functional requirements, Freescale's MC9S12X128 is used as the main control chip. This chip has rich A/D conversion channels and PWM channels, which is suitable for motor control. In actual use, as long as the registers of the corresponding modules are configured, the module functions can be used without complex program writing, so that the main focus can be placed on improving the performance of the hardware circuit. Problems that arise during system operation can be easily debugged and maintained.

2.3 Driving circuit

In the design of the driving circuit, considering the cost and reliability of the circuit, the traditional inverter bridge driving circuit composed of 3 P-channels and 3 N-channels was abandoned, and the dedicated brushless motor driving chip IR2130 was used to control the motor. The IR2130 driving circuit has few peripheral components, has current amplification and overcurrent protection functions, and has a strong ability to suppress noise. The most important thing is that under the premise of ensuring the accuracy and reliability of the circuit application, the cost is greatly reduced. The performance-price ratio of this circuit is relatively high, which is conducive to promotion and application. The DC brushless motor driving circuit is shown in Figure 3.


In Figure 3, HIN1~HIN3 and LIN1~LIN3 of IR2130 are connected to the main control chip as the input drive signal of the power tube. FAULT is connected to the external interrupt pin of MC9S12X128, and the fault is handled by the controller interrupt program. Considering that the armature coil will generate extremely high instantaneous back electromotive force due to its own inductance, which will break down the components, six diodes D5~D8 are added to the power tube. Their function is to prevent the excessive back electromotive force from causing damage to the MOSFET tube by freewheeling. C3~C5 are bootstrap capacitors, which store energy for the floating power supply driven by the upper bridge arm power tube. The function of D1~D3 is to prevent the DC voltage bus voltage from reaching the power supply of IR2130 when the upper bridge arm is turned on, which will damage the device. Therefore, D1~D3 should have sufficient reverse withstand voltage. Since the diode is connected in series with the capacitor, in order to meet the switching frequency requirements of the main circuit power tube, D1~D3 chooses fast recovery diode 8TQ080.

2.4 Position detection circuit

The difference between a brushless DC motor and an ordinary brushed DC motor is that the continuous rotation of an ordinary DC motor requires mechanical commutation, which will generate electromagnetic interference and produce high noise. The brushless DC motor overcomes these shortcomings by using electronic commutation. The electronic commutation is based on the position of the rotor poles, so rotor position detection is a key link in controlling brushless motors. The function of the position detection circuit is to provide accurate rotor position information to the main control chip, which performs commutation operations in a timely manner according to the rotor position, so that the motor rotates continuously. This part of the circuit is mainly composed of a position Hall sensor and a position detection circuit. The position detection circuit of a brushless DC motor is shown in Figure 4.


This position detection circuit uses MAXIM's MAX9621 chip. By mirroring the sensor current at the analog output or through filtered digital output, MC9S12X128 can monitor the state of the Hall sensor to accurately detect the motor rotor position. Compared with the position detection circuit composed of operational amplifiers, this circuit has the advantages of simple structure, high accuracy, low cost and low power consumption.

2.5 Current detection circuit

Current detection can provide protection for the system. Through the current information collected by the current detection circuit, the main controller can make a judgment in time. Once the current exceeds the limit value of the motor, the circuit power supply is cut off to avoid greater damage. The current detection circuit of the brushless DC motor is shown in Figure 5.


In the figure, RSENSE is a current sampling resistor, and the voltage VSENSE across it is the detection voltage. The voltage-dividing resistor network composed of R20~R24 is connected to the two comparators inside the chip. If there is an overcurrent or undercurrent on pin 16, a high-level signal will be output to the main control chip on pin 6. The main control chip will make corresponding operations in time according to this signal to protect the system from damage.

3 Main software design of the control system

3.1 Position detection and commutation control program

The key to achieving stable rotation of the DC brushless motor is to grasp the commutation moment in time and make the correct commutation operation at that moment. The rotor position signal is output by 3 position Hall sensors, which are collected by the position detection circuit and sent to the main control chip. The output signals of the 3 Hall sensors differ by 120° electrical angle. Each Hall sensor will generate 6 pulse signals when the rotor rotates one circle, which corresponds to 6 commutation moments. By capturing these pulse signals through the capture function of the microcontroller, these 6 commutation moments can be obtained. In the commutation control program, the captured position signal is compared and calculated with the commutation control table. The relationship between the commutation control word and the working state of the MOS tube is shown in Table 1. The state control word at the next moment is obtained, and then this state control word is output to IR2130 to switch the power MOSFET tube, thereby achieving correct commutation. The commutation control program flow of the brushless DC motor is shown in Figure 6.

3.2 PWM waveform generation
PWM modulation is an effective technology for controlling analog circuits using digital output, especially in motor speed control. Using PWM to adjust the motor speed, the pulsation of the motor armature current is small, easy to be continuous and has a wide speed regulation range. There are many ways to generate PWM signals. It can be generated by a circuit with adjustable duty cycle composed of a 555 timer, or by software programming of a single-chip microcomputer. Considering the cost and the needs of circuit design, the PWM signal in this article is obtained by software. MC9S12x128 has 8 PWM output channels, each of which can be programmed to achieve left-aligned or center-aligned output of PWM signals, the waveform flipping can be controlled, and the frequency range of the clock can be selected is wide, which can be set according to actual needs. In the designed control system, only PWM0~PWM2 channels are used, the starting level of PWM output is set to high, the alignment mode is left-aligned, and the bus clock is set to 24 MHz. The output PWM signal is given to the power MOSFET tube of the upper bridge arm, while the power tube of the lower bridge arm is controlled in a normally open or normally closed manner. The PWM waveform generation program flow is shown in Figure 7.



4 Experimental results and analysis

In order to test the effect of the brushless DC motor control system designed in this paper during actual operation, according to the design scheme in this paper, appropriate electronic components are selected according to the circuits of each part of the system circuit, and a hardware circuit is built. The MOSFETs selected in the circuit are IRFR5305 and IRFR1205 of IR Company. The motor used in the experiment is the Xinxida 2210 (KV1000) outer rotor brushless motor. The output PWM frequency is 32 kHz. When the duty cycle of the brushless DC motor is 50%, the voltage waveforms of the three phases A, B, and C are shown in Figure 8; the waveform of the induced electromotive force of a certain phase of the brushless DC motor is shown in Figure 9.


Through long-term running test and observation of the motor, the whole system responds quickly, runs smoothly, and no faults occur during the test. However, as can be seen from Figure 9, the top of the reverse induced electromotive force waveform is bent, indicating that the motor has premature commutation. At this time, the brushless DC motor will vibrate slightly. This situation is caused by the large magnetic gap of the brushless motor. The brushless motor with a small magnetic gap disassembled from the hard disk was tested, and it was found that the top of the reverse induced electromotive force waveform of the hard disk brushless motor was not bent. This shows that the magnetic gap of the brushless motor has a certain influence on the reverse induced electromotive force.

5 Conclusion

According to the control principle of the DC brushless motor, a DC brushless motor control system is designed, and the design schematic diagram of the main circuit is given in this paper. The hardware circuit adopts modular design, which is convenient for system maintenance, and other functions can be expanded according to actual needs in practical applications. The system has the characteristics of low implementation cost and good stability, which can meet the requirements of accuracy and cost. Subsequent research work will focus on the dual closed-loop control of the DC brushless motor based on the current loop and the speed loop and the torque pulsation of the DC brushless motor to obtain better dynamic control performance and stability performance.

Keywords:MC9S12X128 Reference address:Design of brushless DC motor control system based on MC9S12X128

Previous article:Analysis of the relationship between LCD display image quality and power consumption
Next article:Design and simulation of boost switching power supply based on PSpice

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号