123 Main Street, New York, NY 10001

Fuel Gauge (Coulomb Counter): Algorithms, Calibration, and Validation

A fuel gauge blends OCV tables with coulomb counting—plus temperature and resistance learning— to turn “remaining time” into a testable, repeatable metric.

Submit your BOM (48h) Back to PMIC Hub

Algorithms

OCV–SoC LUTs, coulomb counting, and hybrid blending with adaptive weights.

Calibration

One-time learning cycle, temperature tables, resistance learning.

Accuracy Budget

Quantization, zero-offset, drift, and temperature effects—planned up front.

Validation

Matrix across temperature, load, and SoC windows with pass/fail targets.

Battery Pack / Cell(s) Voltage (V) Current (I) Temp (T) Resistance (R) OCV–SoC LUT Per temperature zone Coulomb Counter ∫ I(t) dt, drift guard Hybrid Mixer Weighted OCV ↔ CC Temp & resistance learning SoC / SoH Alerts / Gauges I²C / SMBus
Fuel gauge architecture: OCV+CC hybrid with temperature & resistance learning.

Charger profiles, power-path switching, and hot-swap protections are covered on sibling pages under the PMIC hub to keep this topic focused.

How It Works — OCV Tables, Coulomb Counting, and the Hybrid Blend

At rest, open-circuit voltage (OCV) maps to SoC via per-temperature LUTs; under dynamic load, a coulomb counter integrates current. A hybrid mixer weights both paths and guards against drift.

Charge integration
Q(t) = ∫ I(t) dt
SoCt+Δ = SoCt − (1/Crated) · ∫ I(t) dt

Use short windows for current, longer windows for voltage.

Hybrid weighting
SoC = α·SoCOCV + (1−α)·SoCCC
α ≈ f(rest time, |dI/dt|, temperature zone)

Increase α after long rest; decrease α for burst loads.

OCV–SoC LUT -10 / 25 / 45 °C Coulomb Counter ∫ I(t) dt Weighted Blend LPF / moving average Boot & sleep handling SoC / Alerts I²C / SMBus Boot / Run / Sleep
OCV tables are blended with coulomb counting via a state-aware mixer to estimate SoC.

Next: Algorithms & Tables · Calibration · Power Path & Sleep

Algorithms & Tables — OCV LUT, Temperature Zones, Resistance Learning, Hold

Build a reliable fuel gauge by combining OCV–SoC lookup tables across temperature zones with coulomb counting, internal resistance learning, and a Hold/Relax state that prevents jumps at the end of charge or sleep transitions.

SoC update (CC)
Q(t) = ∫ I(t) dt
SoCt+Δ = SoCt − (1/Crated) · ∫ I(t) dt

Short window for current; longer window for voltage.

Hybrid blend
SoC = α·SoCOCV + (1−α)·SoCCC
α = f(rest time, |dI/dt|, temperature zone)

Clamp correction rate to avoid sudden jumps.

OCV–SoC LUT (per temperature zone)

Fields: Temp_C, SoC_%, OCV_V. Use −10/25/45 °C as a starting point; 5% SoC step or finer.

Temperature table & hysteresis

Switch zones with 2–3 °C hysteresis; raise α after long rest in a stable zone.

Resistance learning (R)

Estimate with load steps: Rest ≈ ΔV/ΔI after filtering polarization. Use R to temper OCV during dynamic loads.

Hold / Relax handling

Enter Hold near CV taper or before ship/sleep to freeze integration; on exit, apply a bounded OCV correction (e.g., ≤1% SoC/s).

OCV–SoC LUT -10 / 25 / 45 °C R Learning ΔV/ΔI, filtered Hold / Relax Tables & States Zone hysteresis Bounded correction Mixer α Control SoC = α·OCV + (1−α)·CC
OCV–SoC LUTs, temperature zones, resistance learning, and a Hold state cooperate to control the hybrid mixer.
Download · fg-ocv-soc-table.xlsx
Three temperature zones • Fields: Temp_C, SoC_%, OCV_V

Next: Calibration & Learning Cycle · Validation Playbook

Calibration & Learning Cycle — One-Time Setup, Lasting Stability

A single learning cycle establishes baseline OCV tables, temperature zones, and R-estimates so the hybrid algorithm converges quickly and stays stable across loads and climates.

