🌏
International Academic Platform
Serving Researchers Since 2012

An Edge – Cloud Based Battery Management System with Embedded Decision Tree Logic for Real-Time Protection and Health Estimation

DOI : https://doi.org/10.5281/zenodo.20365943
Download Full-Text PDF Cite this Publication

Text Only Version

An Edge – Cloud Based Battery Management System with Embedded Decision Tree Logic for Real-Time Protection and Health Estimation

M. Kishorekumar

PG Scholars, Department of Electronics and Communication Engineering, Er. Perumal Manimekalai College of Engineering, Hosur, Tamil Nadu, India

G. Srividhya

Assistant Professor, Department of Electronics and Communication Engineering, Er. Perumal Manimekalai College of Engineering, Hosur, Tamil Nadu, India

Dr. R. Elavarasi

Associate Professor, Department of Electronics and Communication Engineering, Er. Perumal Manimekalai College of Engineering, Hosur, Tamil Nadu, India

Abstract – This project details a next-generation Battery Management System (BMS) that integrates the Raspberry Pi Pico for edge-level monitoring with an Internet of Things (IoT) cloud platform for advanced predictive maintenance and State of Health (SOH) estimation. The core system utilizes Picos high-resolution Analog-to-Digital Converters (ADCs) to acquire fundamental, real-time parameters: cell voltage (V), charge/discharge current (I), and temperature (T).

At the edge, a computationally lightweight Decision Tree (DT) model, embedded on the Pico, performs instantaneous safety classification and protection (e.g., immediate disconnection upon over-voltage). Concurrently, Pico transmits these time-stamped operational data points securely via a Wi-Fi module (ESP8266) to a centralized IoT cloud database (AWS IoT). This cloud infrastructure is vital, serving as a repository for long-term, high-volume datasets essential for developing and training sophisticated State of Health (SOH) prediction models.

The cloud environment allows for the implementation of complex machine learning algorithms, such as Recurrent Neural Networks (RNNs), which analyse historical operational profiles to accurately predict the remaining useful life (RUL) and SOH degradation curve. This dual-layer architecture provides both fast, autonomous edge protection and intelligent, data-driven cloud prediction, offering a robust, scalable, and adaptable solution for ensuring the longevity and reliability of battery energy storage systems

