INA219 load or bus voltage?

I try to understand load and bus voltage of Adafruit INA219.

Here https://forums.adafruit.com/viewtopic.php?f=19&t=127291 it says: "The bus voltage is the total voltage between power and GND. It is the sum of the load voltage and the shunt voltage."
But the code is the oposite:

loadvoltage = busvoltage + (shuntvoltage / 1000);

From my understanding:
shunt voltage: the voltage at shunt resistor terminals
bus voltage: the voltage that my circuit will ACTUALLY see when i use INA219 and it is measured as the voltage between IN- and GND in INA219 sensor
load voltage: the sum voltage of BUS + SHUNT voltage. It is the voltage i give to my circuit when there is no INA219 sensor. Let's say it's my Battery voltage.
So:
bus = load - shunt
load = bus + shunt
So, the answer of Bill is wrong according to these

3 Likes

Ha ha ha ha, sorry I have to laugh so hard. Congratulations on finding this :wink:

The confusion starts in the datasheet.
In the datasheet they say that the bus voltage is measured at VIN-.
They make it clear with: "IN– is Input Negative differential shunt voltage. Bus voltage is measured from this pin to ground".
It makes sense, because when calculating the power to the load, the voltage VIN- and the current through the shunt are required.
They also say that: VBUS = VIN- - GND
So I'm 100% sure that in the datasheet the "bus voltage" is the voltage for the load.

The input voltage (the battery voltage) is called "VIN+", "Supply", "Power Bus". That is very confusing. Shall we call it "VIN+" or Battery voltage ?

I would call the voltage over the load, the "load voltage". However, the datasheet does not use the word "load voltage", they call it "Load".
Then the datasheet mentioned "load power-supply voltage", but it is not clear what they mean.

When the INA219 module with the shunt and the load is seen as one big load for the battery, then the battery voltage can be the "load voltage". Now my head starts to spin :open_mouth:

Without using the confusing "bus voltage" and "load voltage", this is all that is left:
VIN+ = VIN- + VSHUNT
VBATTERY = VIN- + VSHUNT

Why do you want to know the VIN+ ? It is only a little higher than the VIN-.

If you don't mind, then I will continue to laugh. Ha ha ha ha. I will laugh even harder if someone will reply to this with the words "bus voltage" and "load voltage" and does it all wrong. Please, don't use those words anymore, or else explain what they are every time those words are used.

P.S.: The solution is so simple. If the datasheet would have used 'stardust voltage' for VIN+ and 'wheelbarrow voltage' for VIN-, then there would be no confusing :smiling_imp:

I read twice your comment, but i am still not sure i understood it! haha (maybe cause im not native english speaker and the word "load" is a little confusing)

anyway..i understand that the problem is that the datasheet is using the phrase "supply load" for both the INA + my_testing_circuit and the "load" my_testing_circuit..

I agree Vin+ is much better..
The only reason i want to know all these is: how much is my battery at the time of the measurement..

From what we are saying the Battery voltage is the Vin+ and the "load voltage" in the adafruit's code.
Because the code is:

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

SO:
busvoltage = Vin-
loadvoltage = Vin- + Vshunt = Vbattery

SO: the comment of adafruit's guy is wrong

uzer123:
SO: the comment of adafruit's guy is wrong

Yes. Unless he/she uses common sense instead of the datasheet of the INA219 and was not influenced by the wrong words in the Adafruit library. Common sense is good :wink:

Also the words used in the datasheet are wrong and the words used in the Adafruit library are wrong.
Please don't use "loadvoltage" for the battery voltage. If you read that later in your own sketch, then you will be confused again.

These variable names are okay, no confusion here:

float Vbattery;
float VinPlus;
float VinMinus;
float Vstardust;
float Vwheelbarrow;

The INA219 is made by Texas Instruments.
On their own website, look for "bus voltage" in the pictures here and here.

Can you try again to explain it without using the words "load voltage" or "bus voltage" ?

Issue made at Github for Adafruit: Confusion between "load voltage" and "bus voltage". · Issue #49 · adafruit/Adafruit_INA219 · GitHub.

Hi,

I agree, it can be a bit confusing. The datasheet clearly shows that the bus voltage is the voltage level delivered to the load.

The Rsense (Rshunt) is a resistor, very small, but a resistor. So you can consider that your system has two "loads" in series.

The total load voltage is the Bus voltage plus the Shunt voltage. Maybe it would be clearer if you replace "loadvoltage" with "totalloadvoltage"?

totalloadvoltage = busvoltage + shuntvoltage

@tinyelectr, I think that the INA219 datasheet is the only location where VIN- is used to measure the "bus voltage". That creates confusion. There is already confusion about "load voltage", so now the mayhem is complete. There is not much you or me can do about the confusion, because Texas Instruments started it.

I see...

I agree...Vin+ and Vin- is by far the best way to describe the two "loads" thing..

totalloadvoltage instead of load voltage is still better..but Vin+ is always clear.

also Vbat+ instead of totalloadvoltage is good for me..

All in all, the issue in github is a good move to clear the mess!

edit: i just saw this Update getcurrent.ino by phaelbotelho · Pull Request #47 · adafruit/Adafruit_INA219 · GitHub the mayhem is real!

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