

The TP4056 is a lithium-ion battery charger IC designed for single-cell lithium-ion batteries. It provides a constant current/constant voltage (CC/CV) charging profile, ensuring safe and efficient charging. The IC is equipped with built-in thermal regulation, over-voltage protection, and automatic charge termination, making it a reliable choice for battery-powered applications. Its compact design and simple interface make it ideal for portable electronics, power banks, and DIY projects.








| Parameter | Value |
|---|---|
| Input Voltage Range | 4.0V to 8.0V |
| Charging Voltage | 4.2V ± 1% |
| Maximum Charging Current | 1A (adjustable via external resistor) |
| Charging Method | Constant Current/Constant Voltage (CC/CV) |
| Standby Current | < 2µA |
| Thermal Regulation | Automatically reduces current at high temperatures |
| Protection Features | Over-voltage, over-temperature, reverse polarity |
| Package Type | SOP-8 |
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | BAT | Battery connection pin. Connect to the positive terminal of the battery. |
| 2 | GND | Ground pin. Connect to the system ground. |
| 3 | VCC | Input voltage pin. Connect to a DC power source (4.0V to 8.0V). |
| 4 | PROG | Charging current programming pin. Connect a resistor to set the charge current. |
| 5 | TEMP | Temperature monitoring pin. Connect to an NTC thermistor for thermal protection. |
| 6 | STAT1 | Status indicator pin 1. Used with LEDs to indicate charging status. |
| 7 | STAT2 | Status indicator pin 2. Used with LEDs to indicate charging status. |
| 8 | CE | Chip enable pin. Pull low to enable charging, pull high to disable. |
VCC pin. Ensure the power source can supply sufficient current for the charging process.BAT pin and the negative terminal to GND.PROG pin and GND to set the charging current. The formula to calculate the resistor value is:
[
I_{CHG} = \frac{1200}{R_{PROG}}
]
where ( I_{CHG} ) is the charging current in mA and ( R_{PROG} ) is the resistor value in kΩ.STAT1 and STAT2 pins with appropriate current-limiting resistors to monitor the charging status:STAT1 ON, STAT2 OFF: Charging in progress.STAT1 OFF, STAT2 ON: Charging complete.TEMP pin for temperature monitoring. If unused, connect the TEMP pin to GND.The TP4056 can be used with an Arduino UNO to monitor the charging status. Below is an example code to read the status pins:
// Define the status pins connected to TP4056
const int stat1Pin = 2; // STAT1 pin connected to Arduino digital pin 2
const int stat2Pin = 3; // STAT2 pin connected to Arduino digital pin 3
void setup() {
pinMode(stat1Pin, INPUT); // Set STAT1 pin as input
pinMode(stat2Pin, INPUT); // Set STAT2 pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int stat1 = digitalRead(stat1Pin); // Read STAT1 pin
int stat2 = digitalRead(stat2Pin); // Read STAT2 pin
if (stat1 == LOW && stat2 == HIGH) {
Serial.println("Charging in progress...");
} else if (stat1 == HIGH && stat2 == LOW) {
Serial.println("Charging complete.");
} else {
Serial.println("No battery connected or charging disabled.");
}
delay(1000); // Wait for 1 second before checking again
}
Problem: The battery is not charging.
BAT and GND pins. Ensure the CE pin is pulled low to enable charging.Problem: The IC overheats during charging.
R_PROG resistor value. Ensure proper ventilation or use a heat sink.Problem: Status LEDs are not working.
STAT1 and STAT2 pins. Verify the LEDs and resistors are functioning correctly.Problem: Charging stops prematurely.
TEMP pin connection if using a thermistor.Can I use the TP4056 to charge multiple batteries in series? No, the TP4056 is designed for single-cell lithium-ion batteries only. Charging multiple cells in series requires a specialized battery management system (BMS).
What happens if the input voltage exceeds 8.0V? Exceeding 8.0V can damage the IC. Always use a regulated power supply within the specified range.
Can I adjust the charging voltage? No, the charging voltage is fixed at 4.2V ± 1% and cannot be adjusted.
Is the TP4056 suitable for fast charging? The maximum charging current is 1A, which is suitable for most single-cell lithium-ion batteries. For faster charging, consider ICs designed for higher currents.