

The TP4056 is a lithium battery charger IC designed to provide a constant current/constant voltage (CC/CV) charging profile. It is specifically tailored for charging single-cell lithium-ion batteries. The module integrates overcharge protection, thermal regulation, and a straightforward interface, making it an ideal choice for compact and efficient charging applications.








The TP4056 module is a compact and efficient charging solution. Below are its key technical details:
| Parameter | Value |
|---|---|
| Input Voltage Range | 4.5V to 5.5V |
| Charging Voltage | 4.2V ± 1% |
| Maximum Charging Current | Adjustable up to 1A (default: 1A) |
| Charging Method | Constant Current/Constant Voltage (CC/CV) |
| Battery Type Supported | Single-cell lithium-ion/lithium-polymer |
| Overcharge Protection | Yes |
| Thermal Regulation | Yes |
| Operating Temperature Range | -40°C to +85°C |
The TP4056 module typically has six pins. Below is the pinout and description:
| Pin Name | Pin Type | Description |
|---|---|---|
| IN+ | Input | Positive input voltage (4.5V to 5.5V). Connect to the positive terminal of the power source. |
| IN- | Input | Negative input voltage (ground). Connect to the negative terminal of the power source. |
| BAT+ | Output | Positive terminal for the battery connection. Connect to the positive terminal of the lithium battery. |
| BAT- | Output | Negative terminal for the battery connection. Connect to the negative terminal of the lithium battery. |
| OUT+ | Output | Positive output voltage for powering external circuits (optional). |
| OUT- | Output | Negative output voltage for powering external circuits (optional). |
IN+ and IN- pins. This can be a USB power source, a DC adapter, or a solar panel.BAT+ and BAT- pins. Ensure correct polarity to avoid damage.OUT+ and OUT- pins.The TP4056 can be used to charge a battery that powers an Arduino UNO. Below is an example of how to monitor the battery voltage using the Arduino:
// Define the analog pin connected to the battery's positive terminal
const int batteryPin = A0;
// Define the reference voltage and voltage divider ratio
const float referenceVoltage = 5.0; // Arduino's reference voltage (5V)
const float voltageDividerRatio = 2.0; // Assume a 2:1 voltage divider
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int analogValue = analogRead(batteryPin); // Read the analog value
// Calculate the battery voltage
float batteryVoltage = (analogValue / 1023.0) * referenceVoltage * voltageDividerRatio;
// Print the battery voltage to the Serial Monitor
Serial.print("Battery Voltage: ");
Serial.print(batteryVoltage);
Serial.println(" V");
delay(1000); // Wait for 1 second before the next reading
}
Note: Use a voltage divider circuit to step down the battery voltage to a safe level for the Arduino's analog input (0-5V).
Module Overheating
Battery Not Charging
Red LED Stays On Indefinitely
Blue LED Does Not Turn On
Q1: Can I use the TP4056 to charge multiple batteries in series?
A1: No, the TP4056 is designed for single-cell lithium-ion batteries only. Charging multiple batteries in series requires a specialized charging circuit.
Q2: Can I power the TP4056 module with a solar panel?
A2: Yes, as long as the solar panel provides a stable voltage within the 4.5V to 5.5V range.
Q3: What happens if I connect the battery in reverse polarity?
A3: Reverse polarity can damage the module and the battery. Always double-check connections before powering the module.
Q4: How do I adjust the charging current?
A4: Replace the onboard Rprog resistor with a different value. Use the formula ( I_{CHG} = \frac{1200}{R_{PROG}} ) to calculate the desired charging current.
By following this documentation, you can effectively use the TP4056 module for safe and efficient lithium battery charging.