Battery Fuel Gauge Design Guide

Battery Fuel Gauge Design Guide

Coulomb Counting, OCV Modeling, Gauge Algorithms, Calibration & Accuracy

1. Introduction — Estimating the Un-measurable

Unlike voltage, “remaining battery energy” is not directly measurable — it must be estimated from voltage, current, temperature and history. The fuel gauge (gas gauge, SOC metering) is the electronics plus algorithm that converts these measurements into a trusted state-of-charge (SOC), state-of-health (SOH) and remaining runtime. A poor gauge makes a phone claim 20% for an hour then die, or makes a drone land with no margin; a good one holds 1–3% error across temperature and load. This guide explains the two fundamental estimation approaches — open-circuit-voltage (OCV) mapping and coulomb counting — why production gauges fuse them, the chemistry models behind Li-ion OCV/IR curves, sense-resistor selection and layout, the calibration/learning procedures, the common current-measurement traps, and the accuracy budget. It builds on the battery chemistry and BMS fundamentals covered elsewhere on this site.

2. Two Roads to SOC — and Why Neither Works Alone

2.1 OCV-based (voltage) estimation

At rest (no load) the terminal voltage of a lithium cell is a stable, near-monotonic function of SOC — the open-circuit voltage curve. Measuring OCV and applying the inverse curve gives SOC directly. The problems: the OCV curve is flat in the 30–80% region of many chemistries (a few mV maps to several % SOC), the cell must be at rest for a long time (relaxation), and temperature shifts the curve. OCV gives an absolute anchor at the cost of waiting and accuracy in the flat zone.

2.2 Coulomb counting (integration)

Integrate the current: SOC(t) = SOC(0) + ∫I dt / C_rate. A 1 A·h of net charge into a 2 A·h cell adds 50% SOC. Coulomb counting tracks linear changes well but drifts: the x-axis of an ammeter has an offset (the infamous “leak” that makes a fully-charged gauge read decreasing SOC while idle), the capacity C changes with temperature, aging and rate, and any missed charge (I never exactly zero) integrates error forever. Left alone, a coulomb counter quietly walks away from reality.

2.3 The fused approach

Production gauges do both: coulomb counting between rest points, with the OCV measurement used to “re-anchor” the coulomb counter whenever the cell rests long enough. The most capable parts add a full state-space/Kalman estimator that weighs both measurements. This is why the datasheet accuracy statement always reads “±1% with OCV learning” — the fusion, not either method alone, is what reaches that number.

3. The Gauging Chain

  • Current sense: a low-ohm (1–20 mΩ) shunt or an integrated sense element; the integrating ADC must resolve microvolts at load and measure the quiescent current (µA–mA) as well as the 10 A pulse without saturating.
  • Sense resistor selection: larger R gives better low-current resolution but higher loss and drift; a 5 mΩ resistor with a 16-bit ADC spanning ±1.6 mV/LSB resolves ~32 µA. Power loss at 5 A is 125 mW — the power calculator makes this trade explicit.
  • Voltage sense: a high-resolution (16–20 bit) ADC across the cell terminals during rest; the gauge records OCV and the temperature.
  • Temperature sense: an NTC on (or in) the pack; OCV, capacity and IR all shift with temperature, and the estimate is useless without the compensation.
  • Model + state: the firmware keeps SOC, remaining capacity, SOH and an error estimate, updated on every measurement tick.

4. OCV and IR Modeling

The core model is the cell’s open-circuit-voltage curve V_ocv(SOC, T) and the instantaneous terminal equation:

V_term = V_ocv(SOC, T) − I·R_internal(SOC, T, aging)

R_internal (IR) is why a loaded cell reads lower than its OCV — a 50 mΩ IR at 2 A costs 100 mV, which on a flat curve is a sizeable SOC error unless the algorithm compensates. Gauges identify IR from a current step (ΔV/ΔI) and track its growth as the cell ages, which is exactly the SOH signal. Thermal effects enter via Arrhenius-style scaling of R and capacity; the low-power estimator on this site can quantify how the quiescent and pulsed currents drain the modeled capacity, tying the gauge’s arithmetic to the system power budget.

5. Calibration, Learning and Accuracy