Full Charge CC/CV → taper Rest 2–3 h, OCV capture Discharge Nominal load to cutoff Rest 2–3 h, OCV capture Recharge Back to full
One-time learning: Full charge → Rest → Discharge → Rest → Recharge. Repeat across −10/25/45 °C.

What to log

timestamp, V, I, T, SoC_est, mode(run/rest), note. Keep 1–2% SoC sampling during discharge. Repeat in at least three climates: −10/25/45 °C.

Acceptance metrics

  • RMSE(SoC) ≤ ±2–3% within validation matrix.
  • Rest drift after 2–3 h ≤ ±1% SoC.
  • Wake-up jump ≤ 3% SoC (bounded correction rate).

Checklist (SOP)

  • Record battery chemistry, rated mAh, cutoff voltage; verify CC/CV taper.
  • Full charge → rest 2–3 h, capture OCV (per zone).
  • Discharge @ nominal load to cutoff, log V/I/T/SoC every 1–2%.
  • Rest 2–3 h, capture OCV; recharge to full.
  • Populate OCV–SoC LUT and temperature table; save R-estimate.
Download · fg-learning-checklist.pdf
One-page SOP for the first learning cycle
Download · fg-calibration-logsheet.xlsx
Logging template: timestamp, V, I, T, SoC, mode, note

Next: Validation Playbook · ICs from 7 Brands

Power Path & Sleep — Debounce, Freeze, and Bounded Correction

Path switching and sleep/wake transitions can inject spurious charge into the integrator. Use state-aware gating, average-current filtering, and a bounded OCV correction to keep SoC stable during hot-plug and ship/shutdown events.

States & Transitions

Run → Hold → Ship/Shutdown → Wake. Freeze integration in Ship/Hold; on wake, apply OCV correction with rate limit.

Average Current Filtering

Short window for current (tens–hundreds ms); longer window for voltage (seconds). Reset/soft-start windows after switching.

Hot-Plug / Path Switching

Interrupt → debounce (ms) → freeze integration → confirm steady state → unfreeze with gradual α ramp. Ignore one-shot inrush/backfeed.

Bounded Correction

Limit single-step jump <= 3% SoC and correction rate <= 1%/s. Log “reason + timestamp” for validation.

Battery Pack / Cell(s) Power Path Chg / Sys / ORing FETs Hot-plug debounce State Run / Hold / Ship CC Integrator LPF / moving avg OCV Corrector rate ≤ 1%/s jump ≤ 3% SoC
Debounce hot-plug, freeze integration during switching, then apply a bounded OCV correction after steady state.

See also: Algorithms & Tables · Validation Playbook

Single vs Multi-Cell — Direct Gauge or AFE/Monitor Daisy-Chain

Choose direct single-cell gauging for wearables and 1S packs, or a multi-cell AFE/monitor with a host gauge/MCU for stacked series packs. Coordinate addressing and balancing to keep SoC and safety aligned.

Single-Cell Direct Gauge

  • I²C/SMBus/HDQ; low quiescent; compact BOM.
  • Best for wearables/IoT and 1S tool packs.
  • Limits: voltage range and redundancy.

Multi-Cell via AFE/Monitor + Gauge/MCU

  • Per-cell sense, daisy-chained or isolated links.
  • Host-side SoC synthesis; balancing coordination.
  • Address planning and alert sharing required.

Addressing & Topology

Map I²C/SMBus addresses and monitor IDs; avoid conflicts with charger/PMIC. Share ALERT/PG lines thoughtfully; keep a central address map with revision control.

Balancing Coordination

Mark balancing windows in logs, since energy moved between cells can look like load. Do not correct SoC mid-balance; recheck OCV after a short relax.

1S Direct Gauge V/I/T + SoC/SoH I²C / SMBus / HDQ N-S Cell Monitor / AFE Daisy-chain / isolated Per-cell V/T, balance ctrl Host Gauge / MCU SoC synthesis Low quiescent • Compact BOM Address map & ALERT sharing
Single-cell gauges connect directly; multi-cell stacks use a daisy-chained AFE/monitor and a host gauge/MCU, with address and balancing coordination.

Continue to: ICs from 7 Brands · Back to PMIC Hub

Interfaces & Registers — I²C/SMBus, IRQ, Snapshots, NVM Profile

Implement the bus, interrupts, and register snapshot first. Keep units consistent, version your NVM profile, and bound any post-wake corrections. The template below mirrors the recommended fields.

