Overview
The TP4056 1A LiPo Battery Charging Board (Type-C version with current protection) is a compact single-cell lithium-ion / LiPo charger module built around the popular TP4056 IC and a DW01A + 8205A protection front-end. It charges 3.7V cells up to 4.2V from a Type-C USB input at up to 1A constant-current / constant-voltage, with status LEDs for charging and full-charge states.
The "with protection" variant includes over-charge, over-discharge, over-current, and short-circuit safeguards on the OUT+/OUT- pads, making it safe to leave connected to a load full-time. It is the workhorse charging board for ESP32 battery projects, Raspberry Pi Pico portable builds, wearables, sensor nodes, and any DIY application that needs both charging and battery protection in one tiny PCB.
At a Glance
Specifications
| Parameter | Value |
| Charge IC | TP4056 |
| Protection IC | DW01A + 8205A (dual MOSFET) |
| Input Voltage | 4.5V - 5.5V (USB Type-C) |
| Charge Current | 1A (R3 = 1.2k, default) |
| Charge Voltage | 4.2V +/- 1.5% |
| Charge Method | Constant Current / Constant Voltage (CC/CV) |
| Over-Charge Cutoff | 4.28V +/- 0.05V |
| Over-Discharge Cutoff | 2.5V +/- 0.05V |
| Over-Current Cutoff | ~3A |
| LED Indicators | Red = charging, Green = full |
| Quiescent Current | < 6 uA |
| PCB Dimensions | ~28 x 17 x 4 mm |
Pinout Diagram
Wiring Guide
Basic Charging Setup
The simplest use case: plug in a USB Type-C cable, connect the battery to B+/B-, and the board charges automatically. Red LED indicates charging in progress; green LED comes on when the cell reaches 4.2V.
| Board Pad | Connection |
|---|---|
| Type-C USB | 5V source (phone charger, USB port, power bank) |
| B+ | Battery Positive (+) |
| B- | Battery Negative (-) |
Load Sharing (Battery + Load Together)
Connect your load to OUT+ and OUT- so it draws through the protection circuit. The protection IC disconnects the load if the cell hits 2.5V (over-discharge) or if current exceeds ~3A. The board can power your load and charge the battery simultaneously when USB is connected.
| Board Pad | Connection |
|---|---|
| OUT+ | Load Positive (+) input |
| OUT- | Load Negative (-) / GND |
Adjusting Charge Current
The TP4056 sets charge current via the resistor on the PROG pin (labeled R3 on the board, between the IC and the Type-C connector). The board ships with a 1.2k resistor for 1A charging. Replace R3 with a different value to scale charge current up or down for smaller or larger cells.
| R3 (PROG) Value | Charge Current | Recommended Cell Size |
|---|---|---|
| 10k | 130 mA | < 200 mAh (LiPo coin) |
| 5k | 250 mA | 200 - 500 mAh |
| 2k | 580 mA | 500 - 1500 mAh |
| 1.2k (default) | 1000 mA | 1500 - 3000 mAh (18650) |
Powering Microcontrollers from the Battery
A single 3.7V cell directly powers ESP32 and Pico boards via their VIN/VSYS pins (which include onboard regulators that accept 2.7V - 5.5V). For 5V boards (Arduino Uno, Raspberry Pi), use a boost converter on the OUT+ rail.
| Board Output | Microcontroller | Details |
|---|---|---|
| OUT+ | ESP32 VIN / Pico VSYS | Direct 3.7V (regulator on dev board handles it) |
| OUT+ | Arduino Uno 5V | Via MT3608 boost converter to 5V |
| OUT+ | Raspberry Pi 5V | Via boost converter (3A+ rated) |
| OUT+ | Arduino Pro Mini 3.3V | Direct 3.7V to VCC (within tolerance) |
| OUT- | Common GND | Ground reference |
Code Examples
The TP4056 charger has no digital interface, but the LED status pins (CHRG and STDBY) can be tapped for software-side battery state monitoring. The examples below show how to read cell voltage via an ADC and detect charging state via the LED pins.
Arduino (Cell Voltage Monitor)
// TP4056 Cell Voltage Monitor for Arduino
// Connect OUT+ to a 100k/100k divider and read midpoint with A0
const int adcPin = A0;
const float dividerRatio = 2.0;
const float vRef = 5.0;
void setup() {
Serial.begin(9600);
}
void loop() {
int raw = analogRead(adcPin);
float vAdc = (raw / 1023.0) * vRef;
float vBat = vAdc * dividerRatio;
Serial.print("Cell: ");
Serial.print(vBat, 2);
Serial.print(" V");
if (vBat > 4.15) Serial.println(" -- FULL");
else if (vBat > 3.7) Serial.println(" -- GOOD");
else if (vBat > 3.3) Serial.println(" -- LOW");
else Serial.println(" -- CRITICAL");
delay(1000);
}
ESP32 (Cell Voltage + Charging State via LED Pins)
// ESP32 TP4056 monitor
// Cell voltage: OUT+ -- 220k -- GPIO34 -- 100k -- GND
// CHRG LED tap: GPIO32 (HIGH when charging)
// STDBY LED tap: GPIO33 (HIGH when full)
// Note: the LED pins on TP4056 are open-drain -- pull them up to 3.3V via 10k
const int adcPin = 34;
const int chrgPin = 32;
const int stdbyPin = 33;
const float dividerRatio = 3.2;
const float vRef = 3.3;
void setup() {
Serial.begin(115200);
pinMode(chrgPin, INPUT_PULLUP);
pinMode(stdbyPin, INPUT_PULLUP);
analogReadResolution(12);
}
void loop() {
int raw = analogRead(adcPin);
float vBat = (raw / 4095.0) * vRef * dividerRatio;
bool charging = (digitalRead(chrgPin) == LOW); // LED on = pin pulled low
bool full = (digitalRead(stdbyPin) == LOW);
Serial.printf("Cell: %.2f V | Charging: %d | Full: %d\n", vBat, charging, full);
delay(1500);
}
Raspberry Pi Pico (MicroPython)
# Pico TP4056 voltage monitor
# Divider: OUT+ -- 100k -- GP26 (ADC0) -- 100k -- GND
from machine import ADC
import time
adc = ADC(0)
divider_ratio = 2.0
v_ref = 3.3
while True:
raw = adc.read_u16()
v_adc = (raw / 65535) * v_ref
v_bat = v_adc * divider_ratio
if v_bat > 4.15:
state = "FULL"
elif v_bat > 3.7:
state = "GOOD"
elif v_bat > 3.3:
state = "LOW"
else:
state = "CRITICAL"
print("Cell: {:.2f} V -- {}".format(v_bat, state))
time.sleep(1)