Arduino Forum

Using Arduino => General Electronics => Topic started by: MrGarak on Sep 18, 2012, 09:50 pm

Title: Accurate resistence measurement without reference resistor?
Post by: MrGarak on Sep 18, 2012, 09:50 pm
Is it possible to get an accurate (say 0.05%) measurement of a resistor using the arduino, but without having to rely on a reference resistor? The best I have to work with right now is a 10k 1% resistor. I'm trying to use a 10k thermistor and would like to get an exact value for the 10k reference resistor. Unfortunately, I don't have a multimeter and I think that only something like a fluke 87 could give me an accurate reading anyway (from what I've heard the cheaper ones don't have as accurate an ohmmeter). I'd like to get an 87 but that's currently not in my budget at the moment.

I suspect this isn't possible, but figured I'd ask anyway.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: DVDdoug on Sep 18, 2012, 10:26 pm
Quote
Is it possible to get an accurate (say 0.05%) measurement of a resistor using the arduino,
No...  I'm not sure about accuracy of the ADC... can check ATmega specs for that.   But at 10-bits, the BEST resolution you can get at full-scale is 1/1023, which is 0.10%.   At lower ADC readings the percentage resolution of one bit is of course, worse.   As a measurement "instrument", I would not expect the Arduino ADC to be anywhere close to a real multimeter...
Title: Re: Accurate resistence measurement without reference resistor?
Post by: dc42 on Sep 18, 2012, 11:07 pm
I think you will find that the tolerance of your 10K thermistor is 1% or worse, so having a precision reference resistor doesn't help. If you want accurate results, you should calibrate the combination of thermistor and reference resistor against an accurate thermometer.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: MrGarak on Sep 18, 2012, 11:49 pm
Yea, I assume it's 1%. I just wanted an accurate reference value. I figured this wasn't possible due to the errors of the components involved (ADC, resistors, cheap multimeter). I do have another thermometer to test against but not sure it does much good if I can't get an accurate reading for the 10k 1% reference resistor.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: dc42 on Sep 18, 2012, 11:57 pm
You can get 0.1% tolerance resistors quite easily and cheaply, especially if you are prepared to use SMD components. See http://uk.farnell.com/jsp/search/browse.jsp?N=203968+110075262+110079727&Ns=P_PRICE_FARNELL_UK%7C0&locale=en_UK&appliedparametrics=true&getResults=true&suppressRedirect=true&isRedirect=&originalQueryURL=/jsp/search/browse.jsp%3FN%3D203968%26No%3D0%26getResults%3Dtrue%26appliedparametrics%3Dtrue%26locale%3Den_UK%26divisionLocale%3Den_UK%26catalogId%3D%26skipManufacturer%3Dfalse%26skipParametricAttributeId%3D%26prevNValues%3D203968 (http://uk.farnell.com/jsp/search/browse.jsp?N=203968+110075262+110079727&Ns=P_PRICE_FARNELL_UK%7C0&locale=en_UK&appliedparametrics=true&getResults=true&suppressRedirect=true&isRedirect=&originalQueryURL=/jsp/search/browse.jsp%3FN%3D203968%26No%3D0%26getResults%3Dtrue%26appliedparametrics%3Dtrue%26locale%3Den_UK%26divisionLocale%3Den_UK%26catalogId%3D%26skipManufacturer%3Dfalse%26skipParametricAttributeId%3D%26prevNValues%3D203968) for example.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: MarkT on Sep 19, 2012, 01:09 am
If you have one or more 0.1% reference capacitor(s), you might be able to measure resistance by measuring RC time constant....  You charge and discharge the capacitor via one digital output through the unknown resistor.  The voltage at the R-C connection is measured with an analog pin and the output inverted when the cap has charged or discharged a given amount (relaxation oscillator). 

So long as the time constant is fairly long you can get good accuracy (you only sample the voltage every 0.1ms or so with the ADC, so a time constant of 0.1s or more is needed).  Take 1/4 and 3/4 of the supply as endpoints, thats analog values 256 and 768, and you'll be switching outputs every 1.0986 x R x C seconds.  ln (3) = 1.0986

You'll have to allow for the output resistance of an output pin though.  And the fact that capacitors aren't as ideal as you might hope.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: retrolefty on Sep 19, 2012, 01:23 am
Best to keep the complete A/D accuracy thing in proper perspective before you take too much effort and time looking for perfect components.

The Atmel A/D accuracy specification from the datasheet is: 
Quote
• ± 2 LSB Absolute Accuracy

That's a pretty loose spec.

Your default reference voltage used in the A/D conversion is either the USB +5vdc or the on-board +5vdc regulator if using external power connector, neither which will be exactly +5.000000 and neither will they be the same.

The Arduino analog input pins are very useful for lots of things, but making high precision measurements is not one of them. External A/D chips with better resolution, internal voltage reference, switchable gain values all lend themselves to much better measurements if your application requires it.

Lefty
Title: Re: Accurate resistence measurement without reference resistor?
Post by: MarkT on Sep 19, 2012, 02:03 am
And I've just realised with my RC idea that it relies on the board having a quartz crystal, not a ceramic resonator, as its system clock.

Yet another reason to grizzle about the Uno's cheapskate clock source compared to earlier Arduinos.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: MrGarak on Sep 19, 2012, 03:23 am
I think the capacitor current idea would probably only shift the problem to "how accurate are the reference capacitor values" instead of how accurate is the reference resistance value. I have suspected the arduino's ADC wouldn't be up to the task of taking full advantage of a 0.1c accurate or better thermistor anyway. For whatever it's worth I was using the 3.3v and analog reference vs the 5V. Seems the only real solution is a fluke 87 or better to pin down the reference resistance value, and then a quality 12 or 16bit ADC to poll the thermistor. A third option, of course, is an integrated chip thermometer solution, I've had my eye on the SHT75 for that reason. No need to worry about calibrating those either since they're supposedly already calibrated. It just would have been nice to have some accurate thermistors employed in addition to that to get a more accurate average temperature reading.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: Docedison on Sep 19, 2012, 04:08 am
A Calibrated Thermometer isn't nearly as expensive as a Fluke 87 and for that matter neither is a Fluke 87 that accurate:
Resistance   
Maximum Resistance:    50 M?
Accuracy:    Fluke 83 V: ±(0.4%+1)
Fluke 87 V: ±(0.2%+1)
Maximum Resolution:    0.1?

From the data sheet at this URL:  <<http://www.fluke.com/Fluke/usen/Digital-Multimeters/Fluke-80-Series-V-87V-83V-87V-E2-Kit.htm?PID=56135 (http://www.fluke.com/Fluke/usen/Digital-Multimeters/Fluke-80-Series-V-87V-83V-87V-E2-Kit.htm?PID=56135)
And at $399.00 Much too Much overkill for an Arduino for it's other features and resources. Great accuracy requires many different things and the resistance measurement is just one.
An Arduino is capable of just that degree of accuracy however it requires some thinking first.

Doc
Title: Re: Accurate resistence measurement without reference resistor?
Post by: jackrae on Sep 19, 2012, 10:04 am
Out of idle interest, why would you want your thermistor temperature reading to be accurate to better than 1%.   There is much confusion about the measurement term "accuracy".

Accuracy relates to comparison against a national standard, which from the layman's point of view, is generally irrelevant.

What is generally required is "repeatability" not "accuracy".   A repeatable device means that several readings taken at different times of 'exactly' the same value will give repeatable results.   These measurements may not be 'accurate' but they are consistent.

Title: Re: Accurate resistence measurement without reference resistor?
Post by: MrGarak on Sep 19, 2012, 05:36 pm
Doc, retro, and others, thanks for the helpful information. The 87 I was planning on simply getting a used one on ebay when the time was right. You can usually get them for quite a discount and there are always ones up for auction. As for the reason, I'd ideally like my temperature sensor to be accurate to the tenth of a degree Fahrenheit. This is for a weather station project. From all my research on the matter, it seems the best I'll be able to do is ~0.2C (0.36F) accuracy , and that's with an integrated sensor package such as the SHT75. I did want to add a couple thermistors to complement the 75 (for backup and accuracy reasons), but it appears in order for that approach to be feasible I'd have to purchase a .05% tolerance 10k resistor for the reference, and either use a 12-16bit ADC alongside a 0.1% thermistor, or else use some type of multisampling solution to improve the arduino's native ADC resolution. Not sure if it's worth all that hassle, especially since they'd also each have to be calibrated too, and I'd have to use ones with known steinhart-hart coefficents or else an extensive thermistor table. The one I am testing with right now has no part number or anything so it's truly a mystery.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: JoeN on Sep 19, 2012, 06:47 pm

You can get 0.1% tolerance resistors quite easily and cheaply, especially if you are prepared to use SMD components.


I see Digikey has quite a good selection of through-hole ±0.1% resistors for 55 cents each / 42 cents each at 10 / 6 cents each for 5000.  Prices come down quite a bit if you need a a pile.   Just search 'Resistors' and modify the search criteria ("parametric search") for ±0.1% tolerance
Title: Re: Accurate resistence measurement without reference resistor?
Post by: dc42 on Sep 19, 2012, 07:25 pm
If you want high accuracy and resolution, I think you had best use a sensor module, such as the SHT75 you refer to. If 0.5C accuracy and resolution is sufficient, then the Dallas DS18B20 is an inexpensive choice.

Another possibility is the LM34, which if used with the Arduino's 10-bit ADC with Aref connected to a precision 2.5V bandgap reference (LT1019) will give you 0.24 degF resolution and uncalibrated accuracy of about 1degF or better.
Title: Re: Accurate resistence measurement without reference resistor?
Post by: Docedison on Sep 19, 2012, 07:44 pm
IF you need repeatable accuracy of .1d deg F you will need to use a Platinum RTD sensor, .3 Deg can be done with a thermistor or much better an Analog Device AD592... 1 degree is easily done with an LM34/6 and 2deg is easily done with a TMP36. There are resources in the Playground referring to calibrating or 'normalizing' a thermistor's output and there is a man named Anderson, P. H. Anderson who has a website and there you will find tables of data for normalizing thermistors as well as the calculations to do so. The AD592 is probably the best device overall for accurate repeatable and reasonably priced temperature measurements. I've attached data sheets for all three.

Doc
Title: Re: Accurate resistence measurement without reference resistor?
Post by: MrGarak on Sep 20, 2012, 10:06 pm
Docedison, I looked at the attached datasheet for the AD592, and it says it has an accuracy of +/- 0.5C and not 0.3c? So far it seems like the SHT75 is my best bet since it also measures humidity (whose accuracy is dependent on the temperature).

From an electronics standpoint, I was curious if I'm better off running cat5 to the sensors outside (which of course would be subject to the complications and limitations of the I2C standard) or if having a second arduino which would transmit serially over the cat5 is a better solution. My concern with a second uno outside is that the temperature changes to the uno board could affect the accuracy too. Also, two unos seems like overkill when it could all easily be done on one, but obviously I need that one inside so it can display information on an LCD screen. I would need to run a cable out regardless since the sensor measurement assembly needs to be fan aspirated to get accurate temperature readings.

Sorry for the wandering nature of this thread, if it's preferred perhaps a topic in the projects forum would be better suited to this discussion.