Brushless DC Motor Control System Based on Dual Single Chip Computer Communication

Publisher:数据探险家Latest update time:2010-08-10 Source: 计算机应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the brushless DC motor control system, DSP is usually used to collect and process signals. However, due to the high price of DSP, in some occasions where real-time requirements are not high, MCS-51 microcontroller can be used instead of DSP to control the start and stop, forward and reverse rotation and speed regulation of brushless DC motors.

This paper designs and implements a brushless DC motor control system based on dual single-chip microcomputer communication. The design scheme has simple circuit, strong reliability and low price. The system mainly includes single-chip microcomputer control circuit, logic protection circuit, overcurrent protection circuit, drive circuit, speed measurement circuit, rotor position detection circuit, etc. Its principle is shown in Figure 1.

Table 1 Motor positive conversion phase table
H1 H2 H3 Conductive pipe Control Word
1 0 1 Q1,Q2 0x0f
1 0 0 Q2,Q3 0x27
1 1 0 Q3, Q4 0x33
0 1 0 Q4,Q5 0x39
0 1 1 Q5, Q6 0x3c
0 0 1 Q6,Q1 0x1e

1 Rotor position detection circuit

When controlling a brushless DC motor, the position of the rotor must be known. In this design, three photoelectric position sensors are used. This sensor uses the photoelectric effect and consists of a shading plate that rotates with the motor rotor, a fixed light source, a photoelectric tube and other components. The shading plate has a gap of about 180° electrical angle. As the motor rotor rotates, the photoelectric tube intermittently receives light from the light source, continuously turns on and off, and thus generates a series of 0 and 1 signals. After these signals are transmitted to the microcontroller through the P0 port, the microcontroller sends the corresponding control word through the P1 port, which can well control the commutation of the motor. Its control schematic diagram and commutation control table are shown in Figure 2 and Table 1.

2. Driving Circuit

The gate drive voltage of the insulated gate bipolar transistor IGBT is generally 15V±10%, and the turn-off negative bias voltage is 5~6V. Therefore, TLP250 is selected to drive the IGBT, and the circuit is shown in Figure 3. The interior of TLP250 is photoelectrically coupled to isolate the control circuit from the main circuit. When the 3rd pin receives a low level, the VGE output is approximately 15V, which can drive the IGBT to turn on; on the contrary, when the 3rd pin receives a high level, the VGE output is approximately -5V, which turns off the IGBT. The six TLP250s can control the opening and closing of the IGBT well as the input level changes, thereby realizing phase switching.


3 Protection circuit

3.1 Current limiting protection circuit at starting


When the motor starts, due to the low speed, the back electromotive force generated by the rotor flux cutting the stator winding is very small, so an excessive current I may be generated. Usually an overcurrent protection circuit is added, as shown in Figure 4. The current passing through the motor in the main circuit is finally grounded through the resistor Rf. Therefore, Uf=Rf·IM, its size is proportional to the motor current IM, and Uf is connected to the inverting input terminal of the voltage comparator LM324 through a 10k Ω resistor. When Uf is greater than the given voltage U0 at the positive input terminal of LM324, LM324 outputs a low level. The light-emitting diode is turned on, and the transistor C terminal outputs a low level. Since the C terminal is connected to the three-input NAND gate 74LS10, regardless of the other two inputs, its output must be a high level, so -5V is output from TLP250, and the three IGBTs Q2, Q4, and Q6 are turned off at the same time, that is, the sub-main circuit is cut off. When Uf

3.2 Logical protection circuit during operation

In order to prevent the single-chip microcomputer system from being disturbed by the environment or errors when executing the program, a logic protection circuit is added to the output end of the single-chip microcomputer, and its circuit is shown in Figure 5. Assuming that the starting current does not exceed the maximum current, the input C will not play any role, and the output is only controlled by P10~P15. According to the designed bridge circuit, Q1 and Q4, Q2 and Q5, Q3 and Q6 are not turned on at the same time, otherwise the current passing through the IGBT is too large, resulting in overcurrent damage. According to the logic relationship of the circuit, when P10P13, P11P14, P12P15 make mistakes, they all output low level, or the output of P0 port is all low level (high level), Q1Q4, Q2Q5, Q3Q6 are not turned on at the same time, which protects the circuit well.

