Author Topic: Measuring resistance with high accuracy  (Read 3340 times)

0 Members and 1 Guest are viewing this topic.

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Measuring resistance with high accuracy
« on: September 16, 2019, 10:04:59 am »
I am attempting to read a sensor that changes resistance (from 10 ohms to 20k), to a high degree of accuracy, aiming for +-0.1% (ignoring the accuracy of the sensor itself). I feel like this is a frequently asked thing, but after searching on the forum, I couldn't find anything that quite fits my requirements.

My current strategy is a resistor divider, with a fixed resistor between the ADC input (ADS1115) and a fixed 3.3v, and the sensor between the ADC and ground. Unfortunately, it is not accurate enough for my needs.

My replacement idea is to have a constant current source (Looking at LT3092) driving the sensor and the ADC reading the voltage across the sensor. The sensor resistance will be R_SENS=V_ADC/I. The current will either be fixed, using a measured resistor or voltage reference (to reduce temperature variance), or I will use a DAC to program the current source so that the current is in the ideal current range for the current resistance. The DAC will maybe be the DAC8571 or similar.

Is there any thoughts on the best strategy? Before I buy components, PCBs etc. While it would be good to keep the price low, I would prefer to have a more accurate scheme.
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5795
  • Country: ca
Re: Measuring resistance with high accuracy
« Reply #1 on: September 16, 2019, 10:35:18 am »
An dmm like the hp34401a in 4wire mode could do the job, 0.035% precision ?  but costly

How long do you need to take theses measurements,  what is the sensor you need to probe  ?

a wheatstone bridge maybe ?
https://www.omega.ca/en/resources/wheatstone-bridge
https://www.analogictips.com/wheatstone-bridge-part-1-principles-and-basic-applications/


App note ads1232
http://www.ti.com/lit/ml/slyp163/slyp163.pdf
« Last Edit: September 16, 2019, 10:38:55 am by coromonadalix »
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #2 on: September 16, 2019, 11:04:55 am »
Thanks for that. It will be logging indefinitely, and packaged on a small PCB so a DMM will not be an option.

A Wheatstone bridge definitely looks like a possibility, I had completely forgotten about then. It looks like it linearises the relationship between the resistance and the output voltage a bit better over the range I'm looking at. That app note is very handy!
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 337
  • Country: sk
Re: Measuring resistance with high accuracy
« Reply #3 on: September 16, 2019, 12:00:53 pm »
My current strategy is a resistor divider, with a fixed resistor between the ADC input (ADS1115) and a fixed 3.3v, and the sensor between the ADC and ground. Unfortunately, it is not accurate enough for my needs.

This is good start. Measure voltage on sensor (use analog switch or multichannel ADC), then voltage on resistor, divide the two voltages and multiply by resistor value. Result will not depend on 3,3V precision.

Google for ratiometric measurement
http://lpvo.fe.uni-lj.si/fileadmin/files/Izobrazevanje/OME/sbaa110_Understanding_Ratiometric_Conversions.pdf
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Measuring resistance with high accuracy
« Reply #4 on: September 16, 2019, 12:16:37 pm »
Ratiometric measurement is the way for least cost here IMO.
10R to 20k is quite a dynamic range, as you said, using a single resistor might not be sufficient.
I don't know what you're using the ADS1115 inputs and PGA for besides your sensor.
Anyway, I'd suppose to use two of the ADS1115 inputs (one to measure the voltage across the sensor, the other one to measure the voltage across the reference resistor) in differential mode. Maybe the PGA comes in handy to extend the ranges. Another way would be to use multiple resistors to cover the range, and switching them by an external multiplexer using some clever circuitry to take the ON-State resistance of the MUX out of the equation. Something like an 'HC4052 or 'HC4053 could do this job.
Safety devices hinder evolution
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #5 on: September 16, 2019, 01:44:19 pm »
Ratiometric with the Wheatstone bridge looks pretty viable. I will breadboard it up and see how it performs.

Thanks for the help!
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 337
  • Country: sk
