Go Down

Topic: Calibrate Temp Sensor (Read 1 time) previous topic - next topic

I am building a controller for a salt water reef aquarium that will turn on and off heaters, lights, fans, etc. based on the temperature of the water.  I'm using DS18B20 sensors and I have three of them.   In bench testing all three of them vary by up to 1 degree.  In addition they all show higher than my standard thermometer on the wall although I can't really vouch for it.

My question is: How do people "calibrate" the sensors?  I can vary the output in code to agree with the wall thermometer.  In practical use the temp should only vary by 3 or 4 degrees.  Is there a practical "known accurate" thermometer to be used for calibration?

retrolefty


I am building a controller for a salt water reef aquarium that will turn on and off heaters, lights, fans, etc. based on the temperature of the water.  I'm using DS18B20 sensors and I have three of them.   In bench testing all three of them vary by up to 1 degree.  In addition they all show higher than my standard thermometer on the wall although I can't really vouch for it.

My question is: How do people "calibrate" the sensors?  I can vary the output in code to agree with the wall thermometer.  In practical use the temp should only vary by 3 or 4 degrees.  Is there a practical "known accurate" thermometer to be used for calibration?


One method is to use 'known' temperature sources to validate/calibrate temp sensors. Boiling water (100C or 212F) and crushed ice baths (0c and 32f) are pretty easy standards to calibrate with, if your sensor is rated to the two temp values.

Other then that it's a "Man with one watch always knows the time, man with two watches never quite sure" situation.  :D

Lefty


mowcius

Yeah use something known - water is common to use for calibration but I might suggest that you simply make them all roughly the same as if you need them more accurate than a degree or two you probably have the wrong sensors for your application.

Mowcius

DaveO


Boiling water (100C or 212F)


That would be at sea level only. As your altitude increases, the boiling temperature is lower.

mowcius

Quote
That would be at sea level only. As your altitude increases, the boiling temperature is lower.

And that's only for pure water - what's your point?

retrolefty

Quote
My question is: How do people "calibrate" the sensors?


Having just looked over the datasheet for this sensor, I don't think the sensor has any internal method of calibrating the device. That would mean you would have to do that independently in your sketch by either adding or subtracting a calibration factor to the reading, and that assumes any sensor error is linear over your required operating range.

I guess a useful first step is to just run through a temperature range with the sensor using some other temperature sensor as a 'reference' and see what you have. Having worked in industry that dealt with calibrating process sensors I can say with pretty good confidence that words like calibration and accuracy need a lot of operational definitions applied before a successful plan can be applied. 

Lefty

liudr

The spec sheet (http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf) says accuracy is 0.5DegC.

It is a thermistor. From my past experience using $20-$40 thermistors, the interchangeability is 1DegC while accuracy is 0.5DegC or 1DegC. The spec sheet is not quoting interchangeability  ;)
You can't get better than around 1DegC. If you really want accuracy, you need a thermocouple.

Interchangeability: when two "identical" sensors are subject to the same temperature, their average difference in temperature reported.
Accuracy, when the same sensor is subject to the same temperature, the standard deviation of its fluctuating value.

So one sensor could keep reporting around 22DegC while another one keeps reporting around 23DegC. They are interchangeable around 1DegC.

I just checked here:
http://www.netstate.com/states/geography/mapcom/co_mapscom.htm

Seems like 5,000ft is the norm of lots of places in Colorado.

According to this:
http://www.csgnetwork.com/h2oboilcalc.html

Boiling point is 95DegC instead of 100 at that altitude. I think this is consistence with my memory. Most flat regions don't have to worry too much.

retrolefty

Quote
If you really want accuracy, you need a thermocouple.


At our refinery thermocouples were considered the cheaper solution for the vast majority of temperature measure points in our plants. However if the process required more accuracy we would use RTD sensors.  http://en.wikipedia.org/wiki/Resistance_thermometer

Quote
RTDs vs ThermocouplesThe two most common ways of measuring industrial temperatures are with resistance temperature detectors (RTDs) and thermocouples. Choice between them is usually determined by four factors.

What are the temperature requirements? If process temperatures are between -200 to 500 °C (-328 to 932 °F), an industrial RTD is the preferred option. Thermocouples have a range of -180 to 2,320 °C (-292 to 4,208 °F),[8] so for temperatures above 500 °C (932 °F) they are the only contact temperature measurement device.
What are the time-response requirements? If the process requires a very fast response to temperature changes--fractions of a second as opposed to seconds (e.g. 2.5 to 10 s)--then a thermocouple is the best choice. Time response is measured by immersing the sensor in water moving at 1 m/s (3 ft/s) with a 63.2% step change.
What are the size requirements? A standard RTD sheath is 3.175 to 6.35 mm (0.1250 to 0.250 in) in diameter; sheath diameters for thermocouples can be less than 1.6 mm (0.063 in).
What are the accuracy and stability requirements? If a tolerance of 2 °C is acceptable and the highest level of repeatability is not required, a thermocouple will serve. RTDs are capable of higher accuracy and can maintain stability for many years, while thermocouples can drift within the first few hours of use.

DaveO


Quote
That would be at sea level only. As your altitude increases, the boiling temperature is lower.

And that's only for pure water - what's your point?


"only for pure water" would be in the context of it boiling at 100c (at sea level).

Any water will have a different boiling point at altitude than at sea level, so this would need to be a known constant at the time and location of calibration, otherwise calibration would not be possible.

My point is, that it would be incorrect to try to calibrate a sensor to 100c using boiling water at 1000m altitude - kind of like the phrase "the blind leading the blind".

mowcius

Quote
My point is, that it would be incorrect to try to calibrate a sensor to 100c using boiling water at 1000m altitude - kind of like the phrase "the blind leading the blind".

That was kind of a rhetorical question - Although true, it would make minimal difference in the application. You may get a degree or so difference for the kind of temps in this application (if you're boiling water at ~5000ft) but as the sensors aren't that accurate it's a moot point.

Go Up