Design a battery management system (BMS) with an automatic cut off system on LFP (LiFePO4) battery type for powerbank application

A battery is a cell device that can store energy and be converted into a constant voltage. Overcharging and over-discharging conditions on the battery are often a problem. This research designed a Battery Management System (BMS) to monitor battery performance with an automatic Cut Off system. The prototype system uses a voltage divider circuit in the voltage measurement process, one channel relay as the process of cutting off the electric current and Arduino UNO microcontroller as a data processor. Testing on five cell LiFePO4 (LFP) 3.2 volt battery with 1200 mAh capacity using the charging and discharging method in measuring the battery voltage. The results of measuring the voltage in the charging process take 2 hours 25 minutes to reach a voltage of 3.26 V obtained an average error value of each cell measurement of 0.44%. While the discharging process, to reach the voltage of 2.00 V, required an emptying time of 7 hours 15 minutes for output without step-up and 2 hours 46 minutes for the output with step-up obtained an average measurement error value of each cell 1.11% and 1.39%.


Introduction
A battery is a cell device that can store and convert energy into a constant voltage that works based on electrochemical principles. The battery can store energy, and in it occurs a reversible chemical process. The chemical process in this battery occurs when changing chemical energy into electrical energy (discharging process) and changing electrical energy into chemical energy (charging process). In the working process, the battery will displace electrons through a negative electrode toward the positive electrode [1,2].
A battery can be recharged after experiencing a decline in a secondary battery of is that allows the process is reversible electrochemistry. The lithium-ion battery is one type of battery much used [3]. One lithium battery that continues to developed was Lithium Iron Phosphate (LiFePO4) or could be called LFP. It was because LiFePO4 has a structure stable, which keeps safe for the cathode lithium battery [4]. Also, the battery has a high capacity of 170 mAh/g, no toxic or environmentally friendly, does not have the effect of memory, and easy to get to be affordable [5,6,7].
The problems often occur in a battery that is the experience of overcharging or over-discharging that can affect the condition of the battery [8]. To keep the battery condition for optimal performance, it takes a sophisticated and efficient system to monitor the battery condition. Battery Management System (BMS) is a device with a sensor system designed to monitor and control critical parameter battery pack for the smooth and the performance of batteries when subjected to over-discharging or overcharging [9]. One of the BMS systems for a lithium battery applied to electric vehicles that can carry out voltage cell balancing is the type of Nickel Manganese Cobalt Oxide (LiNiMnCo) 18650 or could be called NMC 18650 [10].
Based on the above problems, the objective of this study is to build a Battery Management System (BMS) for the type of Lithium Iron Phosphate (LiFePO4) 18650 using the Arduino UNO microcontroller system to monitor the performance of the battery in the charging process which is equipped with an automatic Cut Off system. In testing the estimated capacity of the battery's power capacity using the charging-discharging method. The benefit of this research is to get a sophisticated and efficient BMS design that can be applied to electronic devices and can be used as a reference for research in designing BMS.

Method
This research uses a type of lithium battery LFP 18650 with an average voltage of 3.2 Volts, and a USB LED lamp for testing the discharging process. This BMS system design research was carried out with two stages, namely design and testing. The design stage consists of 4 steps, including the design of charging and discharging circuit, monitoring the status of the battery voltage and circuit breakers (cut off) input charging and discharging. At the testing stage, the method is charging and discharging.

BMS charging circuit design
The making of this circuit is used Arduino microcontroller as a regulator of components in the charging process. The components governed by Arduino include setting up a one channel relay module in the process of disconnecting the flowing electric current, monitoring the battery voltage status on the 16x2 LCD screen, and simultaneously charging the LFP battery. The supply voltage needed to charge the battery is taken from the Arduino UNO's power pin, which has an output voltage of 3.3 volts. In this system, an adapter is used to activate Arduino UNO. This circuit schematic can be seen in Figure 1. In this system, the LCD is used to display the value of the incoming voltage on the battery, which is measured using a voltage divider circuit. This voltage divider circuit is composed of 2 resistors with a resistance value of 1 k ohm connected in series to the voltage divider referenced to ground, to produce a lower voltage output value when compared to the input. The output value generated from the voltage divider circuit is always smaller than the input. Calculation of the output value generated in this circuit can be specified in the formula [9] :

