Home / Projects / Battery Fuel-Gauge Module

Battery Fuel-Gauge Module

A coulomb-counting BMS front end for a 4-cell Li-ion pack — accurate state of charge instead of a rough voltage guess.

Overview

Reading a Li-ion pack's voltage alone gives you a rough idea of charge state at best — the voltage curve is flat across most of the usable range, so a small measurement error turns into a large state-of-charge error. This module tracks charge properly by integrating current in and out of the pack over time (coulomb counting), then corrects that running total against known reference points so it doesn't drift.

A precision shunt sits in the main current path, feeding a dedicated fuel-gauge analog front end that measures charge/discharge current, pack voltage, and temperature, and reports state of charge over I2C. A separate protection IC handles hard overvoltage, undervoltage, and overcurrent cutoffs independently of the fuel gauge, so a firmware bug can't disable protection.

Block Diagram

4S Li-IONPACK R1 2mΩ1% 2W U1BQ34Z100-G1fuel gauge, I2C U2 BQ76940AFE + protection U3STM32L051C8I2C host U4SSD1306 Q1–Q4 balance FETs + R2–R5, one pair per cell

Key Components

  • 4S Li-ion pack (14.8V nominal, 16.8V full charge)
  • Precision current-sense shunt (low milliohm, high power rating)
  • Fuel-gauge analog front end (coulomb counter + cell voltage ADC)
  • Independent battery protection IC (OV/UV/OC cutoff)
  • Cell-balancing resistor network with switching FETs
  • Host MCU with I2C, plus status display

Bill of Materials

RefPart / ValueRatingPackage
U1BQ34Z100-G1 — Impedance Track fuel gauge, I2C2.5–4.3V cell rangeSOP-28
U2BQ76940 — battery monitor / protection AFE3–15 series cellsTSSOP-48
U3STM32L051C8 — low-power MCU, I2C host1.8–3.6V, 32MHzLQFP-32
U4SSD1306 — 128×64 OLED display moduleI2C, 3.3VModule
R1Current-sense shunt, 2mΩ, 1%2W2512
Q1–Q4DMN2075U — N-channel balancing FET20V, 2ASOT-23
R2–R5Balance resistor, 100Ω0.5W1206
C1Decoupling capacitor, 10µF, X7R25V0805

Build Requirements

  • Comfortable soldering fine-pitch analog ICs (fuel gauge and protection IC packages are small)
  • A precision voltage/current source for calibrating the gauge against known references
  • Basic firmware skills — reading registers over I2C and turning raw counts into percentage SOC
  • A 2-layer PCB with a clean, low-impedance path for the sense shunt

Input / Output

Input4S Li-ion pack: 12.0V (empty) to 16.8V (full), charge/discharge current up to the shunt's rated limit
OutputI2C telemetry — state of charge %, pack voltage, current, temperature — plus a hardware cutoff signal on protection fault
Back to Projects