Design of variable frequency speed control system based on AT89C51 single chip microcomputer

Publisher:AdventureSeekerLatest update time:2010-02-03 Keywords:PWM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Overview

In the field of electrical transmission, with the continuous improvement of the technical level of self-shutoff devices, pulse width modulation technology (PWM technology for short) has also become increasingly mature. PMW AC variable frequency speed regulation has been widely used in underground fans, water pumps, paper machines and other equipment due to its advantages of high efficiency, high power factor, good output waveform and simple structure. Applying single-chip microcomputers to AC variable frequency speed regulation systems can effectively avoid some shortcomings of traditional speed regulation schemes and achieve the purpose of improving control accuracy [1]. Its characteristics are:

(1) The use of a single-chip microcomputer allows most control logic to be implemented through software, simplifying the circuit.

(2) The single-chip microcomputer has stronger logical functions, faster computing speed, higher precision, and large-capacity storage units, which can achieve more complex control.

(3) No zero drift and high control accuracy.

(4) It can provide human-machine interface and multi-machine networking.

According to the latest research results and trends of variable frequency speed regulation at home and abroad, and referring to a large amount of literature and materials, the system structure block diagram shown in Figure 1 was designed based on the system design principles of balancing advancement and maturity, standardization, reliability, continuity and timeliness.

System structure diagram

Figure 1 System structure diagram

Rectification circuit

Figure 2 Rectification circuit

The whole circuit is divided into three parts: the main circuit, the drive circuit and the control circuit that uses a single-chip microcomputer to control the PWM generator. In addition, there is an over-current detection and protection circuit, which makes the system work more stable and reliable.

2. System main circuit design

2.1 Design of rectifier and filter circuit

In order to provide a stable DC voltage for the inverter, the AC power input from the power grid needs to be rectified. Generally, the rectifier circuit can be divided into controlled rectifier and uncontrolled rectifier. Controlled rectifier can make the power factor of the system close to 1, and has smaller ripple, high frequency, and can reduce the filter capacitor with smaller amplitude. However, the use of controlled rectifier circuit will increase the system cost and make the control circuit complicated.

At present, the most economical and reliable solution is to use diode rectification to make the power factor of the power grid independent of the inverter output voltage and close to 1. In this system, we use three-phase diode uncontrolled rectification, as shown in Figure 2. It does not require a control circuit drive, and the circuit is simple, reliable, and low-cost. The disadvantage is that the ripple is large, and a large-amplitude filter capacitor is required.

2.2 Design of three-phase inverter circuit

Three-phase AC loads require three-phase inverters. Among the three-phase inverter circuits, the most widely used is the three-phase bridge inverter circuit [2]. The voltage-type three-phase inverter circuit using IGBT as the controllable element is shown in Figure 3. It can be seen that the circuit consists of three half-bridges.

Three-phase inverter circuit

Figure 3 Three-phase inverter circuit

IR2110 driving half-bridge circuit

Figure 4 IR2110 driving half-bridge circuit

The basic working mode of the voltage-type three-phase inverter bridge is the same as that of the single-phase inverter bridge, which is the conduction mode, that is, the conduction angle of each bridge arm is that the upper and lower arms of the same phase (the same half bridge) conduct alternately, and the time when each phase starts conducting is sequentially different. In this way, at any moment, three bridge arms will be turned on at the same time. It may be one arm on the top and two arms on the bottom, or it may be that one arm on the top and two arms on the bottom is turned on at the same time. Because each commutation is carried out between the upper and lower bridge arms of the same phase, it is also called longitudinal commutation. Use T as the period, just pay attention to the interval of T/3 (T is the period) between the three phases, that is, B phase lags behind A phase by T/3, and C phase lags behind B phase by T/3.

The specific turn-on sequence is as follows:

The first T/6: V1, V6, V5 are turned on, V4, V3, V2 are turned off; the second T/6: V1, V6, V2 are turned on, V4, V3, V5 are turned off;

The third T/6: V1, V3, V2 are turned on, V4, V6, V5 are turned off; the fourth T/6: V4, V3, V2 are turned on, V1, V6, V5 are turned off;

The 5th T/6: V4, V3, V5 are turned on, V1, V6, V2 are turned off; the 6th T/6: V4, V6, V5 are turned on, V1, V3, V2 are turned off.

3 Design of drive circuit and system protection circuit

3.1 Design of driving circuit

As a power switching device, the working state of IGBT is directly related to the performance of the whole machine, so it is particularly important to select or design a reasonable drive circuit. Using a drive circuit with good performance can make the IGBT work in a relatively ideal switching state, shorten the switching time, and reduce the switching loss, which is of great significance to improving the operating efficiency, reliability and safety of the whole device.

