ESP32 Smart Battery Dashboard V3

Wiring Schematic

View full-size circuit ↗
LT

YOUR PROJECT LEARNING PATH

Build it with confidence.

Progress saves on this device
01

Project overview

Know what you’re building before you start wiring.

Build a multi-cell battery monitor using an ESP32 and a resistor-divider circuit for 1S, 2S, and 3S Li-ion packs. It estimates battery percentage and displays live readings through a local Wi-Fi dashboard.

The dashboard includes selectable cell modes, battery-presence detection, voltage history, minimum and maximum readings, averages, session statistics, trend indicators, and activity logs. Charging and discharging states are inferred from voltage changes.

Before you power up

Use suitable battery protection and prevent shorts. Verify divider wiring and keep GPIO 34 within safe ADC input limits.

PROJECT ROADMAP3 project stages
✓
Prepare your kitConfirm the components and tools
⌁
Assemble the circuitFollow the build steps in order
⌘
Upload and testCheck the output and resolve issues
Start the build
02

Components required

Gather these parts before you begin.

ESP32 Development BoardRuns voltage measurements and hosts the local Wi-Fi dashboard.× 1
18650 Li-ion Battery PackProvides the single-cell or multi-cell battery voltage being monitored.× 1
100kΩ ResistorForms the upper divider arm between battery positive and the sensing junction.× 1
27kΩ ResistorForms the lower divider arm between the sensing junction and ground.× 1
0.1µF CapacitorFilters noise between the GPIO 34 sensing junction and ground.× 1
BreadboardSupports assembly of the voltage-divider circuit and ground connections.× 1
Jumper WiresConnect the battery divider, capacitor, and ESP32 ground and ADC input.× 10
USB CableProvides a programming connection and powers the ESP32 board.× 1
03

Build the project

Work through one focused step at a time. You can revisit any step whenever you need.

STEP 010 / 5 complete
BUILD STAGE 0120% of guide

Prepare the ESP32 and Battery Circuit

Place the ESP32 and battery pack on a stable, nonconductive surface. Disconnect power during assembly, inspect terminals for damage, and prepare wiring before constructing the battery-voltage monitoring circuit.

Use a suitable 1S, 2S, or 3S Li-ion pack. The ESP32 measures voltage through GPIO 34 and provides the dashboard using its built-in Wi-Fi.

1 of 5
04

Software & tools

Install these before uploading the firmware.

Arduino IDEEdits, compiles, and uploads firmware to the ESP32 development board.
ESP32 Board PackageProvides ESP32 board definitions and core APIs for this firmware.
WiFi LibraryStarts the ESP32 access point and manages wireless connectivity.
WebServer LibraryServes the dashboard and returns live sensor data to browsers.
Serial MonitorDisplays startup messages and the local dashboard address at 115200 baud.
05

Expected output

Compare your build with the result described here.

FINAL CHECKPOINT

After upload, Serial Monitor at 115200 baud shows the access-point name, password, and IP address. Connect your phone or computer to the ESP32 network, then open the displayed address in a browser.

The dashboard shows voltage, estimated percentage, selectable cell modes, battery-presence status, voltage history, minimum and maximum readings, averages, session runtime, voltage trends, stability, and recent events. Charging status is inferred from voltage changes rather than a dedicated sensor.

06

Troubleshooting & fixes

Choose the issue that best matches what you’re seeing.

01Battery voltage or percentage appears incorrect
Try these checks

Check the 100kΩ and 26.2kΩ divider wiring and select the correct cell mode. Compare the GPIO 34 voltage with a multimeter and verify the firmware's divider ratio against the actual resistor values.

02Dashboard does not open or Wi-Fi is missing
Try these checks

Confirm the ESP32 has started its access point and check Serial Monitor at 115200 baud. Connect to the exact network name and password, then open the IP address printed during startup.

03Charging or discharging status appears wrong
Try these checks

The firmware infers power state from voltage changes across recent graph samples rather than a dedicated charger-status input. Allow readings to stabilize and remember that voltage trends alone cannot confirm active charging.