lamaPLC: INA226 - current/voltage/power monitor with I²C communication

INA226

36V, 16-bit, ultra-precise i²c output current/voltage/power monitor w/alert

The INA226 is a current shunt and power monitor with an I²C or SMBUS-compatible interface. It monitors both a shunt voltage drop and bus supply voltage. Programmable calibration values, conversion times, and averaging, combined with an internal multiplier, enable direct readouts of current in amperes and power in watts.

The INA226 is a current shunt and power monitor with an I²C or SMBUS-compatible interface. The device monitors both a shunt voltage drop and bus supply voltage. Programmable calibration value, conversion times, and averaging, combined with an internal multiplier, enable direct readouts of current in amperes and power in watts. The INA226 senses current on common-mode bus voltages that can vary from 0V to 36V, independent of the supply voltage. The device operates from a 2.7V to 5.5V supply, drawing a typical supply current of 330 μA. The device is specified for an operating temperature range of –40°C to 125°C and features up to 16 programmable addresses via an I2C-compatible interface.

The INA226 supports the fast mode (1 kHz to 400 kHz) and high-speed mode (1 kHz to 2.94 MHz) transmission protocols. All data bytes are transmitted most significant byte first.

INA226

If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.

Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.

2026/02/14 22:38

INA226

Features

  • Senses Bus Voltages: 0 V .. 36 V
  • Shunt Voltage Maximum: 81.9 V
  • Current Maximum: 20 A
  • High-Side or Low-Side Sensing
  • Reports Current, Voltage, and Power
  • High Accuracy:
    • 0.1% Gain Error (Max)
    • 10 μV Offset (Max)
  • Configurable Averaging Options
  • 16 Programmable Addresses
  • Operates from 2.7V to 5.5V Power Supply
  • 10-Pin, DGS (VSSOP) Package

Differences between the INA219 and INA226

The main differences between the INA219 and INA226 lie in their measurement resolution, voltage-handling capabilities, and advanced features. The INA226 is considered the “pro” version for more demanding applications.

FeatureTexas Instruments INA219Texas Instruments INA226
ADC Resolution12-bit16-bit (16x more precise)
Max Bus Voltage26 V36 V
Shunt Voltage Range±320 mV(with PGA) ±81.92 mV
Programmable Gain Amplifier (PGA)Yes (2x, 4x, 8x gain options)No
Averaging EngineConfigurable filtering optionsBuilt-in “DSP” engine, up to 1024 samples
Alert PinNot explicitly mentioned as programmableProgrammable alert for overcurrent/voltage conditions
Sensing ConfigurationHigh-side onlyHigh-side or low-side
Offset VoltageMax 100 µVMax 10 µV

Pin Description

INA226

Pin NameDescription
V+ / VSPower Supply: 2.7V to 5.5V for the chip's own logic
GNDGround: Reference point for power and I²C
SCLI²C Clock: Connect to the microcontroller's SCL pin
SDAI²C Data: Connect to the microcontroller's SDA pin
VBUSBus Voltage Input: Connect this to the high-side or load-side to measure the actual bus voltage (up to 36V)
IN+Shunt Positive: Connect to the supply side of the external shunt resistor
IN-Shunt Negative: Connect to the load side of the external shunt resistor
A0 & A1Address Pins: Used to set the I²C address by tying them to GND, VS, SDA, or SCL
ALERTProgrammable Alert: Open-drain output that can trigger on over/under voltage or current thresholds

Typical Wiring (High-Side Sensing)

  • V+ and GND: Connect to your microcontroller's 3.3V or 5V power and ground.
  • SDA and SCL: Connect to your microcontroller's I²C pins.
  • IN+ and IN-: Place the shunt resistor in series with your load's positive line. Connect IN+ before the resistor and IN- after it.
  • VBUS: Connect this pin to IN- (load side) for standard high-side power monitoring.

INA226 I2C Address Table

The Texas Instruments INA226 supports up to 16 unique I²C addresses. The address is set by connecting the two address pins (A0 and A1) to one of four possible points: GND, VS (power supply), SDA, or SCL.

The default address is 0x40 (when both pins are connected to GND).

A1 PinA0 PinHex Address
GNDGND0x40
GNDVS0x41
GNDSDA0x42
GNDSCL0x43
VSGND0x44
VSVS0x45
VSSDA0x46
VSSCL0x47
SDAGND0x48
SDAVS0x49
SDASDA0x4A
SDASCL0x4B
SCLGND0x4C
SCLVS0x4D
SCLSDA0x4E
SCLSCL0x4F

