# INA219 bus voltage depends on supply voltage

I tried to measure voltage with INA219A connected to Arduino. As datasheet says INA219 works from 3V to 5.5V supply voltage but I get different values for bus voltage when I change supply voltage. Here are some values I get, when I measure Arduino's 5V output (which is actually 4.6V):

• At 3V supply I get 4.54V,
• At 3.5V --> 3.34V,
• At 4V --> 2.93V,
• At 4.6V --> 2.48V.

I've measured bus voltage myself as voltage between GND and Vin- as mentioned in datasheet and get 4.6V regardless supply voltage.

All was connected like in the picture below:

Edited:

I tried to supply INA219 from batteries and measure Arduino's 5V. When I supply 3V I get nearly 4.6V what the multimeter shows but when I supply 4.5 V I get 2.5V. The same question remains regardless INA219 is powered from batteries or potentiometer.

• If I understood correctly, you are changing the supply voltage with 10k potentiometer. This is not a good way, because the supply current will flow through the adjusted resistance of the pot. Assuming it's a linear potentiometer and is adjusted to 60% to get 3V. So the supply current will flow through 4k resistance. The supply current is given as 0.7mA for quiescent mode, but it should be higher at active mode. Let's assume it is 1mA. So, 1mA current drops approx 4V across a 4k resistor. Probably the internal blocks are having trouble during measurement because of the dropped supply voltage. Commented Nov 4, 2019 at 10:42
• Am I missing something. INA219 works from 3V to 5.5V and Arduino has 5V. Use 5V to power INA219. Don't attempt to power a device through a resistor. You have a variable load connected through a resistor. As load current changes, voltage changes. You compound your problem by having INA219 measure it. Commented Nov 4, 2019 at 14:49
• @StainlessSteelRat If I power INA219 with batteries noting changes. The measurements for Arduino's 5V depend on supply voltage in the manner I pointed in the post. Commented Nov 4, 2019 at 15:06
• But VSS is VS and it appears you are varying it. You have to power with +5V and measure with Vin+ and Vin- across a shunt. Not sure what you measure with Vin- floating. Commented Nov 4, 2019 at 15:14
• There is no Vss on the INA219A, there is a Vs. you cannot use a resistor in serises to vary the voltage, because it will also current limit the INA219A Commented Nov 4, 2019 at 16:41

First, powering INA219A via 10K resistor is really bad idea. The high side of a resistor basically works as current limiter. For example when set for 3V output it limits supply current to something like 1.25 mA, which is awfully close to quiescent current of the chip.

Furthermore, if you are using some kind of breakout board with built-in I2C pull-ups, like this one, the same supply is also used for those pullups. Your chip is basically starving for power which can lead to all kinds of strange behavior.

If you are not using off-shelf breakout make sure you have 0.1 μF bypass installed.

But since you haven't reported any I2C failures and also tried powering from battery the actual problem can be somewhere else (does not mean you shouldn't fix the above before troubleshooting further).

Let's see... I would recommend checking your software next.

• Since maximum voltage is around 5V it is better to change default 32V full-scale range to 16V (see BRNG bit);

• Make sure you set mode to "continuous bus voltage" (0b110 in MODE bits);

• If you are using repeated reads then make sure you send correct register address (0x02) first time. Actually, for troubleshooting I'd avoid repeated reads and send register address on each request;

• The bus voltage register bits are not right-aligned. Make sure you shift the register value right by 3 bits before multiplying by 4 mV LSB.

Which came first, the chicken or the egg. That is what you are sort of dealing with.

The 5V to power the INA219A comes from the Arduino AND you want to measure the 5V as it goes to the INA219A?

If you look up the datasheet for the INA219A, you will see this.

I don't know what you want to measure, but if you want to measure the power consumption of INA219A, then you need to connect +5V from Arduino to Power Bus. Load gets connected to Supply Voltage. Connections are shown in Red.

I believe you want to measure the power consumption of the Arduino, so connections would be:

Either way, start there. Go read the data sheet, and try to figure out what you need to do to make it work. You have to figure out $$\R_{SHUNT}\$$ circuitry.

And I'd suggest you figure it out before asking a new question here (but that's just me). We don't mind helping, but we don't do the heavy lifting. Essentially, no beer or pizza!