Amp integration—formally known as Ampere-hour (Ah) integration or Coulomb counting—is the process of continuously measuring electrical current over time to calculate the exact amount of charge entering or leaving a battery. In a real circuit or solar installation, implementing amp integration transforms a blind power source into a smart, managed system; it allows your Battery Management System (BMS) to display a true State of Charge (SoC) percentage, dynamically adjust charge profiles, and disconnect loads before catastrophic deep-discharge damage occurs. Builders commonly confuse amp integration with simple voltage-to-SoC lookup tables or watt-hour (Wh) tracking, but these are fundamentally different metrics that behave very differently under load.
The Core Math: How Amp Integration Actually Works
At the silicon level, an Ampere is defined as 1 Coulomb of charge per second. Amp integration simply sums these discrete charge packets over time. The fundamental formula for updating State of Charge is:
SoC_current = SoC_initial + ∫ (I_charge - I_discharge) dt
In digital systems, the integral becomes a discrete summation. The microcontroller reads the current sensor at a fixed interval (e.g., every 100ms), multiplies the current by the time delta, and adds or subtracts that value from a running total.
Worked Numeric Example: Sizing and Tracking a DC Fridge Load
Let’s look at a real-world off-grid scenario. You have a 12V 100Ah LiFePO4 battery (nominal capacity 1,280Wh) starting at 100% SoC. You connect a 12V DC compressor fridge that draws a steady 10A while the compressor is running.
- Time elapsed: 3.5 hours of continuous compressor runtime.
- Integrated Discharge: 10A × 3.5h = 35Ah removed from the pack.
- Remaining Capacity: 100Ah - 35Ah = 65Ah.
- Calculated SoC: 65Ah / 100Ah = 65%.
Hardware Specs: Shunts vs. Hall Effect for Current Sensing
You cannot integrate amps without first measuring them accurately. The choice of current sensor dictates your BMS cost, power loss, and isolation safety. Below is a spec-sheet comparison of the most common current sensing topologies used for amp integration in 2026.
| Sensor Topology | Example Part Number | Accuracy / Offset | Galvanic Isolation | Est. Component Cost | Best Application |
|---|---|---|---|---|---|
| High-Side Shunt + Digital Amp | Texas Instruments INA228 | ±0.5% gain, ±5µV offset | No (Common mode up to 85V) | $3.50 - $5.00 | 48V LiFePO4 BMS, Solar Shunts |
| Low-Side Shunt + Analog Amp | Texas Instruments INA226 | ±0.1% gain, ±10µV offset | No (Ground referenced) | $1.50 - $2.50 | 12V/24V DIY power banks, e-bikes |
| Hall Effect (Closed Loop) | Allegro ACS724 | ±1.0% typical, high temp drift | Yes (2.5kV rated) | $2.00 - $3.50 | High-side EV traction inverters |
| Fluxgate Sensor | LEM HTFS 200-P | ±0.5%, near-zero offset drift | Yes (High voltage) | $45.00 - $60.00 | Industrial UPS, Marine DC microgrids |
Source: Component specifications aggregated from Texas Instruments INA228 datasheet and LEM HTFS series documentation.
For 90% of DIY solar and RV builds, a high-side digital shunt monitor is the correct choice. Low-side shunts are cheaper to implement because they sit at ground potential, making ADC reading trivial, but they break the ground reference of the load, which can cause severe EMI issues and ground-loop faults in sensitive marine or automotive CAN-bus environments.
Where You Meet Amp Integration in Practice
You will encounter amp integration algorithms in three primary domains of modern electrical design:
- Off-Grid Solar and RV Battery Monitors: Devices like the Victron Energy SmartShunt act as dedicated hardware Coulomb counters. They sit on the negative terminal of the battery bank, continuously integrating discharge and charge currents, and syncing via Bluetooth to your phone to display a highly accurate SoC percentage.
- Smart Battery Management Systems (BMS): Modern active BMS boards (using chips like the TI BQ76952) use internal Coulomb counting to track cell-level charge. This is critical for top-balancing; the BMS integrates the amps to know exactly when to engage the bleed resistors or active capacitive balancers during the constant-voltage (CV) charge phase.
- Embedded IoT and Wearables: Tiny LiPo-powered devices use micro-footprint Coulomb counters (like the Analog Devices LTC2943) to track mAh depletion. Because these devices spend 99% of their time in deep sleep drawing microamps, the hardware integrator runs independently of the main MCU, waking it only when a programmed mAh threshold is crossed.
Voltage Lookup vs. Amp Integration: Why You Need Both
The most common mistake DIYers make is relying solely on one method to guess battery capacity. Professional BMS firmware uses a sensor-fusion approach (often a simplified Kalman filter) to blend both metrics.
| Criteria | Voltage Lookup (OCV) | Amp Integration (Coulomb Counting) |
|---|---|---|
| Accuracy at Rest | Excellent (if rested >2 hours) | Poor (drifts due to ADC offset) |
| Accuracy Under Heavy Load | Terrible (voltage sag skews data) | Excellent (tracks actual electrons) |
| Hardware Cost | Free (uses existing BMS ADC) | Requires precision shunt + amp |
| Long-Term Drift | None (absolute measurement) | High (accumulates quantization error) |
| Chemistry Dependence | High (LiFePO4 flat curve ruins it) | None (chemistry agnostic) |
To fix the long-term drift of amp integration, the BMS must perform a "hard sync." When the battery reaches its top-charge voltage (e.g., 3.65V/cell for LiFePO4) and the charge current tapers below the C/20 threshold, the firmware forcefully overwrites the integrated SoC variable to exactly 100%. This resets the accumulated error to zero.
Frequently Asked Questions
Q: Is amp integration the same as watt-hour (Wh) integration?
A: No. Amp integration tracks charge (the physical number of electrons, measured in Ah or Coulombs). Watt-hour integration tracks energy (the actual work done, measured in Wh). Because battery voltage sags under load and rises during charging, 10Ah pulled from a battery at 12.0V yields less energy (120Wh) than 10Ah pulled at 13.2V (132Wh). For sizing solar arrays and inverters, Wh integration is more accurate; for preventing over-discharge and managing cell chemistry limits, Ah integration is the standard.
Q: What do people commonly confuse amp integration with?
A: Beginners often confuse it with simple voltage-to-SoC lookup tables. They assume that if the battery reads 12.8V, it must be at 80% capacity. As noted above, under a 50A load, a 100% full battery might momentarily read 12.2V due to internal resistance (voltage sag). A voltage-only monitor would falsely report the battery as nearly dead, while an amp integration monitor correctly knows the electrons are still there.
Q: Do I need a dedicated Coulomb counter IC, or can my Arduino/ESP32 do it?
A: An ESP32 can absolutely perform the math, but the bottleneck is the Analog-to-Digital Converter (ADC). The ESP32's internal ADC is notoriously non-linear and noisy at low voltages. If you are building a custom BMS with an ESP32, you must use an external I2C shunt monitor (like the INA226 or INA228) to handle the precision voltage measurement across the shunt, letting the ESP32 simply read the finalized current value and run the integration summation loop.






