The single-chip microcomputer controls the switching power supply. From the perspective of controlling the power supply output, there are several control methods.
One is that the single-chip microcomputer outputs a voltage (via a DA chip or PWM method) and uses it as the reference voltage of the power supply. This method simply replaces the original reference voltage with a single-chip microcomputer, and the output voltage value of the power supply can be input using a key. The single-chip microcomputer does not add a feedback loop to the power supply, and the power supply circuit has not been changed. This method is the simplest. The
second is that the single-chip microcomputer expands the AD, continuously detects the output voltage of the power supply, and adjusts the output of the DA according to the difference between the power supply output voltage and the set value, controls the PWM chip, and indirectly controls 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. The single-chip microcomputer program must use a more complex PID algorithm.
The third is that the single-chip microcomputer expands AD, constantly detects the output voltage of the power supply, and outputs PWM waves according to the difference between the output voltage of the power supply and the set value, directly controlling the work of the power supply. In this way, the single-chip microcomputer intervenes in the work of the power supply the most.
The third way is the most thorough single-chip microcomputer control of the switching power supply, but the requirements for the single-chip microcomputer are also the highest. The single-chip microcomputer is required to have a fast computing speed and be able to output a PWM wave with a high enough frequency. Such a single-chip microcomputer is obviously expensive.
The speed of DSP-type single-chip microcomputers is high enough, but the current price is also very high. Considering the cost, it accounts for too large a proportion of the power supply cost and is not suitable for use.
Among the cheap single-chip microcomputers, the AVR series is the fastest and has PWM output, so it can be considered for use. However, the operating frequency of the AVR single-chip microcomputer is still not high enough, so it can only be used reluctantly. Let's specifically calculate what level the AVR single-chip microcomputer can achieve when directly controlling the switching power supply.
In AVR microcontroller, the maximum clock frequency is 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). It is obviously not enough for the switching power supply to work at this frequency (within the audio range). Then take the PWM resolution as 9 bits, and the operating frequency of the switching power supply is 16000000/512=32768 (Hz). It can be used outside the audio range, but it 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 power tube can be divided into 512 parts in the on-off cycle. As far as the on-state is concerned, assuming the duty cycle is 0.5, it can only be divided into 256 copies. Considering that the pulse width is not linearly related to the output of the power supply, it is necessary to at least halve it, that is, the power supply output can only be controlled to 1/128 at most. Regardless of the load change or the network power supply voltage change, the degree of control can only go so far.
It should also be noted that there is only one PWM wave described above, which is single-ended operation. If push-pull operation (including half-bridge) is required, two PWM waves are required, and the above control accuracy is halved, which can only be controlled to about 1/64. For power supplies with low requirements such as battery charging, it can meet the use requirements, but for power supplies with higher output accuracy, this is not enough.
In summary, the AVR microcontroller can only be used reluctantly in the direct PWM control method.
However, the second control method listed above, that is, The single-chip microcomputer adjusts the output of DA, controls the PWM chip, and indirectly controls the work of the power supply, but the single-chip microcomputer does not have such high requirements. The 51 series single-chip microcomputer is competent. The price of the 51 series single-chip microcomputer is still lower than that of AVR.
Netizen coocle once expressed his opinion: "The disadvantage of the single-chip microcomputer controlling the switching power supply is that the dynamic response is not enough, and the advantage is that the design is flexible, such as protection and communication. My idea is to combine the single-chip microcomputer with the pwm chip. The frequency of the pwm output of the general single-chip microcomputer is generally not too high. If the frequency is too high, it is difficult to achieve single-cycle control. So I think the single-chip microcomputer can complete some flexible analog settings, and there are pwm chips behind to complete some work."
Coincidentally, in the electronic power supply comprehensive area There is an original article "Research on DPWM Circuit", which also uses digital circuit to output PWM wave to directly control the operation of switching power supply. He uses CPLD and single-chip microcomputer for control. As we all know, the price and development difficulty of CPLD are not comparable to single-chip microcomputer, so why does he do this? The reason is as the author said, because the PWM width of single-chip microcomputer is small, resulting in low precision and 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 it. Not only is the price low, but it is also easy to realize single-cycle current detection and other protection functions. We don't have to do digital control for digital control.
Reference address:MCU controlled switching power supply
One is that the single-chip microcomputer outputs a voltage (via a DA chip or PWM method) and uses it as the reference voltage of the power supply. This method simply replaces the original reference voltage with a single-chip microcomputer, and the output voltage value of the power supply can be input using a key. The single-chip microcomputer does not add a feedback loop to the power supply, and the power supply circuit has not been changed. This method is the simplest. The
second is that the single-chip microcomputer expands the AD, continuously detects the output voltage of the power supply, and adjusts the output of the DA according to the difference between the power supply output voltage and the set value, controls the PWM chip, and indirectly controls 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. The single-chip microcomputer program must use a more complex PID algorithm.
The third is that the single-chip microcomputer expands AD, constantly detects the output voltage of the power supply, and outputs PWM waves according to the difference between the output voltage of the power supply and the set value, directly controlling the work of the power supply. In this way, the single-chip microcomputer intervenes in the work of the power supply the most.
The third way is the most thorough single-chip microcomputer control of the switching power supply, but the requirements for the single-chip microcomputer are also the highest. The single-chip microcomputer is required to have a fast computing speed and be able to output a PWM wave with a high enough frequency. Such a single-chip microcomputer is obviously expensive.
The speed of DSP-type single-chip microcomputers is high enough, but the current price is also very high. Considering the cost, it accounts for too large a proportion of the power supply cost and is not suitable for use.
Among the cheap single-chip microcomputers, the AVR series is the fastest and has PWM output, so it can be considered for use. However, the operating frequency of the AVR single-chip microcomputer is still not high enough, so it can only be used reluctantly. Let's specifically calculate what level the AVR single-chip microcomputer can achieve when directly controlling the switching power supply.
In AVR microcontroller, the maximum clock frequency is 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). It is obviously not enough for the switching power supply to work at this frequency (within the audio range). Then take the PWM resolution as 9 bits, and the operating frequency of the switching power supply is 16000000/512=32768 (Hz). It can be used outside the audio range, but it 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 power tube can be divided into 512 parts in the on-off cycle. As far as the on-state is concerned, assuming the duty cycle is 0.5, it can only be divided into 256 copies. Considering that the pulse width is not linearly related to the output of the power supply, it is necessary to at least halve it, that is, the power supply output can only be controlled to 1/128 at most. Regardless of the load change or the network power supply voltage change, the degree of control can only go so far.
It should also be noted that there is only one PWM wave described above, which is single-ended operation. If push-pull operation (including half-bridge) is required, two PWM waves are required, and the above control accuracy is halved, which can only be controlled to about 1/64. For power supplies with low requirements such as battery charging, it can meet the use requirements, but for power supplies with higher output accuracy, this is not enough.
In summary, the AVR microcontroller can only be used reluctantly in the direct PWM control method.
However, the second control method listed above, that is, The single-chip microcomputer adjusts the output of DA, controls the PWM chip, and indirectly controls the work of the power supply, but the single-chip microcomputer does not have such high requirements. The 51 series single-chip microcomputer is competent. The price of the 51 series single-chip microcomputer is still lower than that of AVR.
Netizen coocle once expressed his opinion: "The disadvantage of the single-chip microcomputer controlling the switching power supply is that the dynamic response is not enough, and the advantage is that the design is flexible, such as protection and communication. My idea is to combine the single-chip microcomputer with the pwm chip. The frequency of the pwm output of the general single-chip microcomputer is generally not too high. If the frequency is too high, it is difficult to achieve single-cycle control. So I think the single-chip microcomputer can complete some flexible analog settings, and there are pwm chips behind to complete some work."
Coincidentally, in the electronic power supply comprehensive area There is an original article "Research on DPWM Circuit", which also uses digital circuit to output PWM wave to directly control the operation of switching power supply. He uses CPLD and single-chip microcomputer for control. As we all know, the price and development difficulty of CPLD are not comparable to single-chip microcomputer, so why does he do this? The reason is as the author said, because the PWM width of single-chip microcomputer is small, resulting in low precision and 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 it. Not only is the price low, but it is also easy to realize single-cycle current detection and other protection functions. We don't have to do digital control for digital control.
Previous article:Single chip microcomputer drives six-direction gravity sensor
Next article:Detailed explanation of the servo speed control principle
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Guess you like
- ST FOC electrical angle problem
- Altium Designer software is abnormal, please solve it! ! !
- Unboxing
- 5G frequency band division among the three major operators
- TMS320F28335 and its minimum system design
- 2022 Digi-Key Innovation Design Competition + ESP32-S2-KALUGA1 Unboxing
- Defensive C Programming in Embedded Development
- MSP CapTIvate MCU Development Kit Evaluation Model
- Please tell me, what is the difference between NB-IOT module and NB-IOT chip, what additional features and functions does the former have over the latter?
- 【Home treasure】 esp32s2 freertos communication between tasks Event Groups