Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use TP4056: Examples, Pinouts, and Specs

Image of TP4056
Cirkit Designer LogoDesign with TP4056 in Cirkit Designer

Introduction

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.

Explore Projects Built with TP4056

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Battery-Powered Multi-Sensor System
Image of Dive sense: A project utilizing TP4056 in a practical application
This circuit consists of a TP4056 module connected to a 3.7V LiPo battery, providing a charging interface for the battery. The TP4056 manages the charging process by connecting its B+ and B- pins to the battery's positive and ground terminals, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
Image of playbot: A project utilizing TP4056 in a practical application
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
Image of Copy of CanSet v1: A project utilizing TP4056 in a practical application
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Motor Speed Controller with TP4056 and ESP32
Image of Stimulator: A project utilizing TP4056 in a practical application
This circuit is designed to control the speed of a motor using a PWM motor speed controller powered by a Lithium-Ion battery. The TP4056 module manages battery charging, while a step-up boost converter regulates the voltage supplied to the motor and an Elektro Pad. A rocker switch is included to control the power flow to the motor speed controller.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with TP4056

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Dive sense: A project utilizing TP4056 in a practical application
ESP32-Based Battery-Powered Multi-Sensor System
This circuit consists of a TP4056 module connected to a 3.7V LiPo battery, providing a charging interface for the battery. The TP4056 manages the charging process by connecting its B+ and B- pins to the battery's positive and ground terminals, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of playbot: A project utilizing TP4056 in a practical application
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of CanSet v1: A project utilizing TP4056 in a practical application
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Stimulator: A project utilizing TP4056 in a practical application
Battery-Powered Motor Speed Controller with TP4056 and ESP32
This circuit is designed to control the speed of a motor using a PWM motor speed controller powered by a Lithium-Ion battery. The TP4056 module manages battery charging, while a step-up boost converter regulates the voltage supplied to the motor and an Elektro Pad. A rocker switch is included to control the power flow to the motor speed controller.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Charging single-cell lithium-ion or lithium-polymer batteries
  • Power banks and portable chargers
  • Wearable devices
  • DIY electronics and IoT projects
  • Battery-powered gadgets

Technical Specifications

Key Technical Details

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 Configuration and Descriptions

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.

Usage Instructions

How to Use the TP4056 in a Circuit

  1. Power Supply: Connect a DC power source (4.0V to 8.0V) to the VCC pin. Ensure the power source can supply sufficient current for the charging process.
  2. Battery Connection: Connect the positive terminal of the lithium-ion battery to the BAT pin and the negative terminal to GND.
  3. Set Charging Current: Use a resistor between the 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Ω.
  4. Status Indicators: Connect LEDs to the 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.
    • Both OFF: No battery connected or charging disabled.
  5. Thermal Protection: Optionally, connect an NTC thermistor to the TEMP pin for temperature monitoring. If unused, connect the TEMP pin to GND.

Important Considerations

  • Ensure the input voltage does not exceed 8.0V to avoid damaging the IC.
  • Use a heat sink or proper ventilation if charging at high currents to prevent overheating.
  • Always verify the battery's specifications to ensure compatibility with the TP4056.
  • Avoid reverse polarity connections to prevent damage to the IC and battery.

Example: Using TP4056 with Arduino UNO

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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Problem: The battery is not charging.

    • Solution: Verify the input voltage is within the 4.0V to 8.0V range. Check the connections to the BAT and GND pins. Ensure the CE pin is pulled low to enable charging.
  2. Problem: The IC overheats during charging.

    • Solution: Reduce the charging current by increasing the R_PROG resistor value. Ensure proper ventilation or use a heat sink.
  3. Problem: Status LEDs are not working.

    • Solution: Check the connections to the STAT1 and STAT2 pins. Verify the LEDs and resistors are functioning correctly.
  4. Problem: Charging stops prematurely.

    • Solution: Ensure the battery is not faulty or fully charged. Check the TEMP pin connection if using a thermistor.

FAQs

  • 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.