Re: Measuring resistance with high accuracy
« Reply #6 on: September 16, 2019, 01:54:54 pm »
Wheatstone bridge isn't probably absolutely needed here. All you need is one precise resistor and measurement of two voltages.
This method was good for Keithley 196 6,5 digit DMM with 0,007% one year accuracy and I believe it will do the job for you, too. For first approximation just use single resistor in 5-10kOhm ballpark and see how it works. Don't go for highest grade of resistors - for starters choose for 0,1% type with 25ppm tempco, that is relatively common and cheap stuff. If you find out you need more accuracy, you may employ reference resistor switching and - especially for lower end of your measurement range - 4-wire method may be good idea, too.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6446
  • Country: hr
Re: Measuring resistance with high accuracy
« Reply #7 on: September 16, 2019, 03:19:03 pm »
Take a look at figure 50 and 51 at page 40. That is general idea. You might want to buffer inputs (to isolate sensor from a/D converter loading) and protect input if resistor is going to be remote and/or changed (like in some measurement instrument). It's even better if you can put A/D and uC close to resistor (sensor) and communicate with it digitally..
Measurements are ratiometric, and as Jaromir very nicely said, stability will depend mostly on reference resistor, after calibrating out other errors.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14072
  • Country: de
Re: Measuring resistance with high accuracy
« Reply #8 on: September 16, 2019, 04:24:32 pm »
The method with 2 resistors in series and measuring voltage across both is the right way to do it. The problem here is the rather large dynamic range, that may require using 2 or more separate ranges.
There are higher resolution ADCs if the ADS1115 is not sufficient. Some also include buffer amplifiers to isolate the resistors from the ADC.

The weatstone bridge may help for resistors in a very small range. However it requires the extra reference path and today it may be attractive to use a 24 bit ADC to avoid 2 accurate resistors. For the large dynamic range the bridge would be of limited help anyway.

Another point to observe is the self heating of the sensor due to the test current. So one may have to keep the test current small enough. This may need some care over such a large resistor range.
This is especially import if the sensor is an NTC or similar temperature dependent resistor.
 

Offline babysitter

  • Frequent Contributor
  • **
  • Posts: 893
  • Country: de
  • pushing silicon at work
Re: Measuring resistance with high accuracy
« Reply #9 on: September 16, 2019, 05:58:23 pm »
If you can read a ADC I guess you have some GPIO. How about putting your sensor in series with a good capacitor, and measure the time it takes to charge/discharge it? (Additionally, discharge/charge thru a known good capacitor sometimes for reference.)

P.S.: Telling about the application helps people.
I'm not a feature, I'm a bug! ARC DG3HDA
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3683
  • Country: us
Re: Measuring resistance with high accuracy
« Reply #10 on: September 16, 2019, 10:53:45 pm »
RC timing is fine if you don't need much accuracy and only have digital pins and comparators to work with.  It isn't a good way for accurate resistance measurement (OP specified 0.1%).  You are using a capacitor as a reference instead of a resistor and capacitors generally have orders of magnitude worse accuracy, drift, and linearity than even inexpensive resistors.  Furthermore, you can't do a 4-terminal measurement and the GPIO pin on resistance is in series with the DUT and can generate a large error.

For exactly these reasons RC time is a good and common way to measure capacitors.  Due to their generally poor tolerances it is rarely needed to measure capacitors much better than 1% and resistors of that accuracy are easily available.
 

Offline babysitter

  • Frequent Contributor
  • **
  • Posts: 893
  • Country: de
  • pushing silicon at work
Re: Measuring resistance with high accuracy
« Reply #11 on: September 17, 2019, 02:52:10 pm »
(Additionally, discharge/charge thru a known good capacitor sometimes for reference.)

This should have been resistor.
I'm not a feature, I'm a bug! ARC DG3HDA
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14072
  • Country: de
