1
\$\begingroup\$

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:

enter image description here

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.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Nov 4, 2019 at 10:42
  • \$\begingroup\$ 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. \$\endgroup\$ Nov 4, 2019 at 14:49
  • \$\begingroup\$ @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. \$\endgroup\$ Nov 4, 2019 at 15:06
  • \$\begingroup\$ 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. \$\endgroup\$ Nov 4, 2019 at 15:14
  • \$\begingroup\$ 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 \$\endgroup\$
    – Voltage Spike
    Nov 4, 2019 at 16:41

2 Answers 2

1
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

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.

INA219A Application Circuit

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:

INA219A Application Circuit

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!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.