INA219 seem's not mesuring

Hello
I just try to test INA219 not used from 2 years ans with the adafruit schematics + ino code I get a strange answer :
16:19:19.478 -> Bus Voltage: 0.01 V
16:19:19.478 -> Shunt Voltage: -1.35 mV
16:19:19.511 -> Load Voltage: 0.01 V
16:19:19.511 -> Current: -13.50 mA
16:19:19.511 -> Power: 0.00 mW

The schematic is the one on this page :
https://electropeak.com/learn/interfacing-ina219-current-sensor-module-with-arduino/

The led light on so voltage is not nul...
I had 4 ina219 sensor (with different I2C adress) and same result with this INA219...

Is it possible that INA219 are all out of order ? but responding to i2c request?

Any idee to avoid bying new one?

Help forum members help you by reading and following the instructions in the "How to get the best out of the forum" post, at the head of every forum category.

I think no
Please show your schematic (exactly yours rather than "similar to page anywhere in the net"). And insert the code to the message using the code tags

Thanks for help

The only difference on schematics is that resitor befor led is missing

For the code :

#include <Wire.h>
#include <Adafruit_INA219.h>

Adafruit_INA219 ina219;

void setup(void)
{
Serial.begin(115200);
while (!Serial) {
// will pause Zero, Leonardo, etc until serial console opens
delay(1);
}

uint32_t currentFrequency;

Serial.println("Hello!");

// Initialize the INA219.
// By default the initialization will use the largest range (32V, 2A). However
// you can call a setCalibration function to change this range (see comments).
if (! ina219.begin()) {
Serial.println("Failed to find INA219 chip");
while (1) { delay(10); }
}
// To use a slightly lower 32V, 1A range (higher precision on amps):
//ina219.setCalibration_32V_1A();
// Or to use a lower 16V, 400mA range (higher precision on volts and amps):
//ina219.setCalibration_16V_400mA();

Serial.println("Measuring voltage and current with INA219 ...");
}

void loop(void)
{
float shuntvoltage = 0;
float busvoltage = 0;
float current_mA = 0;
float loadvoltage = 0;
float power_mW = 0;

shuntvoltage = ina219.getShuntVoltage_mV();
busvoltage = ina219.getBusVoltage_V();
current_mA = ina219.getCurrent_mA();
power_mW = ina219.getPower_mW();
loadvoltage = busvoltage + (shuntvoltage / 1000);

Serial.print("Bus Voltage: "); Serial.print(busvoltage); Serial.println(" V");
Serial.print("Shunt Voltage: "); Serial.print(shuntvoltage); Serial.println(" mV");
Serial.print("Load Voltage: "); Serial.print(loadvoltage); 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(2000);
}

You cannot connect the LED without a resistor, else you will burn either the LED or the Arduino pin. Probably, something in your scheme has already broken, and therefore does not work.

If you did use a resistor in series with the LED, what is its value?

The fact that no resistor is shown in the "Electropeak" diagram tells you right away to AVOID that site. The design could destroy an Arduino.

The Electropeak web site author obviously knows nothing about electronic circuit design.

In the schematic on the site, the LED has a resistor. I guess removing the resistor is an 'optimization' of the OP.

My mistake indeed, I did not put the resistor as I had a green LED that should accept 3.3V (I thought the resistor was only there to drop the voltage for the red LED...)

But with a resistor in serie or parallele, the ina219 still read the same very low voltage...

To be sure the arduino was not damage, I test on another arduino and get the same result...

Hi,
Can you please post some images of your project so we can see your connections and component layout?

You do have the header pins of the 219 module soldered to the module pcb?

Thanks... Tom... :smiley: :+1: :coffee: :australia:


A picture like this?
Yes I have header pin soldered to the ina219

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