BMS discharging circuit design
This circuit's design is made to get the process of discharging from a battery that is applied to electronic device equipment. In this series, there is a manual switch used as a safety and regulator when the discharging process occurs on or off. This system's output is divided into two types, namely USB output with 5V Booster and USB output port without 5V Booster. The amount of change in the

Design of input charging cut off
In this charging circuit, one channel relay module was added as a regulator of the charging process to cut off the electric current that flows. The Normally Open (NO) port will be connected to the battery charging circuit, and the COM port was connected to the voltage source. The Arduino UNO microcontroller will control the relay module, when the microcontroller gives a high signal or logic "1", then the relay will be connected to NO Port and conduct electricity to the circuit. In contrast, when the microcontroller gives a low signal or logic "0", then the relay will cut off power because it has already reached the maximum voltage entered into the battery. The Arduino UNO microcontroller will read the change in the value of the battery voltage until it reaches the standard battery voltage of 3.2 Volts

System circuit testing
The battery charging circuit test was carried out using a lithium-ion battery type LFP 18650 with a standard voltage on the battery of 3.2 V. The data obtained from this circuit in the form of an increase in the value of the voltage entering the battery to reach the maximum limit on the battery. Measurement of the voltage increase in this battery will be monitored by the LCD, displaying the voltage value and the percentage of capacity in the battery. When the battery voltage value on the LCD reaches the maximum battery voltage limit, the current that flows will be interrupted automatically by a relay that regulates the charging process that has been programmed by the Arduino UNO microcontroller. Then in the process of discharging, the battery will be tested directly on electronic equipment to determine the length of use after experiencing the charging process. The flow chart of the charging and discharging process circuit can be seen in Figures 3 and 4.

Results and Discussion
The result of this research is an instrument that can be used to control the charging and discharging process of LFP battery (LiFePO4). The result of this research is presented in figure 5, where the device is equipped with a 16x2 LCD as an interface that is used to monitor the status of the battery voltage during the charging process while discharging, battery voltage status monitoring is carried out by a DC Voltmeter mini digital display module.  From Figure 5 and Figure 6, it can be seen the physical form of the design of the device designed in a circuit in which there is an Arduino UNO microcontroller as the input/output connecting all components, including the relay module as a breaker of the electric current in the LFP battery in a condition of 100% (full, voltage 3,26V) or 0% (empty, voltage 2V) and a set of 16x2 LCD modules with additional I2C modules to display the results of monitoring battery voltage status. The following is a display of the Battery Management System (BMS) design with an automatic Cut Off system on LFP (LiFePO4) type battery. In this discharging system design, there is a USB port that functions as the output of the power current from the BMS circuit discharging the process to the device. Also, the adapter is a means to get an electric voltage source and activate the microcontroller to manage all components, as shown in Figures 5 and 6.
The battery charging process is characterized by an increased value of the battery voltage displayed on the LCD screen during the charging process and a mini digital display DC Voltmeter during the discharging process. Display on these components is the status of the battery condition in the whole process that takes place in the form of the voltage's value entering the battery, as shown in Figures 7 and 8. The design is expected to be used as an alternative to BMS use, especially on the LFP (LiFePO4) battery.

Testing the charging process
The charging test was carried out to determine how long it takes the system to charge the battery. The charging process on this LFP battery requires a voltage of 3.2 Volts. This time testing uses a power pin on the Arduino UNO with a 3.3 Volt output voltage specification and a current of 50mA. In this test, 5 LFP battery samples were used to determine the time needed to reach the maximum battery voltage during the charging process. The state of the battery charged at an initial voltage condition of 2.01 Volts -2.04 Volts.
In this data collection, a time interval of 1-minute data will be taken to increase the battery voltage. Based on the charging process data, it can be analyzed that the battery charging cycle during the first minute has a high enough voltage increase. After that, the detected voltage tends to be constant. The results of the graph for the charging process can be seen in Figure 9. Based on the graph shown in Figure 9, the initial high voltage rise for the first 1 minute of each battery occurs at a voltage of 2.02 Volts -2.73 Volts for LFP A, 2.03 Volts -2.50 Volts for LFP B, 2.03 Volts -2.63 Volts for LFP C, 2.01 Volts -2.59 Volts for LFP D and 2.04 Volts -2.63 Volts for LFP E. Then the voltage tends to be constant after passing through the first minute of the charging process until reaching 3.26 Volts which occurs because of the first cycle of high inrush currents. In theory, the greater the voltage that enters the battery, the less current will enter the battery. A decrease in the current rating on the battery indicates the battery is undergoing a charging process. When the charging process on the LFP battery has reached the saturation point of the battery in the voltage range of 3.20 Volts, charging voltage will tend to be constant, and the system on the relay will disconnect the charging circuit to avoid overcharging the battery. During the charging process, the time required for each battery to reach a voltage of 3.26 Volts is 148 minutes for LFP A, 139 minutes for LFP B, 146 minutes for LFP C, 147 minutes for LFP D and 141 minutes for LFP E. In This system performance can be calculated that the average error value of voltage measurement when charging each battery cell is 0.44%.

