Wireless Battery Monitoring System for Lithium Battery Packs
2025-01-09 | By Jobit Joseph
License: Attribution-NonCommercial-ShareAlike ADCs Analog Batteries Battery Charger / Management Wifi Wireless Arduino ESP32
Lithium-ion batteries are ubiquitous in modern applications, including electric vehicles, home UPS systems, and flashlights. To ensure their safety and efficiency, it is essential to monitor the voltage and current of individual cells in a battery pack. This project demonstrates how to build a Wireless Battery Monitoring System using the ESP32 microcontroller. The system monitors individual cell voltages and facilitates cell balancing through a web interface.
Key Features
Monitors individual cell voltage of a multi-cell lithium-ion battery pack.
Wireless communication for remote monitoring via a web server.
Displays battery voltage and charge percentage.
Ensures protection using bidirectional voltage-level transistors.
Components Used
ESP32 Microcontroller: For processing and wireless communication.
AD7280 Battery Monitor IC: To measure the voltage levels of each cell in the battery pack.
ADP7105 low dropout (LDO) linear regulator: To regulate the power supply to the ESP32.
USB to UART Converter: For programming the ESP32.
14.8V Lithium-ion Battery Pack: Consisting of four 3.7V cells connected in series.
Indication LEDs: To display system states.
Bidirectional Voltage-Level Transistors: To interface 3.3V logic of the ESP32 with the 5V AD7280 IC..
Circuit Diagram
The system’s circuit consists of the following sections. The Power Supply Section includes USB input and the ADP7105 power path controller to generate 3.3V for the ESP32. The USB to UART Section facilitates the programming of the ESP32. The Battery Monitor IC Section features the AD7280 IC to monitor individual cell voltages. The Voltage-Level Translator Section protects components by interfacing 3.3V ESP32 pins with 5V AD7280 pins.
Code Overview
The code for the Wireless Battery Monitoring System is written using the Arduino framework. The key functionalities include library inclusions for SPI Communication, Wi-Fi Connection, and an Asynchronous Web Server. The setup involves initializing serial communication, configuring output pins for LEDs, setting up Wi-Fi credentials, and initializing the web server. In the main loop, the code calculates battery voltage and charge percentage, maps battery levels to a scale of 0-100%, and sends data to the web server for remote monitoring.
Web Interface
The system features a simple web interface designed using HTML. It displays individual cell voltages, total battery voltage, and charge percentage.
Implementation Steps
For hardware setup, connect the ESP32 microcontroller, AD7280 IC, and ADP7105 IC as per the circuit diagram. Ensure proper connections for USB to UART programming and voltage-level translation. Attach LEDs for system state indication. For software setup, install the necessary Arduino libraries (SPI, Wi-Fi, and Asynchronous Web Server). Configure Wi-Fi credentials and server settings in the code. Upload the code to the ESP32 using the USB to UART converter. During testing, power the system using a 14.8V lithium-ion battery pack and access the web interface via the ESP32’s IP address to monitor cell voltages and charge levels.
For more details including design files and code please check out the original article Wireless Battery Monitoring System for Lithium Battery Packs
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum