TP4056 Li-ion charger with protection with ESP32

Supply 5 V Bus GPIO
IN+IN-B+B-OUT+OUT-

Pins and ESP32 wiring

PinRoleESP32 pinNotes
IN+Not wired to the ESP32—5 V input (or the USB connector)
IN-GroundGNDInput 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-GroundGNDLoad 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

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.