The actual schematic inside this block — every part is explained below.
Li-ion Charger (1 cell)
Charges a single lithium cell safely from 5 V (USB) — running the CC/CV profile every
lithium cell requires: constant current while the cell is empty, smoothly handing over
to a constant 4.2 V as it fills, then tapering off to done.
U1 (TP4056-class) — the whole charge brain. It measures the cell at BAT and decides
which phase you're in. The cell is safe because this loop never lets it see more than
4.2 V or more than the programmed current.
R2 — the one resistor that sets the charge current: Icharge ≈ 1200 / R(PROG).
The 1.2 kΩ here means 1 A. Swap it to match your cell — never charge faster than 1C
(a 500 mAh cell wants ≤ 500 mA → 2.4 kΩ).
R1 — pull-up for CHRG, the open-drain status output: low while charging, releases
when full. Wire it to an LED or a GPIO.
TEMP is tied to ground here, which disables battery-temperature monitoring — fine
for a bench project at room temperature; for anything enclosed or outdoors, wire a 10 k
NTC against the cell instead.
It's a linear charger: simple and quiet, but it burns (Vin − Vbat) × Icharge as heat —
about 1 W into an empty cell at 1 A. That's why the chip gets warm; it's supposed to (it
thermally self-limits).
Exposes:vin (5 V), batt (the cell, 4.2 V max), chrg (status), gnd.
⚠ Protected cells only, or add a protection circuit: this block charges correctly but
does NOT protect against over-discharge or shorts on the battery side. Most bare 18650s
need that protection; most pouch cells with a small PCB already include it.
Watch it explained
Exposed nets
●vinin · power · 4.5–5.5 V
●gndin · gnd
●battout · power · 4.2 V
●chrgout · signal
Inside this block
U1
tp4056
the charge controller — runs the CC/CV profile: constant current into an empty cell, tapering to a constant 4.2 V as it fills
R1
1k
limits the CHRG status LED / signal current
R2
1.2k
programs the charge current: Icharge ≈ 1200 / R → 1 A
C1
10uF
input stability
C2
10uF
keeps the battery node stable while the loop regulates
Inside the chip: Li-ion charger — a pass transistor with two referees
What U1 actually does, drawn out in discrete parts — the same view the editor's “break into discrete” shows.
Linear CC/CV charging, drawn out: a power PNP passes current from input to cell, and two control loops referee it. The current referee: charge current through the sense resistor drops a voltage across Q3's base-emitter — past ~0.6 V (here ≈ 1 A), Q3 wakes and steals the pass transistor's drive, so current can't rise further (constant current). The voltage referee: when the cell reaches the 3.6 V zener plus Q4's 0.6 V base-emitter — 4.2 V, the Li-ion full-charge number — Q4 robs the driver instead and the current tapers (constant voltage). The sense resistor IS the PROG pin's job here: I ≈ 0.6 V / R. Simplified honestly: the real IC adds a precision reference (a zener is not ±1%), thermal regulation, and the TEMP/STDBY functions omitted from this drawing.
Limits & gotchas
⚠vin.max 6V — Abs-max is ~8 V but the part runs hot fast above 5.5 V in — it's a LINEAR charger, burning (Vin − Vbat) × Icharge as heat. At 5 V in, 1 A into an empty cell ≈ 1 W on this little package.
⚠icharge.max 1A — Set by R2: Icharge ≈ 1200 / R(PROG). 1.2 kΩ → 1 A. Never set it above 1C of your cell (a 500 mAh cell wants ≤ 500 mA → 2.4 kΩ).
Use this block in a real design
Drop it on a canvas, wire it up, and watch the live checks — free, no card.