Arduino wiring

  • VCC/VSS → Arduino 5V (or 3.3V)
  • GND → Arduino GND
  • SDA → Arduino SDA (A4 on Uno)
  • SCL → Arduino SCL (A5 on Uno)

Arduino example code

In the Arduino IDE, go to Tools > Manage Libraries, search for “INA226_WE”, and install the version by Wollewald.

This sketch initializes the sensor at the default address (0x40) and prints current, voltage, and power to the Serial Monitor.

#include <Wire.h>
#include <INA226_WE.h>
 
#define I2C_ADDRESS 0x40
 
INA226_WE ina226 = INA226_WE(I2C_ADDRESS);
 
void setup() {
  Serial.begin(9600);
  Wire.begin();
 
  // Initialize INA226
  if (!ina226.init()) {
    Serial.println("Failed to find INA226 chip. Check wiring!");
    while (1);
  }
 
  /* 
     Optional: Calibrate for your shunt. 
     Default is usually 0.1 Ohm. 
     Parameters: (Shunt value in Ohms, Max expected current in Amps)
  */
  ina226.waitUntilConversionCompleted(); 
  Serial.println("INA226 Ready!");
}
 
void loop() {
  float shuntVoltage_mV = 0.0;
  float loadVoltage_V = 0.0;
  float busVoltage_V = 0.0;
  float current_mA = 0.0;
  float power_mW = 0.0;
 
  // Read values
  ina226.readAndClearFlags();
  shuntVoltage_mV = ina226.getShuntVoltage_mV();
  busVoltage_V = ina226.getBusVoltage_V();
  current_mA = ina226.getCurrent_mA();
  power_mW = ina226.getBusPower_mW();
  loadVoltage_V  = busVoltage_V + (shuntVoltage_mV / 1000);
 
  // Print results
  Serial.print("Bus Voltage:   "); Serial.print(busVoltage_V); Serial.println(" V");
  Serial.print("Current:       "); Serial.print(current_mA); Serial.println(" mA");
  Serial.print("Power:         "); Serial.print(power_mW); Serial.println(" mW");
  Serial.println("---------------------------");
 
  delay(2000);
}

Sources

https://www.ti.com/product/INA226#tech-docs (Texas Instruments datasheet)

I²C topics on lamaPLC

PageDateTags
2025/05/31 21:56, , , , , , ,
2025/09/23 19:25, , , , , ,
2026/03/21 19:20, , , , , , ,
2026/02/15 20:33, , , , , , , , ,
2026/02/14 22:24, , , , , , , , , , , , ,
2026/03/28 22:07, , , , , , ,
2026/02/15 20:40, , , , , , , , , , , , , ,
2026/02/14 23:37, , , , , , , , , , ,
2026/02/14 22:40, , , , , , , , , ,
2026/03/21 22:25, , , , , , , , , , ,
2026/02/14 18:19, , , , , , , , , , ,
2026/02/14 18:11, , , , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/14 19:29, , , , , , , , , , , , , ,
2025/11/21 23:07, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/03/22 00:26, , , , , , , , ,
2026/02/14 22:45, , , , , , , , ,
2026/02/14 22:09, , , , , , , , , , , , , , , ,
2026/02/14 17:26, , , ,
2026/02/14 21:54, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/03/28 18:02, , , , , , , , , , , , , , , ,
2026/02/14 23:58, , , , , , , , , , ,
2026/02/14 17:27, , , , , , , , , ,
2026/02/14 23:38, , , , , , ,
2026/02/14 22:52, , , , , , , ,
2026/02/14 22:23, , , , , , , ,
2026/02/14 22:53, , , , , , , , , , , , ,
2026/02/15 20:27, , , , , , , , , , , , , , , ,
2026/02/15 20:29, , , , , , , , , , , , , ,
2026/02/14 22:47, , , ,
2026/02/14 22:51, , , , , ,
2026/02/14 17:26, , , ,
2026/02/14 22:22, , , , , , , , , , , , ,
2026/02/14 22:21, , , , , , , , , , ,
2026/02/14 22:22, , , , , , , ,
2026/03/05 20:19, , , , , , , , , , , , , , , , ,
2026/02/14 17:27, , , , , , ,



This page has been accessed for: Today: 1, Until now: 46