1 Introduction to STMicroelectronics STM8S208RB MCU
STM8S208RB is a high-performance core MCU of STMicroelectronics, with enhanced Harvard & CISC architecture, high running speed, strong processing power, rich on-chip peripherals, easy to use and modular design, and is widely used in the control of brushless DC motors. The specific performance indicators of this MCU are as follows: 1) Core: 2.95 ~ 5.5 V wide operating voltage, -40 ~ + 125 ℃ operating environment temperature, with 3-stage pipeline structure, when working at 24 M crystal frequency, it can reach 20 MIPS. 2) Program memory: up to 128 K bytes of Flash; data can be stored for 20 years at 55 ℃ after 10 K erases and writes. Data memory: up to 2 K bytes of erasable data storage area eeprom, up to 300,000 erasable times; RAM: up to 6 K bytes; 3) Timer: 2 16-bit general timers, 1 16-bit advanced control timer, with 4 CAPCOM channels, 3 complementary outputs, dead zone insertion and flexible synchronization function. 4) 10-bit A/D converter with up to 16 channels, minimum conversion time of 2.33μs.
2 Brushless DC motor position sensorless control technology
2.1 Composition structure of air conditioning compressor and brushless DC motor
In the air conditioning compressor system using brushless DC motor, it is mainly composed of three parts: compressor, motor and controller. The motor body of brushless DC motor is similar to the structure of permanent magnet synchronous motor. Its stator is armature and rotor is permanent magnet. The use of rare earth permanent magnet material greatly reduces the weight of brushless DC motor, simplifies the structure and improves the performance. Compared with ordinary DC motor, it removes the mechanical contact structure composed of commutator and brush, and adopts electronic switch commutation device to improve its reliability. When a current is passed through one phase of the stator winding of a brushless DC motor, the magnetic field generated by the current interacts with the magnetic field generated by the permanent magnet of the rotor to generate torque, driving the rotor to rotate. The magnetic field generated by the conduction sequence of the power switching devices in the drive circuit is synchronized with the rotor angle, thus playing the commutation role of the mechanical commutator.
2.2 Mathematical model of brushless DC motor
Under ideal conditions, a brushless DC motor has a trapezoidal wave back electromotive force with a flat top width of 120°. The motor outputs a square wave voltage or current through an electronic switch and maintains an appropriate phase relationship with the motor back electromotive force, thereby generating an effective electromagnetic torque to make the motor run. The brushless DC motors currently used mostly use three-phase star windings, working in a two-two conduction, three-phase six-state mode, as shown in Figure 1.
For permanent magnet brushless DC motors with Y-type winding connection and three-phase six-state 120° two-by-two energization. Assuming that the three-phase winding of the brushless DC motor is symmetrical, the three-phase voltage equation can be expressed as:
Where Ua, Ub, Uc are the voltage (terminal voltage) of the three-phase winding of the motor to the ground; ia, ib, ic are the current of the three-phase winding of the motor; Ea, Eb, Ec are the reverse electromotive force of the three-phase winding of the motor; Ra, Rb, Rc are the resistance of the three-phase winding of the motor; La, Lb, Lc are the self-inductance of the three-phase winding of the motor; Un is the voltage of the neutral point to the ground; Mab is the mutual inductance of the A-phase winding and the B-phase winding, and the same applies to the others. From the assumptions, it can be seen that Ra= Rb=Rc=R; La=Lb=Lc=Ls; Mab=Mac=Mba=Mbc=Mca=Mcb=M; ia+ib+ic=0; If L=Ls-M is set, substitute it into the formula and get:
[page]
The operation of permanent magnet brushless DC motor requires detection of rotor position signal to realize phase change. In air conditioning compressor system, position sensorless technology is usually used. The position sensorless methods include back-EMF method, magnetic resistance method, flux linkage change method, and inductance method. The above-mentioned rotor position information detection methods have their own advantages and disadvantages, and it is necessary to propose a reasonable solution based on their advantages and disadvantages according to the specific situation. In view of the high requirements of reliability and stability and low requirements of accuracy for brushless DC motors in air conditioning compressors, the back-EMF zero-crossing detection method is used in this system to detect rotor position information. The system adopts a two-two conduction, three-phase six-state conduction mode, and the modulation mode is H-PWM-L-ON, that is, the upper bridge arm switch tube is chopped, and the lower bridge arm switch tube of the other conduction phase is always on.
Assume that the motor is in a 120° conduction state: in the PWM "ON" state, T1 and T4 are turned on, as shown in Figure 2; in the PWM "OFF" state, T6 is turned on and T1 is turned off, as shown in Figure 3.
1) Zero-crossing detection method when PWM is turned on
In the PWM "ON" state, T1 and T4 are turned on, as shown in Figure 2, and the three-phase terminal voltage expression is as follows:
According to the above formula, when PWM is "ON", as long as the C phase terminal voltage is detected to be equal to Ud/2, it is the zero-crossing point of the C phase.
2) Zero-crossing detection method when PWM is turned off
In the PWM off state, T1 is turned off and T4 is turned on. At this time, the current flows through the body diode inside T2 as shown in Figure 3. From the figure, it can be obtained that
the AB phase terminal voltage Ua=Ub=0 (8)
The C phase terminal voltage Uc=Ec丘 (9)
[page]
At this time, the neutral point voltage Un=0; the C phase electromotive force is Ec=Uc; according to the above formula, when the C phase terminal voltage is detected to be 0 when PWM is "OFF", it is the zero crossing point of phase C. Figure 4 is the actual measurement diagram of the terminal voltage and zero crossing point under PWM "OFF" and PWM "ON" conditions.
2.4 Fast demagnetization technology
In order to correctly detect the back electromotive force zero-crossing signal, it is necessary to ensure that the power-off phase current decays as quickly as possible before detection, that is, the power-off phase demagnetization. When controlling the brushless DC motor to change phases, due to the effect of the winding coil inductance, the current of the power-off phase winding cannot decay to zero immediately. Due to the freewheeling effect of the anti-parallel diode, the phase terminal voltage is clamped to 0 V or high voltage, so the back electromotive force zero-crossing detection cannot be performed during the demagnetization period. Therefore, the demagnetization process must be accelerated to ensure the stability of the motor. The power-off phase freewheeling process can be equivalent to the phase inductance being connected in parallel with the voltage source and charging it. Therefore, if a reverse voltage is applied to the off phase at the time of phase change, the demagnetization process can be accelerated. The specific process can be referred to the literature. Experiments have found that the use of accelerated demagnetization technology greatly shortens the demagnetization time, improves the accuracy of back electromotive force zero-crossing signal detection, and enhances the stability of system operation. The three-phase terminal voltage and zero-crossing point experimental waveforms of the brushless DC motor before and after the use of accelerated demagnetization technology are shown in Figure 5.
3 Hardware Design
The circuit of the variable frequency air conditioner controller based on STM8S208RB was built, mainly including power supply circuit, power drive circuit, overcurrent differential amplifier circuit, zero-crossing detection circuit, etc. (the minimum system diagram of STM8S208RB and the power supply part are omitted due to space limitations).
3.1 Drive Circuit
The drive circuit is shown in Figure 6. IR2101 is a cost-effective driver produced by IR. It is very simple to use and has high cost-effectiveness. It can output 100-210 mA current. The IR2101 driver can drive a group of power tubes. The entire power circuit only needs 3 pieces, which not only saves manufacturing costs, but also improves system stability.
3.2 Overcurrent feedback and overcurrent protection circuit
The current feedback and overcurrent protection monitoring circuit is shown in Figure 7. The current on the bus passes through 2 milliohms and is differentially amplified by 1 mV358. After first-order filtering, it is input to the AD sampling input terminal of the STM8S chip; and at the same time, this current signal is connected to the comparator Im2903 for motor overcurrent protection detection. When the bus current exceeds the set overcurrent protection threshold, the microprocessor enters the overcurrent protection state.
[page]
3.3 Zero-crossing detection circuitThe zero-crossing detection circuit is shown in the figure below. Figure 8 is the U-phase zero-crossing detection circuit, where PHASE_U is connected to the U-phase of the motor, Z_MS_U is the GPIO control signal of the microcontroller, and ZDtet_U is connected to the AD port of STM8S. The transistor Q31 plays the role of overvoltage protection and emitter follower for the AD port, and improves the input impedance. R91 and D20 play the role of accelerating the discharge of the transistor base. When PWM is "ON", Z_MS_U is low level, R92, R93 and R89 form a voltage divider circuit. When PWM is "OFF", Z_MS_U is high impedance, R89 does not work, and the motor back electromotive force signal directly enters the AD sampling end through Q31.
4 Experimental environment
A complete 48 V air conditioner compressor system test platform is shown in Figure 9; the system power supply voltage is 48 V, the rated power of the brushless DC motor is 600 W, and the rated speed is 3600 rpm. The power device uses IRFB4310 from IR. VDSS = 100 V, Rds(on) = 5.6 mΩ, Id = 140 A (Tc = 25°), Id = 97 A (Tc = 100°).
5 Conclusion
This system uses H-PWM-L-ON modulation mode and fast demagnetization technology to achieve the goal of stable operation and non-step-out commutation of the brushless DC motor. And through the three-stage starting method, the static starting of the brushless DC motor is completed, and the application of back-EMF detection method in the position sensorless brushless DC motor control system is realized. The experimental results show that the zero-crossing detection method used can work well under the compressor load.
Previous article:Design and simulation of LLC resonant converter based on UC3863 control
Next article:Application of three operation modes of TMS320F2812 in SRM control
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
- AG9311DEMO board circuit design schematic diagram | PD TYPE-C to HDMI solution design principle question
- [Program source code] Freescale MAPS-K64 development board program example
- Award-winning online seminar | The industry's most powerful MPS multi-phase controller power solution helps the Internet/IoT take off
- MicroPython upgraded to v1.12
- I would like to ask, how is the transformer in a single-tube transformer-coupled amplifier magnetically reset?
- Sensor materials for learning at home: the hottest collection of EE sensor materials
- [RVB2601 Creative Application Development] Unboxing
- E103-W01-BF Unboxing and Brief Introduction
- SensorTile.box trial (unboxing and mobile APP connection)
- [Silicon Labs Development Kit Review] +Si7021 Temperature and Humidity Sensor Detection