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.
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.
Previous article:Single chip microcomputer control of stepper motor
Next article:Three-phase PWM motor driver A3936 and its application
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 22 Ways to Prevent EMI When Designing Power Supplies
- 【NXP Rapid IoT Review】Hello Touch
- RISC-V MCU Application Development Series Tutorial CH32V103
- Communication between Yitong Chuanglian MODBUS to PROFIBUS gateway and Honeywell DCS system
- Let's take a look
- 【TI Wireless】Micro Dual-Mode Wireless Receiver
- PWM and PFM
- Let’s talk about whether Huawei can survive in the end.
- Can the network cable be directly soldered to the PCB without a crystal plug or can the network cable be plugged into the circuit board with terminals?
- [Revenge RVB2601 creative application development] helloworld_beginner's guide to debugging methods and processes