Re: Measuring resistance with high accuracy
« Reply #12 on: September 17, 2019, 03:33:36 pm »
The measurement of the resistance via a delay gets tricky due to the switch resistance. So it may be practical for large values, but not for small ones like 1 K or less. In addition at high resistance parasitic capacitance can change things.
 

Offline mzzj

  • Super Contributor
  • ***
  • Posts: 1238
  • Country: fi
Re: Measuring resistance with high accuracy
« Reply #13 on: September 17, 2019, 04:40:26 pm »
Layout? external wires? thermovoltages?

Tie 3.3v to ADC ref input and 3.3k precision resistor, 1mA to 10 ohms  gives you 10uV per 0.1%, easy peasy for something like LTC2484. Upper end of the range is easy after that.
 

Offline splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Measuring resistance with high accuracy
« Reply #14 on: September 17, 2019, 11:19:00 pm »
Layout? external wires? thermovoltages?

Tie 3.3v to ADC ref input and 3.3k precision resistor, 1mA to 10 ohms  gives you 10uV per 0.1%, easy peasy for something like LTC2484. Upper end of the range is easy after that.

Better still, use a 447ohm precision resistor to give 70.6uV (21.4ppm) per 0.1% change in sensor resistance at both 10 ohms and 20k, and 500+uV/0.1% from 100 to 2000 ohms with the best sensitivity at 447 ohms. Change the reference to get the best sensitivity to match your application needs.

A higher value reference resistor is likely to be preffered given that:

a) Most ADCs have different errors at zero compared to full scale. Eg, the LTC2484 has 2.5uV offset error but 82.5uV max gain error before calibration + .33uV/C gain drift (with 3.3V reference).

b) At 10 ohms, the reference resistor will be dissipating 24mW, compared to .5mW at 20k ohms, causing it to increase in temperature by up to 10C depending on its type and heatsinking. The reference voltage could be reduced, but that would increase the ADC noise relative to the signal level.
 

Offline mzzj

  • Super Contributor
  • ***
  • Posts: 1238
  • Country: fi
Re: Measuring resistance with high accuracy
« Reply #15 on: September 18, 2019, 05:44:27 am »


Better still, use a 447ohm precision resistor to give 70.6uV (21.4ppm) per 0.1% change in sensor resistance at both 10 ohms and 20k, and 500+uV/0.1% from 100 to 2000 ohms with the best sensitivity at 447 ohms. Change the reference to get the best sensitivity to match your application needs.

I was thinking of balancing the range with ~450ohm reference resistor.
Current and self-heating "felt" bit too high but that's probably because I'm accustomed to platinum resistance thermometers (like Pt-100) where you have "crazy" tempco and self-heating effect.
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #16 on: September 19, 2019, 12:27:23 pm »
I have achieved an accuracy that I'm pretty happy with (0.06%), just using the 'voltage divider' with a 10k resistor and measuring either side of the resistor. I will probably stick with that as a measurement strategy for now. I will have calibration in firmware.

Since I already have bought a couple of the ADS1115, I would prefer to stick with it and just read the two voltages and calculate from there. It doesn't have an external voltage reference however, is there a significant advantage of referencing the ADC to the voltage divider's voltage? Besides not having to calculate as much.
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #17 on: September 19, 2019, 12:34:28 pm »
Also, I want to buffer the input of the ADC however I cannot determine what opamp characteristics are desirable here. Eg. what is the advantage of using the LTC1050 over the LM358? I don't need a high slew rate so is it mainly higher stability, lower drift? There's just way too many opamps to choose from.
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #18 on: September 19, 2019, 01:27:44 pm »


Better still, use a 447ohm precision resistor to give 70.6uV (21.4ppm) per 0.1% change in sensor resistance at both 10 ohms and 20k, and 500+uV/0.1% from 100 to 2000 ohms with the best sensitivity at 447 ohms. Change the reference to get the best sensitivity to match your application needs.

