Optimization Design of Switching Power Supply Based on 89C51 Single Chip Microcomputer

Publisher:亚瑟摩根Latest update time:2011-10-10 Keywords:89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

The switching power supply is a new type of voltage-stabilized power supply that uses modern power electronics technology to control the ratio of the time when the power switch tube (MOSFET, IGBT) is turned on and off to stabilize the output voltage. Since the 1990s, switching power supplies have been introduced into various electronic and electrical equipment fields. Computers, programmable switches, communications, electronic testing equipment power supplies, control equipment power supplies, etc. have all widely used switching power supplies. Using a switching power supply controlled by a single-chip microcomputer can make the switching power supply have more complete functions, further improve intelligence, and facilitate real-time monitoring. Its functions mainly include detecting the switching power supply in operation and automatically displaying the power status; it can be programmed and controlled by buttons; it can perform fault self-diagnosis and realize automatic monitoring of the power part of the power supply; it can protect the power supply from overvoltage and overcurrent; and it can control the battery charging and discharging in real time.

System structure of switching power supply

The structure diagram of the -48V switching power supply for communication is shown in Figure 1:

Figure 1 Switching power supply structure diagram

After rectification, filtering and power factor correction, the mains power is converted into high-voltage direct current, and then the required direct current voltage is obtained through the DC/DC conversion circuit. The control circuit samples from the output end and compares it with the set reference, and then controls the inverter to change the conduction frequency or conduction/cutoff time of the power switch tube to stabilize the output; on the other hand, according to the data provided by the detection circuit, after identification by the protection circuit, the control circuit is used to perform various protections on the whole machine and control the charge and discharge of the battery. The control circuit is the core part of the entire switching power supply. The control circuit of a general switching power supply mainly consists of a detection comparison amplifier circuit, a voltage-pulse width conversion circuit (or a voltage-frequency conversion circuit), a clock oscillator (or a constant pulse width generator), a base drive circuit, an overvoltage and overcurrent protection circuit, and an auxiliary power supply. There are disadvantages such as complex circuits, high power consumption, poor sensitivity, and inability to achieve good control.

The control circuit is composed of the single-chip microcomputer 89C51 module, which has many advantages such as programmability, powerful functions, simple control, high integration, etc. It also improves the shortcomings of the original circuit. Its principle block diagram is shown in Figure 2.

Figure 2 MCU control power supply structure diagram

This intelligent switching power supply uses the basic circuit of the switching power supply for communication, and takes the high-performance single-chip computer 89C51 as the control core to form a data processing circuit. Under the support of detection and control software, the output current and voltage of the switching power supply are sampled and compared with the given data, so as to adjust and control the working state of the switching power tube, and monitor the output current size and perform current control at the same time. The working principle of the circuit is: the city power is converted into direct current through rectification and filtering, and the power correction circuit PFC (Power Factor Correct) is sent to the power conversion circuit (DC/DC). The power conversion circuit outputs a stable DC voltage under the control of the pulse width modulation circuit (PWM) and the single-chip computer. Users can set the output voltage value and maximum output current value of the switching power supply through the keyboard as needed. The single-chip computer system automatically samples the output voltage and current of the power supply, and compares it with the user's given data, and then controls the switch adjustment circuit according to the set adjustment algorithm to make the output voltage of the power supply meet the given value. While adjusting the output voltage of the power supply, the single-chip computer also detects the output current of the circuit. When the output current exceeds the given value, the protection circuit is activated to realize the protection function. In order to make the intelligent switching power supply work reliably and safely, this system is equipped with multiple monitoring and protection systems, mainly including overcurrent protection and short circuit protection. The single-chip microcomputer system detects the output current of the switching power tube through the current sensor. When the current exceeds the given value, the single-chip microcomputer system cuts off the switch excitation signal and sends out an audible and visual alarm, and detects the working condition of the battery.

Control Circuit

The control circuit uses ATMEL's 89C51 single-chip microcomputer, and expands the A/D, D/A, keyboard display, and RS232 communication port circuits. The principle structure is shown in Figure 3.

Figure 3 Control circuit principle diagram

The control system controls the on and off time of the power conversion switch through the I/O input port through D/A conversion to stabilize the output voltage. The output voltage and current of the switching power supply are sampled through A/D conversion, and the overvoltage, overcurrent protection and current limiting functions are realized through the system software. At the same time, a dual closed-loop control system is adopted. When the switching power supply is working, the voltage feedback is used to realize the voltage stabilization function of the output voltage by PWM control, and the control closed loop is a voltage loop or a current loop; when the battery is charged or overloaded, the current signal is used as feedback to control the charge and discharge current of the battery and realize the overload protection function. In order to accurately control the voltage output of the switching circuit, the high-frequency pulse signal of the single-chip microcomputer is divided into a suitable switching pulse signal as the counting pulse and gate signal of 89C51. The single-chip microcomputer compares the given value with the signal collected by the sensor to generate an error signal. According to the voltage control algorithm, 89C51 is set to generate square wave signals with different duty cycles (0-90%), and the switch is controlled by the photoelectric coupler to adjust the circuit voltage output. The output end is optically isolated from the switching circuit, thereby preventing the interference signal from the switching power supply circuit from affecting the normal operation of the single-chip microcomputer system.

