Overview

The INA226 is a 16-bit high-precision bidirectional current and power monitor IC manufactured by Texas Instruments. Interfacing over I2CI^2C / SMBus, it measures both the differential voltage drop across a shunt resistor and the common-mode bus voltage, internally multiplying them to calculate power in Watts.

Surpassing the popular 12-bit INA219, the INA226 features 16-bit ADC resolution (2.5 μV2.5\ \mu\text{V} shunt LSB, 1.25 mV1.25\text{ mV} bus LSB), extremely low offset voltage (<10 μV<10\ \mu\text{V} max), high-side or low-side sensing up to 36 V, and a 16-configurable I2CI^2C address matrix. It is widely used in high-accuracy battery fuel gauges, solar charge controllers, and ESPHome power meters.

Quick reference

Operating voltage (VCC)2.7 V to 5.5 V DC
Bus voltage range (VBUS)0 V to 36 V DC (independent of supply voltage VCC)
Shunt full-scale range±81.92 mV\pm 81.92\text{ mV} differential (2.5 μV2.5\ \mu\text{V} LSB)
Resolution16-bit ADC
Offset voltage10 μV10\ \mu\text{V} max (10×10\times lower than INA219)
Gain error0.1%0.1\% max
InterfaceI2CI^2C (Fast Mode up to 400 kHz, High-Speed up to 3.4 MHz)
Default I2CI^2C address0x40 (A0,A1GNDA_0, A_1 \to \text{GND})
Operating current330 μA330\ \mu\text{A} active / 2 μA2\ \mu\text{A} power-down

Pinout

Breakout module header & heavy-current terminal block:

PinNameTypeDescription
1VCCPowerLogic power supply (+2.7 V to +5.5 V DC)
2GNDPowerGround reference (0 V)
3SCLDigital InputI2CI^2C Serial Clock
4SDADigital Input / OutputI2CI^2C Serial Data
5ALERTDigital OutputOpen-drain programmable alert / interrupt pin
6IN+ / VIN+Analog InputHigh-side positive shunt voltage measurement pin
7IN- / VIN-Analog InputHigh-side negative shunt voltage measurement pin
8VBUSAnalog InputBus voltage sense input (0 to 36V DC)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply VoltageVCCV_{CC}2.73.3 / 5.05.5VDC
Common-Mode Bus VoltageVCMV_{CM}036.0VHigh-side or low-side
Full-Scale Shunt VoltageVSENSEV_{SENSE}-81.92+81.92mVBidirectional
Shunt LSB SizeLSBshuntLSB_{shunt}2.5µV16-bit signed
Bus LSB SizeLSBbusLSB_{bus}1.25mV16-bit unsigned
Bus Voltage Max ErrorEbusE_{bus}-0.1%±0.02%\pm 0.02\%+0.1%Over temperature
Conversion Timetconvt_{conv}14011008244µsConfigurable per sample

Internal Math & Register Calculations

  1. Current Calibration Register (0x05):

Current_LSB=Maximum Expected Current215=Imax32768\text{Current\_LSB} = \frac{\text{Maximum Expected Current}}{2^{15}} = \frac{I_{max}}{32768}

CAL=trunc(0.00512Current_LSB×Rshunt)\text{CAL} = \text{trunc}\left( \frac{0.00512}{\text{Current\_LSB} \times R_{shunt}} \right)

  1. Current Register (0x04):

Current (A)=Raw Current Register Code×Current_LSB\text{Current (A)} = \text{Raw Current Register Code} \times \text{Current\_LSB}

  1. Power Register (0x03):

Power (W)=25×Raw Power Register Code×Current_LSB\text{Power (W)} = 25 \times \text{Raw Power Register Code} \times \text{Current\_LSB}

Wiring (High-Side Sensing Configuration)

INA226 PinPower Circuit / MCUNotes
VIN+Connected to Positive Power Supply (+)Up to +36V DC
VIN-Connected to Load positive sideAfter 0.1 Ω0.1\ \Omega or 0.01 Ω0.01\ \Omega shunt
VBUSConnected to VIN+ or VIN-Bus voltage monitoring rail
VCCMCU 3.3V / 5V RailLogic power
GNDMCU GND & Load GroundCommon ground
SCLMCU SCL PinI2CI^2C Clock
SDAMCU SDA PinI2CI^2C Data

Example (Arduino / ESP32 INA226 Library)

cpp
#include <Wire.h>
#include <INA226_WE.h>

#define I2C_ADDRESS 0x40

INA226_WE ina226 = INA226_WE(I2C_ADDRESS);

void setup() {
  Serial.begin(115200);
  Wire.begin();

  if(!ina226.init()){
    Serial.println("Failed to find INA226 chip!");
    while(1);
  }

  // Set shunt resistor value (0.1 ohm) and max expected current (0.8A)
  ina226.setResistorRange(0.1, 0.8);
  ina226.setAverage(INA226_AVERAGES_16); // 16-sample averaging
  
  Serial.println("INA226 initialized successfully.");
}

void loop() {
  float shuntVoltage_mV = ina226.getShuntVoltage_mV();
  float busVoltage_V = ina226.getBusVoltage_V();
  float current_mA = ina226.getCurrent_mA();
  float power_mW = ina226.getBusPower();

  Serial.print("Bus Voltage: "); Serial.print(busVoltage_V); Serial.print(" V\t");
  Serial.print("Current: "); Serial.print(current_mA); Serial.print(" mA\t");
  Serial.print("Power: "); Serial.print(power_mW); Serial.println(" mW");

  delay(500);
}

Common mistakes

  • Exceeding the ±81.92 mV\pm 81.92\text{ mV} shunt voltage limit: With a standard 0.1 Ω0.1\ \Omega onboard shunt resistor, maximum measurable current is 0.8192 A0.8192\text{ A}. For currents up to 10 A10\text{ A} or 20 A20\text{ A}, replace the shunt resistor with 0.005 Ω0.005\ \Omega or 0.002 Ω0.002\ \Omega.
  • Forgetting to write the Calibration Register (0x05): Unlike voltage readings, reading the Current and Power registers returns zero until a valid CAL value is written to register 0x05.

Notes

  • INA226 vs INA219: INA226 has 16-bit resolution (10 μV10\ \mu\text{V} offset) vs INA219's 12-bit resolution (100 μV100\ \mu\text{V} offset); INA226 supports 36V bus voltage vs INA219's 26V.

Assets & downloads