Bus & IRQ Basics

  • I²C/SMBus standard/fast/hs; retry on NACK; allow clock stretching if device supports it.
  • ALERT/INT is often open-drain: add pull-up; debounce a few ms; level/edge per datasheet.
  • PEC (packet error checking) optional on SMBus—enable where host stack supports it.

Register Snapshot (minimum set)

Read in one burst if available; keep units stable across firmware and logs.

  • Status/Flags (alerts, state machine)
  • Voltage (mV), Current (mA, signed), Temperature (0.1 °C)
  • SoC (0.01 %), Cycle/Capacity if available

Scaling & Conventions

Use fixed-point fields to avoid FP on small MCUs. Confirm current polarity (charge > 0 or < 0) and two’s-complement width.

// Example scaling
Voltage_raw → mV         : mV = raw * 1
Current_raw (signed)     : mA = raw * LSB_mA
Temperature_raw          : 0.1°C = raw
State of Charge (0.01%)  : SoC% = raw / 100

NVM Profile (Import/Export)

  • Include thresholds, sleep/hold policy, correction limits, OCV LUT base, temperature zones.
  • Write flow: unlock → page write → CRC → power-fail guard → reboot → self-check.
  • Version and rollback: keep profile_id and crc fields; log changes.

Driver Porting Notes

  • Unify error codes (timeout/NACK/CRC) and back-off policy.
  • Before sleep: stop polling; on wake: read Status then main data; apply bounded OCV correction.
  • Log “correction reason + timestamp” for validation.

Typical Transactions (pseudo)

// Burst read snapshot
i2c_read_block(ADDR, REG_STATUS, buf, LEN_MIN_SET)

// Write config (read-modify-write)
cfg = i2c_read16(ADDR, REG_CONFIG)
cfg |= CFG_ALERT_EN
i2c_write16(ADDR, REG_CONFIG, cfg)

// NVM profile write
enter_nvm(); page_write(profile); verify_crc(); exit_nvm(); soft_reset()
Download · fg-register-map-template.xlsx
Fields: Addr(hex), Name, R/W, Bits, Notes

Keep units consistent with Algorithms & Tables and align snapshot cadence with Validation Playbook.

Accuracy Budget — Quantization, Zero Offset, Temperature Drift, Integration Leakage

Break SoC error into measurable parts and plan limits up front. Use the quick rules below to size ADC resolution, offset trimming, LPF windows, and bounded corrections.

Quantization
Eq ≈ (0.5·LSB) / Crated (as SoC)

Set current ADC LSB < 0.1–0.2% of nominal load.

Zero Offset
E0 ≈ Ioffset · Δt / Crated

Trim baseline or auto-zero during long rests.

Leakage / Window
EI ∝ window length & cutoff vs load spectrum

Shorter I-window for bursts; longer V-window for OCV.

Bounded Correction
|ΔSoC| per step ≤ 3% and rate ≤ 1%/s

Apply after wake or path switching only.

Quantization ADC LSB Zero Offset Ioffset Temp Drift OCV & R(T) Leakage Window/LPF Error Combiner RSS or worst-case Per scenario KPI Targets RMSE(SoC) ≤ 2–3% Rest drift ≤ 1% Wake jump ≤ 3%
Plan per-source errors, combine per scenario (RSS or worst-case), and verify against RMSE, rest drift, and wake-up jump targets.

Worked Example (3000 mAh pack)

Sampling 100 ms, Ioffset=0.5 mA → over 1 h, E0≈ (0.5 mA·3600 s)/3000 mAh ≈ 0.06 SoC%. Keep ADC LSB < nominal_load/1000 to hold Eq small; shorten I-window during bursts to limit EI.

Inputs:
C_rated = 3000 mAh, Δt = 3600 s, I_offset = 0.5 mA, window_I = 100–200 ms

Quick results:
E0 ≈ 0.06 %SoC   |  Eq small if LSB < 0.1% nominal load
Bound: |ΔSoC_step| ≤ 3%   and   |dSoC/dt| ≤ 1%/s (after wake/switch)

Tie this to Power Path & Sleep limits and verify in your Validation Playbook.

Validation Playbook — Matrix, Rest Drift, Wake-Up Jump

Validate your fuel gauge against a clear matrix of Temperature × Load × SoC windows. Track RMSE(SoC), Rest Drift, and Wake-Up Jump with the downloadable checklist and report template.

