Brief Analysis on the Design of Lithium Battery Charging System with Data Display

Publisher:琴弦悠扬Latest update time:2013-09-21 Source: 电子发烧友Keywords:TP8002 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  introduction

  In view of the coexistence of nickel-cadmium batteries and lithium batteries in the market, the charger designed in this paper can charge these two types of batteries. It uses pulse charging for nickel-cadmium battery packs and constant current charging for lithium battery packs. This is designed based on the different mechanisms of batteries, and truly achieves dual purposes. This is the innovation of the charger and also the difficulty of the design. The charger's widescreen LCD can display the charging status of 4 groups of chargers at the same time, and can also display the various parameters of the batteries on a group of chargers separately, so as to achieve real-time monitoring of the battery charging process.

  Overall system design

  The system design goals are:

  1. Can charge and discharge 4 groups of 8.4V lithium-ion batteries or 9.2V nickel-cadmium batteries at the same time.

  2. It can communicate with the chip in the battery pack to determine the chemical properties of the battery.

  3. For batteries with different chemical properties, corresponding charging methods will be adopted.

  4. It can communicate with the chip in the battery pack to obtain the voltage, charging current, capacity and other parameters of the battery pack.

  5. The charger is equipped with an LCD that can display various battery data.

  The functional block diagram of the charger is shown in Figure 1.

  

  Figure 1 System overall design structure diagram

  System hardware design

  Design and implementation of the master control unit

  The main control unit is composed of a microcontroller PIC16F873 and a keyboard control chip ZLG7289A. Its main task is to communicate with each charging unit and process user input and LCD display information. The keyboard control chip is responsible for the control of 6 buttons and 12 LEDs.

  The ZLG7289A and the microcontroller communicate bidirectionally via the SPI bus. The main control unit queries each charging unit once a second to obtain the current charging unit information, such as the presence of a battery, battery properties, battery voltage, etc. The LCD module then displays it to the user.

  Design and implementation of charging unit

  TP8002 Lithium-ion Battery

  Charging control chip

  The TP8002 is a high efficiency stand-alone switch mode Li-ion battery charge controller. The controller is available in 4.2V and 8.4V versions.

  TP8002-8.4 has a 500kHz switching frequency and is a high-efficiency current-mode PWM controller. By driving an external P-channel MOSFET, it can provide a charging current of 4A with an efficiency of up to 90%. The output voltage is set to 8.4V, the final floating voltage has an accuracy of 1%, and the charging accuracy is 5%. In addition, the device can operate on a variety of wall adapters in the range of 9V~22V. Compared with hysteresis topology chargers, the fast operating frequency and current mode architecture of TP8002-8.4 enable the use of small inductors and capacitors.

  Lithium-ion/Ni-Cadmium battery

  Overall design of the charging unit

  From the previous analysis of TP8002, we know that this chip is a charging controller for lithium-ion batteries. To realize the charging of nickel-cadmium batteries, the following problems need to be solved: First, TP8002 monitors the battery voltage to ensure that the battery voltage does not exceed 8.4V. But for nickel-cadmium battery packs, the charging cut-off voltage can reach 9.2V. Secondly, when the charging of nickel-cadmium batteries is about to end, the batteries need to be trickle-charged at 30% and 10% of the normal current. Therefore, the second problem that needs to be solved is how to control the current size of constant current charging. In addition, pulse charging should be used for charging nickel-cadmium batteries. That is, with a cycle of 1s, 95% of the time is used for charging, 1% of the time is used for discharging, and the rest of the time is neither charged nor discharged. Finally, how to judge whether a battery is a lithium-ion battery or a nickel-cadmium battery, because if a lithium-ion battery is misjudged as a nickel-cadmium battery, the charging voltage will be higher than 8.4V, which is very dangerous for lithium-ion batteries, and if a nickel-cadmium battery is misjudged as a lithium-ion battery, it may cause the battery to be undercharged. Therefore, it is necessary to ensure a very low misjudgment rate.

  Based on the working principle of TP8002, this part designs a circuit that can charge lithium-ion batteries with constant current and constant voltage, and also charge nickel-cadmium batteries with pulse charging. The overall functional block diagram of the charging unit is shown in Figure 2. Among them, the signal conditioning circuit enables the charger to charge both 8.4V lithium batteries and 9.2V nickel-cadmium batteries, and also plays a role in controlling the charging current.

  

  Figure 2 Overall functional block diagram of the charging unit

  The microcontroller is used to control the working state of TP8002, and the discharge circuit is used to enable the charger to charge the nickel-cadmium battery in a pulse manner.

  The microcontroller communicates with the smart battery through a certain communication protocol (HDQ16) to determine its key parameters such as capacity and chemical properties.  Design of signal conditioning circuit

  In order to enable TP8002 to charge batteries higher than 8.4V with constant current and adjust the charging current, a signal conditioning circuit is added between the BAT and SENSE terminals of TP8002 and the sampling resistor. The main function of this circuit is to operate the signals at both ends of the sampling resistor and send the corresponding signals to TP8002 for batteries with different chemical properties. The signal conditioning circuit is shown in Figure 3.

  

  Figure 3 Functional diagram of the signal conditioning circuit

  Here, the voltage values ​​across the sampling resistor are defined as VBAT and Vsense, so the voltage drop VRS of the charging current on the sampling resistor is: VRS=Vsense-VBAT, and this signal is the output of the subtractor. Let the multiplication coefficient of the multiplier be K, then the output of the multiplier is KVRS. For lithium batteries, the two-choice switch will select the battery voltage VBAT; for nickel-cadmium batteries, the two-choice switch will select the 7V constant voltage. Here, let the output of the two-choice analog switch be V1, then the output Vs of the adder should be: Vs=KVRS+V1, so that the voltage difference between BAT and SENSE sent to TP8002 should be KVRS. As long as the K value is correctly controlled, the charging current can be made 1/K of the normal charging current. Therefore, the current can be controlled by the two-choice switch to be 10% or 30% of the constant current charging.

  For the BAT input value of TP8002, when the switch selects the lithium-ion battery, the BAT input is the battery voltage. At this time, TP8002 can control the entire lithium-ion charging process without any external intervention.

  When the switch selects the 7V constant voltage, the input of the BAT terminal is constant at 7V. At this time, TP8002 cannot know the real voltage of the battery and only thinks that the battery voltage is 7V. Therefore, even though the battery voltage is higher than 8.4V, the battery will still be charged with a constant current. In this case, the intervention of the microcontroller is required, otherwise, the battery will be overcharged. Since the microcontroller has an ADC inside, the change of battery voltage can be monitored. When the battery voltage reaches the specified value, the charging current is reduced until the battery is fully charged. In this way, a 9.2V nickel-cadmium battery can be charged.

  Design of pulse charge and discharge circuit

  Since TP8002 is a constant current charging control chip, its charge enable pin COMP must be controlled by a microcontroller. When TP8002 needs to output a charging pulse, the port that controls the COMP pin becomes a high impedance state. When the COMP pin rises to more than 360mV, the charging current is output. When discharging, the COMP pin must be pulled low to turn off the charging current of TP8002. After that, the discharge circuit is turned on. The microcontroller is PIC16F873, which is an 8-bit microcontroller based on Flash. It has timer, watchdog circuit, 10-bit ADC and other modules inside.

  

  Figure 4 Flowchart of the main program of the charging unit

  The microcontroller performs pulse charging and discharging of the nickel-cadmium battery with a cycle of 1s.

  System software design

  System software overall design

  The microcontroller in the charging unit is mainly responsible for controlling the charging process and communicating with the main control board. The program flow is shown in Figure 4. The charging unit first determines whether there is a battery. If a battery is inserted, it determines the charge and discharge state. The default state is the charging state, which can be changed by the main control unit. If the charging unit is in the charging state, it continues to determine the chemical properties of the battery and adopts different charging methods for different batteries. If it is in the discharging state, the battery pack is discharged until the battery voltage is lower than the threshold voltage, and then it is switched to the charging state.

  In addition to the main program, the communication between the master control unit and the charging unit is implemented in the interrupt service program. When the charging unit receives the instruction from the master control unit, it enters the interrupt. If the instruction is a data query instruction, the required data is sent to the master control unit. If it is a charging status setting instruction, the charging status of the charging unit is set according to the instruction.

  Implementation of communication protocol

  The properties of the battery are determined by communicating with the energy metering chip in the battery pack. This system can communicate with smart battery packs that follow the HDQ16 interface protocol. In addition to the chemical properties of the battery pack, the capacity, voltage, charging current, serial number and other data of the battery pack can also be read for display by the charger.

  The charging unit can read the smart battery through the HDQ bus. The HDQ16 interface protocol is a command-based protocol. A processor sends an 8-bit command code to the smart battery. This 8-bit command code consists of two parts, a 7-bit HDQ16 command code (bits 0 to 6) and a 1-bit read/write command. The read/write command instructs the smart battery to store the next 16 bits of data into a specified register, or output 16 bits of data from a specified register. In HDQ16, the least significant bit of a data byte (command) or word (data) is transmitted first.

  The transmission of a block consists of three different parts. The first part starts with the host or smart battery setting the HDQ16 pin to a logic low state for a tSTRH:B time. The next part is the actual data transmission. The data bit is valid during the tDSU:B time interval, and the negative boundary is used to start communication. The data bit is held for a tDH:DV time interval to allow the host or smart battery to sample the data bit.

  After starting the communication on the negative boundary, the last part stops the transfer by returning a logic high state to the HDQ16 pin for at least tSSU:B interval. The last logic high state must be maintained for a tCYCH:B interval to allow time for the block transfer to completely stop.

  If a communication error occurs (eg, tCYCB>250ms), the host sends a BREAK signal to the smart battery to control the serial interface. The smart battery detects BREAK when the HDQ16 pin is in a logic low state for a time interval or longer. Then, the HDQ16 pin returns to its normal preset high logic state for a tBR time interval. Then, the smart battery is ready to receive commands from the host.

  The HDQ16 pin is open drain and requires an external pull-up resistor.

  FIG. 5 is a communication waveform on an HDQ bus displayed by a logic analyzer.

  

  Figure 5 A HDQ bus communication waveform

  Conclusion

  The charging system proposed in this article solves the above problems well from a technical point of view. Through the LCD display screen, important information such as the remaining capacity of the power supply, the number of charge and discharge times, the charge and discharge current, the battery voltage, the capacity statistics and the battery characteristics can be clearly and conveniently read out. In addition, through the setting, it can be determined whether the power supply has reached the scrap standard and the operator can be reminded to update the power supply in time.

  LED backlight driver IC

Keywords:TP8002 Reference address:Brief Analysis on the Design of Lithium Battery Charging System with Data Display

Previous article:How to Correctly Select Low Dropout Linear Regulator
Next article:How to choose EN55022 standard low EMI power supply

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号