Battery and BMS simulator
Cells and packs that behave like the real ones: 18650 and 21700 Li-ion, 32700 and prismatic LiFePO4, 12 V and 200 Ah packs, each with its open-circuit curve, internal resistance, capacity and limits. Protection boards and BMS from 1S to 16S are modelled on real products (DW01A, Daly, HX boards) with their exact over-charge, over-discharge and over-current figures. Chargers from the TP4056 and TP5000 to CC/CV bench chargers and power-bank modules. Over-charge a cell and it vents; short one and the fuse, the BMS or the cell decides who gives first.

Open the labFree, in your browser, no account needed. Part of a free electronics simulator with 293 parts, 193 lessons and 66 builds.
What you can do
- Build a power bank or a 12 V LiFePO4 station and run it flat to see what the BMS and the firmware cut-offs really do.
- Compare Li-ion and LiFePO4 charging: 4.2 V against 3.6 V, and what a mismatched charger does.
- Parallel mismatched cells and watch the inrush current between them.
- Read every protection board's datasheet card: thresholds, delays, release conditions.
Builds (24)

Single 18650 charger with LED charge indicator
Charges one cell from USB; red while charging, blue when full.

18650 battery level indicator
Three LEDs show full, half and low.

USB power bank
18650 charger plus protection plus a 5 V boost output.

12 V low-voltage battery cutoff
Disconnects the load before the battery is damaged.

Router DC UPS
Keeps a 12 V router running through a power cut.

Solar phone charger
Panel to USB with a buck converter.

ESP32 battery sensor node
Wakes, reads a sensor, reports, sleeps.

10,000 mAh power bank · 4 × 18650
10,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

20,000 mAh power bank · 8 × 18650
20,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

40,000 mAh power bank · 16 × 18650
40,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

10,000 mAh power bank · 2 × 21700
10,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

20,000 mAh power bank · 4 × 21700
20,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

40,000 mAh power bank · 8 × 21700
40,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

12,000 mAh LiFePO4 power bank · 2 × 32700
12,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

24,000 mAh LiFePO4 power bank · 4 × 32700
24,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

42,000 mAh LiFePO4 power bank · 7 × 32700
42,000 mAh, 5 V 2.4 A USB out, 2 A USB charging, full protection.

50 Ah 12 V LiFePO4 battery (4S9P, 32700 cells) with charger
12.8 V 54 Ah (691 Wh) battery from 36 × 32700 cells, 4S BMS with balancing, 10 A CC/CV charger from mains.

100 Ah 12 V LiFePO4 battery (4S17P, 32700 cells) with charger
12.8 V 102 Ah (1306 Wh) battery from 68 × 32700 cells, 4S BMS with balancing, 20 A CC/CV charger from mains.

200 Ah power station from four 3.2 V prismatic LiFePO4 cells: 4S BMS, 2 × 12 V, 3 × USB, mains charger
12.8 V 200 Ah (2560 Wh) power station from four prismatic cells with a 4S BMS, two fused 12 V outputs, three USB…

200 Ah power station on a 12.8 V LiFePO4 battery: 2 × 12 V, 3 × USB, mains charger
12.8 V 200 Ah (2560 Wh) power station on a drop-in battery, two fused 12 V outputs, three USB outputs, a watt meter…

65 W USB-C PD charger from scratch: mains flyback (UC3844, 800 V MOSFET, PQ2625 transformer), TL431 + PC817 feedback, PD controller
65 W USB-C PD charger from parts: mains input filter, bridge and bulk, UC3844 flyback with RCD clamp and aux-powered…

Home UPS on a 24 V LiFePO4 battery: charger, inverter, changeover relays, two 220 V outputs
Keeps two 220 V circuits powered through outages from a 24 V LiFePO4 battery; charges from the grid when it returns.

Home UPS on 8 × 3.2 V LiFePO4 cells + BMS: charger, inverter, changeover relays, two 220 V outputs
Keeps two 220 V circuits powered through outages from 8 × 3.2 V LiFePO4 cells; charges from the grid when it returns.