The drive circuit must have two functions: one is to achieve electrical isolation between the control circuit and the gate of the driven IGBT; the other is to provide appropriate gate drive pulses [3].

The requirements for the drive circuit can be summarized as follows:

1) Both IGBT and MOSFET are voltage driven, both have a voltage of 2.5~5V and a capacitive input impedance. Therefore, IGBT is very sensitive to gate charge. Therefore, the drive circuit must be very reliable and ensure a low-impedance discharge loop, that is, the connection between the drive circuit and the IGBT should be as short as possible.

2) Use a driving source with low internal resistance to charge and discharge the gate capacitance to ensure that the gate control voltage Uge has sufficiently steep leading and trailing edges to minimize the switching loss of the IGBT. In addition, after the IGBT is turned on, the gate driving source should be able to provide sufficient power to prevent the IGBT from exiting saturation and being damaged.

3) The driving circuit must be able to transmit pulse signals of tens of kHz.

4) Under large inductive loads, the switching time of the IGBT cannot be too short to limit the peak voltage formed by di/dt and ensure the safety of the IGBT.

5) The gate drive circuit of IGBT should be as simple and practical as possible. It is best if it has its own protection function for IGBT and has strong anti-interference ability.

This article uses the IR2110 integrated driver launched by the American IR company to drive the IGBT. It has the advantages of small size, high speed and simple circuit, and is the preferred type of driver device in small and medium power conversion devices.

The driver chip IR2110 is used to drive the half-bridge circuit as shown in FIG4 .

3.2 Current detection and overcurrent protection circuit

When the current flowing through the IGBT exceeds the safety zone, the IGBT will be permanently damaged. Therefore, the system needs to set up a current overcurrent protection circuit. The system connects a current transformer in series with the DC part of the inverter to convert the current into a voltage signal and then compares it through a comparator. After the overcurrent signal is detected, it is sent to the pulse blocking end (level signal) of SA828l, and then SA828l will stop outputting PWM pulses to protect the IGBT. The overcurrent protection circuit of IGBT is shown in Figure 5.

IGBT current protection circuit
Figure 5 IGBT current protection circuit

The operational amplifier C814 forms a voltage follower, and its input comes from the output of the current transformer. Two voltage comparators C271 form a window voltage comparator, and the output of the comparator is connected to the input of the AND gate through a Schmidt inverter. When the IGBT has no overcurrent, the input voltage of C814 is relatively low, and the window voltage comparator outputs a high level, so the EN signal is high, making the IGBT drive signal effective; conversely, when the IGBT has an overcurrent, the EN signal becomes a low level, blocking the IGBT drive signal and turning off the IGBT. By adjusting the potentiometer RP, the size of the overcurrent threshold can be changed.

The principle of the overvoltage protection circuit is similar to that of the current protection circuit. In addition, a 10A fast-acting fuse should be installed on the main circuit. When a serious overcurrent occurs in the circuit, the fast-acting fuse will burn out and cut off the power supply to the grid, thereby ensuring the safety of the main circuit as much as possible.

4. Control circuit hardware and software design

The three-phase SPWM generator is the core part of the control circuit. In this design, we selected the AT89C51 microcontroller to control the dedicated integrated chip SA8281 of the British MITEL company as the SPWM waveform generator. This chip is easy to interface with the microprocessor and can form a complete SPWM control circuit without adding any logic circuit. It has a compact structure, improves the integration and reliability of the system, and helps reduce costs.

4.1 SA8281 Function Introduction

The SA8281 chip is designed by MITEL for AC motor speed control, UPS power supply and other power electronic devices that require pulse width modulation as an effective power control [4]. The pins are shown in Figure 6:

Pinout of SA8281
Figure 6 Pinout of SA8281

Connection diagram between MCU and SA8281

Figure 7 MCU and SA8281 connection diagram

[page]

It is a programmable microcomputer peripheral interface chip that can be used to generate three-phase PWM waveforms. It uses a set of standard MOTEL buses and is suitable for both Intel and Motorola bus interfaces. It has good interface versatility and is simple, convenient and fast to program and operate.

SA8281 uses the commonly used symmetrical double-edge sampling method to generate a fully digital PWM waveform with no time drift or temperature drift, and has high accuracy and temperature stability.

There are 6 standard TTL level outputs to drive the 6 power switching devices of the inverter.

The operating frequency range is wide, the precision is high, and the triangular carrier frequency is adjustable.

