Note: * is required
[Please fill in during the registration stage↓]
1. Self/Team Introduction: Title of Station B: The 5th Lichuang Electronic Design Competition: (Fully Digital Synchronous BUCK Constant Voltage and Constant Current LED Driver) Project -
Self introduction. Station B link: https://www.bilibili.com/video/BV18V411U793?from=search&seid=2351486646778217126 < br>< br> < br>
Project Introduction. Station B link: https://www.bilibili.com/video/BV1Lh411o7r2?from=search&seid=13642084700404719828 < br>< br> < br>
2. Briefly introduce the project: based on GD32 fully digital synchronous BUCK constant voltage and constant current LED driver
Initial requirements to be fulfilled
Input: 7.5 - 16V.
Output: 6V/5A.
Input power: 32W.
Output power: 30W.
Efficiency: >90% at any voltage from 7.5-16V.
Input anti-reverse protection: Yes.
Under-overvoltage protection: Yes.
Secondary short circuit: Yes.
Secondary constant voltage: Yes.
Secondary constant current: Yes.
Fast strobe: It requires 0.5 seconds to turn on and off quickly, so that the lights can light up normally and the driver will not be damaged.
Constant power: When the input voltage changes, when the secondary voltage changes, the output power deviation < = 1.5W
Chip selection: GD32F330F4P6 + EG3112 + LM321
Solution selection: Uncommon synchronous rectification BUCK for LED drivers (why it is not common is explained below)
Algorithm selection:
1. Integral separation PID.
2. Anti-integral saturation PID.
3. Variable speed integral PID.
4. PID with feedforward compensation.
5. Trapezoidal integral PID.
6. PID with filter.
7. Incomplete differential PID.
8. Differentiation first PID.
If it is necessary to achieve double closed-loop control (current inner loop, voltage outer loop, or clamping outer loop, power middle loop, current inner loop), I will test which loop and algorithm to use one by one and choose the more stable one.
[Please fill in during the competition stage↓]
Describe the project details: Whether it is an all-digital power supply or an all-digital LED driver, there has always been a veil of mystery, and there are very few reference materials. Most of them require a DSP to implement, and a DSP costs at least 15-20 yuan or more. If it is made into a product, DSP can account for a large part of the cost, causing many companies to be discouraged. In the past, I have researched more on CNC (analog chip + microcontroller). This is much simpler. The core is the analog chip as the main control. The microcontroller outputs PWM or DA to control the FB pin of the analog chip. This is much simpler, but there are many components and mass production is required. The post-dispersion is relatively large. CNC cannot directly monitor some faults and stable conditions of the equipment. Of course, CNC has to do some remote adjustment and telemetry, 485 connection, CAN communication, network port, etc. It is also difficult. All-digital also solves these problems. With the rapid development of microcontrollers, all-digital low-cost microcontrollers have become possible. GigaDevice innovative microcontrollers are also domestically produced and have a good reputation. It is just in time to test performance, reliability, etc. As the chip, we choose a simplified version of the M4 core (GD32F330F4P6TR TSSOP-20). It is a very compact microcontroller and the price should be within 3 yuan.
GD32F330F4 main parameters.
1.M4 core with DSP instructions. 2. Main frequency is 84MHZ.
3.1-channel ADC.
4.7 channel DMA.
5. Working voltage 2.6V-3.6V.
6. I won’t introduce anything else further. You can download the manual from GigaDevice’s official website.
Brief scheme diagram:
The general working process: After the input is filtered by the capacitor, the divided voltage enters the microcontroller to detect whether there is under-voltage or overvoltage. If it is normal, the microcontroller turns on the lower-side MOS after driving the chip, and then turns on the upper-side MOS after a delay, completing the automatic switching of the upper-side MOS at boot. Lift. Then after the output voltage is divided, it enters the microcontroller to run the voltage loop PID, and calculates the PID result. As a reference value for the output current, it collects and uses LM321 to amplify the current signal and runs the current loop PID. After calculating the result, it assigns it to the PWM, thereby completing a constant voltage constant current. After normal operation, the microcontroller detects whether there is overvoltage, detects the temperature of the LED lamp beads, linearly controls the fan's air volume and faults, etc.
Describe the challenges faced by the project and the problems it solved:
1: Efficiency: The traditional solution uses asynchronous floating BUCK, 30W power, 6A output current, and it is very difficult to achieve 90% efficiency. The advantages and disadvantages of the two options are introduced below, and you can choose the option that meets your requirements.
Conventional solution: asynchronous floating point BUCK.
advantage:
1: MOS tubes are easy to drive.
2: Switching back and forth, the MOS tube timing will not be wrong or burned out.
3: Peak current sampling, relatively fast.
4: The output is floating and it is difficult to collect voltage. Many current solutions do not have voltage stabilization. If the input voltage is relatively high, the secondary capacitor voltage will also be rushed to a high level, which will damage the LED lamp beads at the moment of switching.
shortcoming:
1: Low efficiency.
2: The loss of the MOS tube to the ground sampling resistor is relatively large.
3: The output current is 5A, and the secondary diode loss is very large.
Special solution: synchronous BUCK.
advantage:
1: High efficiency, the internal resistance of the MOS tube can be chosen to be very low.
2: Average current sampling, constant current accuracy is relatively high.
3: The input and output can be grounded together, making it easier to collect voltage and current.
shortcoming:
1: The control is complicated and the cost is slightly higher.
2: When switching back and forth, the timing of the MOS tube is prone to errors and the lamp beads are easily burned out.
3: It is difficult to collect peak current, and the response speed will be reduced.
2: Synchronous BUCK has a fatal problem. When the input switches back and forth, the MOS tube drive timing will be disrupted, which may cause the lamp beads to burn, or the driver and MOS tube to burn directly. Through research, I have completely solved the problem that synchronous BUCK cannot be thermally switched.
The solution is as shown in the figure above. The reason is that after the input power is lost, the energy stored in the input and output capacitors cannot be released immediately, resulting in a sloped voltage discharge after the power is lost. After powering on again, the upper tube did not bootstrap again, resulting in timing disorder and burnout. Some experts said it was a soft-start problem. I used TL494+IR2104 to do synchronization BUCK before, and it was the same phenomenon. I posted many posts on the forum, and most people thought it was because soft-start was not enough. Later, I tried adding soft-start and the same thing happened. , and some people say that the duty cycle is not controlled at the moment of power-on, causing the output to overcurrent and burn out. In fact, I feel that this statement is not very correct. I limited the maximum duty cycle to 20%, and the phenomenon is still the same, because BUCK Even in open loop, the maximum output voltage is equal to the input voltage. After continuous testing, a conclusion is drawn. At the moment of power-on, the microcontroller must start running the program from the beginning, complete over-voltage and under-voltage, and then bootstrap. Because BUCK will still have stored voltage after power off, so we have to find a way to quickly release this voltage. After testing, the center point of the bridge passes through a diode and then a capacitor is added to the ground. Each time the power is turned on, the discharge voltage slope is found to be steeper. The working principle is that the capacitor here will hinder the square wave generated in the center of the bridge. After the power is turned off, , the square wave still exists, and the capacitor accelerates the obstruction, thereby quickly discharging the stored voltage. Coupled with input voltage detection, when it is lower than 6V, the microcontroller is reset, so it can be guaranteed to run again every time it is turned on. That solves the problem. However, this method has a flaw. Normal operation will cause a loss of about 0.15W.
Three: The problem of PWM resolution. Factors affecting the development of all-digital power supplies or LED drivers include ADC resolution, ADC sampling speed, PWM resolution, floating point operations, response speed, anti-interference, etc. In fact, with the rapid development of microcontrollers, ADC resolution, ADC sampling speed, floating point, etc. are not big problems. But PWM resolution is a big problem. Suppose our main frequency is 120MHZ and PWM strobe is 200KHZ. Then PWM accuracy = 1 / (120MHZ / 200KHZ) = 1 / 600. We need to directly control PWM between 0-600 integers. It can be seen that the resolution is too low, and the accuracy will definitely be greatly affected. Like some advanced microcontrollers STM32F334 TI's DSP, in order to solve this problem, the PWM has a separate clock, like the STM32F334 PWM clock is as high as 4.6GHZ, then the accuracy = 1 / (4.6GHZ / 200KHZ) = 1 / 23000, PWM can be between 0- 23000 is directly adjusted, which shows that the accuracy is very high. The analog chip has no resolution and can be stepped at will. However, the price of single-chip microcomputer is too expensive, and it is difficult to apply it to actual products. Therefore, in order to solve this problem, I tried to overclock the main frequency of 84MHZ to 120MHZ. The test found that it is very stable. Reduce the PWM frequency to 75KHZ, and the accuracy is about 1/1600. Since it is mainly constant current, it is enough.
Four: EMI issues.
At present, equipment is becoming more and more advanced, which makes it easy to be interfered. In order to solve this problem, the analog chip has added frequency dithering technology, also called spread spectrum technology. For example, the main frequency is 75KHZ. It changes up and down by 3KHZ with 75KHZ as the center, and the frequency jittering time is 4MS each time. This driver also adds frequency jittering technology. Check out the test video for details.
(5) Difficulty: PID algorithm selection.
1. (Judgment of increase or decrease method) I saw others using this algorithm.
For example, input 10V, output 5V, if(adc > 5V)PWM--;if(adc < 5V)PWM++;
I have also tested this method, and it is easy to adjust, but the effect is average, especially when the load changes, it will take a while for the voltage to return to normal, so this method is not suitable for dynamic adjustment.
2. Single voltage or single current closed loop.
This method is the earliest used for testing. Generally, P is adjusted first, and then I and D are adjusted. D (differential) has many disadvantages when used in power supplies, so this article uses PI adjustment. (The debugging method is to first set I and D to 0; set P slightly smaller, and check the driving waveform. If jitter (oscillation) occurs, reduce P appropriately, and then add I after the waveform is relatively stable. Just increase it from small to large, and then Just fine-tuning is enough. In fact, it can be done after debugging it a few times.
3. Double closed loop (outside voltage, inside current) Three closed loop (outside voltage, inside power, inside current)
In fact, three closed loops are not common anymore. The common practice is to clamp the voltage with a comparator, use the power as the outer loop, and the current as the inner loop. Since the F330 does not have a comparator, it cannot be tested. If the three loops are all written in software, the It’s too much and I haven’t adjusted it out yet. I will adjust it later when I have time, so I chose double closed loop for this article.
4. I tested the 8 common PID algorithms one by one, and finally chose the conventional PID incremental algorithm. Other algorithms take too long to run once, which affects the response speed.
Six: Difficulties: PID algorithm and other issues.
The internal operation block diagram of the single-chip microcomputer constant voltage and constant current control.
From the internal block diagram, there are mainly two closed loops, with voltage as the outer loop and current as the inner loop.
If it is a separate voltage or current loop, it is relatively difficult to adjust. If the two loops are adjusted at the same time, they will interfere with each other, making adjustment more troublesome. Debugging method (set the current loop PI value as small as possible, then set the voltage loop P value, observe the drive waveform until the oscillation is relatively small, and then add fine adjustments. The method is very simple, but debugging is very laborious and can only be adjusted slowly. )
3. Describe the key points involved in the hardware and software parts of the project: there is an introduction above, and the pictures below are also marked.
4. Project material list display: see attachment.
5. Upload project pictures
Efficiency test pictures:
6. Demonstrate your project and record it as a video for upload: Already uploaded.
6.1. Official website of the video upload contest: has been uploaded.
6.2. Video title of station B
1. The 5th Lichuang Electronic Design Competition: "Fully Digital Synchronous BUCK Constant Voltage and Constant Current LED Driver" Project - Self-Introduction Link to Station B: https://www.bilibili.com/video/BV18V411U793?from=search&seid=13746222370725116876 < br> < br>
2. The 5th Lichuang Electronic Design Competition: "Fully Digital Synchronous BUCK Constant Voltage and Constant Current LED Driver" Project - Project Introduction Link to Station B: https://www.bilibili.com/video/BV1Lh411o7r2?from=search&seid=13642084700404719828 < br> < br>
3. The 5th Lichuang Electronic Design Competition: "Fully Digital Synchronous BUCK Constant Voltage and Constant Current LED Driver" Project - Project Test B Station Link: https://www.bilibili.com/video/BV1y54y1e7rE?from=search&seid=13642084700404719828 < br> < br>
4. The 5th Lichuang Electronic Design Competition "Fully Digital Synchronous BUCK Constant Voltage Constant Current LED Driver" Project - New Project Ideas and Summary Link to Station B: https://www.bilibili.com/video/BV1Hh411R7NP?from=search&seid =3247798636556668723 < br> < br>
5. The 5th Lichuang Electronic Design Competition: "Fully Digital Synchronous BUCK Constant Voltage and Constant Current LED Driver" Project - Highlights 1 B-site link: https://www.bilibili.com/video/BV1T54y1m7Hy?from=search&seid=13998484549694844732 < br> < br>
7. Whether it is released to the public for the first time: It is released to the public for the first time.
7.1. Whether the project has been published or won an award before, please indicate: it is original and has not been published before.
7.2. If the project is optimized on the original basis, please explain the optimization part: None.
8. Open source documents* see attachment.
9. Reference: UC3842 internal block diagram.
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