Keywords

1 Introduction

The battery management system is the most important system for energy storage and the main research direction. BMS can not only improve the use efficiency of energy storage batteries, but also monitor the battery working in a healthy state, extend the cycle life of the battery, [1] and maintain the best working condition of the battery. The basic function of the battery management system is to prevent the occurrence of single cells. Overcharge, overdischarge, overheat, overcurrent, overvoltage, and can even charge the single battery. SOC is the most important parameter of the battery management system, [2] and there are many factors that affect the estimation of remaining power, so higher requirements are put forward for the accuracy of SOC.

2 Battery Management System Hardware Design

The hardware of the battery management system is the skeleton of the management system. The hardware circuit design mainly includes the auxiliary power module, the main control chip and its minimum system, current detection circuit, voltage detection circuit, active equalization circuit, temperature control unit, etc. The overall hardware design is shown in Fig. 1.

Fig. 1.
figure 1

Hardware design block diagram.

2.1 Power Circuit

The switching power supply module adopts a block design, and controls the output voltage by controlling the MOSFET to work intermittently. This system uses a 12 V battery to provide total power. The integrated chip requires different operating voltages, mainly 5 V and 3.3 V power. The 5 V power supply is mainly for current sampling, voltage sampling, reference power supply, gate circuit power supply, and circuit schematic as shown in Fig. 2. The 3.3 V power supply is mainly used to provide power for the main control chip STM32F103, and the STM32F103 special power supply ASM1117–3.3 is obtained by 5 V step-down. The circuit schematic is shown in Fig. 3.

Fig. 2.
figure 2

5 V power supply schematic

Fig. 3.
figure 3

3.3 V power supply schematic

2.2 Protection Circuit

When the battery temperature is too high, the control circuit will start the fan to ensure the battery's operating temperature. When the battery has a serious undervoltage or overvoltage, the control circuit can cut off the main circuit. In normal operation, KT1 outputs high level, the optocoupler is turned on, 12 V enters the base of the BXC56 transistor, the collector and emitter are turned on, and the relay is closed. If it is necessary to disconnect the main circuit, KT1 output is low, K1-O is disconnected from CT1, and the main circuit is disconnected. The fault protection control circuit is shown as in Fig. 4.

Fig. 4.
figure 4

Protection circuit

2.3 Current Sampling Circuit

Current is an important parameter that shows the working state of the battery, and also an important indicator for estimating the remaining power (SOC). A voltage isolation amplifier is used in the circuit design to reduce the ripple of the input current through RC filtering (R1, R2 and C2). C3 and C4 can reduce the sudden change of the input current. Then use a differential amplifier to convert the sampled value, and BAT1 is the sampled value. Figure 5 is the schematic diagram of the current sampling circuit.

Fig. 5.
figure 5

Current sampling circuit

2.4 Active Equalization Circuit

The active balancing circuit topology uses MOS transistors as switching devices, and high-current diodes as unidirectional current control devices to achieve active balancing [3]. In the entire battery pack, the lowest voltage of BAT16 needs to be supplemented, and the control level turns on the lower P-type MOS transistor Q40 and the upper-end N-type MOS transistor. The charging current sequentially passes through Q40, D40, BAT16, D28, and Q28 to form the battery BAT16. In the charging circuit, in order to prevent battery short circuit or constant current source short circuit when the MOS tube is broken down, high current diodes are added to each branch, which can realize that even if the control circuit fails, the additional circuit will not cause the battery pack to short circuit. The schematic is shown in Fig. 6.

Fig. 6.
figure 6

Active equalization circuit

3 Battery Management System Software Design

The stability of the management system depends on the reliability of the hardware circuit and the rationality of the software. This system uses CAN communication as the communication method. The system mainly includes the functions of detecting battery current, cell voltage, collecting temperature, battery equalization, power estimation, etc. It is completed by six subroutines, namely, current sampling subroutine design and voltage sampling subroutine., Temperature sampling subroutine, active balance subroutine, battery power estimation subroutine, fault judgment subroutine. The voltage and temperature of the single battery of the system are collected by the AD7280A, with internal registers and a CRC check mechanism to ensure the accuracy of the collected data. The upper 8 bits of the configuration register, D15, D14 can be defined as the conversion input channel, D13, D12 are defined as the read conversion result, D6, D5 are defined as the acquisition time, the system sets the sampling time to 400ns, and the default CNVST input is The low level indicates the start of acquisition. The subroutine first receives the voltage and current values sent by the DSP, selects the appropriate algorithm and function, and calculates and analyzes it to get the estimated power value. The flowchart is shown in Fig. 7. The AD7280A comes with a battery equalization register, the address is 0 × 14, and the battery equalization register has a total of 8 bits. D0 and D1 are reserved bits. D2 ~ D7 can control the opening and closing of CB1 ~ CB6, so as to drive the external MOSFET and realize the function of active equalization. The flow chart of the battery equalization subroutine is shown in Fig. 8.

