LabVIEW GUI for Battery Monitoring system

P K Surya Praneeta


Any battery, may it be a lead acid or a Li-ion battery, has to be tested multiple times to test the battery capacity, leakage resistance and the time battery capacity can withstand. For these types of processes, a human cannot sit in front of the setup to record the voltage, current, cycle count and other values. To simplify this job a LabVIEW Graphical User Interface (GUI) can be made to automate the battery monitoring system.

Every battery which has to be charged or discharged, has two significant limits, Lower Threshold Point (LTP) and the Upper Threshold Point (UTP). When the battery starts charging and reaches UTP, a relay is automatically switched on and starts discharging. Two relays with a provision of sensing voltage and current are included for this charging and discharging cycle.

Cyclic charging and discharging cycle

A cyclic process has to involved while programming in LabVIEW, which resembles an SR flip flop as shown in Figure 1 below;

Cyclic Process for a battery
Fig: Cyclic Process for a battery

Here the source may be a constant current source or constant voltage source. Used here are the NI-9222 card, which is an Analog input/output sensor, NI-9148, which is a Relay module and a chassis for connecting all these modules to a PC through Ethernet which is an NI-9188, a cDAQ (compact Data Acquisition). The block diagram for the process is shown below;

Block Diagram of the process which has been automated
Fig: Block Diagram of the process which has been automated

LabVIEW Panel for the battery monitoring system

LabVIEW is a user-friendly software for graphical coding. It has a front panel for user interface and block diagram where the entire code is developed. The basic GUI has a provision to set UTP and LTP points, voltage and current of the battery, whether it is charging or discharging. This is designed basically to see the battery leakage resistance or measure the time in which it is going into discharging mode. A manual switch is given by pressing it only when the system starts.

Battery monitoring system: basic GUI
Battery monitoring system: basic GUI

The final GUI is made with all provisions to give number of counts or cycles, delay in charging and discharging cycles, indications for which phase of the cycle it is in. The below figure shows the outline of the user interface panel, where all the above indications can be seen. Provision for displaying actual count and the set count is also available.

Once all the connections with the source, including the modules and the battery are made, then only the application panel with all values is executed. You might forgot to set any value or if you set any reverse values it has to be indicated, otherwise the battery may be destroyed.

Final GUI with all displays involved
Fig: Final GUI of the battery monitoring system with all displays involved

Those popup should arrive as soon as the application is executed. Below is an example to set the initial values. By initializing all values, the VI executes and a manual ON/OFF button is provided to start the process or stop whenever needed between the cycles.

Pop-up display if by mistake the VI is run without values
Fig: Pop-up display if by mistake the VI is run without values

Without differentiating the UTP and LTP, as LTP should be less than UTP an error might popup. Any error while adjusting these values also shows a popup to indicate an invalid condition as shown below;

Pop-up if the values given reversed
Fig: Pop-up if the values given reversed

If all the conditions are satisfied then the process can be executed any number of times. There is a provision for the data to be recorded in the database with all voltage, current, time for charging and discharging. For turning it on and off, a manual switch and an emergency stop button is also provided. The internal block diagram has a provision to save the database in an excel sheet of all values.



Please enter your comment!
Please enter your name here