Design of intelligent digital switching power supply based on 68HC908SR12

Publisher:SerendipityJoyLatest update time:2011-11-11 Source: 21icKeywords:68HC908SR12 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Compared with linear power supplies, switching power supplies have many advantages: because the main power transistor works in a switching state, its loss is small and the overall efficiency is greatly improved; the use of ferrite high-frequency transformers greatly reduces the size and weight of the power supply, and the cost is lower. The emergence of some dedicated power supply chips such as TL494 and UC3842 also makes the design of switching power supplies simpler and reliable. However, the output of a switching power supply made only with dedicated chips is usually a single state. If the output state is to be changed, the hardware circuit must be modified. The author designed and implemented a digital switching power supply controlled by a single-chip microcomputer, which effectively improved the above problems.

1 Design principle of digital switching power supply

The digital switching power supply designed by the author has a rated power of 12OW. The system uses the switching power supply as the basic circuit and a high-performance single-chip microcomputer as the control system. With the support of the control algorithm, the output voltage and current are sampled in real time and compared with the given values ​​of the software to control and adjust the working state of the switching power supply to obtain the expected value. It mainly includes five parts: input rectification and filtering correction, power conversion, auxiliary power supply part, drive circuit, and single-chip microcomputer control system. The power conversion part adopts a single-ended flyback conversion circuit. The auxiliary power supply provides power for the drive circuit. The drive circuit amplifies the PWM signal from the single-chip microcomputer and drives the main power transistor. The single-chip microcomputer system is the control core of the entire circuit. The duty cycle of the output PWM is controlled in real time through the change of the sampling value. The entire design strives to achieve the best performance and the lowest cost. Its structure is shown in Figure 1.

1.1 Main circuit analysis

The power conversion part adopts a single-ended flyback circuit, and the structure is shown in Figure 2. When the excitation pulse added to the primary main power switch tube Q1 is high level to turn on Q1, the DC input voltage is applied to both ends of the primary winding. Since the phase of the secondary winding is negative at the top and positive at the bottom, the rectifier tube D1 is reverse biased and cut off, and the primary inductor stores energy; when the excitation pulse is low level to cut off Q1, the voltage polarity at both ends of the primary winding is reversed, the phase of the secondary winding becomes positive at the top and negative at the bottom, the rectifier tube is forward biased and turned on, and the energy stored in the transformer is released to the secondary side. In this switching process, the high-frequency transformer plays both the role of voltage transformation isolation and the role of inductor energy storage.

1.2 Single-chip microcomputer control system

The single chip microcomputer control system is the core part of the entire digital power supply.

The single-chip microcomputer uses Freescale's 68HC908SR12, which has rich internal resources, integrating 12k program memory, 2-way timer/counter, 14-channel 10-bit A/D converter, PWM output, internal temperature sensor, etc. The block diagram of the single-chip microcomputer control system is shown in Figure 3.

ATD0 and ATD10 are the voltage and current sampling pins, which convert the analog quantity collected into digital quantity and send it to the CPU. The CPU makes a control adjustment every 1ms to output a PWM signal with a suitable duty cycle. The PWM signal is isolated and amplified by the drive circuit to directly control the switch tube of the main circuit. Since the 908SR12 has its own pulse width modulation module, the maximum PWM frequency reaches 125kHz, which can be fully used in high-frequency switching power supplies. The 8-bit resolution can ensure the accuracy of the output voltage and current. The keyboard part uses a contact key switch, and the user can adjust the output voltage and current value at the rated power according to their needs.

The whole circuit adopts a double closed-loop control system. Under normal circumstances, the feedback of the voltage loop keeps the output voltage constant. Once the output current exceeds the maximum value, the current loop reduces the output voltage and maintains the output current at the maximum current value. The display part can be composed of a digital tube or a liquid crystal. In this system, the voltage, current, power, temperature, electric energy metering, etc. are displayed separately through key selection, and different states are indicated by indicator lights. If an open circuit or short circuit occurs during operation, the indicator light shows an alarm state, and the CPU will immediately start the protection program to shut down the main circuit. At the same time, the internal temperature of the power supply is continuously detected to prevent the temperature of the whole machine from rising too high.

1.3 Driving circuit design

Since the 5V 1vrL level output by the microcontroller is not enough to drive the main power switch tube, and the primary and secondary sides are completely electrically isolated in the entire circuit, the PWM signal output by the microcontroller cannot be directly connected to the main power switch tube. In addition, the temperature rise of the main power switch tube directly affects the stability and service life of the entire equipment. Improving the on and off speed of the switch tube is the most essential and effective way to solve the problem of temperature rise of the switch tube. This requires the drive circuit to have the following characteristics:

(1) Ability to provide sufficiently large drive current, that is, the charging resistance of the drive circuit should be sufficiently small to shorten the conduction time;

(2) It should have sufficient discharge capacity, that is, the discharge resistance should be sufficiently small to increase its shutdown speed;

(3) Appropriate driving voltage. Generally, 12V is the most appropriate driving voltage.

Considering the electrical isolation between the primary and secondary sides, the following drive circuit is designed, as shown in Figure 4.

PWM is the duty cycle signal output by the microcontroller, which is connected to the primary side through an optocoupler, meeting the electrical isolation requirements of the primary and secondary sides. Inverter U2 realizes the conversion from TTL level to CMOS level. When the PWM signal is high, U2 outputs high level, T1 is turned on, T2 is turned off, and the driving power supply charges the gate-source capacitance of the switch tube, so that it quickly reaches the turn-on threshold voltage of the switch tube, and the switch tube is quickly turned on; when the PWM signal is low, U2 outputs low level, T1 is turned off, T2 is turned on, and the gate-source capacitance of the switch tube quickly discharges the electricity through T2, realizing the rapid shutdown of the switch tube. The driving circuit has a simple structure, stable performance and high driving speed, and can replace the more expensive driver chip.

2 System Software Process

The system flow chart is shown in Figure 5.

In order to improve the dynamic characteristics and stability of the system, the upper and lower limits of the PWM duty cycle are set in the data processing program to prevent large deviations during continuous sampling and limit the PWM. In addition, if an unexpected situation occurs, the microcontroller will turn off the PWM in time to prevent the output voltage or current from being too large and damaging the transistor.

3 Conclusion

After collecting a large amount of data for analysis, the following conclusions were drawn: When the switching power supply operates in constant voltage mode, the error between the output value and the expected value does not exceed 30mV; when operating in constant current mode, the error between the output value and the expected value does not exceed 40mA; the overall efficiency is above 85%, the temperature rise of the main power switch tube is around 40°C, and the temperature rise of the high-frequency transformer is lower than 60°C, which is fully adapted to the power supply requirements in general situations.

The switching power supply with a single-chip microcomputer as the core not only helps to improve the accuracy of the switching power supply, but also makes the switching power supply more intelligent. Intelligence is also a direction for the development of power supply in the future. Therefore, the programmable power supply with a single-chip microcomputer as the core designed in this paper has a high use value.

Keywords:68HC908SR12 Reference address:Design of intelligent digital switching power supply based on 68HC908SR12

Previous article:Design of switching power supply based on PQ35
Next article:Design of running water lamp based on digital integrated circuit

Latest Power Management Articles
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号