The INA226 is a high-side current shunt monitor with an integrated I2C interface, designed to measure voltage, current, and power in a wide range of applications. It features a precision 16-bit analog-to-digital converter (ADC) for accurate measurements and operates with a supply voltage range of 2.7V to 5.5V, making it ideal for battery-powered devices. The INA226 is commonly used in power management systems, battery monitoring, and industrial equipment.
Parameter | Value |
---|---|
Supply Voltage (Vcc) | 2.7V to 5.5V |
Input Voltage Range | 0V to 36V |
Current Measurement Range | Determined by external shunt resistor |
ADC Resolution | 16-bit |
Communication Interface | I2C (up to 400kHz) |
Operating Temperature | -40°C to +125°C |
Power Consumption | 330µA (typical) |
Pin Name | Pin Number | Description |
---|---|---|
V+ | 1 | Positive supply voltage (2.7V to 5.5V) |
GND | 2 | Ground connection |
SCL | 3 | I2C clock line |
SDA | 4 | I2C data line |
A0 | 5 | I2C address selection pin 0 |
A1 | 6 | I2C address selection pin 1 |
VIN+ | 7 | Positive input for differential voltage sensing |
VIN- | 8 | Negative input for differential voltage sensing |
Below is an example of how to use the INA226 with an Arduino UNO to measure current and voltage:
#include <Wire.h>
// INA226 I2C address (default: 0x40 if A0 and A1 are grounded)
#define INA226_ADDRESS 0x40
// INA226 register addresses
#define CONFIG_REGISTER 0x00
#define SHUNT_VOLTAGE_REGISTER 0x01
#define BUS_VOLTAGE_REGISTER 0x02
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(CONFIG_REGISTER); // 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 shuntVoltage = readRegister(SHUNT_VOLTAGE_REGISTER) * 0.0025; // Convert to volts
float busVoltage = readRegister(BUS_VOLTAGE_REGISTER) * 0.00125; // Convert to volts
Serial.print("Shunt Voltage (V): ");
Serial.println(shuntVoltage);
Serial.print("Bus Voltage (V): ");
Serial.println(busVoltage);
delay(1000); // Wait 1 second before the next reading
}
uint16_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
uint16_t value = (Wire.read() << 8) | Wire.read(); // Combine MSB and LSB
return value;
}
No I2C Communication:
Incorrect Voltage or Current Readings:
Device Not Responding:
Q: Can the INA226 measure negative currents?
A: No, the INA226 is designed for unidirectional current measurement. For bidirectional current sensing, additional circuitry or a different device is required.
Q: What is the maximum current the INA226 can measure?
A: The maximum current depends on the value of the external shunt resistor and the maximum measurable voltage drop across it (±81.92mV).
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 supply voltage (V+) is within the 2.7V to 5.5V range.