Design of Internal Resistance Detection System for Retired Lithium-ion Batteries

Aiming at the echelon utilization of retired lithium-ion battery, an internal resistance detection system based on pulse discharging was designed. Taking STM32F103ZGT6 as the MCU of the lower computer, the collection circuits of voltage and current are designed, and the internal resistance of the battery is estimated by the collected information. The upper computer operation software is compiled, and the test results are stored in the database, which is convenient for management and query.


Introduction
Lithium-ion battery has been widely used in electric vehicles and other fields because of its high energy density, long service life and small memory effect. The performance of lithium-ion battery will decrease with the increase of cycle times. It will not meet the requirements of electric vehicles when the attenuation reaches a certain degree. However, it still has a wide application space in other occasions [1] . Therefore, it is of great significance for promoting the healthy development of the electric vehicle industry to extend the service life of lithium battery through echelon utilization.
Internal resistance is one of the most important indicators to judge the battery performance. Abnormal internal resistance will lead to premature termination of charging and discharging process. Currently, common methods for detecting internal resistance of lithium-ion battery include open-circuit voltage method [2,3] , DC discharge method [4] and EIS method [5][6][7] . The open circuit voltage method is simple, but the accuracy is very poor. DC discharge method has small error and high precision, but the high discharge current will damage the battery. EIS method has high test accuracy and little damage to the battery, but it is expensive and less competitive in practical applications [8][9] .
The safety of retired lithium-ion battery is poor, it can not be charged or discharged through large current. And it is not suitable for the test method with complex process and high cost because of the low economic value. In addition, the test time cannot be too long considering of the engineering feasibility. Based on the above considerations, this design adopts the pulsed current discharge method to detect the internal resistance, which is precise, simple and safe.

Design principle
In this paper, first-order RC circuit is used to model the lithium battery. As shown in Fig 1, U OC , R 0 , R p , and C p are open circuit voltage, ohmic internal resistance, polarization internal resistance, and polarization capacitance, respectively. As shown in Fig. 2, When the pulse discharge current ΔI is applied to the battery, the battery terminal voltage U L will rapidly decrease ΔU 1 due to the ohmic internal resistance, and then slowly decrease ΔU 2 due to the polarization. When the pulse current is removed, the change of U L is reversed. When the pulse charging current is applied to the battery, the change of terminal voltage is reversed. According to the model shown in Fig. 1, the equation is established: (2) At the beginning of discharge: At the ending of discharge: τ = (7) According to (2~7), the values of R 0 , R p and C p can be fitted according to the voltage and current values in the charging and discharging process  Fig. 3 shows the overall structure of the internal resistance detection system for retired lithium battery, mainly including voltage and current acquisition and conditioning circuit, DC/DC circuit, protection circuit, lower computer and upper computer system. After starting up, the upper computer sends instructions to the lower computer to control the DC/DC circuit, and discharge the retired lithium battery. The voltage and current signals of retired lithium battery are collected and transmitted to the lower computer, which calculates the internal resistance of the battery and then transmits the results to the upper computer. The upper computer stores the test results in the database for later maintenance and management. STM32F103ZGT6 is selected as the MCU of lower computer, which uses 32-bit Cortex-M3 core, and the maximum operating frequency can reach 72Mhz. It comes with three 12 bit ADCs and one 12 bit DAC, meeting the accuracy requirements.

Design of voltage acquisition and conditioning circuit
The voltage of the 18650 lithium battery is generally 2.7~4.2V, while the maximum voltage of STM32 A/D input is 3.3V. As shown in Fig. 4, resistor R 1 and R 2 are used to divide the voltage of battery, and then the voltage is amplified to 0~3V through the in-phase amplifier circuit composed of U1B. The role of voltage follower is to reduce the influence of load on the sampled signal. The operational amplifier selected is LM324, which is low−cost, quad operational amplifiers with true differential inputs.
When the battery voltage is V b : Where = 20 Ω, = = = 10 Ω, = 1 Ω; the purpose of R 5 using adjustable resistor is to adjust the circuit gain conveniently. Combining (8) and (9), it can be obtained

Design of current acquisition and conditioning circuit
In this design, Hall current sensor is used to collect the current, and CC6900 with high performance is selected as the acquisition chip. This chip integrates a high-precision, low-noise linear Hall circuit and a low-impedance current wire. The relationship between its output voltage and input current is: = 0.5 + 0.067 (11) Where V cc generally takes +5.0V. The normal operating current of 18650 lithium battery is generally about 3A. When discharging, the current is positive and the output voltage V 4 of current sensor is in the range of +2.5~ +2.902V. When charging, the current is negative, and the range of V 4 is +2.098 ~ +2.5V.
As shown in Fig. 5, in order to improve detection accuracy, the V 4 is subtracted by +2.5V with the instrumentation amplifier U2. The output voltage range V 5 of U2 is -0.402~+0.402V, which is discharged when it is greater than 0V and charged when it is less than 0V. Then the voltage is amplified 6 times by the in-phase amplifier circuit composed of U1C, and input to the AD of STM32. According to the above analysis process, there are:

Design of Software
The system software mainly includes lower computer detection software and upper computer operation software. The lower computer software mainly executes the operation instructions sent by the upper computer, completes the collection and processing of voltage and current signals, and calculate the internal resistance, and transmits results to the upper computer. The upper computer operation software mainly provides a visual operation interface for operators, which is convenient to set parameters, send relevant instructions and manage historical data.

Main program for lower computer
As shown in Fig. 6, after starting the lower computer, the initialization subroutine is executed to initialize variables, then read the test parameters, and start the DC/DC circuit. The signal acquisition subroutine collects and processes the battery voltage and current information, and then determine whether normal. If normal, then calculate the resistance, and transmits it to the upper computer. Otherwise, it will send an alarm and end the test process in advance.

Operation software for upper computer
LabVIEW is adopted to compile the upper computer software, and the software operation interface is shown in Fig. 7. The upper left corner displays the time, number and other information, and the upper right corner displays the status of each battery in real time. When the battery is abnormal, the indicator light above the number will turn red. The specific information of abnormal battery is displayed in the lower left corner, which is convenient for the operator to find problems in time. The lower right corner is the basic operation area for detection.  Fig. 6 The lower computer program Fig. 7 The upper computer operating software

Conclusion
Aiming at the problem of detecting the internal resistance of retired lithium batteries, this paper adopts the method of discharging based on pulse current to estimate the internal resistance. Taking STM32F103ZGT6 as the MCU of lower computer, the acquisition and conditioning circuit of voltage and current is designed. The operation software of upper computer is compiled by LabVIEW to send operation instructions and manage the detection data. The circuit structure is simple, the detection accuracy is high, and the cost is low. It provides a good solution for the internal resistance detection of retired lithium batteries.