Design of Inverter Power System Based on 16-bit Single-chip Microcomputer

Publisher:HuanleLatest update time:2012-01-04 Keywords:8XC196MC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

Recently, inverter power supply has been widely used in various industries. This paper introduces the design of an inverter power supply system with 16-bit single-chip microcomputer 8XC196MC as the core. 8XC196MC integrates a 3-phase waveform generator WFG. This peripheral device greatly simplifies the control software and external hardware for generating synchronous pulse width modulation waveforms. It can form a minimum single-chip microcomputer system and coordinate the generation of SPWM waveforms and the detection, protection, intelligent control, communication and other functions of the entire system.

2. Basic principles of power supply system

The power supply is fed with 24V DC from the battery, which is then inverted into an SPWM waveform through a bridge inverter circuit and then output as a sine wave through a low-pass filter. The SPWM waveform is generated by the 8XC196MC 3-phase waveform generator WFG, which can output a sine wave of the required voltage and frequency.

3. System hardware design

The inverter power system can realize frequency modulation and voltage regulation. Through A/D conversion, the voltage is automatically adjusted by feedback to make the output waveform stable. The three-phase voltage value and frequency can be displayed by digital tubes. By using MAX232E, it can communicate with PC to realize remote control and monitoring. The hardware block diagram of the system is shown in Figure 1.

3.1 SPWM waveform generation circuit

The SPWM waveform is completed under the control of the dedicated register WFG of 8XC196MC.

Features of WFG:

There are three synchronous PWM modules on the chip, each module contains a phase comparison register, a dead time generator and a pair of programmable outputs. WFG can generate three independent pairs of PWM waveforms, but they have a common carrier frequency, dead time and operation mode. Once started, WFG only requires the CPU to intervene when changing the PWM duty cycle.


How WFG works:

1. The time base generator establishes the carrier period for SPWM. The period value depends on the value of WG-RELOAD

2. The phase drive channel determines the duty cycle of the SPWM waveform, with programmable output. Each phase driver contains a programmable no-signal time generator;

3. The control circuit is used to determine the operating mode and other register configuration information.

WFG has two types of interrupts: WFG interrupt and EXTINT interrupt.

WFG interrupt is generated when WG-COUNT is reloaded. Different working modes have different reload modes. In each PWM cycle, mode 0 generates a WFG interrupt when WG-COUNT=WG-RELOAD, and mode 1 generates an interrupt when WG-COUNT=WG-RELOAD and WG-COUNT=1.

The EXTINT interrupt is generated by the protection circuit. The interrupt generation mode can be programmed to detect overcurrent signals in the entire system and protect power electronic switching devices.

3.2 Driving and protection circuit

According to the design of traditional inverter drive circuit, the switching action of the device needs to be realized by an independent drive circuit, and the power supply of the drive circuit must be isolated from each other, which undoubtedly increases the difficulty of hardware circuit design and reduces the reliability of the inverter circuit. To solve the above problems, this paper selects the driver chip IR2130 of IR Company of the United States. The chip adopts the bootstrap drive mode, and the floating channel design enables it to drive the power tube with a bus voltage less than 600v, and the switching frequency can be from tens of hertz to hundreds of kilohertz. The clever use of its internal bootstrap technology can make it applicable to high-voltage systems, and can also generate a 2 microsecond interlocking signal for the gate drive signal of the upper and lower bridge arm devices, and set the undervoltage protection function, which can easily design overvoltage and overcurrent protection.

In practical applications, some issues should be noted, especially the strict design and selection of bootstrap diodes and bootstrap capacitors. The recovery time of the bootstrap diode is very important. This design uses a fast recovery diode, and its withstand voltage must be greater than the bus peak. The capacity of the bootstrap capacitor is determined by the gate drive requirements and the maximum turn-on time of the power tube. It must be ensured that the capacitor is charged to a sufficient voltage, and the voltage across it is not lower than the undervoltage protection action value when discharged. Generally, when the driving switching frequency is greater than 5K Hz, the capacitance should not be less than 0.1 . The matching of the power supply capacitor capacity is also very important, and its value must be at least ten times that of the bootstrap capacitor. The chip has an internal overcurrent protection function, which can quickly shut down the PWM output in the event of an overcurrent or direct-through fault.

