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 to provide a constant current/constant voltage (CC/CV) charging profile. It is specifically tailored for charging single-cell lithium-ion batteries with high efficiency and safety. The IC integrates features such as over-voltage protection, under-voltage lockout, and thermal regulation, making it a reliable choice for battery charging applications.

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 and Use Cases

  • Charging single-cell lithium-ion or lithium-polymer batteries
  • Power banks and portable battery packs
  • USB-powered charging circuits
  • Wearable devices and IoT gadgets
  • DIY electronics projects

Technical Specifications

The TP4056 is a compact and efficient IC with the following key specifications:

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)
Operating Temperature Range -40°C to +85°C
Standby Current < 2µA
Package Type SOP-8

Pin Configuration and Descriptions

The TP4056 comes in an 8-pin SOP package. Below is the pinout and description:

Pin Number Pin Name Description
1 TEMP Temperature sense input. Connect to an NTC thermistor for battery temperature monitoring.
2 PROG Programs the charging current. Connect a resistor to ground to set the current.
3 GND Ground pin. Connect to the circuit ground.
4 VCC Input supply voltage. Connect to a 4.0V–8.0V power source.
5 BAT Battery connection pin. Connect directly to the positive terminal of the battery.
6 STDBY Open-drain status output. Indicates charging status (low = charging, high = standby).
7 CHRG Open-drain status output. Indicates charging in progress (low = charging).
8 CE Chip enable. Active low. Pull low to enable the IC, or high to disable it.

Usage Instructions

How to Use the TP4056 in a Circuit

  1. Power Supply: Connect a 5V DC power source (e.g., USB) to the VCC pin. Ensure the input voltage is within the 4.0V–8.0V range.
  2. Battery Connection: Connect the positive terminal of the lithium-ion battery to the BAT pin and the negative terminal to GND.
  3. Programming Charging Current: Use a resistor (RPROG) between the PROG pin and GND to set the charging current. The charging current can be calculated using the formula: [ I_{CHG} = \frac{1200}{R_{PROG}} ] For example, a 1.2kΩ resistor sets the charging current to 1A.
  4. Status LEDs: Connect LEDs to the CHRG and STDBY pins (with appropriate current-limiting resistors) to indicate charging status:
    • CHRG pin low: Charging in progress.
    • STDBY pin low: Charging complete.
  5. Temperature Monitoring: Optionally, connect an NTC thermistor to the TEMP pin for battery temperature monitoring. If unused, connect TEMP to GND.

Important Considerations and Best Practices

  • Thermal Management: Ensure proper heat dissipation, as the IC may heat up during high-current charging. Use a heat sink or adequate PCB copper area for thermal regulation.
  • Battery Protection: Use a protection circuit module (PCM) with the battery to prevent over-discharge and over-current conditions.
  • Input Voltage: Avoid exceeding the maximum input voltage of 8.0V to prevent damage to the IC.
  • Current Limiting: Do not exceed the maximum charging current of 1A to ensure safe operation.

Example: Using TP4056 with Arduino UNO

The TP4056 can be used in conjunction with an Arduino UNO to monitor the charging status of a battery. Below is an example code snippet:

// TP4056 Status Monitoring with Arduino UNO
// Connect CHRG pin to Arduino pin 2 and STDBY pin to Arduino pin 3

#define CHRG_PIN 2  // CHRG pin of TP4056 connected to Arduino digital pin 2
#define STDBY_PIN 3 // STDBY pin of TP4056 connected to Arduino digital pin 3

void setup() {
  pinMode(CHRG_PIN, INPUT);  // Set CHRG pin as input
  pinMode(STDBY_PIN, INPUT); // Set STDBY pin as input
  Serial.begin(9600);        // Initialize serial communication
}

void loop() {
  int chrgStatus = digitalRead(CHRG_PIN);   // Read CHRG pin status
  int stdbyStatus = digitalRead(STDBY_PIN); // Read STDBY pin status

  if (chrgStatus == LOW) {
    Serial.println("Battery is charging...");
  } else if (stdbyStatus == LOW) {
    Serial.println("Battery is fully charged.");
  } else {
    Serial.println("No battery connected or charging stopped.");
  }

  delay(1000); // Wait for 1 second before checking again
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. IC Overheating

    • Cause: High charging current or insufficient heat dissipation.
    • Solution: Reduce the charging current by increasing the RPROG resistor value. Ensure proper PCB design for heat dissipation.
  2. Battery Not Charging

    • Cause: Incorrect wiring or insufficient input voltage.
    • Solution: Verify all connections and ensure the input voltage is within the 4.0V–8.0V range.
  3. Status LEDs Not Working

    • Cause: Incorrect LED connections or missing current-limiting resistors.
    • Solution: Check the LED polarity and ensure resistors are properly connected.
  4. Charging Stops Prematurely

    • Cause: Battery protection circuit triggered or thermal regulation activated.
    • Solution: Check the battery's protection circuit and ensure proper thermal management.

FAQs

  • Can the TP4056 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 multi-cell charger.

  • 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 use the TP4056 without a thermistor? Yes, if temperature monitoring is not required, connect the TEMP pin to GND.

  • How do I adjust the charging current? Use the formula ( I_{CHG} = \frac{1200}{R_{PROG}} ) to calculate the required resistor value for the desired charging current.