“Everything you need to know about charging lithium batteries without accidentally burning down your house.”
๐ง What is TP4056?
TP4056 is a popular linear battery charger IC designed specifically for single-cell Li-Ion and Li-Polymer batteries.
It charges the cell with constant current (CC) followed by constant voltage (CV), ensuring safe and efficient charging.
โก Key Features
- ๐ Input voltage: 4V โ 8V (typically powered by USB 5V)
- โก Charging current: up to 1A (programmable)
- ๐ Full-charge voltage: 4.2V
- ๐ Charging method: Constant Current / Constant Voltage
- ๐ง Built-in safety:
- Over-temperature protection
- Under-voltage lockout
- Automatic recharge
- ๐ฆ Charging status outputs (LED indicators)
๐ฆ Typical Applications
- USB battery chargers (DIY power banks)
- Wearable electronics
- Bluetooth devices
- Arduino, ESP32 portable projects
- Emergency LED lamps
๐ Standard Pinout
| Pin | Name | Function |
|---|---|---|
| 1 | TEMP | Temperature sense (usually tied to GND) |
| 2 | PROG | Program charging current via resistor |
| 3 | GND | Ground |
| 4 | VCC | Input voltage (4-8V, usually 5V USB) |
| 5 | BAT | Battery connection |
| 6 | STDBY | Status: Charge complete (LED) |
| 7 | CHRG | Status: Charging (LED) |
| 8 | CE | Chip Enable (active low, usually tied low) |
๐งฐ How to Set the Charging Current
You define the current using a resistor connected to the PROG pin.
Formula:

| Desired Current | Resistor Value (Rprog) |
|---|---|
| 1000mA | 1kฮฉ |
| 500mA | 2kฮฉ |
| 100mA | 10kฮฉ |
๐ก๏ธ About TP4056 Modules with Protection
Some TP4056 modules come with additional protection chips like:
- DW01A: battery protection IC
- FS8205A: dual MOSFET for cut-off control
These protect against:
- Overcharge
- Over-discharge
- Short circuit
- Reverse polarity
Modules with protection usually have 6 terminals instead of 4:
- IN+, IN-, B+, B-, OUT+, OUT-
Always connect the load across OUT+ and OUT-, not B+ and B-.
๐งช Example Circuit (Basic Setup)
For a simple USB Li-Ion charger without external load:

No magic. Just wire properly and donโt burn the house.
๐ ๏ธ Advanced Setup: Full-Protected Power Module
Components:
- TP4056 charger IC
- DW01A + FS8205A protection circuit
- USB or DC input
- Load connected to OUT+, OUT-
- Bypass capacitors (10ยตF at input/output)
- Optional PTC resettable fuse for USB input (500mA typical)
โ ๏ธ Common Mistakes to Avoid
| Mistake | Why it’s a problem |
|---|---|
| Connecting load directly to B+ | Bypasses protection, risks overdischarge |
| No bypass capacitors | Causes instability or resets |
| Using low-quality USB power | Can cause undervoltage, slow or failed charge |
| Using too high Rprog value | Leads to very slow charging or fake “charging complete” detection |
| Overheating the chip (>100ยฐC) | TP4056 may go into thermal shutdown (or die) |
๐ Pro Tips
- Always add a heatsink pad under the TP4056 if charging >500mA.
- Use a 2kฮฉ Rprog to charge gently at ~500mA โ saves battery life.
- Prefer modules with a real DW01+FS8205 combo for serious projects.
- Always triple-check wiring before connecting batteries โ Li-Ion cells are not forgiving.
๐ฏ Conclusion
TP4056 is cheap, versatile, and robust โ if you respect its limits.
For small Li-Ion projects, itโs hard to beat its simplicity and performance.
๐
Itโs not just a charger. Itโs your batteryโs best friend.
Unless you mess up โ then it’s your firestarter. ๐