4 Speed ​​measurement circuit

If you want to accurately control the speed of a brushless DC motor, you must first accurately measure its speed. The author uses the pulse signal generated by the rotor position sensor to reflect the speed of the motor. Connect the output end of the sensor to the P15 port of the microcontroller. As the motor rotates, the microcontroller continuously receives high and low levels. When the microcontroller detects a falling edge, it starts to start timer T1 until it receives the next adjacent falling edge. The time between two consecutive high levels is proportional to the speed of the motor, and the speed of the motor can be measured.

5 Dual MCU control circuit

5.1 Design Principles

In this design, a single-chip microcomputer is used to control the start, commutation, speed regulation, forward and reverse rotation and parking of the brushless DC motor. In the design, since the program has a waiting delay time when measuring the speed, if the motor speed is low, the interval between the two high levels transmitted by the sensor is large, which will inevitably affect the motor commutation, causing the motor to lose step and stop. To avoid this situation, two 89C52 single-chip microcomputers are used in the design, one of which is the master single-chip microcomputer and the other is the slave single-chip microcomputer. The slave single-chip microcomputer is mainly responsible for controlling the commutation timing of the motor. When the slave single-chip microcomputer receives the rotor position information from the rotor position detection circuit, it sends two signals to the logic protection circuit through its P1 port. The logic protection circuit inverts the received signal and transmits it to the gate drive circuit of the six IGBTs, thereby controlling the commutation timing of the stator winding. The master single-chip microcomputer is responsible for measuring the speed, comparing the measured actual speed with the given speed, and transmitting the comparison result to the slave single-chip microcomputer through the serial port TXD. After receiving the information from the single-chip microcomputer, the stator winding current conduction time is changed under the premise of keeping the commutation timing unchanged, so as to achieve the purpose of adjustment. The single-chip microcomputer connection method is shown in Figure 6.

5.2 Serial port dual-machine communication

In serial communication, the baud rates of both receiving and sending must be consistent. Therefore, the communication baud rate must be set first, and a reasonable sending and receiving rate must be set according to the needs. When the main microcontroller program is reset, it initializes the serial transmission control register SCON and sets SCON=0x40. At this time, serial transmission mode 1 is adopted. Let SMOD=1, TMOD=0x21, timer T1 is set to mode 2, and the initial value is set to 0xff, then the baud rate is 62.5kbit/s. The main microcontroller uses the timed data transmission method, and the slave microcontroller uses the interrupt method to receive data. First, the serial port must be initialized, SCON must be defined so that REN=1, and the CPU and serial port interrupts must be turned on, so that EA=1, ES=1. After receiving the data, the interrupt flag RI is set to 1, and the program enters the interrupt service program, first turns off the interrupt, then takes out the data received by SBUF, and then clears RI and turns on the interrupt to exit the interrupt service program. The specific idea is: the master MCU compares the measured speed with the set speed. If it is too large, it sends a number 0 to the slave MCU through the serial port; if it is too small, it sends a number 1 to the slave MCU; if they are equal, it sends a number 2 to the slave MCU. The slave MCU reads information through interrupts. If the number in SBUF is 0, the commutation delay time is increased to reduce the motor speed until 2 is received; if the number in SBUF is 1, the commutation delay time is reduced to increase the motor speed until 2 is received; if the number in SBUF is 2, the commutation delay time remains unchanged and the motor keeps running at the current speed.

5.3 Serial Communication Software Design

The entire software is written in C51 language and is fully modularized. The main microcontroller program module mainly includes speed measurement program, speed setting program, and speed display program. Its main function flow chart is shown in Figure 7. The slave microcontroller program module mainly includes forward, reverse and parking programs, adjustment programs, and serial interrupt service programs. Its main function flow chart and interrupt function flow chart are shown in Figures 8 and 9.

The brushless DC motor control system designed and implemented in this paper has been successfully debugged in the laboratory. The circuit software simulation and hardware implementation have been verified and achieved good results. Practice has proved that this design is feasible and effective.

Content End
Reference address:Brushless DC Motor Control System Based on Dual Single Chip Computer Communication

Previous article:Single chip microcomputer control of stepper motor
Next article:Three-phase PWM motor driver A3936 and its application

Latest Industrial Control 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号