1 Power supply hardware circuit design and calculation
1.1 Overall system design
The block diagram of the system is shown in Figure 1. The AC power outputs DC through the rectifier and filter circuit, and the EMI common mode filter is used to suppress the interference in the AC power; the +5 V microcontroller power supply is composed of MC34063; the system output voltage is sent to the A/D port of the microcontroller ATMEGA16 through the feedback circuit. The microcontroller performs PWM control on the DC-DC according to the change of the output voltage to make the output voltage stable; at the same time, the system display and keyboard control are also realized by the microcontroller ATMEGA16.
Figure 1 System composition block diagram
1.2 Rectification and filtering circuit
The rectifier and filter circuit is mainly composed of a rectifier transformer (30 W, 18 V), an EMI filter, an RS207 rectifier bridge (2 A) and a filter capacitor of 2 000 μF. The main function of the EMI filter is to filter out switching noise and harmonics introduced by the input line. The windings on the magnetic core in the filter are wound in the same direction. Because the AC current flowing through the windings is in reverse phase, the AC magnetic flux generated by the two currents in opposite directions in the magnetic core cancel each other out, thereby achieving the purpose of suppressing common-mode interference.
1.3 MCU power supply
In order to improve the efficiency of the power supply, the chip MC34063A is used to connect simple external components to form a step-down circuit, which outputs 5 V voltage to provide power for the microcontroller ATMEGA16. The circuit is shown in Figure 2.
Figure 2 MCU power supply circuit
Where R1 is the current limiting resistor, C1 is the timing capacitor, C2 is the output filter capacitor, R2 and R3 are resistors for setting the output voltage, and the calculation formula is shown in formula (1). Rst is the current limiting resistor. When the voltage of the current limiting resistor reaches 330 mV, the current limiting circuit starts to work. The calculation formula is shown in formula (2), where IMax_out is the maximum output current.
From the above two equations, we can see that when the output voltage is 5V, the values of Rst, R2 and R3 are 0.5 Ω, 1.2 kΩ and 3.6 kΩ respectively.
1.4 Keyboard and display circuit
The input and display circuit uses 4 buttons and function switching to complete the setting of the output voltage and display switching. The display part uses a common anode digital tube for dynamic display, as shown in Figure 3. The single-chip microcomputer ATMEGA16 uses an internal 8 MHz crystal oscillator. [page]
Figure 3 Keyboard and display circuit
1.5 DC-DC Circuit
The DC-DC circuit is shown in Figure 4. This module is an SR-Buck converter, and the switch tube uses the MOSFET tube IRF540. The maximum drain current ID of IRF540 is 33 A, the on-resistance RDS(on) is 44 mΩ, and the drain-source breakdown voltage VDSS is 100V. MOSFET is a voltage-controlled current source. In order to drive the MOSFET into the saturation region, it is necessary to add enough voltage between the gate and the source so that the drain can flow through the expected maximum current. Therefore, a transistor is used to drive IRF540. The main switch tube Q6 is driven by the NPN transistor Q5, and the synchronous rectifier tube Q9 is driven by the PNP transistor Q10.
Figure 4 DC-DC circuit
The filter circuit uses an LC series circuit, which consists of a 220μH inductor and two 470μF ESR capacitors in parallel. The 0.1μF ceramic capacitor is used to absorb the high-frequency components at the output end.
1.6 Output voltage sampling circuit
Connect the two ends of the 50 kΩ potentiometer (voltage sampling resistor) to the power supply output end (V0 end and ground end), and connect the middle pin to the ADC0 pin of the microcontroller. A/D sampling of the output voltage is realized, and the circuit is shown in Figure 5.
Figure 5 Output voltage sampling circuit
2 Feedback Programming
The system collects the output voltage value and compares it with the set output voltage value. According to the size and polarity of the deviation, the duty cycle of the PWM terminal signal in Figure 4 is controlled, thereby changing the on-time of the switch tube to achieve voltage closed-loop negative feedback. In order to avoid oscillation caused by frequent actions, a PID control algorithm with dead zone is applied in the software. [page]
The program flow chart is shown in Figure 6. The actual output voltage c(k) is obtained through A/D detection, and the set voltage r(k) is compared with the measured voltage c(k) to obtain the current deviation value e(k). When |e(k)|≤ε (ε is the dead zone deviation), no adjustment is performed; when e(k) is not within the dead zone range, PID adjustment is performed, and the calculation formula is shown in formula (3).
Figure 6 PID control flow chart with dead zone
△P(k)=Pxe(k)-Ixe(k-1)+Dxe(k-2) (3)
In the formula: △P(k) is the output adjustment amount, e(k) is the current deviation, e(k-1) is the previous deviation, e(k-2) is the previous two deviations, p, I, D are the proportional coefficient, integral coefficient, and differential coefficient respectively. After experimental setting, P, I, and D are 27, 3, and 1 respectively.
3 Power supply function test results
When the output voltage is set to 3 V, 5 V and 9 V respectively, the performance parameters of the power supply are as follows:
1) The output voltage is adjustable from 0 to 9.9 V, with a step of 0.1 V, and the output current can reach 1.5 A;
2) The voltage control accuracy range is 3%~0.71%;
3) When the output voltage is 9 V and the output current is 1.5 A, the efficiency of the power supply is 78.78%.
4) When the output voltage changes from 3 V to 9 V, the load regulation rate is 2.7%~1.1%;
5) At full load, the voltage regulation rate is less than 0.67%;
6) The ripple voltage accounts for 0.73%~0.62% of the output voltage.
4 Conclusion
From the above test results, it can be seen that the power supply output voltage is adjustable from 0 to 9.9 V with high accuracy and efficiency. If the value of the dead zone deviation ε is reduced, the constant voltage characteristics and control accuracy of the power supply can be further improved; when the output power is low, the power supply microcontroller control and LED display module will consume a certain amount of power, resulting in a decrease in the efficiency of the power supply. If LCD display and PCB board wiring are used, it is expected to further improve the power supply efficiency and reduce ripple interference.
Previous article:Power supply circuit composed of MC34063A
Next article:Design of support structure safety monitoring system based on ZigBee and GPRS
- Popular Resources
- Popular amplifiers
- 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)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Key points of machine vision technology
- 【LAUNCHXL-CC2650】+ First look at the CC2650 development board
- Shared bicycle control panel——by chenzhufly
- [National Technology N32WB452 Review] Second issue, lighting and ADC usage in the full version of RT-Thread
- Voltage stabilization
- Please advise, where can I modify the USB device instance path generated by STM32?
- Msp430f149 microcontroller controls stepper motor C language program
- Spectrum Analyzer Principle
- TDA2030 audio amplifier circuit diagram
- dsp reports an error after importing a new project!