Back to Sensors & Actuators Series

Current & Power Monitor: INA219 & INA226

April 10, 2026 Wasil Zafar 9 min read

INA219 & INA226 deep dive — shunt-based current sensing, power calculation, Arduino code, and battery/energy monitoring applications.

Contents

  1. Working Principle
  2. Electrical Characteristics
  3. Interfacing with MCU
  4. Calibration
  5. Code Example
  6. Real-World Applications
  7. Limitations

Working Principle

The INA219 and INA226 from Texas Instruments are high-side current and power monitors with an integrated 12-bit (INA219) or 16-bit (INA226) ADC. They measure the voltage drop across a small shunt resistor (typically 0.1 Ω) placed in the high-side (V+ rail) of the circuit. Ohm’s law converts this voltage to current: I = Vshunt / Rshunt. The chip also measures bus voltage, computing power (P = V × I) internally.

Why high-side? Measuring on the positive rail avoids disturbing the ground reference, allowing accurate monitoring of power consumption without affecting the circuit’s ground plane.

Electrical Characteristics

ParameterINA219INA226
ADC Resolution12-bit16-bit
Bus Voltage Range0–26 V0–36 V
Shunt Voltage Range±320 mV (default)±81.92 mV
Current Resolution0.1 mA (0.1 Ω shunt)~1.25 µA (0.1 Ω)
Supply Voltage3–5.5 V2.7–5.5 V
InterfaceI2C (4 address options)I2C (16 address options)
Power CalculationOn-chip (V × I)On-chip (V × I)
Alert PinNoYes (configurable threshold)

Interfacing with an MCU

Connect VCC, GND, SDA, SCL for I2C communication. Wire the shunt resistor in series with the load on the V+ rail, then connect Vin+ and Vin- to each side of the shunt. The INA219 default I2C address is 0x40; address pins A0/A1 select from 4 (INA219) or 16 (INA226) options.

Multi-channel monitoring: Up to 16 INA226 devices can share one I2C bus, each with a unique address — perfect for monitoring multiple rails simultaneously.

Calibration

  • Calibration register: Set based on shunt resistance and max expected current. Libraries calculate this automatically.
  • Shunt resistor: Choose Rshunt so max current produces <320 mV drop (INA219) or <81.92 mV (INA226)
  • Averaging: INA226 supports hardware averaging (1–1024 samples) for noise-free readings
  • Zero offset: Read with no load to measure offset; subtract from all measurements

Code Example

/*
 * INA219 Current & Power Monitor — Arduino
 * Library: Adafruit INA219 (install via Library Manager)
 * Wiring: VCC → 5V, GND → GND, SDA → A4, SCL → A5
 *         Vin+ → V+ rail, Vin- → Load (0.1Ω shunt between)
 */
#include <Wire.h>
#include <Adafruit_INA219.h>

Adafruit_INA219 ina219;

void setup() {
    Serial.begin(9600);
    if (!ina219.begin()) {
        Serial.println("INA219 not found!");
        while (1);
    }
    ina219.setCalibration_32V_1A();  /* 0.1 Ω shunt, 1A max */
    Serial.println("INA219 Ready");
}

void loop() {
    float busV    = ina219.getBusVoltage_V();
    float shuntmV = ina219.getShuntVoltage_mV();
    float current  = ina219.getCurrent_mA();
    float power    = ina219.getPower_mW();

    Serial.print("Bus: ");
    Serial.print(busV, 2);
    Serial.print(" V  Current: ");
    Serial.print(current, 1);
    Serial.print(" mA  Power: ");
    Serial.print(power, 1);
    Serial.println(" mW");

    delay(1000);
}

Real-World Applications

Battery Management & Energy Profiling

INA219/INA226 are essential in battery-powered IoT devices for tracking state-of-charge via coulomb counting (integrating current over time). Solar charge controllers, USB power delivery monitors, server rack power metering, and embedded system energy profiling all rely on precision current monitoring. The INA226’s 16-bit resolution enables µA-level sleep current measurement.

BatterySolarEnergy ProfilingIoT Power

Limitations

  • Shunt resistor heat: At high currents, the shunt dissipates P = I²R power; size the resistor for thermal handling.
  • Voltage drop: The shunt introduces a voltage drop in the supply rail; minimize Rshunt for low-voltage circuits.
  • No galvanic isolation: The sensor shares ground with the measured circuit; not suitable for mains AC monitoring.
  • Sample rate: I2C read latency limits effective sample rate to ~1 kHz; not suitable for fast transient analysis.