Fig. 7.
figure 7

Battery power estimation subroutine

Fig. 8.
figure 8

Active equalization flowchart

4 System Experiment and Debugging

4.1 Experimental Equipment

A total of 8 lithium iron phosphate 18650 batteries were used in this experiment. The nominal voltage of a single cell is 3.7 V, the final charging voltage is 4.2 V, and the final discharging voltage is 3.2 V. The adjustable linear power supply is used as an analog charger in this test, with a voltage operating range of 0 ~ 30 V and a current operating range of 0 ~ 18 A. The load that converts electrical energy into heat is used as a discharge device. The voltage range of the multimeter is 0.1mV ~ 1000V, and the DC current range is 0.1 uA ~ 10 A. One oscilloscope, programmable constant temperature and humidity box, temperature adjustment range −80 ℃ ~ 150 ℃ . Figure 9 is the physical map of the system.

Fig. 9.
figure 9

Physical map of the battery management system.

4.2 Single Cell Voltage Sampling Experiment

After the system samples the analog voltage of the single cell voltage, it calculates the digital data through the internal calculation of the AD7280A, which is displayed on the human-machine interactive display. However, because there is a certain error in the digital-to-analog conversion, through this experiment, the error of the digital-to-analog conversion is calculated, and finally it is analyzed whether the error is within the error range. The test method is to use a multimeter to measure the cell voltage and compare it with the system detection value to calculate the absolute error. The experiment results in Table 1 below, and Fig. 10 shows the measured values.

Table 1. Comparison of single cell sampling
Fig. 10.
figure 10

Comparison of the voltage detected by the system and the measured value

According to the chart, the absolute error of the voltage is 0.2628%, which is within the allowable error range of the battery management system.

4.3 Current Sampling Experiment

The accuracy of the current sampling directly affects the system's estimation of the remaining power of the entire battery pack. The current sampling experiment has two charging conditions and discharging conditions. The linear power supply and discharge load are used to control the charge and discharge of the battery. Compare the current value measured by the multimeter with the system detection value, and get the following Table 2. Figure 11 shows the discharge current and discharge load.

Table 2. Comparison of current sampling
Fig. 11.
figure 11

Discharge current and discharge load

4.4 Temperature Sampling Experiment

The system detects a total of four temperatures, which are the temperature of the internal power tube and the temperature of the system's auxiliary power supply. There are two temperature sampling points inside the battery pack to detect the temperature of the battery pack. Lithium-ion batteries have higher temperature requirements, so the accuracy of temperature sampling ensures the safety and stability of the battery pack during operation. The specific method of the experiment is to put the system into a programmable constant temperature and humidity box, set different temperatures, and compare the temperature value of the constant temperature box with the temperature value detected by the system, because the same circuit is used for the 4-way temperature detection. So the experiment only compared the temperature sampling of the internal power tube. Table 3 shows the comparison of data.

Table 3. Comparison of temperature sampling

After comparison, the error range of the temperature detection is within the allowable range.

4.5 Equilibrium Experiment

The battery pack is a combination of multiple batteries. This system uses 8 single cells. In the process of using the battery pack, because the individual batteries have certain differences, after the battery is charged and discharged, some battery voltages will be much lower than other battery voltages, or after charging, some battery voltages are higher than other batteries. Many, this is called battery imbalance. This system has designed an active equalization circuit. When the battery voltage difference is greater than 50 mV, the AD7280A chip's equalization register is controlled by software, and the corresponding pins control the MOSFET on and off. Discharge the over-voltage battery to reduce the voltage difference. In this experiment, discharge the physical examination of the 8th battery, then put it into the battery pack, measure the cell voltage separately, and then turn on the active equalization. After the equalization is completed, measure the cell voltage again, and then compare the battery voltage before and after the equalization to analyze the error. Table 4 shows the comparison of battery voltage before and after active equalization.

Table 4. Comparison of data from active equilibrium experiments

It can be seen from the table that the voltage difference between the battery with the lowest voltage (Sect. 8) and other batteries after equalization is reduced to less than 50 mV, and the purpose of equalization is obtained, indicating that the system's active equalization function can be normally achieved.

5 Summary

Through a series of comparative experiments, a large amount of data of the battery and the battery management system were collected. The data results show that the measurement errors of the battery management system are within the allowable range. Single cell voltage sampling, current sampling, temperature sampling, and active equalization can all achieve normal detection functions. It can also display the working status of the battery pack in real time, and the system can complete the function of active equalization management of energy storage batteries.