The TP4056 chip is a lithium Ion battery charger for a single cell battery, protecting the cell from over and under charging. It has two status outputs indicating charging in progress, and charging complete. It also has a programmable charge current of up to 1A.

You can use it to charge batteries directly from a USB port since the working input voltage range is 4V ~ 8V.

There are two types of common breakout boards for this chip:

  • One with only the charger chip on board.
  • One with three chips on board.

Here you are looking at the 3 chip breakout board (TP4056 - middle, DW01A - top right, and 8205A dual MOSFET - bottom right).

TP4056 breakour board with DW01A protection

What you can learn here:

  • How to use the TP4056 breakout board.
  • How to use the TP4056 safely.
  • How the DW01A works on the TP4056 breakout board.
  • How to set temperature limits using the TP4056 TEMP input.

Note: You need to change the current programming resistor on the breakout board to match the lithium battery you are using - the default is 1.2k which is for a 1Ah (1000mAh) battery.

Note: Follow this link to learn how to use the DW01A correctly.

Lithium batteries can be dangerous if not charged properly and that's why the TP4056 is useful as it stops over voltage and current charging by detecting specific voltage conditions.


There are a lot of circuits out there that show the use of the TP4056 as both a charger and a load driver - Not Good. If a load is attached to the battery while charging, then the TP4056 may not detect when the charge current has fallen to C/10. So it could continue charging - this could be dangerous.

You should never use the TP4056 as a charger and as a load driver at the same time. When charging the battery, switch off the load, and when loading the battery, switch off the charger. Alternatively use a PMOSFET, a resistor and a Schottky diode (See page 2 on how to do this).

Lithium batteries can not absorb overcharge - the current must be cut off after charging. If not there could be thermal runaway.

TP4056 Features

  • Constant Current / Constant voltage charging method.
  • C/10 Charge termination.
  • 2.9V trickle charge threshold (for deeply discharged batteries).
  • Upper charge stop voltage : 4.2V.
  • Soft start inrush current limit.
  • Automatic recharge (keeps batteries optimally charged when connected to a charger).

TP4056 module Datasheet

Download the TP4056 Datasheet here.

TP4056 Specifications

  Voltage Supply (Vs)
4V0 ~ 8V0
  Charge Voltage termination (accuracy) 4.2V(1.5%)
  Supply current (Rprog=1.2k: 1A chrg)
150uA (typ)
  Supply current (Chrg ended/ shutdown) 55uA (typ)
  Ibat (Rprog=1.2k: 1A chrg ) 1050mA (max)
  Ibat (Stand by mode; Vbat = 4.2V)-6uA (max)
  Vtrckl(Rprog=1.2k: Vbat:rising) 2.9V (typ)
  Itrckl (Rprog=1.2k: Vbat<Vtrckl ) 140mA max)
  Vtrhsy(Rprog=1.2k) 80mV (typ)
  Operating temperature
-40°C ~ 85°C

            [trckl = Trickle charge, trhsy = Trickle Charge Hysteresis]

TP4056 Current Programming Resistor

The programming resistor (R3 or Rprog) is set to 1k2 which provides 1A programming charge rate or 1C. If your battery is not 1000mAh (1Ah), then you need to remove R3 and replace it with the correct one following the information in the table on the right.

TP4056 Status indicator LEDs

The table shows the state of LEDs for various charging states:

Charge state

Charge Termination.
Extinguish Bright
Vin too low; temperature of battery too low or too high; No battery.
Extinguish Extinguish
BAT PIN Connect 10u Capacitance; No Battery.
Green LED bright, Red LED

TP4056 RPROG Current setting resistor

RPROG on the breakout board is R3.


TP4056 Charger Module Schematic

This is the schematic of the popular breakout board with label 03962A this shows the TP4056 pinout for the breakout board.

TP4056 breakoutboard schematic

[ ]

When charging a battery using the above board connect the battery to B+ and B- and disconnect OUT+ and OUT- from your circuit. When using the battery disconnect the 5V input and take the output voltage from OUT+ and OUT- to your circuit.

TP4056 Connections

The following diagram shows a typical setup (from the datasheet). The block diagram also shows the TP456 pinout for the 8 pin SMD device.

Typical circuit for tp4056
Here you can see the two status LEDs (CHRGn, STDBYn), Battery connection (BAT), Current control connection (PROG) and TEMP connection. Some LI batteries have an internal thermistor that you can connect as shown above. In the breakout boards available generally TEMP is not used and connected to Ground.

TP4056 reverse polarity protection

The TP4056 does not give you reverse polarity protection so if you wire up the battery the wrong way round then you'll get smoke!

Actually, there is no TP4056 reverse polarity protection and the DW01A battery protection IC (on the breakout board) is being used in the wrong way (or not in the best way)! If used correctly the DW01A does provide reverse polarity protection for a battery.

Note: Follow this link to learn how to use the DW01A correctly.

DW01A Battery Protector Chip

On some breakout boards there are an extra 2 chips. One is the DW01A and the other is a dual N Channel MOSFET required by the DW01A chip.

This chip provides battery protection but it is not used in the right way on this board and so only provides short circuit protection (and over current protection). It should provide all of the following:

Charger input protection

The CS pin is connected to the negative terminal of the charger input (via a 1k⦠resistor) and performs the following functions:
  • Short Circuit detector.
  • Over current detector.
  • Charger Detector.
  • Reverse charger detection (overstress high current?).

Battery monitoring

VCC and GND are connected across the battery where two voltages are detected:

  • Overcharge Detector (battery voltage too high).
  • Overdischarge Detector (battery voltage too low).

DW01A and TP4056 breakout Board

On the breakout board, the chip is soldered to the TP4056 so this can never be connected the wrong way round at the "charger input". At the other side the DW01A does not protect from connecting the battery the wrong way round!

This chip will not activate for battery voltage level problems (unless the TP4056 fails) since the TP4056:
  • Stops discharging at voltages below 2.9V; Here trickle charge activates.
         The DW01A threshold is ~ 2.4V; So it will never activate.
  • Stops charging at voltages above 4.2V.
        The DW01A threshold is  ~ 4.3V; So it will never activate.

The only function that will operate is the overcurrent protection and short circuit protection. These will activate at around 3A when using the 8205A dual Mosfet.


This article continues on page 2, where you can find out how to use the TP4056 in the correct way (most circuits are not correct).

New! Comments

Have your say about what you just read! Leave me a comment in the box below.

Privacy Policy | Contact | About Me

Site Map | Terms of Use