Testing the Discharging process
At the testing stage, the battery discharging process is applied to USB LED device devices that require around 7 watts of power. This process carried out by two tests using the DC Step Up Boost Converter Power Module to increase the DC battery voltage from 3.2 Volts to 5 Volts and the female USB Port to be applied directly from the battery to the device. The first test is performed using a female USB port without a DC step-up. The discharging process is carried out at the initial battery voltage of 3.05V. Based on the graph shown in Figure 10, the process of discharging each battery lasts 433 minutes for LFP A, 427 minutes for LFP B, 433 minutes for LFP C, 438 minutes for LFP D and 435 minutes for LFP E. Viewed from the prolonged usage batteries with this system can be used around 435 minutes or 7 hours 15 minutes. During the discharging process of each LFP battery, the battery voltage drops significantly by 0.07 Volts to 0.13 Volts for the first 1 minute from the initial voltage of 3.26 Volts, then drops slowly and forms a near-linear curve. This formed curve shows the  The results shown in Figure 10 show that the characteristics of a battery charge-discharge with an average working voltage in the range of 3.17 Volts to 2.91 Volts have been obtained. In this process, the battery discharge will be immediately stopped when the voltage reaches 2 Volts because the LFP battery has reached the absolute minimum discharge voltage. In this system performance, it can be calculated that the average error value of voltage measurement when discharging each battery cell is 1.11%.  The second test performed using the DC Step Up Boost Converter Power Module in Figure 11. In discharging each battery, a voltage drop for the first minute is equal to 0.06 Volts -0.09 Volts from the initial voltage ranging from 3.34 Volts -3.44 Volts. In this system the discharge process of each battery lasts for 166 minutes for LFP A, 164 minutes for LFP B, 170 minutes for LFP C, 164 minutes for LFP D and 166 minutes for LFP E with an average error value of voltage measurement when discharging each cell battery is 1.39%. Compared to the discharging process system without step up, the time needed to reach the minimum voltage of this battery is faster. It might be due to in this stepup module it has a large current load, resulting in the use of excess voltage in the system which causes the voltage recorded to drop quickly so that the discharge time to reach the minimum battery voltage of 2.00 Volts lasts around 166 minutes or 2 hour 46 minutes.

Conclusion
This research resulted in a Battery Management System (BMS) design with an automatic cut-off system on LFP (LiFePO4) battery for power bank-based microcontroller applications using Arduino UNO with a combination of 1 channel relay module components, a battery status monitoring circuit on 16x2 LCD and a series of 16x2 LCD circuits discharging using the USB Booster 5V module. The results of testing on the charging process where the relay system cut off automatically when the battery voltage reaches 3.26 V with a percentage of 100% battery power capacity in the duration of time for 2 hours 25 minutes from the initial voltage around 2.03 with an average error value of each measurement cell battery 0.44%. The voltage value and the percentage of battery power increase as the charging process takes place. In the process of discharging the test results obtained at an initial voltage of 3.26 with a duration of time for 7 hours 15 minutes to reach a minimum voltage of 2.0 V displayed on the monitor display for USB output without step-up with the average error value of each cell measurement 1.11% battery. Whereas the USB output with step-up obtained the initial voltage around 3.38 V with a duration of 2 hours 46 minutes to reach 2.0V with an average error value of measurement of each cell battery 1.39%.