As long as the bootstrap capacitor, power supply capacitor and bootstrap diode are properly selected, the drive circuit of this device can work very reliably.

3.3 Display and communication interface

The display part uses HD7279A to drive 8-bit common cathode digital tubes at the same time. The chip is completely controlled by a single-chip microcomputer, with a simple interface and flexible control method.

Display content: three-phase voltage, three-phase current, frequency, various protection status.

The MAX232E is used for level exchange when communicating with the PC. This chip generates TTL (MCU side) level and RS-232 (PC side) level. The serial communication port is connected to the PC serial port through MAX232E.

4. System software design


Software programming is the core of the entire inverter system, which determines the characteristics of the inverter output, such as voltage range and stability, harmonic content, protection function improvement, reliability, etc. The software block diagram is shown in Figure 2.

4.1 Initialization

Calculate the sine pulse width within a cycle, initialize the I/O port and WFG waveform generator, and set the carrier cycle and dead time.

In mode 0, the calculation formula of the carrier period T C is:

Tc =(2×WG-RELOAD)/Fxtal (μs)

Ignoring the no-signal time, the duty cycle is:

Duty cycle = (WG-COMPx/WG-RELOAD) × 100%

4.2 Frequency Regulation and Output Voltage Regulation

By changing the time constant in WG-RELOAD, the output frequency can be adjusted. Usually, the synchronous modulation relationship is maintained, that is, the frequency modulation ratio remains unchanged, mf = constant. In order to ensure that the output voltage remains unchanged during the frequency adjustment process, when changing the content of G-RELOAD, the value in WG-COMPx is changed comparatively.

Due to the change of load, the output voltage is unstable. To achieve good dynamic voltage regulation characteristics, output voltage feedback closed-loop control is adopted. The algorithm used is incremental digital PID:

Δu(k)=u(k)-u(k-1)=kp[e(k)-e(k-1)]+k1e(k)+kD[e(k)-2e(k-1 )+e(k-2)]

By correcting the pulse width of each switching cycle according to the result of PID, the purpose of voltage regulation can be achieved.

4.3 External serial interface program

The serial communication mode of 8XC196MC microcontroller is very effective in practical applications. Its flexibility and practicality are unmatched by other independent serial ports. Using EPA and PTS to realize serial communication can complete the RS232 communication with the PC to send and upload data.

5. Experimental analysis

Using the above scheme, a prototype was manufactured for testing. The experimental parameters are: DC 24V voltage input, carrier frequency 9.6KHz , main circuit power tube IRF540, DC side capacitor C=470uF, transformer turns ratio 1:10, output filter inductor Lf = 6mH, output filter capacitor Cf = 30uF.

Figure 3 is the test output waveform:


Figure 3 Output voltage waveform


6. Conclusion

The power supply equipment has a reasonable structure, small size, low cost and stability. The test shows that the inverter power supply has a good output waveform, can achieve voltage and frequency regulation, has good dynamic characteristics and high reliability. The innovation of this article is that the control circuit is greatly simplified and fully digitalized, and the system can be intelligently controlled and remotely monitored.

References:


[1] Cheng Jun. Intel80 C196 MCU Application Practice and C Language Development [M]. Beijing: Beijing University of Aeronautics and Astronautics Press

Keywords:8XC196MC Reference address:Design of Inverter Power System Based on 16-bit Single-chip Microcomputer

Previous article:EPP parallel port communication technology based on uPSD3254A single chip microcomputer
Next article:Design of intelligent reactive power compensation controller based on MSP430 single chip microcomputer

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号