The INA226, manufactured by Sensor (Part ID: Volt/Current), is a high-side current shunt monitor with an integrated I2C interface. It is designed to measure voltage, current, and power in a wide range of applications. The device features a precision analog-to-digital converter (ADC) and operates with a supply voltage of 2.7V to 5.5V, making it ideal for battery-powered devices and energy monitoring systems.
Parameter | Value |
---|---|
Supply Voltage (Vcc) | 2.7V to 5.5V |
Input Voltage Range | 0V to 36V |
Current Measurement Range | Determined by external shunt |
ADC Resolution | 16-bit |
Communication Interface | I2C (up to 1 MHz) |
Operating Temperature | -40°C to +125°C |
Power Consumption | 330 µA (typical) |
The INA226 is available in a small 10-pin VSSOP package. Below is the pinout description:
Pin No. | Name | Description |
---|---|---|
1 | VBUS | Voltage input to measure bus voltage |
2 | GND | Ground connection |
3 | SCL | I2C clock input |
4 | SDA | I2C data input/output |
5 | ALERT | Alert output for programmable threshold violations |
6 | ADDR | I2C address selection pin |
7 | VSHUNT | Voltage input to measure across the external shunt resistor |
8 | VCC | Power supply input |
9, 10 | NC | No connection (leave floating or connect to ground for stability) |
Below is an example of how to interface the INA226 with an Arduino UNO to measure voltage and current:
#include <Wire.h>
// INA226 I2C address (default is 0x40, adjust if ADDR pin is configured differently)
#define INA226_ADDRESS 0x40
// Register addresses
#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 INA226 (e.g., calibration, averaging, etc.)
configureINA226();
}
void loop() {
float busVoltage = readBusVoltage(); // Read bus voltage
float shuntVoltage = readShuntVoltage(); // Read shunt voltage
float current = shuntVoltage / 0.01; // Calculate current (assuming 0.01Ω shunt resistor)
// Print results to the serial monitor
Serial.print("Bus Voltage: ");
Serial.print(busVoltage);
Serial.println(" V");
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
delay(1000); // Wait 1 second before the next reading
}
void configureINA226() {
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(0x00); // Configuration register
Wire.write(0x45); // High byte of configuration
Wire.write(0x27); // Low byte of configuration
Wire.endTransmission();
}
float readBusVoltage() {
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(REG_BUS_VOLTAGE); // Bus voltage register
Wire.endTransmission();
Wire.requestFrom(INA226_ADDRESS, 2);
uint16_t rawData = (Wire.read() << 8) | Wire.read();
return rawData * 0.00125; // Convert to volts (1.25mV per LSB)
}
float readShuntVoltage() {
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(REG_SHUNT_VOLTAGE); // Shunt voltage register
Wire.endTransmission();
Wire.requestFrom(INA226_ADDRESS, 2);
uint16_t rawData = (Wire.read() << 8) | Wire.read();
return rawData * 0.0000025; // Convert to volts (2.5µV per LSB)
}
No I2C Communication:
Incorrect Voltage or Current Readings:
Alert Pin Not Functioning: