Since brushless DC motors have the advantages of simple structure, reliable operation, and convenient maintenance of AC motors, as well as advantages that other types of DC motors cannot match, such as simple structure, small size, light weight, high efficiency, large starting torque, small inertia, and fast response, they are widely used in aerospace, military, petroleum equipment, and industrial and civilian fields. Here is a design scheme for a brushless DC motor control system based on Freescale MC9S12D64 microcontroller.
1 Principle of brushless DC motor control The
brushless DC motor system consists of four parts: motor, rotor position sensor, electronic switch circuit, and drive circuit. Its working principle diagram is shown in Figure 1.
The DC power supply supplies power to the stator winding of the motor through the drive and switch circuits to provide excitation current. The position sensor detects the rotor position at any time and controls the on and off of the switch tube according to the rotor position signal, thereby realizing electronic commutation. As the permanent magnet of the motor rotor rotates, the NS pole of the magnetic field acting on the position sensors H1, H2, and H3 changes, causing the position sensor to generate a square wave signal with a phase difference of 120°, as shown in the waveform in Figure 2.
As the permanent magnet of the motor rotor rotates, the NS pole of the magnetic field direction acting on the three position sensors HALL1, HALL2, and HALL3 changes, causing the position sensors to generate 6-state coded signals with a phase difference of 120°: 101, 100, 110, 010, 011, and 001, which generate control signals that control the switching devices MOSFET or IGBT and other power tubes to be turned on in pairs in a certain sequence. In this way, every time the rotor rotates one turn, the 6 power switching tubes and the 6 states formed by a fixed combination are turned on in sequence to ensure the normal operation of the motor.
2 System Hardware Design
2.1 Main Controller Module
This system uses a 16-bit 9S12 series MC9S12D64 microcontroller produced by Freescale as the main controller. The chip has rich I/O ports; 8 KB RAM, 64 KB Flash, 2 KB EEPROM; SCI, SPI, PWM and serial interface modules; with 6-channel 12-bit PWM modules, which can be set to center alignment or edge alignment mode, just for the variable frequency control of the three pairs of electrodes of the motor; the chip has an enhanced capture timer and 8-channel 10-bit A/D conversion module that can be used for current, voltage, etc. detection to protect the control system. It can also be connected to various sensors, greatly simplifying the peripheral circuit and software design.
The system includes the peripheral system of the MC9S12D64 microcontroller, the motor position sensor signal detection part, the motor drive circuit, the communication circuit and the temperature current detection circuit. The hardware circuit implemented is shown in Figure 3.
The main functions of the control system are the control of the forward and reverse rotation of the motor, the start and stop control, the speed measurement and closed-loop speed regulation, the motor temperature, current detection and protection, etc. The peripheral system of the single-chip microcomputer includes four parts: mode selection, reset circuit, crystal oscillator circuit and power supply; the three input signals HALL1/HALL2/HALL3 of the motor position sensor are connected to the PT0/PT1/PT2 pins respectively after being pulled up and filtered. By using the input capture function of the single-chip microcomputer, an interrupt can be generated every time the motor rotates 60°, and the rotor position and motor speed can be obtained very conveniently; the drive control signal for controlling the rotation of the motor is output by the PB port; the measured motor temperature and motor current signals are input by the AN0/AN1 port, and converted into actual temperature and current values after A/D conversion. In addition, the serial port 0 is used to connect the RS485 bus interface device SN75176 to communicate with the host computer, receive the speed, start and stop, steering and other commands of the host computer, and send the motor information such as motor speed and temperature to the host computer. The hardware circuit is simple and reliable.
2.2 Motor drive circuit
This system adopts a three-phase six-beat control method. The drive circuit adopts a unipolar half-modulation PWM control method. The drive device uses IR2110, which is a dual-channel high-voltage, high-speed voltage-type power switch device gate driver with a bootstrap floating power supply. The drive circuit is simple and only one power supply is needed to drive the upper and lower bridge arms of the two switch devices at the same time, which greatly simplifies the drive power supply design. The power device uses 6 MOSFETs from T1 to T6 to drive the motor. The drive circuit is shown in Figure 4.
The circuit in Figure 4 is only the drive of one phase of the motor. The drive control of the three-phase winding of the brushless DC motor requires a total of 3 groups of such drive control, each group controls 2 MOSFETs, and the 3 groups have a total of 6 MOSFET conduction states. The rotor changes a state every time it rotates 60°. The control signal is output from the PB port of the main controller and input to the upper bridge arm control terminal 10 pins and the lower bridge arm control terminal 12 pins of the IR2110 to control the conduction and cutoff of the high-end 7 pins and the low-end 1 pin of this signal. The conduction sequence is VT1, T4 conduction; VT1, VT6 conduction; VT3, VT6 conduction; VT3, VT2 conduction; VT5, VT2 conduction; VT5, VT4 conduction signal, each time only the upper bridge arm of one phase winding and the lower bridge arm of the other phase winding are turned on, so that every time the rotor rotates one turn, VT1~VT6 and the 6 states formed by the fixed combination are turned on in sequence to ensure the normal operation of the motor. When wiring this part of the circuit, it is important to note that the position of Cx1 is close to the VCC power supply, ensuring that the burr interference on the power supply is filtered out and the SD terminal is not disturbed.
2.3 Current protection and overheat protection control of the motor
In order to protect the motor, the current and temperature of the motor must be detected. This control system uses a sampling resistor connected to the ground terminal of the power supply as a current sensor, and the temperature sensor uses Pt100. The output signal of the temperature sensor is amplified by the instrument amplifier and connected to PAD00 of MC9S12D64 for A/D conversion measurement; the current of the motor is obtained by obtaining a voltage signal through the sampling resistor connected in series in the detection circuit, and then connected to the A/D conversion input terminal PAD01 of MC9S12D64 after differential amplification and other processing for measurement. When the detected current or temperature exceeds the preset maximum value, the SD terminal of IR2110 can be controlled by software to block the output and stop the motor, thereby protecting the motor from burning.
3 System software design
The control software of this control system mainly includes the main program, position detection subroutine, PWM pulse width modulation subroutine, speed regulation subroutine, current temperature measurement and control subroutine, counting and timing interruption program and serial port interruption subroutine. The position detection subroutine includes 3 input capture interruption programs. The PT port of MC9S12D64 has excellent input capture function, which can automatically capture the two rising edges of the position sensor output signal to complete the motor speed measurement and commutation control; the current temperature measurement is scaled after the A/D conversion of MC9S12D64 to convert the actual value. The flow charts of the main program and speed regulation subroutine are shown in Figure 5(a) and Figure 5(b) respectively.
In this system, speed regulation can be manual speed regulation and upper computer command speed regulation. Since the speed of the brushless DC motor and the voltage of the motor are linearly related, the motor speed is matched with the analog input voltage of the speed control when the speed is manually regulated, and the value obtained by A/D conversion is used to set the speed. If the speed is set through the serial port, the binary code is matched with the PWM pulse width. It only takes 1 s to read the motor speed value measured in the speed measurement subroutine, and then compare this value with the preset speed value. If it is greater than the preset speed value, the smaller code value is sent out; if it is less than the preset speed value, the larger code value is sent out. In this way, the motor speed can be adjusted in such a feedback loop until the speed value is equal to the preset value, thereby realizing the speed regulation of the motor. In the entire software design, low-power software design methods such as capture interrupt, timing interrupt, external interrupt, serial port interrupt, A/D interrupt, etc. are used to greatly reduce the static and dynamic power consumption of the system.
4 Conclusion
This system mainly completes the functions of motor drive control, phase change control, forward and reverse control, start and stop control, current, temperature control, motor speed measurement and motor speed regulation. This design uses MC9S12D64 single-chip microcomputer, with simple peripheral circuits and the advantage of low power consumption. The power consumption of the entire control system is only 11 mW. After high-temperature baking test, the control system can work stably in a high temperature environment of 150℃. After a lot of practical verification, this control drive system starts smoothly, the starting current is small, and the driven motor runs smoothly. It has the characteristics of simple hardware, good stability and reliable operation.
Previous article:Design of intercom encryption system based on STC12C2052
Next article:Design of infrared remote control LED electronic clock controlled by DS1302+AT89C2051
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- STM32G474 driver for HDC1080
- MOS and transistor drive circuit
- I want to find some schematics to practice drawing PCBs
- Import problem in Ubuntu
- Share the discussion about BQ40Z50-R2 external equalization circuit, are there any better suggestions?
- Please help me with the circuit of low frequency sine wave
- Switched capacitor filter related
- FPGA_100 Days Tour_Phase-Locked Loop
- [Infineon XENSIV PAS CO2 sensor] Unboxing
- CircuitPython's Python programming software MU