Skip to content
A project ofgwark.dev

NanJing Top Power ASIC · Integrated circuit

TP4056 Li-Ion Charger

A complete single-cell lithium charger in eight pins. One resistor sets the current, and nothing else is needed, which is why it is on every USB charging module sold.

Cheat sheet (SVG)
Logic level
4-8 V in, 4.2 V out
Package
SOP-8

1.Pinout diagram

Highlight a signalhover to preview, click to keep

Pins 1-4

TP4056

Pins 5-8

Pin detail

Hover a pin for its mappings and gotchas. Click to keep it here.

Logic level
4-8 V in, 4.2 V out
Package
SOP-8

Fig. 1. TP4056 Li-Ion Charger, SOP-8. Hover or tap a signal to light up every pin that carries it.

2.Watch out

3.Minimum circuit to charge a cell

What has to go around the chip before it will run.

VCCGNDTP405610 uF ceramic between VCC (4) and GND10 uFceramic10 uF ceramic between BAT (5) and GND10 uFceramicLi-ion cell between BAT (5) and GNDLi-ioncell1.2 kOhm (RPROG) between PROG (2) and GND1.2 kOhm(RPROG)Enable link between CE (8) and VCCEnablelinkTEMP link between TEMP (1) and GNDTEMP linkRed LED + 1 kOhm between CHRG (7) and VCCRed LED+ 1 kOhmGreen LED + 1 kOhm between STDBY (6) and VCCGreen LED+ 1 kOhmGND (3) to GNDVCC (4) to VCCTEMP 1PROG 2GND 3VCC 4VCC 4BAT 5STDBY 6CHRG 7CE 8
Fig. 2. Minimum circuit to charge a cell, drawn from Table 1. Dashed parts are optional. Crossing wires are not connected.
Table 1. External parts, and why each one is there.
PartBetween
10 uF ceramicVCC (4) to GND
10 uF ceramicBAT (5) to GND
1.2 kOhm (RPROG)PROG (2) to GND
Enable linkCE (8) to VCC
TEMP linkTEMP (1) to GND
Li-ion cellBAT (5) to GND
Red LED + 1 kOhmoptionalCHRG (7) to VCC
Green LED + 1 kOhmoptionalSTDBY (6) to VCC

A thermistor in the battery pack goes to TEMP instead of the ground link, with its own divider to VCC. Nothing here protects the cell from over-discharge; that needs a separate protection circuit between the battery and the load.

4.Full pin reference

Every pin, alias and mapping. This is the table that prints.

Table 2. Pin assignments.

Complete pin reference for TP4056 Li-Ion Charger
PinNameFunctions

Found a wrong pin? The whole board is one file, data/boards/tp4056.json.

Edit this file on GitHubReport it instead