Blog
ESP32 Battery Charging: LiPo, 18650
ESP32 battery charging is the part most tutorials skip: a devkit’s USB port charges nothing, and a LiPo needs a charger chip that your board probably does not have. The chips, the voltages, and when the charging light actually means charged.
How to Charge an ESP32?
The short answer to how to charge esp32 boards: you charge the battery, not the chip — and you need a charger IC between them. A bare devkit’s 5 V pin runs straight to the regulator with no charging circuitry. Boards with a charger (IP5306 or similar, like the LilyGO T-Watch family) are the exception; check the schematic before assuming.
Does My Devkit Include a Charger?
Check for a battery connector and a charge IC. A two-pin JST might be wired to the 5 V rail (pass-through, no charging) or through an IP5306/TPS61022 charge pump. M5Stack core boards charge properly; generic devkits mostly do not. If the product page does not say “charger”, assume there is none.
When Is ESP32 LiPo Charged?
A LiPo is charged when the cell reaches 4.2 V and current tapers — the IP5306’s LED turns solid, the TP4056’s CHRG pin goes high. That is the real answer to “when is esp32 lipo charged”: voltage and current cutoff, not time. 1000 mAh from empty at 1 A takes ~90 minutes, and the last 20% is the slow taper.
How Do I Wire a Charger to the ESP32?
Standard build: a TP4056 module with the battery on B+/B- and the board fed from OUT+/OUT-. A 3.7 V LiPo runs through the VIN regulator while the charger handles the rest — an ESP32 LiPo battery pair with a TP4056 is the classic hobby build. Watch the current resistor: it defaults to 1 A, which some cells cannot take.
18650 or LiPo — Which Battery?
LiPo wins on size and direct connection — 3.7 V feeds the VIN regulator without extra parts. 18650 cells win on capacity and price, but need a boost to 5 V or a wide-input regulator. Safe middle ground: a protected 18650 plus a boost module; parallel cells without balancing I would skip entirely.
How Long Does a Full Charge Last?
Do the arithmetic in mAh: 1200 mAh at a real-world 50 µA deep sleep (LED removed) lasts over two years on paper; five seconds of Wi-Fi a minute collapses it to days. The battery is rarely the limit — the sketch’s duty cycle is. The deep sleep FAQ is the other half.
Can I Charge and Run at the Same Time?
Technically yes on pass-through designs, with caveats: the load reads as battery current, so charging slows and the voltage gets fuzzy, and single-rail boards can brown out mid-session. Charge in deep sleep, or accept a slower “full”. It depends on your board’s power path — the schematic settles it.
What Happens If I Overcharge a LiPo?
At 4.2 V the protection circuit or charger IC stops the charge; unprotected cells over 4.3 V swell and can fail violently. The realistic hobby failure is over-discharge below 3.0 V, which protection also covers. Two rules: never charge a cell you cannot identify, never keep a swelling cell.
Why Does My Charging Light Never Turn Green?
On a TP4056: charge current set above what the cell accepts, a damaged cell, or a wrong resistor. On an IP5306 board: the board also powers the ESP32, so the charger never sees a taper. I spent an evening on this once — the answer was a parallel load. Measure the cell: 4.1–4.2 V means done regardless of the LED.
Should I Remove the Battery While Flashing?
Yes, when the board has a charge path — USB and battery on the same rail can fight, and worst case the charger charges through the USB data lines. Disconnect, flash, reconnect. Sealed builds: use the battery-disable circuit or flash over the air. Our pre-flashed kits ship with battery wiring done.
Battery Math You Can Watch — In Your Browser
Charging and discharging both start with knowing the voltage:
- Battery voltage monitor — divider into ADC, printed continuously:
Battery: 3.87 V, thenWARNING: Battery low!as the virtual cell drains past your threshold. - Dual-channel ADC — monitor two cells (or cell + rail) side by side.
Set the low-voltage cutoff where this FAQ says lithium likes it, watch the trip happen, and you have debugged the alarm half of your future battery project before owning a charger.