Battery Chargers: CC/CV Charging and BMS Overview
A cordless tool's pack has four lithium-ion cells in series. Charged a little too far, a cell loses life quickly and, far enough, can vent and burn; charged too fast when cold, it plates lithium metal on its anode and may short internally weeks later. The charger that prevents this is an ordinary buck converter (The Buck Converter), but with two control loops, one for current and one for voltage, and with a battery management system (BMS) that watches every cell. This lesson designs the charger's power stage and control from the chemistry's rules, simulates a charge on a cell model, and outlines what a BMS measures and decides.
Safety: lithium-cell charging is calculation and simulation only in this course. Never connect a lithium cell or pack to a bench supply or a home-made charger, and never charge a damaged, swollen or deeply discharged cell. Lead-acid and NiMH charging are also left to commercial chargers here. The bench part of this lesson uses a bench supply's own CC/CV behaviour into power resistors.
The charging rules
| Chemistry | Charge method | Voltage limit per cell | End of charge |
|---|---|---|---|
| Li-ion (NMC, NCA, LCO) | precharge, CC, CV | typical (some cells or , from the datasheet) | current falls to to in CV, or a timer |
| LiFePO | CC, CV | to | as Li-ion |
| lead-acid | bulk (CC), absorption (CV), float | absorption to , float to at , about to per cell | stays on float |
| NiMH | CC | none fixed | small voltage drop () or temperature slope , plus a timer |
The current is written in units of capacity: charges a cell at . Lithium-ion cells are commonly charged at to (fast-charge cells more), with a precharge at about while a cell is below about , at full rate only between about and : the "JEITA" temperature profile of Japanese battery guidelines reduces the current between and , lowers the charge voltage (to about ) between and , and stops charging outside to ; the cell datasheet sets the actual limits. Safety and transport standards for lithium cells and packs include IEC 62133-2:2017 with Amendment 1:2021 (portable products; a second edition was in its final stages as of 2026-11), IEC 62619:2022 (industrial batteries) and sub-section 38.3 of the UN Manual of Tests and Criteria (Rev. 8, 2023, with Amendment 1, 2025; transport).
The voltage limit has to be held tightly. A setpoint error on a four-cell pack is , per cell; charging even to above the rated limit noticeably shortens a Li-ion cell's cycle life and eats into its safety margin. That accuracy is why the voltage is sensed at the pack, not at the converter's output.
Two loops and a minimum
Both error amplifiers ask for a duty cycle; a minimum selector (in analogue chargers, two diodes on a shared compensation node) passes the smaller request to the modulator. While the pack voltage is below its limit, the voltage amplifier asks for more than the current amplifier, so the current loop rules: constant current. When the pack reaches the voltage amplifier's request drops below the current amplifier's and the voltage loop takes over: constant voltage, with the current tapering as the cells fill. The changeover is smooth because both loops act on the same duty cycle. Each loop is designed like any converter loop (Averaged Models, Voltage-Mode Control); the battery itself is a very large capacitor, so the voltage loop's plant is slow and mostly resistive.
Worked example: a 4S charger from 24 V
Given: a 4S pack of Li-ion cells, limit per cell; charge at ; precharge at below per cell; terminate at . A buck from at , , sense resistor .
Find: the CV setpoint, the currents, the duty-cycle range, the worst inductor ripple, the sense voltage and loss, and the power at the start of CV.
Solve:
Check: the ripple ratio at full current is , in the usual range. During precharge ( at ) half the ripple is still below , so the converter stays in CCM; near the end of CV it does not (see the lab). A sense signal costs of the output power, a typical compromise between loss and the current loop's accuracy near ().
Simulation: a charge on a cell model
The cell is modelled by its open-circuit voltage as a function of state of charge (an illustrative NMC-like curve), a series resistance and one pair (, , ) for the slow polarisation. The charger applies until the terminal voltage reaches , then holds until the current falls to . The code runs the charge for a new cell and for aged cells with higher , starting at 10 % state of charge.
import numpy as np
# One Li-ion cell (illustrative NMC-like curve), equivalent circuit: OCV(SoC) + R0 + R1 || C1
soc_pts = np.array([0, .05, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1.0])
ocv_pts = np.array([3.00, 3.45, 3.55, 3.62, 3.67, 3.72, 3.77, 3.84, 3.92, 4.00, 4.08, 4.20])
Q = 3.0 * 3600 # 3.0 Ah in coulombs
def charge(R0, I_cc=1.5, V_cv=4.20, I_end=0.15, soc=0.10, R1=0.03, C1=1000.0, dt=1.0):
v1, t, t_cv, soc_cv, I = 0.0, 0.0, None, None, I_cc
while t < 6 * 3600:
ocv = np.interp(soc, soc_pts, ocv_pts)
if t_cv is None and ocv + v1 + I_cc * R0 >= V_cv:
t_cv, soc_cv = t, soc # the voltage loop takes over
I = I_cc if t_cv is None else (V_cv - ocv - v1) / R0
if t_cv is not None and I <= I_end:
break
v1 += dt * (I / C1 - v1 / (R1 * C1))
soc += I * dt / Q
t += dt
return t_cv, soc_cv, t, soc
print("R0 (mohm) CC phase CV phase total final SoC")
for R0 in (0.030, 0.060, 0.120):
t_cv, soc_cv, t, soc = charge(R0)
print(f"{R0*1e3:6.0f} {t_cv/60:5.1f} min to {100*soc_cv:4.1f} % {(t - t_cv)/60:5.1f} min "
f"{t/60:5.1f} min {100*soc:5.1f} %")
t_cv, soc_cv, t, soc = charge(0.060, I_cc=3.0)
print(f"1C (3 A), R0 = 60 mohm: CV starts at {100*soc_cv:.1f} % after {t_cv/60:.1f} min, done after {t/60:.1f} min")R0 (mohm) CC phase CV phase total final SoC
30 99.0 min to 92.5 % 21.0 min 120.0 min 99.2 %
60 93.8 min to 88.1 % 32.1 min 125.8 min 98.9 %
120 80.2 min to 76.9 % 59.0 min 139.2 min 98.1 %
1C (3 A), R0 = 60 mohm: CV starts at 71.3 % after 36.8 min, done after 83.0 min
A new cell spends most of the charge in CC and reaches CV at about 90 %; as grows with age, the terminal voltage hits earlier and the slow CV tail grows from to . Doubling the current to does not halve the time: CV starts at and the whole charge still takes . That is why "fast charge to 80 %" is the figure quoted for phones and cars. The model has no temperature and a made-up OCV curve; real charge times come from the cell's datasheet.
Interactive: the charger's power stage near the end of charge
The buck lab shows the power stage with the pack replaced by the resistance it presents at one instant, . At the start of CV (, : , ) it reads , and a peak of , in CCM, with the CCM/DCM boundary at . Now raise to , the end of charge at : the lab switches to DCM and reports that at the same duty cycle the output would rise to . A charger cannot work open-loop: the voltage loop must lower as the current tapers (Discontinuous Conduction Mode), and a loop designed only for CCM can misbehave there.
The battery management system
The charger controls the pack as a whole; the BMS looks after each cell. Its jobs:
- Measure: every cell voltage (to a few millivolts), pack current (shunt or Hall sensor), several temperatures.
- Protect: open the pack's charge and discharge switches (back-to-back MOSFETs, or contactors in a car) on cell overvoltage, undervoltage, overcurrent, short circuit, or a temperature outside the window. These limits sit outside the charger's, as an independent second layer.
- Balance: cells drift apart in charge. Passive balancing bleeds the fullest cells through resistors near the end of charge; active balancing moves charge between cells with small converters, worth it for large packs.
- Estimate state of charge (SoC) and state of health: coulomb counting corrected by the open-circuit voltage after rest, or Kalman-filter observers on a model like the one above.
- Communicate with the charger and the host (SMBus in laptop packs, CAN in vehicles and storage systems), so the charger can lower its current when the BMS asks.
import numpy as np
soc_pts = np.array([0, .05, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1.0])
ocv_pts = np.array([3.00, 3.45, 3.55, 3.62, 3.67, 3.72, 3.77, 3.84, 3.92, 4.00, 4.08, 4.20])
C_Ah = 3.0
# 1. Passive balancing: a 4S pack at the end of charge, one cell 3 % fuller than the others
soc = np.array([0.97, 0.97, 1.00, 0.97])
v = np.interp(soc, soc_pts, ocv_pts)
print("cell voltages at rest:", " ".join(f"{x:.3f}" for x in v), "V")
R_bleed = 68.0
I_b = v[2] / R_bleed
excess = (soc[2] - soc.min()) * C_Ah
print(f"bleed {R_bleed:.0f} ohm: {I_b*1e3:.0f} mA, {v[2]**2/R_bleed:.2f} W; "
f"{excess*1e3:.0f} mAh to remove -> {excess/I_b:.1f} h")
# 2. Coulomb counting with a current-sensor offset and gain error
offset, gain = 0.005, 0.005 # 5 mA offset, 0.5 % gain error
for days in (1, 7):
drift = offset * 24 * days # Ah from the offset alone
print(f"offset drift after {days} day(s): {drift*1e3:.0f} mAh = {100*drift/C_Ah:.1f} % SoC")
print(f"gain error over one full cycle: {100*gain:.1f} % SoC")
# 3. Correcting with the OCV after a rest: invert the curve
for v_rest in (3.700, 3.920, 4.150):
print(f"rest voltage {v_rest:.3f} V -> SoC {100*np.interp(v_rest, ocv_pts, soc_pts):.1f} %")
slope = (3.77 - 3.72) / 0.10 # V per unit SoC on the flat part (40-50 %)
print(f"on the flat part a 5 mV error is {100*0.005/slope:.0f} % SoC")cell voltages at rest: 4.164 4.164 4.200 4.164 V
bleed 68 ohm: 62 mA, 0.26 W; 90 mAh to remove -> 1.5 h
offset drift after 1 day(s): 120 mAh = 4.0 % SoC
offset drift after 7 day(s): 840 mAh = 28.0 % SoC
gain error over one full cycle: 0.5 % SoC
rest voltage 3.700 V -> SoC 36.0 %
rest voltage 3.920 V -> SoC 70.0 %
rest voltage 4.150 V -> SoC 95.8 %
on the flat part a 5 mV error is 1 % SoC
A imbalance takes of bleeding at ; a pack charged daily keeps up, a badly mismatched one does not. A offset alone makes the coulomb counter lose a day, so the BMS re-anchors SoC whenever the pack has rested long enough for its voltage to mean something. On the flat middle of the curve that anchor is weak (LiFePO is flatter still), which is why SoC displays jump after a rest.
Guided lab: CC/CV on a bench supply, into resistors
A bench supply is itself a CC/CV source, so it shows the two-loop behaviour safely.
Hand calculation. Set and a limit. For loads of , , and , predict which loop rules and the readings: gives at (CV), gives (CV), would need , so the supply holds at (CC), and gives at (CC). The crossover is at .
Simulation. In the buck lab, set , and step through the same values: the open-loop converter just follows , which shows what the supply's current loop adds.
What you would measure. With power resistors on a heat-resistant surface and a DMM in series and across the load, expect voltage and current within the supply's display accuracy (typically about plus a few digits; the DMM is better) and the CC/CV indicator changing between and . Watching the output with a scope while switching the load from to shows a brief current overshoot before the current loop acts, set by the supply's output capacitor.
Hazards and safe setup. , current-limited; the resistors dissipate up to and get hot. Never substitute a battery for the resistors: a lithium cell on a bench supply is exactly the experiment this course excludes, and a lead-acid battery can deliver hundreds of amperes into a slip of the probe.
Pitfalls
- Sensing the pack voltage at the charger. Cable and connector drops (and the sense resistor's own drop, if the voltage is sensed on its converter side) make the CV phase start early and leave the pack undercharged when the charge ends.
- Ending charge on time alone. Use the taper current and a safety timer, and stop on any temperature fault.
- Treating the BMS as the charger. The BMS's cut-offs are a second, independent layer, not the normal end of charge.
- Fast-charging cold cells. Below about most Li-ion cells need reduced current, and none should be charged below unless the datasheet allows it.
Practice
- A 3S pack of cells is charged at with a limit. Give the CC current, the CV voltage and the termination current at .
- The 4S charger of the worked example runs from a laptop adapter instead. What is at the start of CV, and is there enough headroom if the switch and diode drop together?
- A offset in a pack's current sensor goes uncorrected for three days. How much SoC error does it make on a pack?
Answer
- , , .
- ideally, about with the drops: at or beyond the maximum duty cycle of most controllers, so the charger may never reach CV at full current. A 4S charger needs a higher input, or a buck-boost.
- , that is .
Test yourself
In a CC/CV charger, which loop controls the converter while the battery voltage is below its limit?
- the voltage loop
- the current loop, because its duty-cycle demand is the lower of the two
- neither: the converter runs open loop
- the BMS
Why does doubling the charge current not halve the total charge time of a Li-ion cell?
- the charger saturates
- the terminal voltage reaches the limit earlier (the drop is larger), so a longer CV tail at falling current remains
- the cell's capacity doubles
- the BMS stops balancing
A 4S Li-ion charger's voltage setpoint is 0.5 % high. The overcharge per cell is about…
- 0.5 mV
- 21 mV
- 84 mV
- 0.5 V
Passive cell balancing…
- moves charge from full cells to empty ones
- bleeds the fullest cells through resistors, turning the excess into heat
- charges each cell from its own converter
- is done by the charger's voltage loop