Temperature Zone −10 / 25 / 45 °C Load Profile 0.1C / 0.5C / 1C SoC Windows 100–80, …, 20–0% Log V/I/T/SoC + events Report KPIs & findings RMSE(SoC) ≤ ±2–3% overall Rest Drift ≤ ±1% after 2–3 h Wake-Up Jump ≤ 3% per event
Run the matrix per temperature zone, log events (hot-plug, sleep/wake, corrections), and evaluate KPIs.
Temp_C Load SoC Window Metrics Notes
−10 / 25 / 45 0.1C / 0.5C / 1C 100–80% RMSE, Rest drift, Wake-up jump Record events; steady-state markers
−10 / 25 / 45 0.1C / 0.5C / 1C 80–60% RMSE, Rest drift Burst loads if applicable
−10 / 25 / 45 0.1C / 0.5C / 1C 60–40% RMSE Note convergence latency
−10 / 25 / 45 0.1C / 0.5C / 1C 40–20% RMSE
−10 / 25 / 45 0.1C / 0.5C / 1C 20–0% RMSE, Cutoff behavior Log cutoff thresholds
Download · fg-validation-matrix.xlsx
Temperature × Load × SoC matrix with KPI fields
Download · fg-report-template.docx
Validation report skeleton: summary, KPIs, logs, and annexes

Compare with your Accuracy Budget and feed refined LUTs back to Algorithms & Tables.

ICs from 7 Brands — Feature Comparison (Placeholders)

This section lists feature dimensions only (interface, cells, quiescent, package, tools) as placeholders. To ensure 100% official data, specific part numbers (PNs) and values will be filled after your confirmation.

Scope note: Rows below are brand-level placeholders. We will populate exact PNs and specs only with confirmed official datasheet values to avoid misreference.
Brand Cells Algorithm Interface Quiescent (typ) Package Tools Notes
Brand A 1S / 2–4S OCV+CC / NVM learning I²C / SMBus / HDQ μA-class DFN/QFN/WLCSP GUI / EVB / Driver To be confirmed
Brand B 1S Chem model support I²C / SMBus μA-class WLCSP GUI / EVB
Brand C 2–4S / 6–16S Host synthesis via AFE Daisy-chain / isolated QFN/TQFP GUI / EVB / App notes BMS-focused
Brand D 1S OCV+CC HDQ / I²C SOT/DFN GUI / EVB Legacy HDQ option
Brand E 6–16S AFE + host gauge Isolated daisy-chain QFP/QFN BMS GUI / EVB Industrial focus
Brand F 1S / 2–4S Chem profiles SMBus / I²C QFN/WLCSP GUI / Drivers
Brand G 1S / 6–16S Hybrid + learning I²C / isolated chain Assorted GUI / EVB / SDK
Tooling: GUI · EVB · App Notes · Drivers (placeholders)

After your PN confirmation, we will populate this grid with official datasheet values. Meanwhile, align driver work with Interfaces & Registers and LUT conventions in Algorithms & Tables.

FAQs — Design, Calibration, and Validation

Concise answers to frequent engineering questions about fuel gauges and coulomb counters. Expand any item to see practical guidance and the relevant section for deeper reading.

