The TP4056 is a lithium battery charger module specifically designed for charging 18650 lithium-ion batteries. It features a USB-C input for convenient power delivery and provides a constant current of 1A and a constant voltage of 4.2V, ensuring safe and efficient charging. This module is widely used in DIY electronics projects, portable power banks, and battery-powered devices.
The TP4056 module is compact and efficient, with the following key specifications:
Parameter | Value |
---|---|
Input Voltage | 4.5V to 5.5V (via USB-C) |
Charging Current | 1A (default, adjustable with resistor) |
Full Charge Voltage | 4.2V ± 1% |
Battery Type | 18650 lithium-ion |
Charging Method | Constant Current / Constant Voltage (CC/CV) |
Operating Temperature | -10°C to +85°C |
Dimensions | 25mm x 19mm x 10mm |
The TP4056 module has several pins and connectors for input, output, and monitoring:
Pin/Connector | Description |
---|---|
USB-C Input | Connects to a 5V power source (e.g., USB adapter, power bank). |
BAT+ | Positive terminal for the 18650 battery. |
BAT- | Negative terminal for the 18650 battery. |
OUT+ | Positive output terminal for powering external devices (optional). |
OUT- | Negative output terminal for powering external devices (optional). |
CHRG (LED) | Indicates charging status (Red = Charging, Off = Fully Charged). |
STDBY (LED) | Indicates standby status (Blue = Fully Charged or No Battery Connected). |
Connect the Power Source:
Plug a USB-C cable into the module's USB-C input. Ensure the power source provides a stable 5V supply.
Connect the Battery:
BAT+
pin. BAT-
pin.Optional Output Connection:
If you want to power an external device while charging the battery, connect the device to the OUT+
and OUT-
pins.
Monitor Charging Status:
CHRG
) will light up during charging. STDBY
) will light up when the battery is fully charged or no battery is connected.The TP4056 can be used to charge a battery that powers an Arduino UNO. Below is an example of monitoring 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's reference voltage (5V for UNO)
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(batteryPin, INPUT); // Set battery pin as input
}
void loop() {
int analogValue = analogRead(batteryPin); // Read analog value from BAT+
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 range for the Arduino's analog input (0-5V).
Module Overheating:
Battery Not Charging:
LEDs Not Lighting Up:
Output Voltage Too Low:
Q1: Can I use the TP4056 to charge batteries other than 18650?
A1: Yes, the TP4056 can charge other lithium-ion or lithium-polymer batteries with a nominal voltage of 3.7V and a full charge voltage of 4.2V. Ensure the battery's capacity and charging current are compatible.
Q2: Can I power a device directly from the TP4056 while charging the battery?
A2: Yes, but ensure the device's current draw does not exceed the module's output capacity. For high-power devices, use a separate power management circuit.
Q3: How do I adjust the charging current?
A3: Replace the onboard Rprog resistor with a different value. Refer to the TP4056 datasheet for the resistor-to-current mapping.
Q4: Is the TP4056 safe for unattended charging?
A4: While the TP4056 has built-in safety features, it is recommended to use a protected battery and monitor the charging process for added safety.