

The Adafruit INA219 (Part ID: 904) is a high-side current sensor designed to measure voltage, current, and power in a circuit. It features an I2C interface, making it easy to integrate with microcontrollers such as Arduino, Raspberry Pi, and other development boards. This sensor is ideal for monitoring power consumption in various applications, including battery-powered devices, solar power systems, and motor controllers.








The Adafruit INA219 is based on the Texas Instruments INA219 chip and offers precise power monitoring capabilities. Below are the key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.0V to 5.5V |
| Current Measurement Range | ±3.2A (default shunt resistor) |
| Voltage Measurement Range | 0V to 26V |
| Communication Interface | I2C |
| Default I2C Address | 0x40 (modifiable to 0x41, 0x44, or 0x45) |
| Resolution | 12-bit ADC |
| Accuracy | ±1% |
| Shunt Resistor | 0.1Ω (default, replaceable for custom range) |
| Dimensions | 25mm x 20mm x 2mm |
The Adafruit INA219 has six pins, as described in the table below:
| Pin Name | Description |
|---|---|
| VIN+ | Positive input for the high-side voltage to be measured. |
| VIN- | Negative input for the high-side voltage to be measured. |
| GND | Ground connection. |
| VCC | Power supply input (3.0V to 5.5V). |
| SDA | I2C data line for communication with the microcontroller. |
| SCL | I2C clock line for communication with the microcontroller. |
Below is an example of how to use the Adafruit INA219 with an Arduino UNO to measure voltage, current, 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 detected
}
}
Serial.println("INA219 initialized successfully");
}
void loop() {
// Read voltage, current, and power
float busVoltage = ina219.getBusVoltage_V(); // Voltage across the load
float current_mA = ina219.getCurrent_mA(); // Current through the load
float power_mW = ina219.getPower_mW(); // Power consumption of the load
// Print the measurements to the serial monitor
Serial.print("Bus Voltage: ");
Serial.print(busVoltage);
Serial.println(" V");
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
}
INA219 Not Detected on I2C Bus:
Incorrect Current or Voltage Readings:
Overheating of the Shunt Resistor:
Q: Can I measure negative currents with the INA219?
A: Yes, the INA219 can measure bidirectional currents. However, you may need to configure the sensor for bidirectional mode in your code.
Q: How do I change the I2C address of the INA219?
A: Modify the address by soldering the A0 and A1 jumpers on the back of the board. Refer to the silkscreen for the corresponding address settings.
Q: What is the maximum current the INA219 can measure?
A: The maximum measurable current depends on the value of the shunt resistor. With the default 0.1Ω resistor, the range is ±3.2A. For higher currents, use a lower-value resistor.
By following this documentation, you can effectively integrate the Adafruit INA219 into your projects for accurate power monitoring and analysis.