The working mode is flexible. Under the condition that the circuit remains unchanged, the performance indicators of the inverter can be changed by directly setting the working parameters such as carrier frequency, modulation frequency, modulation ratio, minimum pulse width, dead time, etc. through the software, so as to drive different loads or work in different working conditions. The forward and reverse rotation of the motor can be achieved by changing the phase sequence of the output SPWM pulse, and the output frequency can be modulated to 0Hz to pass DC power to the motor winding, so as to realize the "DC insertion braking" of the motor.

The independent blocking terminal can instantaneously block the output SPWM pulse to handle sudden motor failures.

The waveforms are stored in internal ROM, with selectable minimum pulse width and dead time which can be deleted.

4.2 Implementation of control hardware circuit

The single-chip microcomputer used in the control circuit is the AT89C51 launched by ATMEL. It adopts CMOS structure, has low power consumption, strong anti-interference ability, is fully compatible with the MCS-51 series, and has much more powerful functions than the general 51 series chips. It contains 128 bytes of RAM and 4K bytes of EPROM to fully meet the system requirements. No external RAM or EPROM is needed to store data or programs, but the parameters that need to be set and saved are stored in an EEPROM [5].

The schematic diagram of the sine wave generator is shown in Figure 7. It uses SA8281 as the three-phase sine wave generating chip and the single-chip microcomputer AT89C51 as the control chip of SA8281. SA8281 integrates most of the peripheral circuits inside the chip. It can be seen that SA8281 has a simple interface with the microprocessor, a very simple control circuit, and a compact structure. This is very helpful for the stability of the chip and improves its reliability.

From the perspective of the entire circuit, the control of SA8281 is realized by inputting the corresponding information through the key. The design of this circuit needs to input the initialization parameters and control parameters of SA8281, so three keys 0#, 1# and 2# are used. In the main program, the key number is judged by the query type. Pressing the 0# key will enter the initialization subroutine; pressing the l# key will enter the acceleration subroutine; pressing the 2# key will enter the deceleration subroutine.

AT89C51 is a single-chip microcomputer with multiplexed address and data bus. In order to isolate potential noise interference, the output disconnect pin SETTRIP is set to ground under normal circumstances. At the same time, a switch is set to quickly shut down all PWM outputs in an emergency. To make the PWM output in an effective state, the output shutdown pin is connected to a high level [6]. The external clock CLK pin is connected to an independent 12M active crystal oscillator to provide a clock reference for the SA8281 chip to control various timings related to PWM.

4.3 Control circuit software design

The control of SA8281 chip is realized by sending the corresponding parameters into two 24-bit registers R4 and R3 inside the chip through the microprocessor interface. They are initialization register and control register. The data is first read into a series of temporary registers R0~R2, and then transferred to the corresponding R4 and R3 registers through a virtual write operation.

The initialization register is used to set some basic parameters related to the motor and inverter. Under normal circumstances, these parameters are initialized before the motor works (for example, before PWM output is allowed), and are generally not allowed to change while the motor is working.

The control register controls the state of the output pulse width modulation wave during operation, thereby further controlling the operation of the motor, such as speed, forward/reverse, start and stop, etc. Usually, the content of this register is often rewritten when the motor is working to achieve real-time control of the motor. The program flow chart is explained below:

4.3.1 Main program

The main program determines the key number using the query type:

Press the O# key to enter the initialization subroutine; press the 1# key to enter the acceleration subroutine; press the 2# key to enter the deceleration subroutine.

In addition, in order to prevent misoperation, a delay de-jittering re-judgment key number link is added. The main program flow chart is shown in Figure 8:

Main program flow chart

Figure 8 Main program flow chart

SA8281 initialization subroutine flow chart

Figure 9 SA8281 initialization subroutine flow chart

4.3.2 Initialization subroutine

The basic parameters related to the motor and inverter need to be set in the initialization subroutine, including the carrier frequency, modulation wave frequency range, pulse delay time, minimum deletion pulse width, modulation waveform selection, amplitude control setting, etc.

The data of the initialization register is first stored in temporary registers R0, R1 and R2 in 8-bit format, and then stored in the initialization register through the virtual write operation R4.

Normally, these parameters should not be changed during motor operation.

The SA8281 initialization subroutine flow is shown in Figure 9:

4.3.3 Speed ​​Control Subroutine

The speed control subroutine includes the acceleration subroutine and the deceleration subroutine. This article only introduces the acceleration subroutine. The deceleration subroutine is similar to the acceleration subroutine.