I was thinking of balancing the range with ~450ohm reference resistor.
Current and self-heating "felt" bit too high but that's probably because I'm accustomed to platinum resistance thermometers (like Pt-100) where you have "crazy" tempco and self-heating effect.
What do you mean by "balancing the range"? With my calculations, I max out of the range of the ADC at around 4000k on my sensor with a 450ohm resistor. So 450ohms isn't suitable, or do you mean that it's applied in another way?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14072
  • Country: de
Re: Measuring resistance with high accuracy
« Reply #19 on: September 19, 2019, 02:01:08 pm »
Having the same reference for the current divider and the ADC helps with noise.  2 separate references adds some extra noise. At the 16 bit level and with some repeats this may not be so bad.

For buffering the requirements for the OP depends on the impedance range and the required accuracy.  For the OP the important parameters are input current, noise, offset drift and a few others.
In this case it depends, wether a single buffer and external MUX is used, or a buffer for every input to the ADC. With just 1 buffer one could compensate much of the offset error in software.
 

Offline splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Measuring resistance with high accuracy
« Reply #20 on: September 20, 2019, 12:19:59 am »
I have achieved an accuracy that I'm pretty happy with (0.06%), just using the 'voltage divider' with a 10k resistor and measuring either side of the resistor. I will probably stick with that as a measurement strategy for now. I will have calibration in firmware.

Since I already have bought a couple of the ADS1115, I would prefer to stick with it and just read the two voltages and calculate from there. It doesn't have an external voltage reference however, is there a significant advantage of referencing the ADC to the voltage divider's voltage? Besides not having to calculate as much.

The ADS1115 has a PGA so the possible full scale input ranges are +/-6.144V, +/-4.096V, +/-2.048V etc, but the input voltage must not exceed Vdd. So for the best resolution and noise performance lets choose Vdd = 4.096V and PGA=1 giving an input range of +/- 4.096V. (Lower Vdd can obviously be used but the noise performance will likely be worse).

The input divider is a 10K reference resistor to Vdd with the sensor connected to ground and the ADC is measuring the differential voltage across the sensor (rather than the reference resistor). The following are the voltages across the sensor for varying sensor resistances, and the voltage difference for a 0.1% change in resistance - the ADC needs to be able to resolve to better than that difference if it is to measure the sensor to a resolution of 0.1% across the whole range:

Rsensor (ohms)   Vsensor (V)   Change in Vsensor for 0.1% change in Rsensor (uV)
20000   2.731     909.6
10000   2.048   1023.5
10        0.0041        4.1

Problem is that the ADC noise in this mode, @8SPS, is probably around 3.5uV rms or 23uV peak to peak (the datasheet only gives noise performance for Vdd = 3.3V and FS = +/-2.048). An LSB is 62.5uV. That means that when the sensor is at 10 ohms the best the ADC can resolve is 1.5%.

Choosing 447ohms for Rref means the ratio Rref:10ohms is equal to 20,000:Rref maximises the minimum sensitivity across the range - the voltages now become:

Rsensor (ohms)   Vsensor (V)   Change in Vsensor for 0.1% change in Rsensor (uV)
20000   4.006      87.5
    447   2.048   1023.5
      10  0.0897      87.7

The sensitivity is now more balanced across the range but the ADC can still barely resolve 0.1%, and that it before all the other error sources including the ADC reference voltage drift (with time and temperature), the ADC gain drift, ADC INL and drift in Rref. The first two are specified as 40ppm/C max, most of which will be the voltage reference. Using an ADC which allows an external reference to be used (which would be the voltage across the divider, Vdd) eliminates most of that error as the measurement becomes ratiometric rather than absolute.

The reference voltage drift can be lagely eliminated by measuring the voltages across both the sensor and the reference resistor and calculating the ratio (which I assume is what you are suggesting). That increases the measurement noise by sqrt(2) but is probably worth doing.

The obvious solution to the resolution problem is to use a higher reference resistor value and use the ADS1115's PGA to amplify the sensor voltage when it gets too low. This introduces a new error source however - the PGA gain match between differing gains. Each gain can be calibrated but different gains will have different gain drift over temperature and time, which aren't properly specified. It also doesn't address the worse case ADC gain drift which isn't specified. The ADC noise, (3.5uV rms) doesn't appear to be any better at a PGA gain of x8 compared to x1, so this solution doesn't seem to work either.

