Uploaded January 2026 | Updated November 2026, 2 days ago
USB-C (Type C) 2A Switching Lithium Battery Charger Circuit
======================================
Altium Develop (Free Legal License): altium.com/yt/MyVanitar
======================================
Article:
======================================
Schematic & PCB: 365.altium.com/files/787A433E-1F41-4904-8A3C-BB543B281476
======================================
Other Videos: bit.ly/2N9OlPa
======================================
@AtiumOfficial
#altiumstories
This project presents the design and implementation of a compact, high-efficiency lithium battery charger based on the TP5000X-4.2 switching charge management IC. The charger is intended for single-cell lithium-ion (Li-ion) and lithium-polymer (Li-Po) batteries with a nominal voltage of 3.7 V and a full charge voltage of 4.2 V. The system supports up to 2 A charging current, offers excellent thermal performance, and integrates comprehensive battery protection, making it suitable for both protected and unprotected battery cells.
Unlike traditional linear chargers, which dissipate excess power as heat, this design uses a buck switching topology, significantly improving efficiency—especially at higher charge currents. This allows the charger to remain compact while safely delivering high current without excessive temperature rise.
A modern USB-C charging interface is used as the input power source, enabling users to charge batteries with widely available phone chargers, power banks, or USB adapters. The design intentionally avoids proprietary or specialized power inputs, focusing instead on universality, safety, and efficiency.
2. Design Goals and Motivation
The main objectives of this project were:
High charging efficiency at currents up to 2A
Support for both Li-ion and Li-Po batteries
Compact PCB layout suitable for embedded or portable applications
User-adjustable charging current via a single resistor
Safe charging of unprotected batteries through onboard protection circuitry
USB-C compatibility without requiring USB-PD negotiation
Thermal robustness without external heatsinks
Clear charge status indication
Many low-cost lithium chargers on the market rely on linear ICs such as the TP4056. While simple, these devices suffer from poor efficiency at high currents and become thermally constrained above ~1 A. This project addresses those limitations by adopting a switch-mode charger IC, allowing higher performance in a smaller form factor.
3. Overview of the TP5000X-4.2 Charging IC
At the core of the design is the TP5000X-4.2, a switching lithium battery charge management IC manufactured by NanJing Top Power ASIC Corp. It is specifically designed for single-cell lithium batteries and is available in versions supporting 3.7 V, 4.2 V, and 4.35 V termination voltages. This project uses the 4.2 V variant, which is the standard for most Li-ion and Li-Po cells.
Key characteristics of the TP5000X-4.2 include:
Buck (step-down) switching charger topology
Integrated power MOSFET
Programmable charging current (0.1 A – 2 A)
800 kHz switching frequency
Trickle, constant-current, and constant-voltage charging stages
±1 % charge voltage accuracy
Wide input voltage range (4.5 V – 9 V)
Built-in thermal regulation
Input overvoltage, undervoltage, and overcurrent protection
Battery temperature monitoring
Automatic recharge functionality
Two open-drain status outputs (CHRG and STDBY)
The IC is packaged in an ESOP-8 package with an exposed thermal pad, which allows efficient heat transfer to the PCB ground plane.
4. Switching Charger Architecture and Efficiency
Unlike linear chargers that regulate current by dissipating excess voltage as heat, the TP5000X uses a high-frequency buck converter to efficiently step down the input voltage to the battery voltage.
5. Charging Algorithm and Operating Phases
The charger follows a three-stage lithium battery charging algorithm, which is essential for battery safety, longevity, and performance.
6. Programmable Charging Current
One of the most practical features of the TP5000X is its resistor-programmable charging current. The charging current is set by a single low-value shunt resistor (Rs) between the VS and BAT pins.
7. USB-C Power Input Design
The charger uses a USB-C connector as its power input. The design intentionally operates in default USB-C mode, drawing 5 V without engaging USB-PD negotiation. This ensures:
Compatibility with nearly all USB-C chargers
No need for USB-PD controllers or firmware
Simplified hardware design
USB-C (Type C) 2A Switching Lithium Battery Charger Circuit
======================================
Altium Develop (Free Legal License): altium.com/yt/MyVanitar
======================================
Article:
======================================
Schematic & PCB: 365.altium.com/files/787A433E-1F41-4904-8A3C-BB543B281476
======================================
Other Videos: bit.ly/2N9OlPa
======================================
@AtiumOfficial
#altiumstories
This project presents the design and implementation of a compact, high-efficiency lithium battery charger based on the TP5000X-4.2 switching charge management IC. The charger is intended for single-cell lithium-ion (Li-ion) and lithium-polymer (Li-Po) batteries with a nominal voltage of 3.7 V and a full charge voltage of 4.2 V. The system supports up to 2 A charging current, offers excellent thermal performance, and integrates comprehensive battery protection, making it suitable for both protected and unprotected battery cells.
Unlike traditional linear chargers, which dissipate excess power as heat, this design uses a buck switching topology, significantly improving efficiency—especially at higher charge currents. This allows the charger to remain compact while safely delivering high current without excessive temperature rise.
A modern USB-C charging interface is used as the input power source, enabling users to charge batteries with widely available phone chargers, power banks, or USB adapters. The design intentionally avoids proprietary or specialized power inputs, focusing instead on universality, safety, and efficiency.
2. Design Goals and Motivation
The main objectives of this project were:
High charging efficiency at currents up to 2A
Support for both Li-ion and Li-Po batteries
Compact PCB layout suitable for embedded or portable applications
User-adjustable charging current via a single resistor
Safe charging of unprotected batteries through onboard protection circuitry
USB-C compatibility without requiring USB-PD negotiation
Thermal robustness without external heatsinks
Clear charge status indication
Many low-cost lithium chargers on the market rely on linear ICs such as the TP4056. While simple, these devices suffer from poor efficiency at high currents and become thermally constrained above ~1 A. This project addresses those limitations by adopting a switch-mode charger IC, allowing higher performance in a smaller form factor.
3. Overview of the TP5000X-4.2 Charging IC
At the core of the design is the TP5000X-4.2, a switching lithium battery charge management IC manufactured by NanJing Top Power ASIC Corp. It is specifically designed for single-cell lithium batteries and is available in versions supporting 3.7 V, 4.2 V, and 4.35 V termination voltages. This project uses the 4.2 V variant, which is the standard for most Li-ion and Li-Po cells.
Key characteristics of the TP5000X-4.2 include:
Buck (step-down) switching charger topology
Integrated power MOSFET
Programmable charging current (0.1 A – 2 A)
800 kHz switching frequency
Trickle, constant-current, and constant-voltage charging stages
±1 % charge voltage accuracy
Wide input voltage range (4.5 V – 9 V)
Built-in thermal regulation
Input overvoltage, undervoltage, and overcurrent protection
Battery temperature monitoring
Automatic recharge functionality
Two open-drain status outputs (CHRG and STDBY)
The IC is packaged in an ESOP-8 package with an exposed thermal pad, which allows efficient heat transfer to the PCB ground plane.
4. Switching Charger Architecture and Efficiency
Unlike linear chargers that regulate current by dissipating excess voltage as heat, the TP5000X uses a high-frequency buck converter to efficiently step down the input voltage to the battery voltage.
5. Charging Algorithm and Operating Phases
The charger follows a three-stage lithium battery charging algorithm, which is essential for battery safety, longevity, and performance.
6. Programmable Charging Current
One of the most practical features of the TP5000X is its resistor-programmable charging current. The charging current is set by a single low-value shunt resistor (Rs) between the VS and BAT pins.
7. USB-C Power Input Design
The charger uses a USB-C connector as its power input. The design intentionally operates in default USB-C mode, drawing 5 V without engaging USB-PD negotiation. This ensures:
Compatibility with nearly all USB-C chargers
No need for USB-PD controllers or firmware
Simplified hardware design