The flow chart of the acceleration subroutine is shown in Figure 9. The control parameters include the modulation wave frequency control word and the modulation wave amplitude control word, which are obtained by calculation. The method is: first, the frequency and amplitude of the modulation wave are obtained according to the U/F curve of the motor, and then the corresponding control word is calculated by the formula and made into a table. In the program design of this article, the table lookup method is used to realize the transmission of the two control parameters. The comparison of the modulation wave frequency and amplitude is shown in Table 1. The flow chart of the acceleration subroutine is shown in Figure 10:

Table 1 Comparison of modulation wave frequency and amplitude

Modulation wave frequency and amplitude comparison table

Acceleration subroutine flow chart
Figure 10 Flowchart of the acceleration subroutine

5 Conclusion

In this paper, when designing the variable frequency speed control system, the control chip uses the single chip microcomputer AT89C51, SA8281 is used as the sine wave generator, and the IR2110 chip is used to drive it. In addition, considering the stability of the system, the system protection circuit is designed. In this way, the whole system has the characteristics of low cost, full functions, and great practical value. At present, the variable frequency speed control market in my country is gradually growing, and the demand is becoming more and more extensive. Therefore, the research on the variable frequency speed control system has important academic significance and application value.

Keywords:PWM Reference address:Design of variable frequency speed control system based on AT89C51 single chip microcomputer

Previous article:Design of Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer
Next article:Design and implementation of computer temperature acquisition system based on VB

Recommended ReadingLatest update time:2024-11-16 16:22

Building a Digitally Programmable Gain Amplifier with Negative Time Constant
A digitally programmable gain amplifier (DPGA) amplifies or attenuates an analog signal to maximize the dynamic range of an analog-to-digital converter (ADC). Most monolithic DPGAs use a multiplexed multiplying digital-to-analog converter (DAC) in the feedback loop of an op amp, such as the Maxim LTC6910 and National
[Power Management]
Building a Digitally Programmable Gain Amplifier with Negative Time Constant
LOTO Lesson 1: RC Resistor-Capacitor Practice --- Low-Pass Filter PWM to DC
Resources used in practice: 1.5K resistor, 22u capacitor, LOTO oscilloscope, adjustable PWM wave. Note: The selection of resistance and capacitance values ​​does not need to be accurate. In fact, it is enough to combine a low-pass filter with a very low cutoff frequency. For example, the values ​​selected above are
[Test Measurement]
LOTO Lesson 1: RC Resistor-Capacitor Practice --- Low-Pass Filter PWM to DC
Using internal timer interrupt to generate PWM speed regulation
      When the timer generates a second interrupt, the program will execute the interrupt service program for the second time. Similarly, the judgment statement if(t==0){tmp1=m1;} is executed first. Since the value of t has been added "1" when the first interrupt and the interrupt service program are executed, that is,
[Microcontroller]
STM32 learning notes - PWM basics and 720 motor drive
1. Definition Pulse Width Modulation: It is a very effective technology that uses the digital output of a microprocessor to control analog circuits. It is widely used in many fields from measurement, communication to power control and conversion. (Baidu Encyclopedia) It is a method of digitally encoding the analog sig
[Microcontroller]
STM32 learning notes - PWM basics and 720 motor drive
STM32 generates 7 PWM waves
The two advanced timers TIM1 and TIM8 in the STM32 timer can generate 7 PWM waves because they have 7 pin channels respectively:  Channel 1  TIM1_CH1  PA8  Channel 1  TIM1_CH1N  PB13  Channel 2  TIM1_CH2  PA9  Channel 2  TIM1_CH2N  PB14  Channel 3  TIM1_CH3  PA10
[Microcontroller]
MSP outputs PWM waveform with adjustable duty cycle in real time
// PWM with adjustable duty cycle, I haven't tried it, I don't have a microcontroller, just note it down.   #include   msp430x14x.h       void main(void)    {        volatile unsigned int i;              WDTCTL   = WDTPW + WDTHOLD;                 // Stop WDT        BCSCTL1 |= XTS;                             // ACLK=
[Microcontroller]
Is it difficult to change LED brightness linearly? PWM duty cycle can help you
Duty cycle is the ratio of power-on time to power-on cycle, and is often used to adjust more precise parameters. A typical application is the adjustment of the brightness of LED lighting equipment. This article will introduce how to ensure that the brightness of the LED changes linearly by adjusting the duty cycle of
[Power Management]
Is it difficult to change LED brightness linearly? PWM duty cycle can help you
PWM logic circuit and output circuit
In Figure 1, V8 is the oscillation pulse generated by the oscillation circuit, and its duty cycle is 50%. The pulse determines the operating frequency of the switching device. V1 is the voltage drop on the primary current sampling resistor, V2 is the feedback value of the output voltage, and V3 is the signal used to dr
[Power Management]
PWM logic circuit and output circuit
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号