The Adafruit INA260 is a high-precision current and voltage sensor module that allows for simultaneous monitoring of current, voltage, and power through a single I2C interface. This sensor is ideal for a wide range of applications, including power supply monitoring, battery charging, energy consumption tracking, and load sensing in various electronic projects.
Pin Number | Name | Description |
---|---|---|
1 | VIN+ | Voltage input, positive side of the shunt resistor |
2 | VIN- | Voltage input, negative side of the shunt resistor |
3 | GND | Ground reference for the module |
4 | SCL | I2C clock signal |
5 | SDA | I2C data signal |
6 | VCC | Power supply for the module (3.0 V to 5.5 V) |
7 | ALERT | Alert pin, configurable for various warning and limit conditions |
8 | ADDR | I2C address selection pin |
#include <Wire.h>
#include <Adafruit_INA260.h>
Adafruit_INA260 ina260 = Adafruit_INA260();
void setup() {
Serial.begin(115200);
// Initialize the INA260
if (!ina260.begin()) {
Serial.println("Couldn't find INA260 chip");
while (1);
}
Serial.println("Found INA260 chip");
}
void loop() {
Serial.print("Current: ");
Serial.print(ina260.readCurrent());
Serial.println(" mA");
Serial.print("Voltage: ");
Serial.print(ina260.readBusVoltage());
Serial.println(" mV");
Serial.print("Power: ");
Serial.print(ina260.readPower());
Serial.println(" mW");
delay(1000);
}
Q: Can the INA260 measure negative current? A: Yes, the INA260 can measure current in both directions, from -15 A to +15 A.
Q: What is the maximum voltage that can be measured? A: The INA260 can measure voltages up to 36 V.
Q: How do I change the I2C address of the INA260? A: The I2C address can be changed by connecting the ADDR pin to GND, VCC, SDA, or SCL, providing four different address options.
Q: Is it possible to use multiple INA260 modules on the same I2C bus? A: Yes, you can use up to four INA260 modules on the same I2C bus by setting a unique address for each using the ADDR pin.