Reading resistance very accurately

I want to use a three wire PT100 sensor with PICAXE - see diagram - (rather than DS18B20 as these are not accurate enough for my needs). The PT100 is a highly accurate resistance temperature sensor that is exactly 100ohms at 0.01degC and varies linearly with temperature.

The problem is, how to measure the resistance accurately enough. I want to get within 0.02 ohms which will give me a temperature accuracy of around 0.005 degC.

Does anyone have any ideas of what I would need to do to measure resistance to this accuracy with PICAXE please? As you can tell, I am not a whizzo with analogue electronics, so please go gently on me - short sentences, simple words :)

Threewire.gif
 

Goeytex

Senior Member
Picaxe ADC resolution is limited to 10 bits. That will give a maximum of 1023 steps. Assuming you are capable of producing circuit and board with precise temperature compensation for all associated components ...

If each step represents .005 degrees C then you might theoretically be able to make a controller/device that would have a temperature range of about 5 degrees and with a "resolution" of .005 degrees. If you have the electronics and programming skills, you might be able to extend the range using a "piecewise" method. e.g a 10 position range switch and or piecewise code that uses a different bridge circuit / op amp and different algorithm for each range of 5 degrees.

IMO, with a Picaxe, resolution could be .005 degrees within a narrow band, but accuracy will never be .005 degrees. This project would be a challenge for a seasoned electronics engineer and probably not doable for an electronics newbie. It most certainly could not be done on a common breadboard with cheap/common components where "cheap" is many times the main project specification and sub-optimal POS components are sourced from cheesy auction sites.
 

sghioto

Senior Member
You can't get that kind of accuracy with just the Picaxe and the sensor is not perfectly linear as the in the description here:

PT100 has a resistance of 100 ohms at 0 °C and 138.4 ohms at 100 °C.
The relationship between temperature and resistance is approximately linear over a small temperature range: for example, if you assume that it is linear over the 0 to 100 °C range, the error at 50 °C is 0.4 °C.

Steve G.
 
Thank you very much for your replies.

I don't really want to get into a "Why you can't do this" discussion, but firstly, I didn't say in my question that I wanted huge resolution resolution. Really, what I want is to be able to read the resistance accurately, to reasonable resolution and that is all (as it happens, I am not looking for a huge range, perhaps between 96 and 113 ohms).

Secondly, as far as the circuit is concerned, a three wire PT100 circuit, seems to be a Wheatstone bridge arrangement, which should be pretty immune to vagaries of circuits etc as long as lead lengths are carefully matched.

As far as the linearity (or otherwise) is concerned, there is a linearisation formula** which seems to be just to be a programming exercise.

So, assuming all other things being equal, does anyone have any good ideas how I can read resistance pretty accurately please? Perhaps not using the PICAXE ADC.

----
** Rt = R0 * (1 + A* t + B*t2 + C*(t-100)* t3)

Where:

Rt is the resistance at temperature t, R0 is the resistance at 0 °C, and
A= 3.9083 E-3
B = -5.775 E-7
C = -4.183 E -12 (below 0 °C), or
C = 0 (above 0 °C)
 
Last edited:

Goeytex

Senior Member
You cannot "measure" resistance directly. In simple terms resistance is extrapolated by supplying a current then measuring a voltage. Ohms Law. Picaxe does this with ADC. A PT100 with a simple wheatsone bridge and a Picaxe will not give you the accuracy you require.

TI and other companies make chips for use with PT100 / RTD sensors. Also look up "Instrumentation Amplifier".

I don't really want to get into a "Why you can't do this" discussion, but firstly, I didn't say in my question that I wanted huge resolution resolution. Really, what I want is to be able to read the resistance accurately, to reasonable resolution and that is all (as it happens, I am not looking for a huge range, perhaps between 96 and 113 ohms).
The "why you can't do this" discussion is inevitable, especially when incomplete specifications are provided, or when a Picaxe simply cannot do something. It also prevents sending someone down a rabbit hole only to emerge with nothing.

Provide complete and accurate specs up front and the discussion may be more to your liking. But there are no guarantees you will like the answers or replies.

96 to 113 ohms represents a temperature window from about -10C to about 35C depending upon PT100 type ( see the datasheet/chart) . So that's a range of about 45 degrees C. To get an "accuracy" of .005 degrees C (digitally, ie Microcontroller /Picaxe) the device will need to able to convert an analog signal of perhaps 0 to 5 volts into ~ 9000 bits of data where each bit represents .005 degree C.

If I wanted to do this, I would probably use an instrumentation amplifier, a 14bit ADC chip such as an ADS4149 and use a micro-controller that supported double precision floating point maths. But even then the "accuracy" would still probably less than .005 degrees C.
 
Last edited:

Reloadron

Senior Member
I really don't think you will attain the uncertainty you are looking for with a PICAXE or really any other micro controller very easily. Starting with the sensor all PRT 100 sensors are not created equally. You are talking an uncertainty found in laboratory grade sensors or primary and secondary reference temperature standards typically costing about $1,000 USD or so and that is just the sensor less the rest of the measurement plane. For example sensors like this have uncertainty that looks a little like this:
± 0.024 °C at –200 °C
± 0.012 °C at 0 °C
± 0.035 °C at 420 °C
The best systems I have ever worked with were about 0.01 Degrees C. systems and those were some expensive probes that were provided with calibrated curves. A Fluke 5615 secondary standard probe for example has a price range of around $500 to $1,200 USD depending on temperature range and calibration certifications. These are not your $50 USD probes by any standard and certainly not your $10 Chinese imports.

Next you get into the electronics and remainder of the measurement plane. Starting with the probe the errors are additive so the end results are only as good as the weakest link in the system. Then to maintain the high level of test uncertainty the overall system must be calibrated on a regular basis. This all gets into some very serious temperature measurement and not a project for the kitchen table. :(

What range of temperatures are you wanting to measure and what are the minimum uncertainties you can live with?

Ron
 

sghioto

Senior Member
(as it happens, I am not looking for a huge range, perhaps between 96 and 113 ohms)
Using a sensor current of 1ma as recommended gives only a 17mv range. As Goeytex mentioned you would need to convert that to a 0 to 5 volt range for max resolution. However you could simply amplify the signal 44X (using a 5 volt supply), that would increase the range to about 748 mv providing apprx 150 steps of resolution or about a + or -.16 degC accuracy at best. Using a lower reference voltage for the ADC might increase the accuracy also.

Steve G
 

Goeytex

Senior Member
Some Micros such as TI's MSP430 have 14-Bit ADCs. This may be something to look into as the dedicated ADC chip could be eliminated. But still .005 C accuracy is a stretch without spending thousands of dollars and months of prototyping and testing.
 

John West

Senior Member
I repair equipment for NIST, here in the USA, that can meet your specified accuracy requirements. It isn't simple and it isn't cheap. There are far too many variables you aren't taking into consideration.

So, " short sentences, simple words:" You can't meet your specified accuracy by building something simple. Sorry.
 

Reloadron

Senior Member
Thinking about this a little here is what I would suggest you think about doing. You don't mention a budget but a reasonably good approach with reasonably good accuracy would be to use what is commonly called a "Temperature Transmitter" which are made by a host of companies and pretty much all do the same thing. Using an INOR Temperature Transmitter as an example it will take care of most of the problems. They are programmable and handle RTD sensors quite well. Here in the US when I was buying ten or more the cost was about $70 USD per unit. With the numbers you mention, approximately -10 to 35 Degrees C you have a span of about 45 Degrees C which would be 4 to 20 mA passed through a 250 ohm precision resistor that gives you 1 to 5 volts so -10 to 35 degrees C = 1 to 5 Volts. Thus a span of 45 Degrees C = 4 Volts. You can process it as you wish. Another option is to simply purchase an instrument that will directly read your PRT. Instruments like the Omega DP 41E or Newport INF-B come to mind. They are both the same thing.

Nothing off the shelf that is inexpensive will provide you either the accuracy or resolution you desire.

Ron
 

premelec

Senior Member
@Adrian Hudson - take a look at Linear Technology Data Sheet for LTC2983 - it has useful discussion of Kelvin connections and reasonably accurate measurement accuracy with RTDs TCs and so forth - might help you with your considerations... also digital interfacing...
 

Dippy

Moderator
I agree with JW, but you may be able to get a reasonable resolution with an analogue front-end.

Like a lot of non-linear sensors (e.g. thermistors) you can have a pretty good go at linearising before you apply gain/offset and A-D.
Here's an example of one to analyse for the PT100:-
http://freecircuitdiagram.com/2010/01/16/analog-compensation-circuit-for-pt100-rtd-temperature-sensor/
(I cannot vouch for it and present it simply as an example).

Then applying gain/offset to stretch the V range over the ADC range you could then do a little bit of maths or lookup to fine tune. And obv your ADC reference needs to be bang-on.

As to whether you'll get consistent 0.005oC resolution (precision) let alone accuracy with budget kitchen-table electronics is another thing of course.

It'll certainly be interesting to see your results. Good luck with the mission.
 
Everyone:

Many, many thanks for your replies!

Regarding the figure I quoted of accuracy (0.005 C) - I wish I hadn't! I don't REQUIRE this accuracy, I simply meant that if I could measure resistance to 0.02 Ohms, the accuracy would be that figure - I was quoting a (rather old) magazine article on building DIY high accuracy thermometers using PRTs** - and a high accuracy multimeter. Apologies if I misled you all. In fact, on learning about the non-linearity of the PRT sensor, I think the magazine article itself was misleading, if not plain wrong.

I actually require only 0.01 C accuracy - resolution the same figure.

Anyway, thank you all again for your ideas, plenty to go on.

---

**the actual quote was "Using a high-quality handheld digital multimeter that can measure 1000 ohms [Must have meant PT1000 - although the article was using a PT100] of resistance to within 0.02 ohms amateurs can now resolve temperatures to within 0.005 degrees C."

Very misleading to the casual reader - no mention of non-linearity anywhere in the article.
 

AllyCat

Senior Member
Hi,

"... resistance to within 0.02 ohms amateurs can now resolve temperatures to within 0.005 degrees C."
But the article does say "resolve to" NOT "accurate to" and the difference can be enormous. Typically at least one and maybe two orders of magnitude difference between resolution and accuracy.

So IMHO your aim for "0.01 degree C accuracy" is still VERY ambitious. And how will you know if you've actually achieved it?

In practice a DS18B20 is likely to give just as good accuracy in a PICaxe environment and certainly should be included as a "sanity check" on whatever you construct.

Cheers, Alan.
 

nekomatic

Member
Can you give us any more detail about your application, and are you wedded to the 3-wire Pt100 for some reason or could you consider alternatives? 0.01 degC resolution is doable but for absolute accuracy of even a few tenths of a degree you are going to have to spend some money, not least on calibration (and regular recalibration). What's your budget?

The suggestion of a 4-20mA transmitter plus resistor is a good one, you might look at these for example: http://www.tcdirect.co.uk/Default.aspx?level=2&department_id=250

Another approach if small size isn't important could be to pick up a decent secondhand benchtop multimeter with serial interface - some of these are capable of 4-wire resistance measurements if you used a 4-wire probe, or you could look at a Pt1000 probe where lead resistance will make that much less of a contribution. I'm told that thermistors can be pretty much as good as PRT's over the temperature range you're talking about, though I've not used them myself and you'd need to deal with the linearisation function.

What's your application and what's your budget?
 

EPAIII

Member
Resistance can not be measured directly. There is no balance scale that tips due to resistance. It is measured by knowing two other quantities, current and Voltage, and applying some math called Ohms Law. R = E/I.

So, in order to measure resistance, to whatever degree of accuracy you wish (coarse of very fine), you need to apply a Voltage to the resistance element you are trying to measure and then actually measure both the Voltage across it and the current through it. Sounds easy, but it isn't. At a coarse level, it is easy. Volt meter across the resistance and an Ampere meter in series and bing-bang, done.

But as you want finer resolution, problems crop up in that simple scenario. That Volt meter that is across the resistance also draws some current in order to operate. Since the two are in parallel, that current will be added to the current in the resistance you are trying to measure so the reading on your Ampere meter will be wrong by a small, but perhaps significant amount. So your resistance calculation is also wrong. AND the amount of error will vary as the resistance varies.

This is ONLY ONE REASON why it takes some complicated measures to produce the degree of accuracy that you are asking about. Other problems would include the temperature of all the components in your circuit, any short and long term aging, power supply variations, random noise pick-up from the environment, etc., etc., etc.

If you have an independent way of measuring the actual temperature at many points along the range you are interested in, you may be able to construct a simple circuit and just calibrate it. But even there, I think you are going to be disappointed in the accuracy of the device over a period of time.

Oh, and consider, according to sghioto's post you are working with a 38.4 Ohm change for a 100 degree C range. That neans you have 0.384 Ohms per degree and you say you want 0.01 degree accuracy. So, you need to measure the resistance to better than +/- 0.00384 Ohms. I think the very temperature of your wires is going to be a major concern. Perhaps you can rethink this?
 
Top