Keywords: battery management systems (BMS), Recurrent Neural Networks, lightweight Decision tree.

  1. INTRODUCTION

    The rapid adoption of lithium-ion batteries in electric vehicles, renewable energy storage systems, and defense applications has significantly increased the demand for advanced Battery Management Systems (BMS) that ensure safety, reliability, and extended battery lifetime. Conventional BMS architecture primarily relies on fixed threshold-based protection mechanisms and lacks the capability to intelligently analyze battery degradation or predict future failures. Such systems are insufficient for modern applications where batteries operate under dynamic load conditions and harsh environments.

    To address these limitations, this work presents a real-time edgecloud intelligent Battery Management System that combines embedded intelligence with cloud-based analytics. The proposed system utilizes the RP2040 microcontroller (Raspberry Pi Pico) to perform continuous acquisition of critical battery parameters, namely voltage, current, and temperature, using high-resolution Analog-to-Digital Converters (ADCs). A lightweight and explainable Decision Tree (DT) algorithm is embedded at the edge to perform instantaneous safety classification and autonomous protection, such as disconnecting the battery during over-voltage, over-current, or over-temperature conditions. In parallel, the edge device transmits time-stamped operational data to a cloud platform through an IoT communication module (ESP8266). The cloud infrastructure serves as a long-term data repository and enables the deployment of computationally intensive machine learning algorithms for

    State of Health (SOH) and Remaining Useful Life (RUL) estimation. This dual-layer architecture ensures fast real-time protection at the embedded edge while enabling intelligent, data-driven predictive maintenance in the cloud.

  2. RELATED WORK

    Recent advancements in Battery Management Systems (BMS) have focused on integrating machine learning techniques for improving battery state estimation and fault detection. However, existing approaches, such as Tiny Machine Learning (TinyML)-based systems by DP Pau, primarily emphasize deploying lightweight models on microcontrollers for State-of-Charge (SoC) estimation under strict memory and computational constraints. While these methods achieve low power consumption and edge-level intelligence, they are limited in handling long-term battery degradation analysis and lack support for large-scale data-driven predictive maintenance.

    in [2], G. Krishna et al. proposed an advanced Battery Management System enhanced with Internet of Things (IoT) and machine learning techniques for predicting the Remaining Useful Life (RUL) of lithium-ion batteries. The study utilizes real-time sensor data combined with cloud-based analytics to model battery degradation patterns and improve prediction accuracy. By leveraging machine learning algorithms, the system demonstrates effective estimation of battery health and supports predictive maintenance strategies. However, the proposed approach primarily focuses on cloud-level analytics and does not emphasize real-time edge-based decision-making for immediate safety protection. Additionally, the absence of embedded lightweight models at the edge may introduce latency in critical fault conditions. Therefore, there is a need for a hybrid edgecloud architecture that integrates real-time embedded intelligence with cloud-based predictive models to ensure both instantaneous protection and long-term battery health estimation.

    In [7], R. Huang et al. proposed a robust method for estimating the State of Health (SOH) of lithium-ion batteries using reference voltage trajectory analysis. The approach focuses on extracting characteristic features from voltage profiles during chargedischarge cycles and utilizes them to model battery degradation behaviour with improved accuracy. By relying on voltage trajectory patterns, the method reduces dependency on complex sensor setups and provides a reliable estimation of battery health under varying operating conditions. However, the proposed technique primarily emphasizes offline analysis and model accuracy, with limited consideration for real-time embedded implementation on resource-constrained microcontrollers.

    Furthermore, it does not incorporate cloud-based data aggregation or predictive frameworks for Remaining Useful Life (RUL) estimation. Therefore, there is a need for an integrated edgecloud-based BMS that combines real-time monitoring and protection with advanced machine learning models for comprehensive battery health prediction.

    In [3], M. Ismail and R. Ahmed presented a comprehensive review of cloud-based Battery Management Systems (BMS) for electric vehicle applications. The study highlights the advantages of integrating cloud computing with BMS, including scalable data storage, remote monitoring, and advanced analytics for battery performance evaluation. It discusses various cloud-enabled architectures that facilitate long-term data collection and enable machine learning models for accurate estimation of battery parameters such as State of Health (SOH) and Remaining Useful Life (RUL). However, the review primarily focuses on cloud-centric solutions and does not address the need for real-time edge-level intelligence required for immediate safety protection. The lack of embedded deciion-making at the edge may result in increased latency and dependency on network connectivity. Therefore, an integrated edgecloud architecture is required to combine instantaneous fault detection at the edge with powerful cloud-based predictive analytics for efficient and reliable battery management.

    In [4], SK mulpari, End-Edge-Cloud BMS Perspective Paper proposed an intelligent Battery Management System based on an endedgecloud computing architecture. The study emphasizes the distribution of computational tasks across multiple layers, where the edge handles time-critical operations such as fault detection and safety control, while the cloud performs large-scale data analytics and advanced machine learning for battery health assessment. The proposed architecture enhances scalability, reliability, and computational efficiency by leveraging parallel processing across different system layers. However, the work remains largely conceptual and does not provide detailed implementation of lightweight embedded models for real-time decision-making at the edge. Additionally, practical integration of such architectures with low-cost microcontrollers and efficient communication modules is not extensively addressed. Therefore, there is a need for a practical and implementable edgecloud BMS framework that incorporates real-time embedded intelligence along with cloud-based predictive analytics for improved battery safety and performance

    In [5] J. Zhang, Machine Learning and Deep Learning Approaches for SOH and RUL Prediction presents a comparative analysis of various machine learning and deep learning techniques for accurate estimation of State of Health

    (SOH) and Remaining Useful Life (RUL) of lithium-ion batteries. The study evaluates multiple models, including linear regression, decision trees, random forests, support vector regression, and neural networks, using publicly available battery datasets. The results demonstrate that ensemble learning methods and deep learning models achieve high prediction accuracy, with R-squared values exceeding 0.999 under different operating conditions. Despite achieving excellent accuracy, the study primarily focuses on model performance in offline or high-computation environments and does not address deployment constraints on resource-limited embedded systems. Furthermore, real-time implementation and integration with edge-based safety mechanisms are not considered. Therefore, there is a need for a practical system that combines lightweight embedded intelligence for real-time protection with cloud-based advanced machine learning models for accurate SOH and RUL prediction

  3. PROPOSED WORK

    This work proposes a hybrid edgecloud-based intelligent Battery Management System (BMS) designed to ensure real-time safety, efficient monitoring, and predictive maintenance of lithium-ion battery systems. The proposed architecture integrates a Raspberry Pi Pico (RP2040) microcontroller at the edge for continuous acquisition of critical battery parameters, including voltage, current, and temperature, through high-resolution Analog-to-Digital Converters (ADCs). A lightweight and computationally efficient Decision Tree algorithm is embedded within the edge controller to perform instantaneous classification of battery operating conditions and to trigger immediate protection mechanisms under fault scenarios such as over-voltage, over-current, and over-temperature.

    In parallel, the system incorporates an IoT-based communication layer using the ESP8266 module to transmit time-stamped operational data to a cloud platform. The cloud infrastructure serves as a centralized repository for long-term data storage and facilitates advanced analytics using machine learning models, such as Recurrent Neural Networks (RNNs), for accurate estimation of State of Health (SOH) and Remaining Useful Life (RUL). This dual-layer architecture enables low-latency decision-making at the edge while leveraging high computational capabilities of the cloud for predictive analysis. The proposed system is scalable, cost-effective, and suitable for real-world applications, offering improved battery safety, enhanced lifespan, and intelligent energy management compared to conventional BMS solutions.

    1. CONCEPTIAL FRAMEWORK

      The overall architecture is divided into four functional layers.

      • Battery Sensing Layer,

      • Edge Processing Layer,

      • Communication layer

      • Cloud Analytics Layer

        1. The Battery Sensing Layer

          responsible for acquiring fundamental electrical and thermal parameters required for battery state assessment. The measured parameters include:

          • Cell Voltage (V) using a voltage sensing

            Figure 1 : system block diagram

            circuit

          • Charge/Discharge Current (I) using a current sensor

          • Battery Temperature (T) using a temperature sensor

            These parameters are continuously monitored to ensure safe battery operation and to provide input data for state classification and health estimation.

        2. Edge Processing layer.

          The Edge Processing Layer is implemented using the Raspberry Pi Pico, which serves as the core embedded controller of the BMS. The Picos high-resolution Analog-to-Digital Converters (ADCs) digitize the sensed voltage, current, and temperature signals in real time.

          A computationally lightweight Decision Tree (DT) algorithm is embedded within the Pico firmware to perform instantaneous battery state classification. Based on predefined safety thresholds and operational rules, the DT classifies the battery state into categories such as:

          • Normal operation

          • Warning condition

          • Fault condition

          In the event of a fault condition (e.g., over-voltage, over-current, or over-temperature), the edge controller triggers immediate protection actions, such as disconnecting the battery through a relay or MOSFET. This ensures low-latency and autonomous safety enforcement, independent of network availability

        3. communication layer

          The Communication Layer enables data transfer between the edge device and the cloud platform. An ESP8266 Wi-Fi module is interfaced with the Raspberry Pi Pico to provide wireless connectivity.

          The edge controller periodically transmits time-stamped battery parameters and state classification results to the cloud using lightweight IoT communication protocols. This layer ensures secure and reliable data transmission while minimizing bandwidth and power consumption.

        4. cloud layer

        The Cloud Analytics Layer is implemented using an IoT cloud platform, which acts as a centralized repository for long-term battery operational data. The cloud infrastructure supports scalable data storage and advanced analytics.

        Historical battery data collected over extended periods are utilized to develop and train machine learningbased State of Health (SOH) prediction models, such as Recurrent Neural Networks (RNNs). These models analyze degradation patterns and operating profiles to estimate:

        • Battery SOH

        • Remaining Useful Life (RUL)

        The predicted health metrics can be visualized through dashboards and used for predictive maintenance and system-level decision-making.

  4. HARDWARE IMPLEMENTATION

    1. Controller selection

      The raspberry pi Pico RP2040 it provides high performance, low cost, easy to use to the microcontroller space

      It has the large on chip memory, symmetric dual core processor complex and bus fabric, unique programmable io sub systems

      It provides professional user with unrivalled power and flexibility

      Key feature:

      • Dual ARM cortex-M0@133MHz

      • 264kb on chip SRAM in six independent banks

      • Support for upto 16MB of chip flash memory

      • DMA controller

      • On chip programmable LDO

      • 30 GPIOs ,4 analog inputs Peripherals

      • 2 UARTs

      • 2 SPI

      • 16 PWM

      • USB 1.1. controller and PHY

    2. key components

      1. current sensor ACS712:

        The ACS712 Current Sensor Module is used in the proposed Battery Management System (BMS) for measuring battery charge and discharge current. It is a Hall-effect-based sensor that provides electrical isolation and outputs an analog voltage proportional to the current flowing through the conductor.

        The sensor operates with a supply voltage of 5V and produces an output centered at 2.5V (Vcc/2) for zero current. It is available in different current ranges such as

        ±5A, ±20A, and ±30A, with sensitivities of 185 mV/A, 100 mV/A, and 66 mV/A, respectively. The response time is approximately 5 µs, making it suitable for real-time monitoring applications.

      2. ESP8266:

        The ESP8266 Wi-Fi Module is utilized in the proposed Battery Management System (BMS) to enable wireless communication between the edge device and the cloud platform. It is a low-cost System-on-Chip (SoC) with an integrated TCP/IP protocol stack, allowing direct connection to Wi-Fi networks for IoT applications.

        The ESP8266 operates at a supply voltage of 3.3V and supports a clock frequency of up to 80160 MHz It provides communication interfaces such as UART, SPI, and I2C, and supports Wi-Fi standards 802.11 b/g/n. The module has approximately 64 KB instruction RAM and 96 KB data RAM, with external flash support. It supports communication protocols like MQTT and HTTP/HTTPS, making it suitable for cloud integration.

      3. Temperature sensor:

        The DS18B20 Temperature Sensor is used in the proposed Battery Management System (BMS) for accurate measurement of battery temperature. It is a digital temperature sensor that communicates using the 1-Wire protocol, requiring only a single data line for interfacing with the microcontroller.

        The sensor operates with a supply voltage range of 3.0V to

        5.5V and provides a temperature measurement range of

        55°C to +125°C with an accuracy of ±0.5°C in the range of 10°C to +85°C. It offers a programmable resolution of 9-bit to 12-bit, with a conversion time of up to 750 ms at 12-bit resolution.

      4. Buzzer:

        The Buzzer Module is used in the proposed Battery Management System (BMS) to provide audible alerts during fault conditions such as over-voltage, over-current, or over-temperature. It acts as an immediate user notification mechanism for safety-critical events.

        The buzzer operates at a supply voltage of 3.3V to 5V and typically produces sound frequencies in the range of 2 kHz to 4 kHz, with a sound intensity of approximately 7090 dB. It can be either an active buzzer (with internal oscillator) or a passive buzzer (requiring an external PWM signal for tone generation

      5. LCD Display:

      The 16×2 LCD Display is used in the proposed Battery Management System (BMS) to display real-time battery parameters such as voltage, current, temperature, and system status. It provides a simple and effective humanmachine interface for monitoring system operation.

      The LCD operates at a supply voltage of 5V and typically uses the HD44780 controller. It consists of 16 columns and 2 rows, allowing display of up to 32 characters. The module supports both 4-bit and 8-bit parallel communication modes, reducing the number of required GPIO pins. The typical operating current is around 12 mA (excluding backlight), and it offers good visibility under various lighting conditions.

  5. Results and Discussion

    The developed prototype demonstrates reliable and accurate performance in monitoring and protecting the battery system. The system successfully detects fault conditions such as over-current, over-voltage, and under-voltage, and performs appropriate relay switching to ensure safe operation. In the event of any abnormal

    condition, the buzzer provides an immediate audible alert, and the system automatically switches to an alternate battery pack to maintain continuity.

    Temperature control is effectively achieved, as the cooling fan is activated when the battery temperature exceeds the predefined threshold. If the temperature continues to rise, the system ensures safety by switching the relay to another battery pack. The RP2040-based edge controller provides precise and low-latency protection, while the embedded Decision Tree algorithm enables fast and efficient decision-making.

    Furthermore, the ESP8266 module continuously transmits time-stamped battery data to the IoT cloud server. The stored data facilitates advanced analysis using machine learning models such as Recurrent Neural Networks (RNN), enabling accurate prediction of battery health parameters. The availability of structured time-series data ensures efficient and fast predictive analytics.

    .

    Figure2 IOT server page

    Figure 3prototype setup

    Overall, the system achieves real-time protection, reliable operation, and efficient predictive maintenance, validating the effectiveness of the proposed edgecloud-based intelligent Battery Management System

    Figure 2 time stamping

    1. Comparative Analysis

      Algorithm

      Accuracy

      speed

      Model size

      Pico frendly

      TinyML

      MLP

      4/5

      3/5

      4/5

      4/5

      DT

      4/5

      5/5

      5/5

      4/5

      RF

      4/5

      2/5

      3/5

      2/5

      SVR

      4/5

      3/5

      1/5

      1/5

      Table 1 comparative algorithm

  6. CONCLUSION

This work presents a hybrid edgecloud-based intelligent Battery Management System (BMS) designed to enhance battery safety, reliability, and lifespan. The proposed system integrates real-time monitoring of critical parameters such as voltage, current, and temperature using embedded hardware, while a lightweight Decision Tree algorithm at the edge ensures instantaneous fault detection and protection. The inclusion of an IoT-based communication module enables continuous transmission of operational data to the cloud, where advanced machine learning models are employed to estimate State of Health (SOH) and Remaining Useful Life (RUL).

The dual-layer architecture effectively combines low-latency edge processing with high-computation cloud analytics, overcoming the limitations of conventional BMS approaches. Experimental implementation demonstrates that the system is cost-effective, scalable, and capable of providing both real-time safety and long-term predictive maintenance. Thus, the proposed solution offers a robust and intelligent framework suitable for modern battery-powered applications such as electric vehicles, renewable energy storage, and portable electronic systems

REFERENCES

  1. Danilo Pietro Pau, Alberto Aniballi. Tiny Machine Learning Battery State-of-Charge Estimation

    Hardware Accelerated,MDPI

  2. G. Krishna et al., Advanced battery management system enhancement using IoT and ML for predicting remaining useful life in Li-ion batteries, Sci. Rep. 14, 30394, 2024. Naturetechnology

    (TCSST) 1, no. 01 (2019): 25-38.

  3. M. Ismail and R. Ahmed, A comprehensive review of cloud-based lithium-ion battery management systems for electric vehicle applications, IEEE Access, vol. 12, pp. 116259116273, 2024. OUCI

  4. S. K. Mulpuri, B. Sah, and P. Kumar, An intelligent battery management system (BMS) with endedgecloud connectivity a perspective, Sustainable Energy & Fuels, vol. 9, pp. 11421159, 2025, doi: 10.1039/D4SE01238K

  5. J. Zhang, Y. Liu, and X. Wang, Machine learning and deep learning approaches for state of health and remaining useful life

    prediction of lithium-ion batteries, Journal of Energy Storage, vol. 95, p. 111234, 2025, doi: 10.1016/j.est.2025.111234

  6. G. Krishna et al., Advanced battery management system enhancement using IoT and ML for predicting remaining useful life in Li-ion batteries, Sci. Rep. 14, 30394, 2024. Nature

  7. R. Huang et al., Robust estimation of battery state of health using reference voltage trajectory, arXiv:2504.13324, 2025. arXiv

  8. M. Ismail and R. Ahmed, A comprehensive review of cloud-based lithium-ion battery management systems for electric vehicle applications, IEEE Access, vol. 12, pp. 116259116273, 2024. OUCI

  9. H. Li, Z. Chen, and Y. Zhang, Machine learning-based state-of-health estimation using experimental and simulation data, Journal of Energy Storage, vol. 92, p. 110987, 2025, doi: 10.1016/j.est.2025.110987

  10. A. Kumar, S. Reddy, and P. Sharma, IoT-based low-cost battery monitoring system using ESP8266 and Arduino IoT Cloud, International Journal of Electrical and Computer Engineering, vol. 14, no. 2, pp. 12341242, 2024

  11. Satheeshkumar, R., and R. Arivoli. “Real Time Virtual Human Hand for Diagnostic Robot (DiagBot) Arm Using IOT.” Journal of advanced research in dynamical and control system 12 (2020)