

The TP4056 is a lithium-ion battery charger IC that provides a constant current/constant voltage (CC/CV) charging profile. It is specifically designed for charging single-cell lithium-ion batteries. The module integrates overcharge protection, thermal regulation, and a simple interface for monitoring the charging process. Its compact design and ease of use make it a popular choice for DIY electronics projects and battery-powered devices.








The TP4056 charging module is designed to provide safe and efficient charging for lithium-ion batteries. Below are its key technical specifications:
| 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 Overcharge Protection | Yes |
| Operating Temperature | -40°C to +85°C |
| Dimensions | ~25mm x 19mm |
The TP4056 module typically has six pins. Below is the pinout and description:
| Pin Name | Description |
|---|---|
| IN+ | Positive input voltage (4.5V to 5.5V, typically connected to USB 5V) |
| IN- | Negative input voltage (ground) |
| BAT+ | Positive terminal of the lithium-ion battery |
| BAT- | Negative terminal of the lithium-ion battery |
| OUT+ | Positive output voltage (connected to the load, optional) |
| OUT- | Negative output voltage (connected to the load, optional) |
Connect the Input Voltage:
IN+ and IN- pins.Connect the Battery:
BAT+ pin.BAT- pin.Optional Load Connection:
OUT+ and OUT- pins.Adjust the Charging Current (if needed):
Monitor the Charging Status:
The TP4056 module 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:
// Example code to monitor battery voltage using Arduino UNO
const int batteryPin = A0; // Analog pin connected to BAT+ via a voltage divider
const float voltageDividerRatio = 2.0; // Adjust based on your resistor values
const float referenceVoltage = 5.0; // Arduino reference voltage (5V for UNO)
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(batteryPin, INPUT); // Set the battery pin as input
}
void loop() {
int rawValue = analogRead(batteryPin); // Read the analog value
float batteryVoltage = (rawValue / 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 to ensure the battery voltage does not exceed the Arduino's analog input range (0-5V). For example, use two resistors of equal value (e.g., 10kΩ each) to divide the voltage by 2.
The module is not charging the battery:
The module overheats:
The LEDs are not lighting up:
The battery does not reach full charge:
Q: Can I use the TP4056 module to charge multiple batteries in series?
A: No, the TP4056 is designed for single-cell lithium-ion batteries only. Charging multiple batteries in series requires a specialized charger with balancing capabilities.
Q: Can I power a load while charging the battery?
A: Yes, you can connect the load to the OUT+ and OUT- pins. However, ensure the load does not draw more current than the module can supply.
Q: How do I adjust the charging current?
A: Replace the onboard Rprog resistor with a resistor of the appropriate value. Use the formula ( I_{CHG} = \frac{1200}{R_{PROG}} ) to calculate the desired charging current.
Q: Is the TP4056 module safe to use?
A: Yes, the module includes overcharge protection and thermal regulation. However, always follow best practices to ensure safe operation.