![30A AC Soft Starter (Inrush Current Limiter) Circuit with Fail-Safe
30A AC Soft Starter Inrush Current Limiter Circuit
Altium Designer + License (Free): https://www.altium.com/yt/myvanitar
OctoPart: https://octopart.com
Article: https://www.pcbway.com/blog/technology/30A_AC_Soft_Starter_Inrush_Current_Limiter_6a29aea8.html
Gerber/PCB: https://www.pcbway.com/project/shareproject/30A_AC_Soft_Starter_Inrush_Current_Limiter_b3a43854.html
Other Videos: http://bit.ly/2N9OlPa
Are you tired of dealing with the damaging effects of inrush currents on your industrial devices? Look no further than an AC inrush current limiter (soft starter). Inrush current, also known as surge current, is the large amount of current that flows into a load at start-up. This can cause damage to equipment, reduce its lifespan, and lead to costly downtime. But with an AC inrush current limiter, you can eliminate these problems. Simply, a soft starter works by limiting the initial current flow, ensuring a smooth and efficient start-up, while protecting your equipment from damage.
So I decided to design this AC soft starter that is equipped with a fail-safe mechanism. During start-up, the inrush current passes through a power resistor, and after a delay (adjustable between 1ms to 1s), a 30A power Relay shorts the resistor and applies the full power to the load. If this Relay fails for whatever reason, the power resistor won’t melt everything; the logic circuit activates the fail-safe Relay that turns OFF the load to prevent any damage. 3 LEDs indicate the Supply, Normal, and Fault conditions. I selected the cheap ATTiny13 MCU as a controller.
To design the schematic and PCB, I used Altium Designer 23. The fast component search engine (Octopart) allowed me to quickly consider components’ information and also generate the BOM. To get high-quality fabricated boards, I sent the Gerber files to PCBWay. I used the Arduino IDE to write the MCU code, so it is pretty easy to follow and understand.
Let’s get started :-)
I start explaining the schematic from the top. AC-IN is the connector for the AC Mains input. R2 is the 10D5651K [2] varistor to eliminate voltage spikes at the input. U1 is the HLK-PM12 [3] AC to DC module that handles 12V at the output. This voltage is suitable to drive the Relays. R1 is a 5K potentiometer to adjust the delay. You can adjust the delay to something between 1ms and 1s. ISP is a male pin header for the AVR ISP programmer. IC1A and IC1B are parts of the ATTiny13 microcontroller. R3 is a pullup resistor for the RESET pin. C2 and C3 are decoupling capacitors for the VCC pin.
R4 and C4 build an RC filter at the input of the REG1. REG1 is the 78L05 SOT-89 5V regulator [4] to build a stable 5V power for the microcontroller. D1 is a 3mm yellow through-hole LED to indicate a proper supply voltage and R5 limits the current to D1. C5 and C6 are output capacitors to stabilize the regulator output voltage and reduce the noise. NTC is a 2 Pins XH connector to wire a 10K NTC to the board. R6 and NTC build a voltage divider, where voltage variations indicate changes in the temperature. If the temperature increases at the NTC side, the output voltage increases, and vice versa. C6 is a decoupling capacitor to reduce noise.
There are two Relay circuits here, both are identical. I explain one of them. Q1 is a Si2302 Mosfet [5] to drive the K1 Relay. R10 is a pulldown resistor for the Gate pin of Q1 to prevent unwanted triggering of the Mosfet. D2 is a 1N4007 diode [6] to protect the Mosfet against reverse currents of the Relay’s coil. D4 is a 3mm Red LED to indicate the fault condition. C8 damps the voltage spikes of Relay activation/deactivation. R9 is a 27R-20W power resistor to limit the inrush current, you can use other values depending on your application. 30A AC Soft Starter (Inrush Current Limiter) Circuit with Fail-Safe](https://i.ytimg.com/vi/_QyYtV-IEO8/mqdefault.jpg)






