Documentation
Onboarding
Getting Started
Power & Battery
Hardware & Components
Build & Assembly
Radio & RF Design
Frequencies & Regulations
Firmware & Software
USB & Connectivity
GPS & Navigation
Morse & Communication
Modes & Operation
Field Operations & Rescue
Building Effectively
Build Variants
Project & Reference
Docs Power & Battery TP4056 Charger Guide

TP4056 Charger Guide

Edit on GitHub

The TP4056 USB-C charge module: BAT+, STDBY, DW01A protection and wiring to the ESP32

TP4056 Charger Guide

Overview

The TP4056 is a single-cell Li-ion linear charger sold as a tiny USB-C breakout. In the Aegis-Beacon it charges the 18650 and provides the BAT+ rail that the voltage divider samples.

Module Facts

ParameterValue
Charge current1 A max (set by resistor on module)
InputUSB-C 5 V
Cell outputBAT+ / BAT-
ProtectionDW01A + FS8205 (over-discharge, over-current)
Status pinsCHRG (charging), STDBY (done)
STDBY to ESP32not connected (GPIO 39 is the radio DIO1 line; the firmware has no charge-detect input)

The Pads That Matter

PadConnect toPurpose
BAT+100k divider inputBattery voltage measurement point
BAT-GND (common)Cell negative
STDBYN/Cleave unconnected in the default build; no firmware charge-detect
CHRG(optional)LOW while actively charging
OUT+/OUT-ESP32 VBUS/5V or separateDepends on module layout

Warning

Two TP4056 breakout layouts exist: one exposes the cell on BAT+/BAT- and the system on OUT+/OUT-, another uses only BAT. Measure with a multimeter before wiring so the ESP32 5 V input comes from the right pads.

Charging Behavior

StateCHRG LEDSTDBY pin
ChargingRed onLOW
Charge completeOffLOW
No cell / standbyRed blinksHIGH

The firmware reads STDBY on GPIO 39 and shows a C in the battery icon while charging.

Protection Layer

The DW01A protector handles:

  • Over-discharge cutoff around 2.4-3.0 V.
  • Over-current protection.
  • Over-voltage during charge.

This is why the build does not need a separate protection PCB for the cell.

Charging Tips

  1. Charge at 0.5 A or 1 A; the module’s resistor sets the rate.
  2. Do not leave the cell charging unattended overnight on a cheap supply.
  3. In the field, a 5 V solar bank can top up the cell through the USB-C port.