A gauge is only as good as its anchors. The two classical learning events are the charge-complete point (voltage/taper-current full) and a discharge/rest cycle that lets OCV re-anchor the coulomb counter. Calibration typically requires: a full-charge to a defined criterion, a full discharge at a defined rate, and a temperature profile; the firmware then re-derives capacity and IR. In production, every cell gets at least an impedance/OCV fingerprint at the battery maker, and the pack firmware starts from those tables. The stated accuracy (±1–3%) is only reachable when the cell is genuinely rested at an OCV opportunity and the current ADC offset is nulled (measure IBS = 0 with the switch open).

6. Worked Example — 2S2P 5000 mAh Drone Battery Gauge

Target: a 2-series, 2-parallel 7.4 V, 5000 mAh Li-ion pack gauge at ±2% end-of-flight accuracy.

  • Sense resistor 5 mΩ; ADC integral: measure from 10 mA idle to 60 A pulse with ±0.5% shunt tolerance → IR drop at 60 A = 300 mV on the shunt, plus 60 mΩ cell IR → 3.6 V drop — the gauge must subtract it (compensate) to keep SOC/summing correct.
  • Building block: with I = 60 A and R = 5 mΩ, P = I²R = 18 W in the shunt (impossible) — so use a 0.2 mΩ shunt: P = 0.72 W (acceptable with a large footprint); resolution = 0.2 mΩ × 32 µA ≈ 6.4 nV — fine for the ADC.
  • Use the power calculator and low-power estimator to confirm the shutdown/standby current contribution to the SOC drift and to size the wake cadence.
  • Set an OCV re-anchor after 30 min rest (voltage settled to <0.5 mV/min); fuse with coulomb count; run a calibration discharge every N cycles to refresh capacity and IR.
  • Verify end-of-flight SOC within ±2%; log the error during hovering (load steps) and charging.

7. Comparison — Gauge Implementation Options

Approach Accuracy Cost Complexity Best for
Simple voltage table ±10–20% Near zero Trivial Cheap toys, rough indication
Coulomb counter only ±5–10%, drifts Low Low Short-use, recharged often
Integrated fuel-gauge IC (bq/bq27/gauge) ±1–3% Medium Medium (learning) Smartphones, tools, drones
Full state-space / learning (multi-model) < 1% High High Automotive BMS

8. Common Mistakes

  • Sense resistor too large: burns power and heats (drifting the reading) exactly at the point of the highest current.
  • Zero-offset not nulled: a few-hundred-µA ADC offset integrates into a large SOC error over a day of standby.
  • Uncompensated IR: reading the voltage under load and calling it OCV misplaces the state on the flat curve by several percent.
  • Skipping the rest anchor: without the OCV re-anchor the coulomb counter drifts forever; accuracy claims silently degrade.
  • Ignoring temperature: capacity at −20 °C is a fraction of room temperature; a gauge calibrated at 25 °C reports absurd SOC in the cold.
  • Treating SOC as a single number: remaining runtime is itself a function of the load profile — report both SOC and the time-to-empty under the present draw.

9. FAQ

Q: Why does my gauge say 100% but the device dies quickly? A: Often an uncorrected coulomb counter that never re-anchored, a stale capacity from aging, or an IR too large to sustain the load — the discharge “falls off the edge” of the usable range.

Q: Do I need an integrated gauge IC, or can the MCU do it? A: The MCU can, but requires a high-resolution integrating ADC, a shunt, and the OCV/IR/aging model maintained in firmware — the IC simply packages that carefully and adds the learning loop. For accuracy and development speed the IC usually wins.

Q: How often must the gauge calibrate? A: Full deep-cycle learning is needed periodically as capacity ages; with a good model, a weekly-ish full charge + occasional rest gives the OCV anchors that keep drift bounded.

Q: What is the meaning of the C-rate? A: The current normalized to capacity — 1C = full-capacity current in one hour; the gauge’s capacity and runtime estimates depend on the rate due to the Peukert-like capacity derating.

10. Conclusion

A trustworthy fuel gauge fuses an OCV anchor with coulomb counting, compensated for IR, temperature and aging, and recalibrated by real charge/discharge events. Size the sense resistor against both resolution and power loss, null the offset, model the chemistry, and re-anchor at rest. Do that and the “20%” on the screen means something; build a power budget with the power and low-power calculators and the estimate stays honest over the whole product life.

发表评论