Using a low noise opamp PGA resolves the noise problem but now more precision resistors will be required to set the gains which will drift with time and temperature.

If this is a one off then you can easily calibrate it at various temperatures, but if it is to be commercialised, a better ADC will be required.

Also don't underestimate the reference resistor(s) cost - 5ppm film resistors aren't too expensive but to guarantee long term drifts of < 0.1% probably means decent wirewound or metal foil resistors costing $5 or more apiece if you don't want to have to recalibrate periodically.

Personally I'd use a 24bit lower noise ADC - AD7793 modules are around $5 on ebay and very suitable for your application.
 
The following users thanked this post: mzzj, mycroft

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #21 on: September 20, 2019, 08:48:32 am »
I have achieved an accuracy that I'm pretty happy with (0.06%), just using the 'voltage divider' with a 10k resistor and measuring either side of the resistor. I will probably stick with that as a measurement strategy for now. I will have calibration in firmware.

Since I already have bought a couple of the ADS1115, I would prefer to stick with it and just read the two voltages and calculate from there. It doesn't have an external voltage reference however, is there a significant advantage of referencing the ADC to the voltage divider's voltage? Besides not having to calculate as much.

The ADS1115 has a PGA so the possible ...
Ah ok, I understand. That does make a lot more sense for the lower end of the measurements.

Thanks for the explanation!
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14072
  • Country: de
Re: Measuring resistance with high accuracy
« Reply #22 on: September 20, 2019, 09:16:10 am »
With a relatively low reference resistor, the worst case power consumption for the DUT and reference resistor can be quite high. With 500 Ohms reference and sensor this could be something like 5 mA * 2.5 V = 12.5 mW. This won't burn the resistor, but self heating could change this quite a bit, especially for the sensor.

The ADC internal PGA actually is only faster input sampling. So it will increase the input current at high gain. One the positive side, the internal PGA gain is quite accurate and stable.
With readings to compare the voltage over the reference resistor and the external resistor, most of the reference errors and also ADC gain drift are not relevant.
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #23 on: September 20, 2019, 09:33:35 am »
I have achieved an accuracy that I'm pretty happy with (0.06%), just using the 'voltage divider' with a 10k resistor and measuring either side of the resistor. I will probably stick with that as a measurement strategy for now. I will have calibration in firmware.

Since I already have bought a couple of the ADS1115, I would prefer to stick with it and just read the two voltages and calculate from there. It doesn't have an external voltage reference however, is there a significant advantage of referencing the ADC to the voltage divider's voltage? Besides not having to calculate as much.
Personally I'd use a 24bit lower noise ADC - AD7793 modules are around $5 on ebay and very suitable for your application.
I just had a look at this ADC, it looks pretty good! It also has an internal programmable current source that I could also use? Is there any reason not to go with that instead?

EDIT: just had a look at the internal current source specifications and it has a 200ppm/C drift and poor regulation and tolerance. So it's not going to be nearly as stable.
« Last Edit: September 20, 2019, 09:35:51 am by madwolfe »
 

Offline madwolfeTopic starter

  • Contributor
  • Posts: 30
  • Country: dk
Re: Measuring resistance with high accuracy
« Reply #24 on: September 20, 2019, 01:56:26 pm »
With a relatively low reference resistor, the worst case power consumption for the DUT and reference resistor can be quite high. With 500 Ohms reference and sensor this could be something like 5 mA * 2.5 V = 12.5 mW. This won't burn the resistor, but self heating could change this quite a bit, especially for the sensor.

The ADC internal PGA actually is only faster input sampling. So it will increase the input current at high gain. One the positive side, the internal PGA gain is quite accurate and stable.
With readings to compare the voltage over the reference resistor and the external resistor, most of the reference errors and also ADC gain drift are not relevant.

Very true - I'll keep that in mind
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf