Final-year projects / Electric vehicles

E-bike battery monitor with state of charge and range

Electric scooters and e-bikes are booming in India, but riders often have only a few bars to judge range, and packs age without warning. A monitor that counts charge in and out, checks cell balance and temperature and estimates range teaches battery management.

ESP32Major projectEEE, ECE, EIE
ESP32CURRENCELLNTC10.83 VFeatured
Parts
₹3,447
Build
14 weeks
Board
ESP32
Objectives
5
Work on a small 3S pack with its BMS and a fuse. Never probe a real e-bike pack, which can deliver hundreds of amps.

Block diagram

Inputs
  • CURREN
    Current sensorCounts charge in and out
  • CELL
    Cell taps and ADCMeasure each cell's voltage
  • NTC
    NTC probesMeasure pack temperature
Controller
  • ESP32
    ESP32Estimates SoC, health and range
Power
  • +
    Pack with BMSThe battery under test
Outputs
  • 23.4°COLED
    OLED displayShows SoC, range and warnings
  • CLOUD
    Cloud dashboardStores readings, plots trends and sends alerts+

Objectives

  1. To measure each cell's voltage within ±10 mV and pack current within ±2%.
  2. To estimate state of charge by coulomb counting, corrected by open-circuit voltage at rest.
  3. To estimate remaining range from recent Wh per km.
  4. To warn on cell imbalance, high temperature or low charge, and measure SoC error over full cycles.
  5. To publish readings over MQTT and show them on a live dashboard with threshold alerts.

Parts and specifications

Total about ₹3,447 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

Cell voltages from taps

Tap 2 reads cells 1 + 2; cell 2 = V(tap 2) − V(tap 1). Dividers scale 12.6 V to within the ADS1115 ±4.096 V range (ratio 4, 30 kΩ / 10 kΩ, 1% resistors, calibrate each).

Coulomb counting

SoC(t) = SoC0 − (1 / Capacity) × ∫ I dt. Sampling every 100 ms: 4 A for 30 minutes removes 2 Ah from a 4 Ah pack = 50%.

OCV correction

After 30 minutes at rest, look up SoC from open-circuit voltage per cell (for example 3.85 V ≈ 70%, 3.65 V ≈ 30%) and reset the drift.

Range

Recent consumption 12 Wh/km (bike) with 300 Wh left → 25 km. In the model use Wh per minute of motor run instead.

Imbalance

Warn when any cell differs by over 50 mV from the mean at rest.

Pin map

SignalPin or connection
Cell taps 1S / 2S / 3S via dividersADS1115 A0 / A1 / A2 (0x48 on GPIO 21 / 22)
ACS712 OUTADS1115 A3 (better than the ESP32 ADC)
NTC probesGPIO 34 / 35 with 10 kΩ dividers
OLEDSame I²C bus
Load relay or MOSFETGPIO 26 (test load control)

Firmware outline

  1. Every 100 ms read current (zero offset taken at rest) and integrate charge.
  2. Every second read cell voltages and temperatures.
  3. Correct SoC from OCV after a rest; learn actual capacity from full-to-empty cycles (state of health).
  4. Show SoC %, range, pack V, current, hottest temperature and warnings on the OLED.
  5. Log to flash and send to a phone app (upgrade).

Test plan

TestExpected result
Each cell vs a multimeterWithin ±10 mV
Current vs clamp meter at 1, 2, 4 AWithin ±2%
Full discharge and charge cyclesSoC error at end vs OCV
One cell slightly dischargedImbalance warning

These rows start your results table when you plan the project.

Viva practice

Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.

1. Why does coulomb counting drift?
2. Why measure each cell?
3. What is state of health?
4. Why is temperature important?
5. What does AIS 156 cover?

Make it yours

One or two upgrades for a mini project, two to four for a major one.

Build these first

Datasheets and sources to cite

  • Plett, Battery Management Systems Vol. 1
  • AIS 156 (EV battery safety, India)
  • TI ADS1115 datasheet

About this project

How much does the e-bike battery monitor with state of charge and range project cost?

About ₹3,447 for the parts in the base list: ESP32 DevKit V1, ACS712 current sensor (20 A), ADS1115 16-bit ADC, NTC 10 kΩ waterproof probe × 2, 0.96 inch OLED (SSD1306, I²C), Li-ion 18650 pack 3S2P (11.1 V), 3S BMS 20 A, 12 V geared motor with load (test load), LM2596 buck converter, 5 A glass fuse with holder, 1% resistors for cell dividers × 6.

How long does it take?

About 12 weeks for the base project, built on an ESP32. Each upgrade adds time.

Which branches is it suitable for?

Electrical and Electronics, Electronics and Communication, Instrumentation, as a major project.

Which pins and design calculations does it use?

Cell taps 1S / 2S / 3S via dividers on ADS1115 A0 / A1 / A2 (0x48 on GPIO 21 / 22); ACS712 OUT on ADS1115 A3 (better than the ESP32 ADC); NTC probes on GPIO 34 / 35 with 10 kΩ dividers. Worked calculations on this page: cell voltages from taps, coulomb counting, ocv correction, range, imbalance.

How do I test it?

Each cell vs a multimeter: Within ±10 mV. Current vs clamp meter at 1, 2, 4 A: Within ±2%. Full discharge and charge cycles: SoC error at end vs OCV. One cell slightly discharged: Imbalance warning.

What are the objectives?

To measure each cell's voltage within ±10 mV and pack current within ±2%. To estimate state of charge by coulomb counting, corrected by open-circuit voltage at rest. To estimate remaining range from recent Wh per km. To warn on cell imbalance, high temperature or low charge, and measure SoC error over full cycles.