ina219 read instable

hi, i have arduino nano and sensor INA219 buy from adafruit. I have executed the instructions of the page https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout.

at module sensor, at Vin- i have connect a negative 12Vcc, at Vin+ i have connect positive 12Vcc whit serial resistor of circa 500ohm.

Next i have use program and this is log:

Hello! Measuring voltage and current with INA219 ... Bus Voltage: 0.00 V Shunt Voltage: 2.35 mV Load Voltage: 0.00 V Current: 16.60 mA Power: 11.00 mW

Bus Voltage: 1.08 V Shunt Voltage: 2.35 mV Load Voltage: 1.08 V Current: 23.40 mA Power: 20.00 mW

Bus Voltage: 1.14 V Shunt Voltage: 2.35 mV Load Voltage: 1.15 V Current: 23.80 mA Power: 113.00 mW

Bus Voltage: 0.00 V Shunt Voltage: 1.70 mV Load Voltage: 0.00 V Current: 23.50 mA Power: 25.00 mW

Bus Voltage: 0.93 V Shunt Voltage: 2.35 mV Load Voltage: 0.93 V Current: 20.00 mA Power: 0.00 mW

Bus Voltage: 6.66 V Shunt Voltage: 2.36 mV Load Voltage: 6.66 V Current: 23.50 mA Power: 8.00 mW

Bus Voltage: 1.17 V Shunt Voltage: 2.35 mV Load Voltage: 1.17 V Current: 23.50 mA Power: 187.00 mW

Bus Voltage: 0.00 V Shunt Voltage: 2.35 mV Load Voltage: 0.00 V Current: 17.50 mA Power: 18.00 mW

Bus Voltage: 1.00 V Shunt Voltage: 2.35 mV Load Voltage: 1.01 V Current: 23.60 mA Power: 20.00 mW

Bus Voltage: 2.39 V Shunt Voltage: 2.35 mV Load Voltage: 2.39 V Current: 23.60 mA Power: 120.00 mW

Bus Voltage: 0.00 V Shunt Voltage: 1.62 mV Load Voltage: 0.00 V Current: 23.40 mA Power: 26.00 mW

Bus Voltage: 0.91 V Shunt Voltage: 2.34 mV Load Voltage: 0.91 V Current: 15.70 mA Power: 0.00 mW

Bus Voltage: 5.00 V Shunt Voltage: 2.34 mV Load Voltage: 5.00 V Current: 23.60 mA Power: 21.00 mW

Bus Voltage: 1.10 V Shunt Voltage: 2.34 mV Load Voltage: 1.10 V Current: 23.60 mA Power: 172.00 mW

Bus Voltage: 0.00 V Shunt Voltage: 1.78 mV Load Voltage: 0.00 V Current: 18.00 mA Power: 29.00 mW

Bus Voltage: 0.56 V Shunt Voltage: 2.36 mV Load Voltage: 0.57 V Current: 23.50 mA Power: 0.00 mW

Bus Voltage: 8.77 V Shunt Voltage: 2.35 mV Load Voltage: 8.77 V Current: 23.70 mA Power: 102.00 mW

Bus Voltage: 0.83 V Shunt Voltage: 2.03 mV Load Voltage: 0.83 V Current: 23.50 mA Power: 26.00 mW

Bus Voltage: 0.89 V Shunt Voltage: 2.34 mV Load Voltage: 0.89 V Current: 16.00 mA Power: 0.00 mW

Bus Voltage: 4.95 V Shunt Voltage: 2.35 mV Load Voltage: 4.95 V Current: 23.50 mA Power: 21.00 mW

Bus Voltage: 1.09 V Shunt Voltage: 2.34 mV Load Voltage: 1.09 V Current: 23.50 mA Power: 172.00 mW

Bus Voltage: 0.00 V Shunt Voltage: 1.75 mV Load Voltage: 0.00 V Current: 18.00 mA Power: 33.00 mW

Bus Voltage: 0.58 V Shunt Voltage: 2.34 mV Load Voltage: 0.58 V Current: 23.60 mA Power: 0.00 mW

Bus Voltage: 8.24 V Shunt Voltage: 2.36 mV Load Voltage: 8.24 V Current: 23.80 mA Power: 102.00 mW

Bus Voltage: 0.83 V Shunt Voltage: 1.94 mV Load Voltage: 0.83 V Current: 23.60 mA Power: 26.00 mW

Bus Voltage: 0.87 V Shunt Voltage: 2.34 mV Load Voltage: 0.87 V Current: 16.30 mA Power: 0.00 mW

Bus Voltage: 4.66 V Shunt Voltage: 2.36 mV Load Voltage: 4.66 V Current: 23.50 mA Power: 21.00 mW

Bus Voltage: 1.10 V Shunt Voltage: 2.34 mV Load Voltage: 1.10 V Current: 23.70 mA Power: 128.00 mW

is visible some time power is instable, 180mW or 0mW,....

how is possible????

thanks

You need to show how you've wired it up...

There definitely shouldn't be any negative voltages anywhere.

Vin+ connects to the positive side of the supply, GND connects to the negative side of the supply,

The load goes between Vin- and GND.

12V+----[Vin+ Vin- ]----/\/\/\/----12V GND INA219 500R

Is 12volt ground connected to Arduino ground? The INA219 can only measure voltages within it's own common mode range. Leo..

Wawa: Is 12volt ground connected to Arduino ground? The INA219 can only measure voltages within it's own common mode range. Leo..

was this the problem!!!

now i have connect the ground ina219 at ground arduino and work!!

Measuring voltage and current with INA219 ... Bus Voltage: 12.10 V Shunt Voltage: 2.36 mV Load Voltage: 12.10 V Current: 23.80 mA Power: 287.00 mW

Bus Voltage: 12.10 V Shunt Voltage: 2.37 mV Load Voltage: 12.10 V Current: 23.70 mA Power: 288.00 mW

Bus Voltage: 12.10 V Shunt Voltage: 2.37 mV Load Voltage: 12.10 V Current: 23.70 mA Power: 287.00 mW

Bus Voltage: 12.10 V Shunt Voltage: 2.37 mV Load Voltage: 12.10 V Current: 23.70 mA Power: 287.00 mW

Bus Voltage: 12.10 V Shunt Voltage: 2.37 mV Load Voltage: 12.10 V Current: 23.80 mA Power: 287.00 mW

Bus Voltage: 12.10 V Shunt Voltage: 2.37 mV Load Voltage: 12.10 V Current: 23.70 mA Power: 288.00 mW

Bus Voltage: 12.10 V Shunt Voltage: 2.37 mV Load Voltage: 12.10 V Current: 23.70 mA Power: 288.00 mW

thanks