Realization of output voltage programmable switching power supply using single chip microcomputer PWM

1、 Overview:The usual switching power supply is fixed output voltage and current. In some special occasions, it is necessary to output different voltage and current according to different functions, s

1、 Overview:

The usual switching power supply is fixed output voltage and current. In some special occasions, it is necessary to output different voltage and current according to different functions, so the ordinary circuit can not meet it. For example, in some water generators, it is necessary to input different power supply voltage to the electrolytic cell and reverse the polarity of the power supply, It is not easy to realize in this general hardware circuit, or it will make the circuit quite complex. Therefore, we designed and produced a PWM programmable function of single chip microcomputer to realize adjustable voltage output and provide appropriate power supply according to different functions, which greatly improves the power use efficiency of the whole product, reduces the weight and small volume, This is impossible when using ordinary series regulated power supply

We can realize the real-time adjustable output of switching power supply voltage and current by using the PWM function of Holtek single chip microcomputer HT46R23 (of course, any single chip microcomputer with PWM output function can also be used). We select UC3843 as the switching power supply pulse width control IC. The output is isolated from the high-voltage power supply by optical coupling, and is equipped with overcurrent protection, overvoltage and no-load protection. The circuit block diagram is as follows:

Realization of output voltage programmable switching power supply using single chip microcomputer PWM

The figure above is the functional block diagram of the control circuit.

Taking our water generator as an example, the corresponding alkaline output is divided into four grades. The input voltage requirements of the electrolytic cell are 10V, 15V, 22V and 36V. Considering that there are great differences in the acidity and alkalinity of the water quality itself in different regions, so the water quality with the same acidity and alkalinity cannot be obtained at the same voltage, so different regions will be distinguished. For example, the water quality difference between the South and the northeast is very obvious, Therefore, under the above standard voltage, there will be requirements of plus or minus 1V and 2V. In the main control MCU, it can be set to voltages in different regions. In this way, 20 different output voltages are required. Of course, it is easy to realize the PWM function of MCU. The hardware circuits are the same, and the requirements can be easily met only by modifying the PWM pulse width, This is the advantage of using MCU programming control

The following figure shows the appearance of the switching power supply board

开关电源板外观图


This switching power supply is designed with full voltage. The working voltage range is designed as 90-265v (AC) and 50-60Hz. The actual test working voltage range can reach 65-265v (AC), the efficiency is more than 87%, the output voltage is 8-36v, ± 1V, and the maximum output current is 2.5A, which can be competent in normal circuits

Considering that the water generator can produce both alkaline water and acidic water for different roads, for example, weak alkaline water is required for drinking, strong alkaline water is required for salad cooking, and acidic water is required for disinfection, so we also set voltage polarity inversion circuit in the circuit. At the same time, the water maker also has heating function, which also needs to control the relay. Of course, all this is controlled by the output command of single chip microcomputer

Due to the perfect protection circuit, overcurrent protection, overvoltage and no-load protection, temperature control, water free protection, etc., the whole circuit is safe and reliable when working unattended for a long time. It has been proved by thousands of products and several years of product use, This design is successful and applicable. Of course, this circuit can also be extended to other products requiring voltage adjustment. The general design principle is the same