Hello everyone, my name is Lei Chaolin. The circuit I designed this time uses STC’s microcontroller analog DAC to control the output voltage of the BUCK chip through the conditioning circuit. The input voltage is 4-32V, the output voltage is adjustable from 0-32V, and the output current is 0-3A. (Maximum 5A). 3-digit digital tube displays real-time voltage and current. This circuit uses the knowledge of microcontrollers, analog circuits, high-frequency signal processing, etc. It can well train students' circuit analysis ability, and the difficulty level is medium to high. I will point out the relevant circuit knowledge in detail in this article. If there are any omissions, please let me know.
If we want to control the output voltage of the BUCK chip, we must change its voltage feedback. How to change its voltage feedback? We need an op amp to control our threshold voltage and the actual comparison output. During the voltage regulation process, the op amp is always in a comparison state until the voltage reaches stability. At the same time, closed-loop sampling should be added.
According to Kirchhoff's law, the node voltage is changed. The corresponding node voltage will change accordingly. This is how the feedback side of this circuit works. This system is in a closed loop state. Since the output voltage does not change linearly, we also add PID adjustment.
The sampling end passes through the op amp. Scale down the voltage by a factor of 10. The current sampling terminal amplifies the current signal on the sampling resistor ten times through calculation.
This circuit belongs to BUCK circuit. Increasing the switching frequency helps reduce voltage ripple. At the same time, the freewheeling inductance can be reduced. The efficiency of this circuit can reach 95%. Maximum power 50 watts.
This system uses STC's 8A8K64S4A12 microcontroller, which is simple to program and supports 3.3V-5V power supply. SMD packaging, small footprint and powerful pin functions.
Two 3-digit red digital tubes are used. One digital tube displays voltage, and the other digital tube displays current. Due to the limited ability of the microcontroller to drive high levels, a 74HC245 is used to drive the digital tube at the same time to improve the display effect and drive this digital tube. The tube mode is dynamic scanning
Conduct a principle analysis of the core circuit, compare the schematic diagram with the text, and introduce the core device selection.
The reference circuit uses the TL431 voltage stabilizing chip. According to the voltage stabilizing formula in the manual, Vo=Vref*(1+R1/R2), Vref=2.5V, R1=5k, R2=10k, so Vo=3.75V. This circuit provides a voltage reference for the ADC sampling of the microcontroller.
I don’t need to say much about the reset circuit. The independent button uses 5 buttons, two coarse adjustment, two fine adjustment, and one confirmation button.
This circuit uses the USB-to-TTL CH340C, which does not require an additional crystal oscillator. What we should note here is that the power supply of CH340 must be powered separately, otherwise the CH340C will also be powered on again when the download requires repowering, causing the download to fail.
This circuit uses a linear voltage regulator chip 7805, with a maximum voltage of 36V. Our input must not exceed the maximum limit voltage of the 7805. Since this step-down chip is a linear regulator, heat will be generated on the chip. We must not touch it with our hands.
This circuit is a low-pass filter circuit. Its function is to convert the PWM signal generated by the microcontroller into a voltage signal, which can be converted between 0-5V.
The picture above shows the main circuit of the power supply. The lower part is the current loop, which samples the output current and controls it with a microcontroller to achieve closed-loop control of the current. The function of U7.1 is to convert the current signal sampled at 0.1om into a voltage signal that is amplified 10 times. , if 1A current flows out, then the output voltage of U7.1 is 1V. The function of U7.2 is to compare the current controlled by the microcontroller with the actual current to achieve current control.
The picture above shows the main circuit of the power supply. The upper part is the voltage loop, which samples the output voltage and controls it with a microcontroller to achieve closed-loop control of the voltage. The function of U7.3 is to convert the voltage signal on the output voltage into a voltage signal that is reduced by 10 times. If the output voltage is 10V, then the output voltage of U7.3 is 1V. The function of U7.4 is to compare the voltage controlled by the microcontroller with the actual voltage and output it to the FB pin of the buck chip to achieve voltage control.
Regarding the placement of components, we must pay attention to the FB pin of the power supply chip being kept away from the inductor. The high-frequency signal on the inductor will interfere with the voltage feedback. At the same time, our ground loop must be the shortest loop. The components in the power part should be separated from the components in the analog part by a certain distance to prevent interference.
On the PCB wiring, we must pay attention to the power wiring as thick as possible, and at the same time, the power ground should be connected to the analog ground at a single point, especially near the inductor, and the wiring should be as few as possible to prevent interference from the inductor.
When pouring copper, we need to separate the power ground and analog ground to achieve the best effect. The distance between the copper pours of the power supply should be large.
(1) Hardware welding
When welding, we must pay attention to raising the temperature of the soldering iron when welding power devices such as inductors. Otherwise, it will affect the firmness of the welding and cause abnormalities in the components. At the same time, there is a heat dissipation pad under the BUCK chip. We must remember to connect the
(2) Hardware debugging
When debugging the hardware, we should pay attention to the value of the resistor of the op amp, which can be adjusted appropriately, especially the current feedback end. Maybe you have a 1A current flowing through it, but the actual sampling end of the resistor is 1V, and the sampling end of the resistor is 1.2V. , this is when our resistance is increased. When the voltage we collect does not change linearly, it means that the capacitance has been increased. These values must be adjusted appropriately. The performance of each chip is different.
(1) Software environment
Use keil C51 version
(2) Firmware burning
When downloading using STC ISP, remember to uncheck RESET for the IO port.
(3) Code debugging
Debugging is mainly about PID adjustment. The sampling voltage and current of each board are slightly different. We must patiently debug every small parameter. Be careful not to set the voltage too high at the beginning.
Video link https://www.bilibili.com/video/BV1tL4y1G7zw?spm_id_from=333.999.0.0
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet