Abstract: In order to effectively improve the service life of lead-acid batteries and realize the monitoring of the charging process, a 36 V lead-acid battery charging power supply controlled by a single-chip microcomputer is designed. This circuit adopts a flyback topology and continuous current working mode. The power management IC is designed on the secondary side of the power supply and is simulated by the EM78P258N single-chip microcomputer of ELAN. It is a successful attempt to use programmable devices to simulate power management ICs and realize the low cost of intelligent power supply. Through the software design of the single-chip microcomputer, the status display of the charging power supply, charging time control, alarm, over-temperature protection, over-voltage protection, over-current protection and other functions are realized. This charger truly realizes the three-stage charging process of lead-acid batteries. Its maximum output power can reach 90 W, the efficiency is about 85%, and the cost is less than 20 yuan, which has high market competitiveness.
Keywords: lead-acid battery; charging power supply; single-chip microcomputer; power management IC
Lead-acid batteries have been widely used due to their low manufacturing cost, large capacity and low price. However, if used improperly, their life will be greatly shortened. There are many factors that affect the life of lead-acid batteries, and the correct charging method can effectively extend the service life of batteries. Studies have found that the battery charging process has the greatest impact on battery life, while the discharge process has less impact. In other words, the vast majority of batteries are not damaged by use, but "damaged by charging". It can be seen that a good charger plays a vital role in the service life of batteries.
The charging curve that is currently more recognized is shown in Figure 1. This is also known as the three-stage charging method: constant current charging is used at the beginning and end of charging, and constant voltage charging is used in the middle. When the current decays to a predetermined value, it switches from the second stage to the third stage. This method can minimize the gas output and protect the battery life to the maximum extent.
The traditional 3842 charger has reliable performance and low price, but it can only realize the first two stages of the charging curve, cannot realize the floating charge (trickle charge) stage, and cannot realize intelligent control. Some so-called intelligent chargers on the market are all expensive and have no market competitiveness. This article introduces an intelligent charger that uses a single-chip microcomputer as a power management IC, which can truly realize the three-stage charging process and has functions such as status display, charging time control, and alarm. The cost of the whole machine is less than 20 yuan, which is very competitive in the market.
1 Power supply design scheme
1.1 Introduction to the overall scheme
The bottleneck problem of using a single-chip microcomputer as a power management IC is that the operation speed of the single-chip microcomputer is slow. When the load suddenly changes, it cannot be adjusted in time. In this case, the load is a battery. The process of charging the battery does not have the problem of sudden load changes, which makes it possible to use a single-chip microcomputer as a power management IC.
Since the output power of this circuit is less than 100 W, a flyback topology is adopted. The biggest advantage of the flyback topology is that it does not require an output filter inductor, which makes the flyback topology low in cost and small in size. The power management IC is designed on the secondary side of the circuit and is simulated by the ELAN brand EM78P258N microcontroller. The operating frequency of the microcontroller is set to 8 MHz. The EM78P258N is a highly cost-effective microcontroller. Its operating frequency can reach up to 20 MHz (external oscillator mode). It has four 12-bit precision AD converters, 2Kx13-bit on-chip registers, three eight-bit and one sixteen-bit timers, and a PWM waveform generator with a watchdog function. The primary and secondary sides of the circuit are isolated by a transformer. The transformer is not only simple in structure, but also easy to achieve a primary and secondary 3000VAC dielectric strength. The maximum output of the charger can be about 45 V/2 A, and can be adjusted according to actual needs. The switching frequency of this charger is set to 40 KHz, each cycle is divided into 200 parts, and the PWM can be adjusted 1/200 cycle each time, that is, 125 ns.
The circuit of this charger is shown in Figure 2. After the mains input is bridge rectified, a DC voltage of about 300 V is formed. The rectifier and filter circuit of this circuit is different from the usual one. For the battery charger, it is not necessary to filter out the 100 Hz pulsating current after rectification. The 100 Hz pulsating current is not only harmless to battery charging, but also beneficial. To a certain extent, it can play the role of pulse charging, so that the chemical reaction of the battery during the charging process has a chance to be buffered, and prevent the plate sulfation caused by continuous high current charging.
The initial working voltage of the microcontroller is provided by the load battery. When the load battery is not connected, the charger will not work. Since the sampling accuracy of the microcontroller EM78P258N chip is related to the power supply ripple of its power supply, the 7805 chip is used here to power it. The high level of the PWM pulse output by the EM78P258N chip is 5V, and the turn-on voltage of IRF840 is 4V. However, since the output signal of the EM78P258N chip must first pass through the amplifier circuit and then through the coupling of the signal transformer before driving the switch tube IRF840, the PWM waveform will inevitably be distorted. In order to reduce the loss, the voltage of the signal amplifier circuit is set to 20 V. After testing, this will greatly improve the efficiency of the circuit. This 20 V voltage is provided by the 7820 chip. The inputs of the 7805 chip and the 7820 chip are both connected to the output end of this charger (not shown in Figure 2). Pins 6 and 7 of the EM78P258N chip are used to control the signal lights. By observing the on and off status of the two signal lights, we can know which stage this circuit is working in. Pin 11 is set as the alarm control signal terminal. When the battery charging process is completed or the charger fails, this pin controls the alarm to emit different alarm sounds. Among the 4 AD converters, pin 13 is used to collect voltage signals, pin 14 is used to collect current signals, pin 1 is used to collect temperature signals, and pin 2 is idle and can be used for future function upgrades. Pin 3 is used to monitor 220VAC mains power. When the charger is powered off, the microcontroller enters a dormant state. The current sampling resistor can also complete the function of a dummy load.
This circuit starts working only after both the mains power and the battery are connected. If either the battery or the mains power is disconnected, the circuit stops working, and the reliability is good.
1.2 Design of microcontroller software
Since the EM78P258N chip is not a dedicated power management IC, when designing the program, it is necessary to take into account all possible working states as much as possible. Due to the limitation of the operation speed of the single-chip microcomputer (in this example, one instruction cycle is 125 ns), it is impossible to achieve particularly accurate voltage or current output, but for lead-acid batteries, appropriate voltage or current ripple is beneficial to eliminate the plate sulfation phenomenon.
The software control process is shown in Figure 3. When the battery is connected, the single-chip microcomputer starts to work. After initialization, the PWM is slowly turned on, and then the voltage on the current sampling resistor is detected, and the output current of the circuit is controlled to between 1.8 and 2 A. At the same time, the output voltage is detected and timed. If the time for the circuit output voltage to reach 42 V is less than 10 s, it is considered that the battery itself is full, and the program directly switches to the trickle state. When the output voltage of the circuit reaches 43 V, the program switches to the constant voltage charging stage. In this stage, the output voltage of the circuit is controlled to between 43 and 45 V, and the output current is detected and timed. When the output current is less than 200 mA, the program switches to the constant voltage to trickle stage. Since the battery has been float-charged to about 44.6 V in the constant voltage stage, and the voltage requirement in the trickle stage is about 41.4 V, if the constant voltage stage is directly transferred to the trickle stage after the end, the battery voltage will be higher than the charger output voltage, and the charging current will be zero, forcing the program to terminate. Therefore, after the constant voltage stage is over, the program first enters a constant voltage to trickle stage. In this stage, the charging current is controlled to between 80 and 100 mA. As the charging current decreases, the voltage at both ends of the battery will also decrease. When the voltage at both ends of the battery drops below 40 V, the program switches to the trickle stage to continue charging the battery, thus truly realizing the three-stage charging mode. After the trickle stage lasts for half an hour or the charging current is less than 50 mA, the microcontroller goes to sleep after a buzzer prompt, and the charging process ends.
During the entire working process of the single-chip microcomputer, the output voltage and output current of the charger are always monitored. If the program of the single-chip microcomputer is not completed, the battery is removed. At this time, the energy stored in the transformer when the switch tube is turned on cannot be fully released. After a long time, it will cause the magnetic saturation of the transformer and then burn the charger. Therefore, in the program, it is set that when the charging current is zero, the charging process is forced to end. If the output voltage of the charger is detected to be too high or the output current is too large, the charging program will also be forced to end to protect the battery from damage.
In the program, the execution time of each stage is recorded. If the charging time is too long or too short, it will jump to the corresponding program segment, or light up the signal light, or beep the alarm, or force the program to end, which makes the charging status clear at a glance.
1.3 Transformer Design Introduction
Since the charging current of the battery cannot be zero, this charger must work in the continuous working mode. Even if the flyback transformer works in the current continuous mode, although the total ampere-turns will not stay at zero, for each coil of the flyback transformer, the coil current is always in a discontinuous state. Of course, the current (ampere-turns) is intermittent. This is because during switching, the current (ampere-turns) switches back and forth between the primary and secondary, that is, when the primary ampere-turns decrease, the secondary ampere-turns increase by the same amount, and vice versa. Although the total ampere-turns are continuous and the ripple is small, the current of each coil
changes alternately from zero to the highest peak value. Regardless of the working mode, the coil AC loss is large.
In order to reduce costs, the switching device used in this example is IRF840 (500 V, 8 A), which makes it impossible for the transformer turns ratio to be too large, because the voltage of the AC power after rectification and filtering is about 300VDC, and the maximum output voltage of the charger is about 45VDC. The turns ratio N1/N2 is set to 2 during design, so that the IRF840 chip has a leakage inductance peak margin of about 100VDC, and the reduction is more reliable.
The volt-seconds of the primary and secondary of the transformer should be balanced, from which the maximum on-time of the switch tube can be calculated
.
In the formula,
is the minimum input voltage of the primary side of the transformer, T is the switching period, VO is the output voltage, N1 is the primary turns, N2 is the secondary turns, and the conduction voltage drop of the switch tube and the diode in the circuit is ignored here.
Assuming that the efficiency of the charger is 80% and the output power of the charger is 100 W, since the maximum on-time of the switch tube occurs when the input voltage is the lowest, the primary inductance of the transformer can be deduced
. In the formula, PO is the output power.
In order to ensure that this charger can work reliably in the continuous current mode, after debugging, the actual parameters of the transformer are as follows: the core uses TDK's PC40EER40 core, the air gap of the core column is set to 1.58 mm, and the skeleton uses a vertical skeleton with a row spacing of 25 mm, a pin spacing of 5 mm, and 6x6 pins. The primary winding is wound with 0.64mm high-strength enameled wire for 97 turns, with an inductance of 780 μH; the secondary winding is wound with 0.64 mm high-strength enameled wire in three parallels for 50 turns, with an inductance of 208 μH. Three layers of polyester film are placed between the primary and secondary windings, without varnishing.
2 Summary
According to the test, the maximum output power of this charger can reach 90 W, the efficiency is about 85%, and the cost of the whole machine is about 20 yuan, which has strong market competitiveness.
Due to the limitation of the operation speed of the single-chip microcomputer, the feedback loop cannot be made very stable by using the single-chip microcomputer analog power management IC, which increases the difficulty of the thermal design of the circuit. If you want to optimize the thermal design, you can use the method of adding an external oscillator to the single-chip microcomputer and increasing its operating frequency to 20 MHz. You can also divide the constant current charging stage into several stages. As the output voltage of the charger increases, the output current is gradually reduced to reduce the output power, and the heat generation of the charger is reduced at the cost of extending the charging time, which can greatly reduce the operating temperature of the charger.
This design is a successful attempt to realize the intelligent power supply by using a single-chip microcomputer to simulate the power management IC. Through this attempt, it is believed that the design ideas of intelligent power supply can be greatly expanded.
Previous article:Design of environmental temperature and humidity monitoring system based on GPRS
Next article:USB serial communication design based on CH341A
- Popular Resources
- Popular amplifiers
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
- What is impedance matching and why do we need impedance matching?
- Musk's "satellite dish" becomes a cat heater. Engineer: The cat is warm, but the Internet speed is so slow that it drives people crazy
- Does anyone have a good method for 4.2V disconnection monitoring?
- Can 5G Home Internet meet your broadband needs at home?
- Please help provide the code or download link for STM32 M0 to read and write AT24C256, thank you.
- Indoor positioning solution: UWB indoor positioning technology - Xindao Intelligent
- What are the most common wireless communication (data) transmission technologies?
- This week's review information, freshly arrived!
- CCS cannot build its own platform
- Qorvo Boosts Performance with Powerful New Multi-Time Programmable PMIC