ohahaha

Simple electronic load

 
Overview

The constant current source control circuit uses a hardware closed-loop current stabilizing circuit to achieve stable control of the output current. The A/D conversion circuit realizes high-precision voltage and current measurement. The microcontroller uses the STM32 microcontroller as the control core and combines with the LCD to realize the display function of the system. A sliding rheostat is used to regulate the current.

Chapter 1 Design Tasks and Requirements** **

Simple electronic load

1. Task

Design and build a simple DC electronic load with constant current (CC) operating mode. The schematic diagram of its principle is shown in Figure 1

2. Requirements

1. Basic requirements

(1) The current setting range of the constant current (CC) operating mode is 50mA ~ 1500mA, the setting resolution is 10mA, and the setting accuracy is ±1%. CC operating mode is also required to have an open circuit setting, which is equivalent to setting the current value to zero (20 points).

(2) In the constant current (CC) operating mode, when the voltage across the electronic load changes by 12V, the absolute value of the output current change is required to be less than 1% of the current value before the change (20 points).

(3) It has overvoltage protection function, and the overvoltage threshold voltage is 20V±0.1V (10 points).

2. Play part

(1) It can measure and digitally display the voltage at both ends of the electronic load in real time. The voltage measurement accuracy is ±(0.02%+0.02%FS) and the resolution is 1mV (5 minutes).

(2) It can measure and digitally display the current flowing through the electronic load in real time. The current measurement accuracy is ±(0.1%+0.1%FS) and the resolution is 1mA (5 minutes).

(3) It has the function of automatic measurement of the load regulation rate of the DC stabilized power supply, with a measurement range of 0.1% to 19.9% ​​and a measurement accuracy of ±1%. For convenience, this question requires that the output voltage of the DC regulated power supply under test is within 10V (10 points).

(4) Able to realize constant voltage and constant resistance functions (20 points).

(5) Other functions (10 points)

 

1.3 Question Analysis** **

According to the design requirements, the topic analysis is as follows:

1. Realize constant current CC working mode.

2. Controllable current adjustment.

3. Digital display measures current and voltage.

4. Digital display of load regulation rate.

Chapter 2 Plan Demonstration** **

2.1 Argument comparison** **

2.1.1 Electronic load solution: ** **

Solution 1: New feedback intelligent electronic load, which is a device for adjustable electrical isolation between various AC and DC power supplies. It can also invert DC power into AC power and integrate it into the power grid to realize the regeneration and utilization of electric energy. Because the question only requires working in a DC state, this solution is too complicated.

Option 2: Traditional analog load - electronic load. This option uses a microcontroller as the core, converts electrical energy into heat energy, and consumes electrical energy through a triode. Only program control is required during operation to achieve constant current, constant voltage, constant power and constant resistance modes. The constant current mode can adjust the DAC output by setting the current value; the constant voltage mode can use the software closed loop to continuously adjust the DAC by comparing the voltage sampling value and the set value, so that the output voltage value is equal to the set voltage value; constant In the power mode, the set power can be divided by the voltage sampling value to obtain the current value to adjust the DAC output; in the constant resistance mode, the voltage sampling value can be divided by the set resistance to obtain the current value to adjust the DAC output. This design adopts this solution.

2.1.2 Constant current source circuit scheme

Option 1: Use software closed-loop control method. The keyboard presets the current value, and the DAC converts it into a voltage signal to control the output current. The sampling circuit converts the actual output current value into the corresponding voltage value and sends it back to the microcontroller through ADC conversion. It compares it with the preset current value and adjusts the output current value to make it equal to the set current value through an appropriate algorithm, thereby forming a software closed loop. Control System. When the voltage and current measurement accuracy is high, precise control can be achieved, but the response speed is slow.

Option 2: Use hardware closed-loop control method. The typical circuit is shown in Figure 1. According to the virtual short concept of the integrated operational amplifier, we can get: I Vin/R1. In the formula, I is the load current, R1 is the sampling resistor, and V i n is the input signal at the non-inverting terminal of the operational amplifier.

If R 1 is fixed, then I is completely determined by Vin . At this time, no matter whether Vcc or RL changes , I can quickly remain stable by using the automatic adjustment function of the feedback loop. This solution has a simple circuit and fast response speed, so this solution is adopted in this design.

                                                                                                  

Figure 2 Hardware closed-loop current stabilizing circuit

Chapter 3 Hardware Unit Circuit Design** **

3.1 Main control module**** STM32 **** MCU ** **

The main control module chooses STM32 microcontroller instead of 51 microcontroller, mainly because STM32 has the following advantages and is very suitable for this competition. Structurally it has the following characteristics:

