Kelvin circuit with Arduino, LM317 and INA219

Hi everyone,

I am trying to build a 4-wire (kelvin) circuit to measure resistance in a precise manner. For simple tests I am using a 4,7 Ohm and a 10 Ohm resistor.

So first of all I have built a constant current circuit with a LM317 which outputs 100mA and is equal to the Ammeter in the cicuit above. This seems to work so far. I power this circuit via the Vin pin of my Arduino.

To measure the voltage drop, I have connected Vin+ and Vin- of my INA219 breakout board like the Voltmeter in the circuit above.
For a quick test I am using the example sketch of the breakout board.
The problem is that the shunt voltage I see in the serial monitor seems to be wrong because I do not get the right value for my resistor when I use Ohm's law.
But if i use my multimeter instead of the INA219 I can see the correct voltage drop of about 150 mA when I use the 4,7 Ohm resistor. So the problem seems to be located at the INA219.

I would be very grateful if you could help me to find my error.

Kind regards,
Tom

If you're using the usual INA219 board, you need to put that in series with your Rx value. Why? Measure across the boards input terminals with your ohmmeter and it will become apparent...

Also, 100ma into 4.7ohms will not result in 150mv (assuming your stated 150ma was a typo). In addition, you might want to consider powering your '317 from a separate 30-ish volt, stable power supply. Otherwise, you'll be limited to about 50 ohms on the upper end of your measurement capability and that's assuming about 8-9 volts on Vin.

Hi,
The 1NA219 is a current measuring board, not a voltage measuring device.

As you diagram shows you are measuring a voltage, you do that with a voltmeter.
The 1NA219 already has a low value resistor across its Vin+ and Vin- input terminals.


That is the R100 component on the PCB.

Tom.. :slight_smile:

@TomGeorge: I have read that it is possible to use the INA219 for my application but without any details.

@avr_fred: When I measure the resistance across the input terminals of the INA219 I see the resistance of the shunt --> 0,1 Ohm
Yes you are right, I have mixed everything up during my experiments. I have now put the INA219 in series with my resistor whose resistance I would like to know. You can see that in the circuit below.

I am using the example sketch of the library.
In the serial monitor I see for a 10 Ohm "unknown resistor":

Bus Voltage: 0.11 V
Shunt Voltage: 1.27 mV
Load Voltage: 0.11 V
Current: 12.90 mA

for 20 Ohm:
Bus Voltage: 0.23 V
Shunt Voltage: 1.28 mV
Load Voltage: 0.23 V
Current: 12.80 mA

for 1,47 Ohm:
Bus Voltage: 0.00 V
Shunt Voltage: 1.28 mV
Load Voltage: 0.00 V
Current: 12.90 mA

for 4,7 Ohm:
Bus Voltage: 0.04 V
Shunt Voltage: 1.30 mV
Load Voltage: 0.04 V
Current: 12.60 mA

for 47 Ohm:
Bus Voltage: 0.56 V
Shunt Voltage: 1.31 mV
Load Voltage: 0.57 V
Current: 12.90 mA

Arduino is powered by a 7,5 V power supply. I will buy a 30 V power supply next week.

Now I feel a bit lost in how to calculate the unknown resistor. Any hint for me?

Re-think what you're doing.
You have an LM317 constant current circuit, and measure current (across a fixed internal 0.1ohm shunt).

  1. use a constant voltage across unknown resistor and shunt, and measure current.
    Or
  2. use a constant current, and measure voltage across the unknown resistor.
    Leo..

Hi,

@TomGeorge: I have read that it is possible to use the INA219 for my application but without any details.

Yes you can, but not a INA219 breakout board, it has extra components that makes it a stand alone current measuring device.

As Wawa is trying to explain, your diagram shows you need to measure VOLTAGE across the resistor, not current, current will be constant because you are supplying the circuit with CONSTANT CURRENT from the LM317 circuit.

You need to look at the data sheet for the INA219, and the datasheet for your INA219 PCB

Can you tell us your electronics, programming, Arduino, hardware experience?

Thanks.. Tom... :slight_smile:
PS. Please read post #2.

@TomGeorge.
OP has a similar thread where an ADS1115 is used as voltmeter across the unknown resistor.

https://forum.arduino.cc/index.php?topic=491922.0

Leo..