Calibrate Thermistor

gdenehy

Member
Hi,
How do you calibrate a thermistor to read accurate to 0.1C?
I am using the EEPROM method and have calulated the Stein-Hart calculations etc, but the problem is a reference....
Without having a precise thermometer, how can you get precise reference points for the equation? If I had a precise thermometer, I would use that instead of making one!

I used and ice/water mixture to get 0.0C (it should be in equilibrium - although there was a little change in the values when it was stirred around, so it is probably not 100% accurate either)
I live at sea level so used boiling water as 100.0C

What can I use as the third point? I cant find anything with a reliable and safe boiling point.

I would like to measure accurately from about 0 to 100C
 

westaust55

Moderator
Firstly, I concur with Technical and you would be better using a DS18B20 temp sensor. They operate from -55C to +125C. The PICAXE includes commands specifically to work with the DS18B20.

Do you currently have a thermistor or RTD (resistive temperature device)?
Thermistors are generally accurate over a narrow band of temperature and are more typically used as a temperature switch as the resistance changes greatly (almost a step function) once a specific temperature is reached.

By comparison, RTD's are much more stable over a wide temperature range and using say a PT100 RTD you would find the formula which will involve a small correction over various temperature ranges - but your EEPROM idea would comensate for that.
 

gdenehy

Member
Firstly, I concur with Technical and you would be better using a DS18B20 temp sensor. They operate from -55C to +125C. The PICAXE includes commands specifically to work with the DS18B20.

Do you currently have a thermistor or RTD (resistive temperature device)?
Thermistors are generally accurate over a narrow band of temperature and are more typically used as a temperature switch as the resistance changes greatly (almost a step function) once a specific temperature is reached.

By comparison, RTD's are much more stable over a wide temperature range and using say a PT100 RTD you would find the formula which will involve a small correction over various temperature ranges - but your EEPROM idea would comensate for that.

I am using a Thermistor. And RTD looks a much better idea.
Only problem is, wouldnt I still need to calibrate it to get an accurate temp?
 

westaust55

Moderator
When you say "Calibrate" do you mean :

1. checking for minor errors in resistance, or

2. finding the resistance at a given temperature.

With an RTD there are tables available for the second.

A PT100 device wll be 100 ohms at 0 deg C. Think you will find the tolerance is very small. Have a look this table at:
http://www.mne.psu.edu/me345/Lectures/Platinum_RTD_100_ohm_table.pdf

also here:
http://content.honeywell.com/sensing/prodinfo/temperature/technical/c15_136.pdf


Again though, give consideration to a DS18B20 if there is a need to start again on a temp sensor.
 
Last edited:

gdenehy

Member
Surely when I connect that to the picaxe using a voltage divider or similar, my circuit will introduce errors, even tho they are not in the sensor?
 

BeanieBots

Moderator
To get better than 0.5C ACCURACY as apposed to resolution will cost $$$.
The DS18B20 is the most accurate and easy to use device in that price raqnge. Many 'modules' available for around £20 will show 0.1C resolution but will have typical errors of +/- 2C. (2 not 0.2). In addition, if they are battery operated, you can expect to see a 1C variation in the displayed temperature as the battery dies over time. The ones with a probe on the end of a length of wire have two further problems. If the probe is kept at a constant temperture and the module is heated or cooled, expect yet another varation of as much as 0.5C. This is because the reference and A2D is in the module and to a lesser degree, there will be some thermocouple effects at the probe connections.

Most, if not all, of the these problems are eliminated with DS18B20. You can use the ice/boiling water method to calibrate it further. It has a resolution of 1/16C with the ReadTemp12 command.

Platimum resistance offers the most accurate measurement but also relies on correct electronics. It is prohibitively expensive for "hobby" use.
 

BeanieBots

Moderator
I fit my DS18B20 sensors inside 1/2" length of 1/4" stainless tubing.
Plug the end with epoxy, once set, cover the sensor in epoxy and push in. I often fit a grommet to the lead end to offer some strain releif and/or cover the cable with tubing if they are to be immersed in water.

PT sensor + A2D + calibration = £250 ~ £1k.

By taking many samples you can average the DS18B20 readings.
I do this in my aquarium controller. I take 7 readings and sum them. I do that 7 times giving a total of 49 readings. I then add in a hardcoded calibration value giving a total of 50 readings. I then use that total to calculate a temperature which is CX100. That gives me a RESOLUTION of 0.01C which is adequate for the PID controller to work with and an absolute accuracy of better than 0.05C.
The tank has a moderate flow rate of about 400l/hour but even then, there is a temperature variation of about 0.05C around the tank so there is little point in trying to do any better.
This was designed before the one-wire commands of the 28X1 were available. Those commands would allow many sensors to start their conversions at the same time and then all be read in together. Otherwise each sensor would add 750mS to the loop time. If I did that project now, I would fit 2 (maybe 3) sensors in the same 'probe' and could probably dispense with the need for any calibration. Just rely on the spread of individual sensors to give around 0.1C absolute accuracy.
 
Last edited:

gengis

New Member
Peter Anderson gives some good info on using thermistors to measure temperature accurately.

http://www.phanderson.com/picaxe/picaxe_thermistor.html

Introduction.
This discussion deals with the use of a 10K negative temperature coefficient (NTC) thermistor to measure and calculate temperature. I have specifically focused on the Vishay / BC Components 2381-640-66103 bead type thermistor with axial leads and 2381-633-83103 glass thermistor with radial leads. However, the general approach may be used for any NTC thermistors.


Depending on the range and accuracy, you may not need a lookup table. Some time ago I had to come up with some 30 small "column heaters." For the thermostats I used a 10K Panasonic thermistor from Digi Key, linear comparator, and solid state relay.


To set the temperature I used a "digipot" (10K) U/D push button potentiometer. Just so happened that the pot and thermistor were in agreement over the range I needed, so the operators could just enter the temp. It was spot on compared to the calibrated mercury in glass thermometer they monitored the temperature with. It worked like a champ over the 37 -65 degree C range needed.
 

jcgalvezv

New Member
Peter Anderson gives some good info on using thermistors to measure temperature accurately.

http://www.phanderson.com/picaxe/picaxe_thermistor.html

Introduction.
This discussion deals with the use of a 10K negative temperature coefficient (NTC) thermistor to measure and calculate temperature. I have specifically focused on the Vishay / BC Components 2381-640-66103 bead type thermistor with axial leads and 2381-633-83103 glass thermistor with radial leads. However, the general approach may be used for any NTC thermistors.


Depending on the range and accuracy, you may not need a lookup table. Some time ago I had to come up with some 30 small "column heaters." For the thermostats I used a 10K Panasonic thermistor from Digi Key, linear comparator, and solid state relay.


To set the temperature I used a "digipot" (10K) U/D push button potentiometer. Just so happened that the pot and thermistor were in agreement over the range I needed, so the operators could just enter the temp. It was spot on compared to the calibrated mercury in glass thermometer they monitored the temperature with. It worked like a champ over the 37 -65 degree C range needed.
tried to use a NTC bought from Professor Anderson in a Li-Ion Battery charger and it didn't work for me. Compared to my Fluke 179 temperature sensor I noticed a difference of 2ºC at just 34ºC. My Fluke measured 34ºC and the Mr Anderson approach measured 32ºC. I sent him an email related to a possible mistake I found in his implementation but I didn't get a response to my question but to a typo I made.
 
Last edited:

premelec

Senior Member
jcgalvezv - it is very hard to be sure what you are seeing with the thermistor vs Fluke and which is accurate - are they both in the same stirred oil bath with incoming leads also immersed? :)

I just made a PICAXE 08M 2 x DS18B20 unit and even with similar leads and them tied together there is a considerable time constant difference between their readings which ultimately settle together... temperature measurement is an art as BeanieBots has indicted - however it's fun to learn the problems and how to overcome them... or live with them - stay cool! :)
 

InvaderZim

Senior Member
From what I understand of RTDs, they are sensitive, repeatable, and typically have a (minimized) linear error over a wide temperature range. That means that a point or two of calibration will get you an absolute result.

Why do you need absolute measurements? Most applications only require repeatability; accuracy is seldom a requirement to get something to work. As long as it works the same way every day, most people are satisfied (since they are tuning the setup in some way anyway).
 

gdenehy

Member
I build distilling equipment, so the absolute temperature relates directly to the % produced. If it is out by more than 0.1C, then it is not really useful
 

westaust55

Moderator
temerature sensors with 0.1C accuracy

Even the much touted DS18B20 in the microcontrller field has an accuracy of +/-0.5C over the range -10 to +85C (and greater error outside that range which you will be working in - you quote 95C) even though it's resolution is 0.0625C.

Short of using an Pt100 RTD and also buying a very high quality transmitter and having that calibrated you will not get 0.1C accuracy. Simpler transmitters on calcibrate at zero and span (ie at 100%) so there can be varying accuracy between these values. Even the high quality smart transmitters with HART protocol etc can drift over time and for certified applciations it must be recalibrated typically annually at a cost.

Put the 4-20mA signal from a transmitter into a PICAXE and you introduce more errors. The ttoal possible error componds the more components in the line.

What have you been using todate that gives you 0.1C accuracy over the entire range?
 
Last edited:

leftyretro

New Member
I agree with the ideas shared so far. Until my recent retirement I worked for 27 years in an oil refinery as an instrumentation analyst on process control.

Accuracy is a very complex topic and most people seldom understand all the variations and principles involved. Most accuracy specifications are pure marketing puff, never giving the context needed to describe and understand their published specifications. Absolute accuracy is seldom obtainable and always unaffordable.