In view of the high precision and fast adjustment characteristics of the output voltage of the controlled switch circuit, an improved PID control algorithm can be used, which has the advantages of fast voltage adjustment, small overshoot, and stable performance. The keyboard and display part are installed on the instrument operation panel, consisting of 8-bit LED digital tubes, 3 LED indicator lights and 16 keys, of which 4-bit digital tubes display the power supply voltage, 4-bit digital tubes display the current, and 3 LED indicator lights are used as alarm displays. [page]

System software design

This software mainly completes signal sampling, various data processing, and control of the power conversion part. This system software mainly includes key switch scanning program, fault judgment subroutine, equalization and floating charge subroutine, interruption detection subroutine and communication subroutine. The main program flow chart is shown in Figure 4.


Figure 4 Main program flow chart



During the initialization process, first reset the input ports of 89C51, then read the data stored before the last shutdown from EEROM, control the switch circuit, and display it. After the initialization is completed, start the interrupt program. If there is an interrupt request, respond, otherwise perform data sampling and read the given value, and then perform data processing; if a short circuit or overcurrent occurs, call the alarm protection subroutine; if the battery floats to a certain degree of dynamics, it can reflect the changes inside the battery and the size of SoC to a certain extent, but this method assumes that the current is time-varying during the derivation process. If the battery is discharged at a constant current for a long period of time, the accuracy of SoC prediction will be greatly reduced. The dynamic model based on the state space establishes a model based on the dynamic changes of the reactants, calculates the SoC with the measured current and voltage as input, and considers the diffusion phenomenon of the active substance to improve the accuracy of the SoC. It is a better method; but due to the high order of the battery model, the calculation is more difficult, and the establishment of the model requires the determination of a considerable number of empirical parameters, which brings great trouble to the application.

The definition of SoC based on the energy model corrects the shortcomings of the original SoC model. Taking into account the recoverability of the battery, it integrates the current, voltage, and resistance judgments, which improves the judgment accuracy of SoC to a certain extent. However, it does not consider the influence of temperature and requires a large amount of test data. Since the battery is sealed, the only external measurable parameters are current and voltage. Using the Randels Ershler battery model to model the battery and estimate the SoC through precise ampere-hour integration, while performing capacity aging compensation, temperature compensation, self-discharge compensation, and discharge rate compensation, is also a feasible method.

The above methods can reflect the remaining power to a certain extent and are suitable for predicting the SoC of batteries for electric vehicles. However, the determination of these model parameters requires many repeated iterations, and importantly, these algorithms must know the initial SoC value of the battery. Because it takes time to calculate and display the SoC value in real time. The more complex the model, the more time it takes to calculate the SoC. There are many SoC prediction methods, but to achieve higher accuracy, there is still a lot of work to be done in battery modeling and SoC prediction methods.

Keywords:89C51 Reference address:Optimization Design of Switching Power Supply Based on 89C51 Single Chip Microcomputer

Previous article:Design of 51 single chip microcomputer for temperature acquisition and control system
Next article:Design of multifunctional AC voltage regulated power supply based on 89C2051

Recommended ReadingLatest update time:2024-11-16 15:29

89C51 MCU realizes the running light
/******************************************* Copyright: 2014.02.09.version1.0 File name: led.c Description: DIY running light 89C51 Author: lxl Version: version1.0 Date: 2014.02.09 History: None **************************************************/ #include reg51.h /**********
[Microcontroller]
89C51 single chip microcomputer timer controlled water lamp
/******************************************************* Copyright: 2014-02-11.version1.0 File name: timer.c Description: Flow light controlled by timer interrupt Author: lxl Version: version1.0 Date: 2014.02.11 History: None **********************************************************/
[Microcontroller]
Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer
Introduction Environmental noise monitoring is an important part of improving the quality of life and strengthening environmental protection. In the busy streets and residential areas of major cities, large environmental noise displays have been erected on the streets. However, most of the portable noise teste
[Microcontroller]
Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer
Interrupt System in 89C51 Single Chip Microcomputer
The interrupt system is a difficult point in learning single-chip microcomputers. If the interrupt system is not thoroughly understood, the study of 51 single-chip microcomputers will be considered a failure. First, let's take an example to explain what an interrupt is. For example, when you are eating popcorn and
[Microcontroller]
Interrupt System in 89C51 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号