+86-18822802390

How the Power Supply Works

Jul 18, 2023

How to realize the design of an intelligent control switching power supply

 

Intelligent control switch design power supply, from the control of power output alone, there are several control methods. One is that the single-chip microcomputer outputs a voltage (via DA chip or PWM mode), which is used as the reference voltage of the power supply. This method only replaces the original reference voltage with a single-chip microcomputer, and the output voltage value of the power supply can be input with buttons. The single-chip microcomputer does not join the feedback loop of the power supply, and the power supply circuit does not change much. This way is the easiest.


The second is to expand the AD of the single-chip microcomputer, continuously detect the output voltage of the power supply, adjust the output of the DA according to the difference between the output voltage of the power supply and the set value, control the PWM chip, and indirectly control the work of the power supply. In this way, the single-chip microcomputer has been added to the feedback loop of the power supply, replacing the original comparison and amplification link, and the program of the single-chip microcomputer needs to adopt a more complicated PID algorithm. The third is to expand the AD of the single-chip microcomputer, continuously detect the output voltage of the power supply, and output PWM waves according to the difference between the output voltage of the power supply and the set value, and directly control the work of the power supply. In this way, the single-chip microcomputer intervenes in the power supply work the most.


The third way is the most thorough single-chip microcomputer control intelligent control switch, but it also has the highest requirements for the single-chip microcomputer. It is required that the operation speed of the single-chip microcomputer is fast, and it can output a PWM wave with a sufficiently high frequency. Such a microcontroller is obviously expensive. The speed of DSP single-chip microcomputer is high enough, but the current price is also very high. Considering the cost, it accounts for a large proportion of the power supply cost, so it is not suitable for use. Among the cheap single-chip microcomputers, the AVR series is the fastest and has PWM output, which can be considered. However, the operating frequency of the AVR single-chip microcomputer is still not high enough, and it can only be barely used. Let's specifically calculate what level the AVR microcontroller can directly control the switching power supply.


In the AVR microcontroller, the clock frequency is up to 16MHz. If the PWM resolution is 10 bits, then the frequency of the PWM wave, that is, the operating frequency of the switching power supply is 16000000/1024=15625 (Hz), and it is obviously not enough for the switching power supply to work at this frequency (in the audio range). Then take the PWM resolution as 9 bits, and the operating frequency of the switching power supply this time is 16000000/512=32768 (Hz), which can be used outside the audio frequency range, but there is still a certain distance from the operating frequency of modern switching power supplies. However, it must be noted that the 9-bit resolution means that the turn-on-turn-off cycle of the power tube can be divided into 512 parts. As far as the turn-on is concerned, assuming that the duty cycle is 0.5, it can only be divided into 256 parts. Considering the non-linear relationship between the pulse width and the output of the power supply, it needs to be folded at least in half, that is to say, the output of the power supply can only be controlled to 1/128 at most, regardless of the change of the load or the change of the power supply voltage, the degree of control can only reach this point until. Also note that there is only one PWM wave as described above, which is single-ended work. If push-pull operation (including half-bridge) is required, two PWM waves are required, and the above-mentioned control accuracy will be halved, and can only be controlled to about 1/64.


It can meet the usage requirements for low-demand power sources such as battery charging, but it is not enough for power sources that require high output accuracy. To sum up, the AVR microcontroller can only be reluctantly used in the way of direct PWM control. However, the second intelligent control switch design control method listed above, that is, the single-chip microcomputer adjusts the output of the DA, controls the PWM chip, and indirectly controls the work of the power supply, but it does not have such high requirements for the single-chip microcomputer, and the 51 series single-chip microcomputer is competent. The price of 51 series MCU is still lower than that of AVR. The disadvantage of intelligent control switch design is that the dynamic response is not enough. The advantage is that the design is flexible, such as protection and communication, the combination of single-chip and pwm chips. It is also difficult to achieve single-cycle control. So I think the single-chip microcomputer can complete some flexible analog settings, and there is a pwm chip to complete some work behind it. I have seen an article using CPLD plus microcontroller for control.


We all know that the price of CPLD and the difficulty of development are by no means comparable to those of single-chip microcomputers, so why does he do this? The reason is as the author said, because the PWM width of the single-chip microcomputer is small, resulting in low precision, which cannot meet the requirements of the system. The author also said that in these cases, the application of off-chip PWM circuit is undoubtedly an ideal choice. He chose CPLD chip to realize PWM. I suggest: still use the original control chip of the switching power supply to realize. Not only is the price low, but also it is easy to implement protection functions such as single-cycle current detection. We don't need digital control for digital control's sake. The above is the design of the intelligent control switch, please friends to participate in the discussion and correct me.

 

Laboratory power supply

Send Inquiry