0

I want to measure the voltage of batteries. I am using an INA219 powered by an Arduino MKRWAN 1300. I have connected the INA219 to the MKRWAN as seen in the image below:

Photo of Arduino and INA219 on breadboard

However, I seem to have a hard time connecting the batteries to the INA219. How should I connect the batteries that the INA219 sensor can read its voltage?

Greenonline
  • 2,064
  • 7
  • 23
  • 38
  • 1
    The INA219 is intended to measure the voltage over a shunt resistor (see the datasheet). It would be possible to use batteries instead. Draw a schematic of what you've tried, and tell us what problem you got with it. – CL. Jul 13 '23 at 07:08

1 Answers1

0

INA219 is a power monitor which is able to measure both bus voltage and load current. Although typical application setup is given in the datasheet, I'll try to draw a clearer version:

schematic

simulate this circuit – Schematic created using CircuitLab

Rshunt is a small resistance (e.g. 50 mR) to measure the current that the load draws from the supply.

If you don't want to measure the current (i.e. you want to measure the bus voltage only) then short Vin+ and Vin– pins together to positive bus rail:

schematic

simulate this circuit

and set the operation mode to one of the "bus-voltage-only" modes:

enter image description here


If there's any available A/D channels on your Arduino then you can use it via a simple voltage divider, but you should take the maximum possible bus voltage into account i.e. the divider's output shouldn't exceed the A/D channel's max acceptable input voltage.

Rohat Kılıç
  • 26,954
  • 3
  • 25
  • 67