

The INA226 is a high-side current shunt monitor with an integrated I2C interface, designed to measure voltage, current, and power in a single device. It is highly versatile, featuring a programmable gain and a wide operating supply voltage range of 2.7V to 5.5V. This makes it ideal for applications such as battery management, power monitoring, and energy optimization in embedded systems.








The INA226 is available in a 10-pin VSSOP package. Below is the pinout description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VBUS | Voltage input pin for bus voltage measurement |
| 2 | GND | Ground connection |
| 3 | SCL | I2C clock input |
| 4 | SDA | I2C data input/output |
| 5 | ALERT | Alert output pin for programmable threshold-based alerts |
| 6 | ADDR | Address pin for setting the I2C address |
| 7 | VSHUNT+ | Positive input for shunt voltage measurement |
| 8 | VSHUNT- | Negative input for shunt voltage measurement |
| 9 | NC | No connection |
| 10 | VCC | Power supply input (2.7V to 5.5V) |
Below is an example of how to use the INA226 with an Arduino UNO to measure voltage and current:
#include <Wire.h>
// INA226 I2C address (default is 0x40, but check your configuration)
#define INA226_ADDRESS 0x40
// INA226 register addresses
#define REG_CONFIG 0x00
#define REG_BUS_VOLTAGE 0x02
#define REG_SHUNT_VOLTAGE 0x01
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Configure the INA226 (default configuration)
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(REG_CONFIG); // Point to the configuration register
Wire.write(0x45); // MSB of configuration (example value)
Wire.write(0x27); // LSB of configuration (example value)
Wire.endTransmission();
}
void loop() {
float busVoltage = readBusVoltage();
float shuntVoltage = readShuntVoltage();
float current = shuntVoltage / 0.1; // Assuming a 0.1 ohm shunt resistor
Serial.print("Bus Voltage: ");
Serial.print(busVoltage);
Serial.println(" V");
Serial.print("Shunt Voltage: ");
Serial.print(shuntVoltage);
Serial.println(" V");
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
delay(1000); // Wait 1 second before the next reading
}
float readBusVoltage() {
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(REG_BUS_VOLTAGE); // Point to the bus voltage register
Wire.endTransmission();
Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
uint16_t rawData = (Wire.read() << 8) | Wire.read();
return rawData * 0.00125; // Convert to volts (1.25 mV per bit)
}
float readShuntVoltage() {
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(REG_SHUNT_VOLTAGE); // Point to the shunt voltage register
Wire.endTransmission();
Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
uint16_t rawData = (Wire.read() << 8) | Wire.read();
return rawData * 0.0000025; // Convert to volts (2.5 µV per bit)
}
No I2C Communication:
Incorrect Current or Voltage Readings:
Alert Pin Not Functioning:
By following this documentation, you can effectively integrate the INA226 into your projects for accurate power monitoring and management.