Introduction to several control methods of single chip microcomputer controlled switching power supply

Feb 25, 2025

Leave a message

Introduction to several control methods of single chip microcomputer controlled switching power supply

 

There have been many articles published in this version about microcontroller controlled switching power supplies, and the debate has been intense. I would like to take this opportunity to share my views as well.


There are several control methods for controlling the power output of a microcontroller controlled switching power supply.


One is that the microcontroller outputs a voltage (via DA chip or PWM method) as the reference voltage for the power supply. This method only replaces the original reference voltage with a microcontroller, which can input the output voltage value of the power supply through buttons. The microcontroller does not add a feedback loop to the power supply, and the power circuit has not been modified. This method is the simplest.


The second is to expand the AD of the microcontroller, continuously detect the output voltage of the power supply, adjust the output of DA based on the difference between the power supply output voltage and the set value, control the PWM chip, and indirectly control the operation of the power supply. This method has added a microcontroller to the feedback loop of the power supply, replacing the original amplification link. The microcontroller program needs to use a more complex PID algorithm.


The third is to expand the AD of the microcontroller, continuously detect the output voltage of the power supply, and output PWM waves based on the difference between the power supply output voltage and the set value, directly controlling the operation of the power supply. This method involves the most microcontroller intervention in power supply operation.


The third method is the most thorough microcontroller controlled switching power supply, but it also has the highest requirements for the microcontroller. Require the microcontroller to have fast computing speed and be able to output PWM waves with sufficiently high frequency. Such microcontrollers are obviously expensive.


DSP based microcontrollers have high speed, but their current prices are also high. From a cost perspective, they account for too much of the power supply cost and are not suitable for use.


Among inexpensive microcontrollers, the AVR series is the fastest and has PWM output, which can be considered for use. But the operating frequency of AVR microcontroller is still not high enough, it can only be used reluctantly. Let's calculate in detail what level can be achieved by directly controlling the operation of the switching power supply with an AVR microcontroller.


In AVR microcontrollers, the highest clock frequency is 16MHz. If the PWM resolution is 10 bits, then the frequency of the PWM wave, which is the operating frequency of the switching power supply, is 16000000/1024=15625 (Hz). It is obvious that the switching power supply is not sufficient to operate at this frequency (within the audio range). So with a PWM resolution of 9 bits, the operating frequency of this switching power supply is 16000000/512=32768 (Hz), which is outside the audio range and can be used, but there is still a certain distance from the operating frequency of modern switching power supplies.

 

Switching power supply

Send Inquiry