

The INA226 is a high-side current shunt monitor with an integrated I2C interface, designed for precise measurement of voltage, current, and power. It features a built-in 16-bit analog-to-digital converter (ADC) for high-resolution measurements and operates over a wide voltage range, making it suitable for a variety of applications. The INA226 is widely used in power management systems, battery monitoring, server power monitoring, and industrial automation.








The INA226 is available in a 10-pin VSSOP package. Below is the pinout and description:
| Pin | Name | Type | Description |
|---|---|---|---|
| 1 | VIN+ | Input | Positive input for differential voltage measurement across the shunt resistor. |
| 2 | VIN- | Input | Negative input for differential voltage measurement across the shunt resistor. |
| 3 | GND | Power Ground | Ground reference for the device. |
| 4 | SCL | Input | I2C clock line. |
| 5 | SDA | Input/Output | I2C data line. |
| 6 | A0 | Input | Address selection pin 0. |
| 7 | A1 | Input | Address selection pin 1. |
| 8 | ALERT | Output | Alert output for programmable threshold events. |
| 9 | VCC | Power Supply | Power supply input (2.7V to 5.5V). |
| 10 | NC | No Connection | Not internally connected. |
Below is an example of how to interface the INA226 with an Arduino UNO to measure current and voltage:
#include <Wire.h>
// INA226 I2C address (default: 0x40)
#define INA226_ADDRESS 0x40
// INA226 register addresses
#define REG_CONFIG 0x00
#define REG_SHUNT_VOLTAGE 0x01
#define REG_BUS_VOLTAGE 0x02
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Configure the INA226
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(REG_CONFIG); // Point to the configuration register
Wire.write(0x45); // MSB: Set averaging and conversion times
Wire.write(0x27); // LSB: Enable shunt and bus voltage measurements
Wire.endTransmission();
}
void loop() {
float shuntVoltage = readShuntVoltage();
float busVoltage = readBusVoltage();
float current = shuntVoltage / 0.1; // Assuming a 0.1Ω shunt resistor
Serial.print("Bus Voltage: ");
Serial.print(busVoltage);
Serial.println(" V");
Serial.print("Shunt Voltage: ");
Serial.print(shuntVoltage);
Serial.println(" mV");
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
delay(1000); // Wait 1 second before the next reading
}
float readShuntVoltage() {
int16_t rawValue = readRegister(REG_SHUNT_VOLTAGE);
return rawValue * 0.0025; // Convert to mV (LSB = 2.5µV)
}
float readBusVoltage() {
int16_t rawValue = readRegister(REG_BUS_VOLTAGE);
return rawValue * 0.00125; // Convert to V (LSB = 1.25mV)
}
int16_t readRegister(uint8_t reg) {
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(reg); // Point to the desired register
Wire.endTransmission();
Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
int16_t value = (Wire.read() << 8) | Wire.read(); // Combine MSB and LSB
return value;
}
No I2C Communication:
Incorrect Current or Voltage Readings:
Alert Pin Not Functioning:
Q: Can the INA226 measure negative currents?
A: Yes, the INA226 can measure bidirectional currents if configured appropriately. Ensure the shunt voltage range is within ±81.92mV.
Q: What is the maximum sampling rate of the INA226?
A: The sampling rate depends on the averaging and conversion time settings. The fastest conversion time is 140µs per measurement.
Q: Can I use the INA226 with a 3.3V microcontroller?
A: Yes, the INA226 is compatible with 3.3V systems as long as the VCC voltage is within the 2.7V to 5.5V range.