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
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
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- AM335x Evaluation Board Quick Test (1)
- [TI mmWave Radar Review] Introduction to Sensor Management Module
- The relationship between FPGA memories
- How to choose a wireless communication module with long distance and fast speed?
- [Project source code] [Modelsim FAQ] No error but always shows Loading
- DB HiTek Completes Global Shutter and SPAD Technology Development to Further Expand Image Sensors
- 【XMC4800 Relax EtherCAT Kit Review】+ Getting Started with DAVE, Modbus Bus Comprehensive Application
- Celebrating the Golden 50th Anniversary of the Microprocessor
- iTOP-3399 development board Linux image burning (I)
- [Wireless serial port module quick selection guide] Communication frequency, chip, communication distance, power sensitivity, current air rate