1. The STM32 series of microcontrollers can achieve a 40ns instruction cycle driven by a 25MHz crystal. The combination of 16-bit data width, 40ns instruction cycle and multi-functional hardware multiplier (which can realize multiplication and addition operations) can realize certain algorithms of digital signal processing (such as FFT, etc.).

2. The STM32 microcontroller has powerful functions and can realize multiple ADC port sampling.

3. Strong anti-interference ability and wide temperature range.

4. Can be controlled by multiple machines.

 

Figure 3 STM32 microcontroller

 

Figure 4 Circuit diagram

3.2 Constant current module** **

                 Figure 5 Constant current module** **

The constant current module mainly uses two high-power **** transistors to amplify the current, and adds positive feedback to ensure that the current is constant. ** **

3.3 Overvoltage protection module** **

Figure 6 Overvoltage protection module** **

The core of overvoltage protection is an LM358 operational amplifier with an adjustable resistor connected to the positive terminal and a TL431 used for voltage stabilization. The voltage changes according to changes in the resistance and input voltage. The negative terminal is a voltage regulator tube, and the stable voltage is around 2.5v. When the negative terminal is greater than the positive terminal, a low level is output, and the triode does not work. The circuit is closed. When the positive terminal is greater than the negative terminal, a high level is output, and the triode starts to work.

3.4****  ADC **** Acquisition Module ** **

This circuit uses a 24-bit analog-to-digital converter AD to further improve the measurement accuracy of voltage and current. Sampled by ADC in stm32. The signal input end is connected to a cut-off capacitor of 0.1uF for filtering to reduce noise interference. AD adopts its typical connection method, the reference voltage is provided by AD, and the voltage sampling signal and current sampling signal are sent to the two channels of AD respectively.

2. **** Testing principle of power supply load regulation ** **

   The measurement circuit of the load regulation rate is shown in Figure 6. The load regulation rate refers to the change rate of the voltage at both ends of the electronic load when the output current of the DC regulated power supply changes from zero to the rated value. For the convenience of measurement, it can be measured at the output end of the power supply under test. By connecting a resistor Rw in series and replacing Rw with a different resistance value, the load regulation rate of the DC regulated power supply under test can be changed. That is, when the DC regulated output voltage remains unchanged and the load changes from zero to the rated value, the change in voltage at both ends of the electronic load is usually expressed as a percentage.

 

Among them, V1 is the open circuit value of the voltage across the electronic load , V2 is the voltage at 1A, and the rated voltage is specified as 10V in the question.

 

                         

Figure 7 Schematic diagram of load regulation rate test

Chapter 3 **** System Debugging ** **

4.1 Test plan** **

4.1.1 Simulation test** **

 

Figure 8 Simulation diagram ** **

When the voltage of the voltage source is changed, the resistance passing through **** R4 **** does not change, realizing the constant current function. When the voltage of the voltage source exceeds 20v, the voltage at both ends of the sampling resistor almost becomes 0, realizing Overvoltage protection function. ** **

 

 4.1.2**** Physical **** board test ** **

After testing based on **** actual objects, two problems were found ** **

1. When measuring voltage, the voltage is too high, and the ADC sampling range should be less than 3.3v. To solve this problem, we connected a transistor in series, changed a sampling point, and reduced the voltage.

2. The voltage at both ends of the electronic load changes too much, causing the test to be inaccurate. The ADC sampling value keeps changing. To solve this problem, we have adopted three solutions. One is to add a filter capacitor so that the voltage at both ends of the resistor changes with the power input. The terminal changes without obvious fluctuations. Secondly, in order to avoid the resistance change caused by the heating of the sampling resistor when passing a large current and affecting the output current, this circuit connects a high-power spring-type sampling resistor to the circuit. Thirdly, in order to reduce the heat caused by the transistor. Oscillation, multiple transistors are connected in parallel to increase heat dissipation, which can improve the stability of the power supply output current.

The specific tests are as follows** **

4.1.3**** pcb board test ** **

 

 

Chapter 5 **** Software Programming ** **

The main task of this system software is to use ADS1256 to convert to 0mA ~ 2000mA or 0 ~ 30V display according to different acquisition channels, and to make DAC12 generate 0 ~ 1.5V voltage according to user operation, and all the buttons use the interrupt query method.

The software process is shown in Figure 8:  

 

                               Figure 9 Program flow chart

 Conclusion: After actual testing, this system has completed all basic requirements, expanded the current range, and added operating modes such as constant voltage, constant resistance, and constant power, and added functions such as power-off parameter retention, soft start, and current scanning.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-16 13:05:16

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号