Development of air conditioner compressor controller based on STM8S208RB

Publisher:HuanleLatest update time:2012-05-11 Source: 单片机与嵌入式系统 Keywords:STM8S208RB Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Brushless DC motors have the advantages of simple structure, high efficiency, high power factor, small moment of inertia, and low noise. In recent years, the research and application of permanent magnet brushless DC motors have attracted more and more attention. With the country's emphasis on energy conservation and emission reduction. More and more air-conditioning manufacturers are applying brushless DC motors to variable frequency air-conditioning compressors. In traditional brushless DC motor drive control systems, rotor position and speed information are required as feedback signals, and the rotor position and speed are almost always obtained using precise mechanical devices such as photoelectric encoders and rotary transformers. In air-conditioning compressors, due to the strong corrosiveness of refrigerants, conventional position sensors are difficult to work properly. Therefore, studying a reliable and low-cost position sensorless control method has become one of the hot spots in the study of brushless DC motor controllers. This paper uses the low-cost, high-performance STM8S208RB microprocessor launched by ST in recent years as the control core, and uses the on-chip AD to directly sample the terminal voltage of the non-conducting phase as the detection scheme, which has a high cost-effectiveness and realizes the design of variable frequency air-conditioning controllers.

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.

a.jpg


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:
b.jpg
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:
c.jpg [page]

2.3 Back-EMF zero-crossing detection technology
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.

d.jpg


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:
e.jpg
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.

f.jpg


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.

g.jpg



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.

h.jpg


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.

i.jpg

[page]

3.3 Zero-crossing detection circuit
The 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.

j.jpg



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°).

k.jpg

l.jpg



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.

Keywords:STM8S208RB Reference address:Development of air conditioner compressor controller based on STM8S208RB

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号