Single 18650 charger with a 3-LED charge indicator (green 80–100 %, yellow 40–79 %, red below 40 %)
Charges an 18650 from USB and shows its charge on three LEDs: green 80–100 %, yellow 40–79 %, red below 40 %.
Lessons (16)
Capacitor charging
Through a resistor, a capacitor charges along an exponential curve. After one time constant τ = RC it reaches 63 % of…
Capacitor discharging
A charged capacitor emptying through a resistor decays exponentially toward zero. It loses 63 % of its voltage every…
Battery internal resistance
A real battery is an ideal voltage E in series with a small internal resistance r. With no load you read E. Under…
Cells in series and parallel (LiFePO4)
Cells in series add their voltages (and their internal resistances). Cells in parallel keep the same voltage but share…
Deep sleep and battery life
A battery device spends most of its life asleep. Awake, the ESP32 chip draws about 45 mA; in deep sleep only its…
Charging a phone from 12 V with an HW-688
The HW-688 buck module turns 9–36 V into USB 5 V. Plug a cable into its USB-A port and the phone at the far end sees…
USB-C charging: the power path
Follow the energy from a USB-C charger into a TP4056 and a Li-ion cell. The TP4056 is a linear charger: the difference…
Charge-pump inverter: a negative rail
No inductor at all: a 555 square wave charges C1 through D1 while its output is high, then, when the output drops…
Li-ion CC/CV charger from an LM317
Li-ion cells must be charged at a limited current (CC) until they reach 4.2 V, then held at that voltage (CV) while…
Cell protection: DW01 + 8205A
Every Li-ion pack has a tiny board that disconnects the cell when it is in danger: over-charged, over-discharged…
Ideal-diode OR-ing: USB plus battery
Two supplies feed one load and must never feed each other. Schottky diodes would waste 0.3 V. Here each supply goes…
Load-cell scale front end
Four strain gauges on a metal bar form a Wheatstone bridge whose output is a millivolt or two at full load. The HX711…
Phone charging: volts, amps and watts
A phone shows the volts and amps it measures at its own USB port. A DC watt meter on the 12 V side shows what goes in…
Lead-acid against LiFePO4: usable capacity, voltage and life
Two 100 Ah batteries on the same 10 A load. The lead-acid is at 12.0 V and half empty after five hours, where it…
Economics: payback, and what a battery really costs per kWh
A solar system is bought once and paid back by the kWh it replaces: payback = cost ÷ (kWh replaced × tariff). Panels…
MPPT: perturb and observe
A solar panel gives its most power at one point on its I–V curve. The ESP32 measures the panel’s voltage and current…
Parts (38)
9 V battery
Alkaline 9 V · ~1.5 Ω internal · 550 mAh · 100 % left
AA cell
Alkaline 1.5 V · ~0.15 Ω internal · 2500 mAh · 100 % left
18650 Li-ion cell
Li-ion NMC · 3.7 V nominal · 2500 mAh · 90% charged
21700 Li-ion cell
Li-ion NMC 21700 · 3.7 V nominal · 5000 mAh · 90% charged
LiFePO4 cell
LiFePO4 32700 · 3.2 V nominal · 6000 mAh · 80% charged
LiFePO4 prismatic cell
Prismatic LiFePO4 cell (aluminium can, M6 stud terminals) · 3.2 V nominal, 2.5–3.65 V · 200 Ah…
LiFePO4 prismatic cell 50 Ah (LF50K)
LiFePO4 prismatic · 3.2 V nominal · 50000 mAh · 60% charged
LiFePO4 prismatic cell 105 Ah (LF105)
LiFePO4 prismatic · 3.2 V nominal · 105000 mAh · 60% charged
Flat Li-ion battery (LP603450)
LP603450 Li-polymer · 3.7 V · 1200 mAh · protection board (cuts at 4.28 V / 2.5 V / 3 A) · JST-PH…
18650 battery holder
2-slot · 18650 Li-ion 2500 mAh · 2S series
LiFePO4 battery
LiFePO4 12.8 V 100 Ah · 1280 Wh · built-in 100 A BMS
Lead-acid battery
Flooded lead-acid 12 V 100 Ah (C20) · 1240 Wh nameplate, about 620 Wh usable at 50 % · no BMS ·…
Battery pack
3S 11.1 V 2.5 Ah Li-ion · 28 Wh · full 12.6 V, empty 9.0 V · built-in BMS
Battery capacity indicator
Panel-mount LCD battery capacity indicator · 8–70 V · 10-section bar with % or voltage · code P12…
Battery monitor with shunt (coulomb counter) (TF03K)
Shunt 100 A / 75 mV · 100 Ah LiFePO4 12.8 V · counts amp-hours
Low-voltage disconnect (12 V, 30 A)
MOSFET battery protector · Lead-acid: off 10.5 V, back on 12.0 V · 10 s delay · 30 A
ER14505 lithium cell
Li-SOCl2 AA bobbin cell · 3.6 V flat until nearly empty · 2600 mAh · self-discharge about 1 %/year…
LiFePO4 charger
LiFePO4 battery charger for 12.8 V (4S) · AC 100–240 V 50/60 Hz in · 14.6 V 10 A out (146 W) ·…
TP4056 charger module (DW01)
USB-C 5 V · CC/CV to 4.2 V · 1 A · DW01 protection
TP5000 charger module
5 V in · CC/CV to 4.2 V (Li-ion) · 2 A · charger only: pair it with a protection board
1S protection board (TP4056, DW01A, FS8205A)
the TP4056 companion board: DW01A + one FS8205A · 1S Li-ion · 3 A continuous, trips at about 3 A…
1S 10 A protection board (DW01A, FS8205A)
DW01A driving four FS8205A in parallel · 1S Li-ion · 10 A continuous, trips at about 12 A (7 ms)…
2S BMS
HX-2S 20 A board with balancing · 2S Li-ion · 20 A continuous, trips at about 30 A (10 ms), short…
3S BMS (FL25A)
HX-3S-FL25A (no balancing; transient 34–40 A) · 3S Li-ion · 25 A continuous, trips at about 37 A…
3S 40 A BMS
Daly 3S 40 A common-port · 3S Li-ion · 40 A continuous, trips at about 120 A (1 ms), short circuit…
4S Li-ion BMS
Daly 4S 30 A common-port · 4S Li-ion · 30 A continuous, trips at about 90 A (1 ms), short circuit…
6S Li-ion BMS
Daly 6S 40 A common-port · 6S Li-ion · 40 A continuous, trips at about 120 A (1 ms), short circuit…
7S Li-ion BMS
Daly 7S 40 A common-port · 7S Li-ion · 40 A continuous, trips at about 120 A (1 ms), short circuit…
10S Li-ion BMS
Daly 10S 30 A common-port · 10S Li-ion · 30 A continuous, trips at about 90 A (1 ms), short…
13S Li-ion BMS
Daly 13S 40 A common-port · 13S Li-ion · 40 A continuous, trips at about 120 A (1 ms), short…
1S LiFePO4 protection board
1S 3.2 V 10 A LiFePO4 board (trips at 16 A) · 1S LiFePO4 · 10 A continuous, trips at about 16 A…
4S LiFePO4 BMS 20 A
Daly 4S 20 A LiFePO4 common-port · 4S LiFePO4 · 20 A continuous, trips at about 60 A (1 ms), short…
4S LiFePO4 BMS
Daly 4S 40 A LiFePO4 common-port · 4S LiFePO4 · 40 A continuous, trips at about 120 A (1 ms)…
4S LiFePO4 BMS 100 A
Daly 4S 100 A LiFePO4 common-port · 4S LiFePO4 · 100 A continuous, trips at about 300 A (1 ms)…
8S LiFePO4 BMS
Daly 8S 60 A LiFePO4 common-port · 8S LiFePO4 · 60 A continuous, trips at about 180 A (1 ms)…
8S LiFePO4 BMS 100 A
Daly 8S 100 A LiFePO4 common-port · 8S LiFePO4 · 100 A continuous, trips at about 300 A (1 ms)…
16S LiFePO4 BMS
Daly 16S 100 A LiFePO4 common-port · 16S LiFePO4 · 100 A continuous, trips at about 300 A (1 ms)…
3S LiFePO4 BMS
small 3S 9.6 V LiFePO4 board (LiFePO4 protection ICs, balancing near full) · 3S LiFePO4 · 5 A…
Calculators
Battery runtime calculator
How long a battery runs a load
Wire size and voltage drop calculator
Voltage drop in a DC or single-phase run, and the size to use
Also on the lab
Solar PV simulator · ESP32 simulator · Arduino simulator · Breadboard simulator · House wiring simulator · PCB layout and perfboard · Brownout backup · Piso Wi-Fi on solar · Questions answered · Compared with other simulators