Algorithms OCV + CC Calibration Learning cycle Power Path Sleep / Wake Accuracy Budgeting Validation KPI matrix Interfaces & ICs Registers · Brands
Key topics linked by this FAQ: algorithms, calibration, power-path, accuracy, validation, and interfaces.
OCV-only vs OCV+CC: which is more reliable?
OCV-only gauges work well after long rests but struggle under dynamic loads. Hybrids blend OCV tables with coulomb counting, using temperature and resistance learning to stabilize results. During rest, weight OCV more; during bursts, trust charge integration. This minimizes drift and jump. Learn more → #how-it-works.
How dense should my OCV–SoC LUT be?
Start with 5% SoC steps across three temperature zones (−10/25/45 °C). Use finer steps near knees of the discharge curve. Capture OCV after 2–3 h rest in each zone, then smooth and validate against your matrix. Keep fields consistent with templates. Learn more → #algorithms.
How do I tune the hybrid weight α?
Make α increase with rest time and decrease with load dynamics (|dI/dt|). Apply temperature-zone hysteresis to avoid chattering, and cap the correction rate to ≤1%/s with ≤3% per step. Record α and reasons for corrections in logs for audits. Learn more → #algorithms.
What does the one-time learning cycle include?
Charge fully (CC/CV to taper), rest 2–3 h, discharge at nominal load to cutoff while logging V/I/T/SoC every 1–2%, rest again, then recharge. Repeat across −10/25/45 °C. Use results to fill LUTs and initialize resistance learning. Acceptance follows KPI thresholds. Learn more → #calibration.
How do I avoid SoC jumps after sleep or hot-plug?
Freeze integration during switching, debounce events, and resume with a bounded OCV correction. Limit single-step change to ≤3% SoC and correction rate to ≤1%/s. Re-initialize averaging windows to prevent inrush artifacts from polluting charge counts. Log timestamps and causes. Learn more → #power-path.
What averaging windows should I start with?
Use a short current window (tens to hundreds of milliseconds) to track bursts and a longer voltage window (seconds) to stabilize OCV estimates. Reset or softly ramp windows after path changes and wake events. Tune with load spectra and KPI trends. Learn more → #how-it-works.
How do I estimate internal resistance correctly?
Apply small, controlled load steps and compute ΔV/ΔI after filtering for polarization. Record temperature and SoC at each estimate, then use R to temper reliance on OCV during dynamic phases. Avoid mixing balancing periods with R learning. Learn more → #algorithms.
What must a register snapshot include?
Read Status/Flags, Voltage, Current (signed), Temperature, SoC, and optional capacity counters in one burst. Keep fixed-point units (mV, mA, 0.1 °C, 0.01% SoC). Confirm current polarity conventions and two’s-complement width to avoid sign errors. Learn more → #interface.
Single-cell or multi-cell with AFE: how to choose?
Pick direct single-cell gauges for compact, low-quiescent 1S packs. For series stacks, use per-cell monitors with isolation or daisy-chain links and host-side SoC synthesis. Plan addressing, ALERT sharing, and balancing coordination from day one. Learn more → #cells.
How do I build an accuracy budget that predicts KPIs?
Split errors into quantization, zero offset, temperature drift, and integration leakage. Convert each into SoC terms, combine by scenario (RSS or worst-case), and set limits that align with RMSE, Rest Drift, and Wake-Up Jump targets. Validate against logs. Learn more → #accuracy.
Beyond RMSE, what should my validation matrix record?
Log convergence latency, OCV correction magnitude and rate, α history, event timestamps, and cutoff behavior. Tag balancing windows and power-path changes. Capture ambient, pack temperature, and any thermal throttling intervals. This speeds triage and tuning. Learn more → #validation.
How should I bound post-wake corrections to avoid oscillation?
Apply a rate limiter (≤1%/s) and a per-step cap (≤3% SoC). Increase α only after a stable rest threshold, and forbid repeated corrections without fresh evidence. Reset averaging windows and verify steady state before blending. Learn more → #power-path.
What files should I version and how?
Version LUTs, temperature tables, NVM profiles, and validation reports. Include profile IDs, CRCs, firmware hashes, and environmental notes. Store templates and logs together so results are reproducible and auditable across builds and packs. Learn more → #interface.
How do vendor toolchains impact bring-up time?
GUI, EVB, and driver samples accelerate first measurements, profile flashes, and snapshot automation. Compare tools by log export quality, scripting options, and calibration assistance—not only by headline accuracy claims. Replace temporary scripts with robust drivers later. Learn more → #ics.

Resources & RFQ — Downloads and Contact

Templates and checklists to accelerate design, learning, and validation. Submit your BOM for cross-brand alternatives or contact us for tailored guidance.

Downloads Tables · Logs · Reports Submit BOM 48h cross-check Contact Questions & RFQs Sibling pages: Charger · Power Path · eFuse · BMS
fg-ocv-soc-table.xlsx
OCV–SoC LUT template (three temperature zones)
fg-learning-checklist.pdf
One-page SOP for the first learning cycle
fg-calibration-logsheet.xlsx
Logging template: timestamp, V, I, T, SoC, mode, note
fg-validation-matrix.xlsx
Temperature × Load × SoC matrix with KPIs
fg-register-map-template.xlsx
Register skeleton: Addr(hex), Name, R/W, Bits, Notes
fg-report-template.docx
Validation report skeleton: summary, KPIs, logs, annexes
Submit your BOM (48h) Contact

Back to PMIC Hub.

Request a Quote

Accepted Formats

pdf, csv, xls, xlsx, zip

Attachment

Drag & drop files here or use the button below.