SOC and SOH Estimation of Lead-Acid Battery
Proposed a low-cost, fully offline IoT-based TinyML system on an ESP32 microcontroller. Deployed a novel Residual-Physics Neural Network (RPNN) to predict battery SOC, SOH, and Time-to-Empty, while introducing Virtual Cranking and Vampire Drain detection — achieving R² = 99.70% with MAE of 0.6815.
Read the full write-up
7
Total Technologies
6
Key Features
Technologies Used
C++
Python
PyTorch
TinyML
ESP32
IoT
Arduino IoT Cloud

Key Features
- Engineered a Residual-Physics Neural Network (RPNN) with a custom loss function embedding Coulomb Counting differential equations (dSOC/dt) as a physics residual penalty, achieving R² = 99.70%, outperforming XGBoost (98.46%), Random Forest (98.45%), and Linear Regression (73.57%).
- Collected 19,948 samples at 1 Hz over 5.5 hours from Voltage, ACS712 (current), and DHT11 (temperature) sensors during a controlled 12.5V→10.5V discharge of a 12V 7Ah lead-acid battery.
- Compressed the RPNN into an INT8-quantized C++ library via the Edge Optimized Neural (EON) Compiler and deployed it on the ESP32's flash memory for fully offline inference.
- Invented a real-time 'Virtual Cranking' algorithm that calculates internal resistance (R₀) and simulates a 200A engine-start load to predict No-Crank failures before they occur.
- Implemented 'Vampire Drain' detection alerting users of abnormal quiescent current (>50mA) after engine-off, and a deep-sleep strategy where the ESP32 hibernates for 5 minutes between predictions.
- Developed an Arduino IoT Cloud mobile dashboard for real-time SOC, SOH, Time-to-Empty, Virtual Crank status, and Vampire Drain alerts.