2010年3月25日星期四

SPWM waveform achievement based STC series MCU (part 1)

SPWM waveform achievement based STC series MCU (part 1)




Abstract: In comparing a variety of SPWM wave is generated based on the technology, given the use of equivalent area method to generate SPWM waveform of the working principle described in detail by the microcontroller STCl2C5410AD programmable counter array PCA to achieve the preparation of SPWM control software process and gives the SPWM interrupt service routine flowchart. Results to be applied by the MICA421 drive driven by four MOSFET devices FQAl60N08 bridge inverter consisting of actual debugging, experimental results show that the method has a simple circuit, calculate the amount of small, strong advantages of real-time, using online computing and search table technology combination, the better solution of the real-time control requirements, has good application value.

Key words: STC12C5410AD; SPWM wave



0 Introduction

In recent years, with the power inverter applications in all walks of life increasingly widespread use of sinusoidal pulse width modulation (SPWM) inverter technology for the control to improve the control effect of the whole system is that people continue to explore the issue. SPWM control for a variety of implementations, one is analog circuits, digital circuits and other hardware circuitry generates SPWM waveform, the waveform of the method stable and accurate, but the circuit complexity, size large, can not be auto-adjustment; the other is with MCU, DSP and other micro-controller to achieve the number of SPWM control method, because of its internal integration of a number of control circuits, such as the PWM circuit, programmable counter array (PCA) and so on, makes this method has a control circuit is simple, fast, anti - the advantages of strong interference. This paper presents a series of single-chip microcomputer using STC method of SPWM waveform will be generated by the STCl2C5410AD unipolar SPWM wave applied to single-phase inverter power supply, test results show that the use of the feasibility of its implementation and effectiveness of SPWM waveform.



A sinusoidal pulse width modulation SPWM

SPWM control scheme, there are two: the unipolar and bipolar modulation modulation. France obtained unipolar SPWM signals positive, negative, and 0 of three levels, while the bipolar received only positive and negative two kinds of levels. Comparison of the two resulting SPWM waves we can see: in the same carrier than the case, the resulting bipolar SPWM wave contained in the large amount of harmonics; and in sinusoidal inverter control, bipolar SPWM wave control complex. Therefore, commonly used in the form of unipolar SPWM wave control.

SPWM controlled by the MCU, in accordance with its software, the different methods, there are several ways: natural sampling method, symmetry rules of law, rules of law and the area of asymmetric follow suit and so on and so on. Theoretical analysis showed that an area equivalent in terms of law in regard to other methods, harmonic minor, harmonic suppression ability. And real-time control simple and conducive to software implementation. Therefore, size, etc. In this paper, follow the example of realization of SPWM control.



Suppose the required output sinusoidal voltage U0 = Umsinωt, type in: Um for the sine-wave amplitude. Follow the example of the use of an area so small an area of sine-wave pulse area S1 and S2 correspond to the same principle, with the positive half cycle sine wave is divided into N equal portions, each of equal portions with a width of Wu / N, calculate the half-cycle N different pulse width values.



2 STC series microcontrollers generate SPWM Wave Principle

About 2.1 STC Series MCU

STCl2 Series MCU U.S. STC in 8051 improved on the basis of the standard kernel introduced an enhanced 8051 microcontroller functionality, from the pin to the instruction is completely compatible with the 8051. The most prominent feature is its programmable counter array PCA. To STCl2C5410AD, for example, there are four Programmable Counter Array PCA / PWM. PCA includes a special 16-bit timers, there are four 16-bit capture / compare modules associated with it. Four blocks of public time base the decision by the PCA timer, you can register through the PCA model CMOD SFR bits of CPSl and CPS0 determined. Each module programmable work in four kinds of modes: rising / falling edge capture, software timer, high-speed pulse output or PWM output. Paper SPWM generation function mainly relies on the completion of PWM pulse output mode. Figure 2 namely PCA module pulse width modulation PWM output mode block diagram.



In the PCA PWM output mode, when CLSFR's value is less than (EPCnL, CCAPnL), the output is low, when the PCA CL SFR is equal to or greater than the value of (EPCnH, CCAPnH), the output is high. When the value of CL overflows from FF to 00 hours, (EPCnH, CCAPnH) content onto the (EPCnL, CCAPnL) in the. This update enables interference-free PWM. Can make the PWM mode, the module CCAPMn register PWMn and ECOMn bits must be set. In this article, SPWM waveform is the integrated use of the module O, pulse width modulation (PWM) mode and the module 1 of the 16-bit software timer mode, software interrupts in the form of implementation.

At the same time, STCl2C54lO microcontroller also has a fast A / D conversion. There is a lO-bit precision, 8-way channel A / D converter. Can be easily input and output voltage, current monitoring and display.



To learn more about power inverter, please visite http://www.szpowerinverter.com/ and http://www.bestekltd.com/, or mail to sale38@0102.cn.

没有评论:

发表评论