We were more then please if we could obtain +/- 1 degree F measurement control even when using PT100 RTD sensors. And often we could not meet that objective due to process variation reasons. Good repeatability is more then enough for good control. The real laugh is that the large DCS display screens that the process operator would watch their process unit on were often programed to display in tenths of a degree, as if that fraction meant anything meaningful :p You think they would lets up reprogram the display to just show whole units? Heck no, they didn't want to lose ACCURACY :rolleyes:

As a wise old chinaman once said, a man with one watch always knows the time, a man with two watches is never quite sure ;)

Lefty
 

premelec

Senior Member
Lfty - if you stop one of the clocks at least you can be sure once a day :)

For distilling the proof is in the proof so empricism is in order as your placement of the sense unit in the apparatus will affect the reading/proof some anyhow... in short calibrate to the output desired using a stable sense element [thermistors are quite good - particularly in a glass probe glass encased bead] with stable reference voltages - or ratiometric A/D such as the PICAXE has. Your first approximation can be made with common methods and final calibration to desired output results... .1C resolution is attainable with a thermistor with reasonable non-linearity over a 2 deg range. When you are successful with the project you will have distilled functional knowledge...
 

leftyretro

New Member
Lfty - if you stop one of the clocks at least you can be sure once a day :)

For distilling the proof is in the proof so empricism is in order as your placement of the sense unit in the apparatus will affect the reading/proof some anyhow... in short calibrate to the output desired using a stable sense element [thermistors are quite good - particularly in a glass probe glass encased bead] with stable reference voltages - or ratiometric A/D such as the PICAXE has. Your first approximation can be made with common methods and final calibration to desired output results... .1C resolution is attainable with a thermistor with reasonable non-linearity over a 2 deg range. When you are successful with the project you will have distilled functional knowledge...
That is a sound method, and frequently used to fine tune a temperature controlled process. What you end up with is good control point based on a temperature sensor with good repeatablity. What you can't prove is an absolute measurement accuracy of +/- .1C and that was my main point. :)
 

gdenehy

Member
This is basically what I am doing now. Using a point that I know is where I want, and knowing what it should be. This is not giving me the accuracy I would desire, but as you say, it is adequate for control purposes.
You have answered my questions about getting that sort of accuracy - difficult and expensive! :)

Someone said 'thermistors drift'. Surely not by 0.3C in 2 weeks?
 

gengis

New Member
Thermistor don't drift a great deal. If you are encountering it, there is likely to be something hinky going on physically with the thermistor - moisture inside the element, physical strain on the leads or element, corroesion on the connections, etc.. or just some other error like stratification in the liquid media. Like others have said there's a lot of things to consider, accuracy, resolution, repeatablility, thermal mass (speed of change), lead resistance and connections, sensor placement, sampling errors and digital AD errors. One of the places I worked at had some calibration baths that had thermistors sealed in SS probes with 5 wire connections to the elements. The thermometer they were used with had an resolution of .001 degree and stated accuracy of better than .05 degrees, with a +/- .002 degree digitization error. So they can deliver deliver the goods with the proper equipment design. Self heating is something to watch for - if you pump current through them they heat themselves - your liquid bath and or thermal connections have to carry that heat away fast and in a repeatable way. Platinium RTD is considered the gold standard of temperature linearity, longevity, and accuracy. But the resistance change in a 100 ohm sensor is a few fractions of an ohm per degree.
 

InvaderZim

Senior Member
Accuracy is a very complex topic and most people seldom understand all the variations and principles involved. Most accuracy specifications are pure marketing puff, never giving the context needed to describe and understand their published specifications. Absolute accuracy is seldom obtainable and always unaffordable.
Amen to the "marketing puff." All accuracy claims for a sensor refer to a controlled lab condition with often undefined parameters, and also over a limited range of temperature, pressure, etc. The instant you get in the field, forget it: get two meters next to each other and it's over. The best you can hope for on a sane budget is 1) repeatability of one meter on several occassions, and 2) small meter-to-meter errors (if using multiple instruments). Us electrical guys typically have it good: voltage and current meters these days are absolutely exquisite compared to anything else out there.

We were more then please if we could obtain +/- 1 degree F measurement control even when using PT100 RTD sensors. And often we could not meet that objective due to process variation reasons. Good repeatability is more then enough for good control.
Absolutely! Repeatability is king for processes. Accuracy is for scientists and figuring your gas bill. And even scientists, after using verrrrrry expensive instruments, have to deal with the reality of a +/- uncertainty at the end of the day.

As a wise old chinaman once said, a man with one watch always knows the time, a man with two watches is never quite sure ;)
I have said that SOOO many times in the last year! It's also true: ignorance is bliss!
 

premelec

Senior Member
Be glad it ain't Julian clocks... :) Have we considered sundials? - once a day.

On thermistor stability - check manufacture's specs for drift - usually not bad for lower temperatures and glass coated types - more likely resistor drift - should use good metal film type or such - definitely not carbon composition or film types - and keep 'em out of the brew!
 
Top