Current control for Li-ion charger
Q5. D5, L2 form a basic buck converter circuit.
Q3 on turns Q5 on via L1.
Also &quot;charging L1.
Also turning Q2 off.
Q3 off stops turning
Q2 on clamps Q5 base to emitter and turns Q5 off.
Q3 off stops turning Q5 on BUT does not provide a fast hard turnoff signal for Q5.
BUT
Q3 off stops turning Q2 off and
L1 is now no longer &quot;charged&quot; by Q3 so
L1 bottom end rings positive driving Q2 off and hard clamping Q5 off.
Once Q5 is off and Q2 is no longer driven hard on by L1 ringing R1 holds Q5 off and
Q2 is held off by DC be short via L1.
As others have said - nowadays a MOSFET would usually be used at Q5.