INA 260 Power monitor not calculating power values

I'm not sure why, but the power values are never calculated whenever I run the Arduino code, and the bus voltage fluctuates in its values often.


#include <SPI.h>
#include <Wire.h>
#include <Adafruit_INA260.h>

Adafruit_INA260 ina260 = Adafruit_INA260();

void setup() {
  Serial.begin(115200);
  // Wait until serial port is opened
  while (!Serial) { delay(10); }

  Serial.println("Adafruit INA260 Test");

  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("Bus Voltage: ");
  Serial.print(ina260.readBusVoltage());
  Serial.println(" mV");

  Serial.print("Power: ");
  Serial.print(ina260.readPower());
  Serial.println(" mW");

  Serial.println();
  delay(1000);
} 

This is the code that I used to run on the Arduino IDE

Current: 6.25 mA
Bus Voltage: 0.00 mV
Power: 0.00 mW

Current: 7.50 mA
Bus Voltage: 0.00 mV
Power: 0.00 mW

Current: 7.50 mA
Bus Voltage: 23.75 mV
Power: 0.00 mW

Current: 7.50 mA
Bus Voltage: 21.25 mV
Power: 0.00 mW

Current: 8.75 mA
Bus Voltage: 3.75 mV
Power: 0.00 mW

And these are the data values that come up whenever I run the code.

The power probably is being calculated, but may simply be too small to display using the x.xx mW format.

Power at 8.75 mA and 3.75 mV is 33 microWatts.

Please post a wiring diagram (hand drawn, not Fritzing).

That would make a lot of sense. Right now I am using a 9V battery in series with a 900 Ohm resistor to measure the current and voltage. Is there a better set of values that would be easily able to show a power reading from the INA260?

Post your wiring diagram.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.