1 Introduction
Lead-acid batteries are the main type of large-capacity batteries at present. They have low manufacturing costs, large capacity, low prices, and a wide range of applications. There are two basic charging methods for lead-acid batteries: constant voltage charging and constant current charging. If only one method, such as the constant current method, is used, the capacity will easily decrease and the battery will be scrapped prematurely due to the unchanged charging current in the later stage of charging. If the constant voltage method is used alone, the current is too large at the beginning of charging, which may cause the electrode active material to fall off, and the current is too small in the later stage, resulting in long-term undercharging, which affects the service life of the battery [1]. Therefore, most chargers use a multi-stage charging method that combines the two methods. In recent years, the three-stage charging method of constant current, constant voltage, and constant voltage floating charge has gradually been accepted.
At present, the three-stage charging method mainly adopts the analog control scheme. Although it has the advantages of good real-time performance and high bandwidth, its hardware circuit is complex and the control is not flexible. To this end, this paper designs a digitally controlled charger, which uses a single-chip microcomputer as the core of the control loop, and controls the output voltage and output current through real-time sampling of voltage and current, realizing a three-stage charging strategy, which can intelligently and flexibly control the charging of the battery, improve the utilization efficiency of the battery, and help to improve the service life and performance of the battery.
2 Charger power structure
The overall design block diagram of the system is shown in Figure 1. It mainly consists of three parts: the first part is the switching power supply part, which adopts a flyback DC/DC converter; the second part is the voltage and current sampling circuit; the third part is the PWM output of the microcontroller core, which then drives the flyback circuit through the drive circuit.
Figure 1 Overall design block diagram of charger circuit
The system consists of a voltage sampling circuit and a current sampling circuit to sample the voltage and current in real time, and send the sampled voltage and current to RA0 and RA1 of the microcontroller respectively. The sampled voltage and current are converted into numerical values through the A/D conversion module inside the microcontroller, and then corresponding operations are performed according to the written software. The corresponding duty cycle is obtained by the PWM module, and then the duty cycle is sent to the drive circuit by RC2 to drive the switch tube of the flyback circuit, so that the corresponding voltage or current is obtained at the output end to charge the lead-acid battery.
3 Digital Control Circuit Structure
The digital control circuit monitors and controls the corresponding working process of the charger by acquiring and outputting the corresponding signals, so that it can work adaptively. However, the output of the main circuit is an analog signal, but the microcontroller can process a digital signal. Therefore, before processing the signal, the analog signal must be converted into a digital signal through an analog-to-digital converter (ADC). Assuming that the ADC word length is N, the analog-to-digital conversion accuracy is 1/2N. The larger N is, the higher the accuracy is, but the more expensive it is. The time resolution and analog-to-digital conversion accuracy of the digital controller PWM unit determine the accuracy of the charger's output voltage, output current, and output power. In order to meet the accuracy requirements and reduce costs at the same time, it is necessary to select an ADC and PWM digital controller with appropriate bits.
After the ADC converter is selected, the PWM bit number needs to be selected. If the PWM bit number is too small, the output voltage will fluctuate around a certain voltage value, causing a limit cycle phenomenon. The output voltage will periodically jitter, which will affect the sampled data and ultimately the processing accuracy of the entire system. Therefore, the higher the PWM unit resolution, the better.
The PWM bit number N and frequency fPWM satisfy the following formula: . In the formula, fclk represents the clock frequency of the microcontroller. PR2 is the microcontroller PWM period register. The higher the fPWM, the smaller the value stored in PR2. If the value stored in PR2 is M, the maximum resolution is the frequency division value f/M. It can be seen that the higher the frequency is, the better it is. Too high a frequency will reduce the PWM resolution. The relationship between the frequency and resolution of the PWM output is shown in Table 1.
Table 1 Relationship between PWM frequency and resolution (fclk=40MHz)
In order to ensure a high enough resolution and ensure that the output voltage ripple is less affected by the PWM resolution than the output filter capacitor, this design uses 10-bit PWM. [page]
At the same time, taking into account other needs, the specific requirements of this system for the digital controller mainly include: (1) built-in ADC module, at least 2 ADC channels, and an accuracy of more than 10 bits; (2) at least 1 built-in PWM unit, and PWM accuracy of more than 10 bits; (3) at least two timers; (4) interrupt priority setting; (5) at least 5 I/O ports; (6) price less than RMB 50.
Taking all the above factors into consideration, we choose PIC18F2620 from Microchip as the digital control chip. The main performance of PIC18F2620 includes: 10 10-bit ADC channels; the maximum external clock frequency can reach 40M; 1024 bytes of data EEPROM for storing variable data; low-power enhanced design that can extend battery life, power consumption in sleep mode is only 100nA, etc. Its performance meets the system requirements.
4 System Software Design
4.1 Main program design
Three-stage charging, constant current charging at the beginning, constant voltage charging in the middle, and floating charging at the end. This charging method reduces the amount of gas discharged during charging, charges more thoroughly, and prolongs the battery life. The charging current and charging voltage change curves of the three-stage charging method are shown in Figure 2.
Figure 2 Three-stage charging characteristics
According to the principle of three-stage charging, draw the main program flow chart of the system, as shown in Figure 3. (Where Um is the maximum voltage upper limit of the battery, Ubat is the constant voltage charging threshold, and Ibat is the constant current charging threshold, and its value is generally 1/10 of the battery capacity.)
The main program of the single-chip microcomputer system is mainly used for A/D sampling initialization, PWM initialization, timing and interrupt system, and timer initial value setting. It then continuously detects the voltage and current of the charger and performs three-stage adaptive charging.
There are a few things you need to pay attention to in the program.
(1) Because it is necessary to sample two variables, voltage and current, at this time, according to the characteristics of the sampling unit of PIC18F2620, the channel can be changed by directly changing the A/D control register ADCON0.2~3 bits, which is fast and takes less time.
(2) The interrupt system is the key part of the program. Since the sampling unit cannot work all the time, it will not only waste the computing power of the microcontroller, but also affect the work of other parts, making the system inefficient. In order to make the microcontroller work more efficiently, the system adopts a timed interrupt working mode: using the TMR0 timer for timing, and entering the interrupt after a fixed period of time. At present, the microcontrollers on the market generally have interrupt priorities. For example, the PIC18F2620 used in the system has 2 priorities, and different priority operations can be performed by setting different interrupt vectors. The corresponding high-priority interrupt service subroutine resets TMR0, loads the corresponding initial value, and enters the next timing state. The low-priority interrupt service subroutine resets the A/D module enable bit, reads and stores the A/D conversion results, and then determines the corresponding voltage and current sampling value stage, and finally modifies the duty cycle through the corresponding PI adjustment of each stage.
Figure 3 Main program flow chart [page]
4.2 Sampling subroutine
The voltage and current signals after sampling and processing inevitably have noise and interference caused by the system. In order to accurately measure and control, these noise and interference must be filtered out. In addition to filtering on the hardware circuit, software filtering or digital filtering can also be used. There are many commonly used digital filtering methods. This system uses the average method: sorting after multiple sampling, and then removing the maximum and minimum values to calculate the average value, which improves the sampling accuracy.
4.3 PI subroutine
In order to eliminate the influence of integral saturation, this system adopts an incremental PI control algorithm and utilizes the method of weakening when encountering limits.
The PI algorithm that weakens the integral when encountering a limit actually stops increasing the integral term and only performs the operation of weakening the integral term once the control variable enters the saturation range [5]. The PI program flow chart is shown in Figure 4.
Figure 4 PI control algorithm flow chart
5 Experimental results and analysis
The above method was used to make a prototype to charge the YTX7A-BS/12V-7AH lead-acid battery.
The main circuit parameters are as follows: input voltage Uin=24V, circuit operating frequency f=50kHz, EI33 magnetic core, primary inductance Lp=212μH, secondary inductance Ls=112μH, switch tube IRF840, output capacitor 1000μF/25V electrolytic capacitor.
FIG5 is a curve diagram of the charging change of the lead-acid battery by the prototype, wherein the horizontal axis is the charging time, the left Y axis is the battery voltage, and the right Y axis is the charging current.
Figure 5 Battery charging curve
As shown in Figure 5, according to the program design requirements, in the initial stage of charging, the charger first performs constant current charging, and the battery current is maintained at about 0.7A. Thereafter, when the battery voltage exceeds the constant voltage charging threshold of 14.4V, it switches to constant voltage charging, the charging voltage is maintained at 14.4V, and the charging current continues to decrease. At the same time, the charging current is continuously detected by RA1. When the charging current drops below 0.1A, it indicates that the battery is fully charged. At this time, in order to supplement the self-discharge of the battery, it switches to floating charging, and the charging voltage is maintained at 13.7V. According to the above results, the three-stage adaptive digital control scheme for lead-acid batteries proposed in this paper is effective, and the charger can select the corresponding charging mode (constant current, constant voltage charging and floating charging) for charging according to the actual state of the battery.
6 Conclusion
Compared with the traditional analog-controlled lead-acid battery charger, the digital-controlled charger greatly improves the flexibility, reliability, and stability of the control system. With the continuous improvement of control schemes and functional integration and the gradual reduction of microcontroller prices, digital-controlled chargers using microcontrollers will become an important research direction in the future.
References
[1] Hu Hengsheng, Wang Hui, Zhao Xucheng, Lv Ruiqiang. Analysis and discussion of battery charging methods [J]. Power Technology Application, 2009, 12 (8): 1-4.
[2] Chen Jian. Power Electronics: Power Electronics Conversion and Control Technology[M]. Beijing: Higher Education Press, 2004.
[3] Meng Jianhui, Liu Wensheng. Analysis and comparison of DCM and CCM modes of flyback converter [J]. Communications Power Technology, 2010, 27 (6): 33-38.
[4] Tong Shibai, Hua Chengying. Fundamentals of Analog Electronics Technology[M]. Beijing: Higher Education Press, 2001.
[5] Cook,B. New Developments and Future Trends in High-Efficiency Lighting. IEEEngineering Science and Education Journal, 2000,9:207-217.
Previous article:Rail Ultrasonic Flaw Detection System Based on TMS320C6201
Next article:Microcontroller entry design: a simple and fun heart rate meter
- Popular Resources
- Popular amplifiers
- Signal Integrity and Power Integrity Analysis (Eric Bogatin)
- singlechip-implementation-of-levelcrossing-adc-for-ecg-sampling-2332-0796-1000219
- A_2.89_uW_Dry-Electrode_Enabled_Clockless_Wireless_ECG_SoC_for_Wearable_Applications
- A portable ECG for recording and flexible development of algorithms and stress detection
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Pingtouge RVB2601 board-GPIO
- [TI recommended course] #DC/DC switching regulator packaging innovation#
- 【AT-START-F425 Review】Reading USB files to achieve image reproduction
- MSP430 MCU Program Upgrade Example
- Looking for open source enthusiasts to improve the BabyOS open source project
- Can experienced friends recommend some useful power modules?
- What is the appropriate sampling rate for an oscilloscope?
- In what fields are panoramic high-definition video recorders used?
- What is the development trend of machine vision surface defect detection system?
- What does the MCU REFO pin stabilization time mean? How is it related to the connected capacitor?