The INA226 is a high-side current shunt monitor with an integrated I2C interface, manufactured by ESP (Part ID: 32). It is designed for precise current sensing and power monitoring in a variety of applications. The INA226 can measure both current and voltage, enabling real-time power calculations. Its wide input voltage range and high accuracy make it ideal for power management systems, battery monitoring, and industrial automation.
Parameter | Value |
---|---|
Supply Voltage (Vcc) | 2.7V to 5.5V |
Input Voltage Range | 0V to 36V |
Current Measurement Range | Configurable via external shunt resistor |
Communication Interface | I2C (up to 400 kHz) |
Accuracy | ±0.1% (typical) |
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 |
SCL | 3 | I2C clock line |
SDA | 4 | I2C data line |
VIN+ | 5 | Positive input for current sensing |
VIN- | 6 | Negative input for current sensing |
ALERT | 7 | Alert output for programmable thresholds |
ADDR | 8 | I2C address configuration |
Below is an example of how to interface the INA226 with an Arduino UNO to measure current and voltage:
#include <Wire.h>
#define INA226_ADDRESS 0x40 // Default I2C address of INA226
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Configure INA226 (example: set calibration register)
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(0x05); // Calibration register address
Wire.write(0x10); // High byte of calibration value
Wire.write(0x00); // Low byte of calibration value
Wire.endTransmission();
}
void loop() {
// Request voltage data from INA226
Wire.beginTransmission(INA226_ADDRESS);
Wire.write(0x02); // Bus voltage register address
Wire.endTransmission();
Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes of data
if (Wire.available() == 2) {
uint16_t rawVoltage = (Wire.read() << 8) | Wire.read();
float busVoltage = rawVoltage * 1.25 / 1000; // Convert to volts
Serial.print("Bus Voltage: ");
Serial.print(busVoltage);
Serial.println(" V");
}
delay(1000); // Wait 1 second before next reading
}
No I2C Communication:
Incorrect Current Readings:
Alert Pin Not Functioning:
High Noise in Measurements:
Q: Can the INA226 measure negative currents?
A: No, the INA226 is designed for high-side current sensing and measures only positive currents.
Q: What is the maximum current the INA226 can measure?
A: The maximum current depends on the shunt resistor value and the input voltage range. Ensure the voltage drop across the shunt does not exceed the input range of the INA226.
Q: Can I use the INA226 with a 3.3V microcontroller?
A: Yes, the INA226 operates with a supply voltage of 2.7V to 5.5V and is compatible with 3.3V logic levels.
Q: How do I calculate power using the INA226?
A: Power can be calculated by multiplying the measured current and bus voltage. The INA226 can also perform this calculation internally and provide the result via I2C.