TP4056 Li-ion charger with protection with ESP32
Supply 5 V
Bus GPIO
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| IN+ | Not wired to the ESP32 | — | 5 V input (or the USB connector) |
| IN- | Ground | GND | Input ground |
| B+ | Not wired to the ESP32 | — | To the cell +. One 3.7 V Li-ion / LiPo cell only |
| B- | Not wired to the ESP32 | — | To the cell -. Not the same as GND: protection sits in between |
| OUT+ | Not wired to the ESP32 | — | 3.0 to 4.2 V to the load. Too low for VIN: use an LDO or a boost to 5 V |
| OUT- | Ground | GND | Load ground: to the ESP32 GND |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
This module is sold for 5 V. Its outputs may be 5 V: use a level shifter or a voltage divider on ESP32 inputs.
Sources
- NanJing Top Power TP4056 datasheet, Charge to 4.2 V; current set by RPROG (1.2 kΩ = 1 A)
- Fortune DW01A datasheet, Over-discharge, over-charge and over-current protection
Try it in 3D in BoardPilot
Related parts
18650 Li-ion cell in holder28BYJ-48 stepper + ULN2003 driver433 MHz transmitter (FS1000A)74HC595 shift registerA4988 stepper driverActive buzzer
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.