

The INA219 is a high-side current shunt monitor with an I2C interface, designed for precise measurement of current, voltage, and power. It integrates a 12-bit ADC for high-resolution measurements and eliminates the need for a separate power supply for the shunt resistor. This makes it ideal for applications requiring accurate power monitoring and energy management.








The INA219 is typically available in an 8-pin SOIC package. Below is the pinout:
| Pin | Name | Description |
|---|---|---|
| 1 | V+ | Positive input for the high-side shunt resistor |
| 2 | V- | Negative input for the high-side shunt resistor |
| 3 | GND | Ground connection |
| 4 | SDA | I2C data line |
| 5 | SCL | I2C clock line |
| 6 | ALERT/RDY | Alert or Ready pin (optional, used for interrupt signaling) |
| 7 | A0 | I2C address selection bit 0 |
| 8 | A1 | I2C address selection bit 1 |
The INA219's I2C address can be configured using the A0 and A1 pins. The table below shows the possible addresses:
| A1 | A0 | I2C Address |
|---|---|---|
| 0 | 0 | 0x40 |
| 0 | 1 | 0x41 |
| 1 | 0 | 0x42 |
| 1 | 1 | 0x43 |
Connect the Shunt Resistor:
Power the INA219:
Connect the I2C Lines:
Configure the I2C Address:
Optional Alert Pin:
Below is an example of how to use the INA219 with an Arduino UNO to measure current, voltage, and power:
#include <Wire.h>
#include <Adafruit_INA219.h>
// Create an instance of the INA219 class
Adafruit_INA219 ina219;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
while (!Serial) {
delay(10); // Wait for the serial monitor to open
}
// Initialize the INA219 sensor
if (!ina219.begin()) {
Serial.println("Failed to find INA219 chip");
while (1) {
delay(10); // Halt execution if the sensor is not found
}
}
Serial.println("INA219 initialized successfully");
}
void loop() {
float shuntVoltage = ina219.getShuntVoltage_mV(); // Get shunt voltage in mV
float busVoltage = ina219.getBusVoltage_V(); // Get bus voltage in V
float current_mA = ina219.getCurrent_mA(); // Get current in mA
float power_mW = ina219.getPower_mW(); // Get power in mW
// Print the measurements to the serial monitor
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_mA);
Serial.println(" mA");
Serial.print("Power: ");
Serial.print(power_mW);
Serial.println(" mW");
Serial.println("-----------------------------");
delay(1000); // Wait 1 second before the next reading
}
No Communication with the INA219:
Incorrect Current or Voltage Readings:
Sensor Not Detected:
Q: Can the INA219 measure negative currents?
A: Yes, the INA219 can measure bidirectional currents if configured appropriately.
Q: What is the maximum current the INA219 can measure?
A: The maximum current depends on the shunt resistor value. For a 0.1Ω resistor, the range is ±3.2A.
Q: Can I use the INA219 with a 3.3V microcontroller?
A: Yes, the INA219 is compatible with both 3.3V and 5V logic levels.
Q: Do I need external pull-up resistors for the I2C lines?
A: Yes, if your microcontroller or breakout board does not already include them. Use 4.7kΩ resistors as a standard.
By following this documentation, you can effectively integrate the INA219 into your projects for accurate power monitoring and energy management.