meta data for this page
lamaPLC: INA226 - current/voltage/power monitor with I²C communication
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.
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.
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.
| Feature | Texas Instruments INA219 | Texas Instruments INA226 |
|---|---|---|
| ADC Resolution | 12-bit | 16-bit (16x more precise) |
| Max Bus Voltage | 26 V | 36 V |
| Shunt Voltage Range | ±320 mV | (with PGA) ±81.92 mV |
| Programmable Gain Amplifier (PGA) | Yes (2x, 4x, 8x gain options) | No |
| Averaging Engine | Configurable filtering options | Built-in “DSP” engine, up to 1024 samples |
| Alert Pin | Not explicitly mentioned as programmable | Programmable alert for overcurrent/voltage conditions |
| Sensing Configuration | High-side only | High-side or low-side |
| Offset Voltage | Max 100 µV | Max 10 µV |
Pin Description
| Pin Name | Description |
|---|---|
| V+ / VS | Power Supply: 2.7V to 5.5V for the chip's own logic |
| GND | Ground: Reference point for power and I²C |
| SCL | I²C Clock: Connect to the microcontroller's SCL pin |
| SDA | I²C Data: Connect to the microcontroller's SDA pin |
| VBUS | Bus 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 & A1 | Address Pins: Used to set the I²C address by tying them to GND, VS, SDA, or SCL |
| ALERT | Programmable 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 Pin | A0 Pin | Hex Address |
|---|---|---|
| GND | GND | 0x40 |
| GND | VS | 0x41 |
| GND | SDA | 0x42 |
| GND | SCL | 0x43 |
| VS | GND | 0x44 |
| VS | VS | 0x45 |
| VS | SDA | 0x46 |
| VS | SCL | 0x47 |
| SDA | GND | 0x48 |
| SDA | VS | 0x49 |
| SDA | SDA | 0x4A |
| SDA | SCL | 0x4B |
| SCL | GND | 0x4C |
| SCL | VS | 0x4D |
| SCL | SDA | 0x4E |
| SCL | SCL | 0x4F |
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
This page has been accessed for: Today: 1, Until now: 46



