Accurate indoor thermometer with a thermistor, general beginner questions

If I were to use that thermistor and an Arduino to make a thermometer, my approach would be to make a voltage divider with a 10K resistor and use the 5V supply as the voltage source and reference.

Then, the scale 0-100C conveniently divides into the 10 bit ADC range of 1024 steps, or about 0.1 C/bit and 5 mV/bit. This implies that the best achievable accuracy is 0.1%.

The thermometer will be most precise (maximum change in output per unit change in temperature) at 25C, where the resistance is 10K. The resistance change at that temperature is, from the data sheet, (10-8.048)K/5 = 0.3904 KOhms/degree.

The voltage output of the divider at 25C is 2.500 V (assuming calibrated 5.000V supply and ignoring component tolerances).

Interpolating the thermistor resistance table, the voltage output of the divider at 25.1C is 2.495 V, for a difference of 5 mV or 1 bit on the ADC.

That is the best you can do. Elsewhere on the temperature scale, it is impossible, using a 10 bit ADC, to even measure changes as small as 0.1 degree C, let alone demand that as the basic accuracy.

Of course, the thermistor tolerance is 1% at best, which translates into a resistance somewhere between 9.9K and 10.1K, or to about +/- 2 bits difference in the ADC output and ultimately to +/- 0.2 C at 25 C. That is one reason why one would have to calibrate the final result against an accurate thermometer.

Watch my YouTube Vid

i even include source code

Hope this helps.

Kris

Wawa:
Assuming you use an Uno...
Then you have a 3.3volt supply that is relatively clean/stable, provided it's not used for anything else.
And a stable (not precise) internal 1.1volt Aref.
Might be more stable than a separate 12volt supply and default Aref.
Leo..

But that would give an even lower ADC resolution.

ricky101:
Seem to be making a simple ntc circuit very complex, though as said you will not get full range accuracy, but few devices do anyway.

Suggest you first try out your ntc on a working circuit and then develop things from there; this one can give 0.1c accuracy with software improvements.

Ricky, the goal here is to create a more accurate thermometer than your average-newbie common one.
I did not read your code because I want to do it all myself to better learn the Arduino, however, I'm pretty sure no "software improvements" can compensate for inaccurate hardware.

Nick: I will probably order a few DS18B20s after the holidays and experiment with them, though in the meanwhile I would like to try to squeeze the most out of a thermistor (when they arrive). And thanks for the compliment!

Kris: Your video is nicely put but does not provide me with any new information (again, I stopped watching when it came to the code due to spoilers).

jremington:
If I were to use that thermistor and an Arduino to make a thermometer, my approach would be to make a voltage divider with a 10K resistor and use the 5V supply as the voltage source and reference.

Lets compare my circuit to yours:
yours - from 25 to 25.1: 5.625mV, mine: 8.584mV
yours - from 5 to 5.1: 5.074mV, mine: 14.392mV
yours - from 45 to 45.1: 4.130mV, mine: 4.234mV
(assuming stable 5V/12V and neglecting components deviation)

So, with the exception of the complexity, why is your circuit better than mine?


Also, I've been thinking about something else. This will probably sound like a crazy idea, Wile E. Coyote style, but I'd like to share it anyway.
Way back in college, when I was young, strong and my hair was still all black, I made a capacitance meter with an 8051 that was really simple, it's pretty much all explained here:
http://www.arduino.cc/en/Tutorial/CapacitanceMeter
but in principle, a capacitor is being charged to 63.2% of VCC and time is measured by the MCU. If we know the time and the value of the resistor, we can find the capacitance using the capacitor RC charge formula:
T = R*C

So this is what I'm thinking of doing: Get some 1% 10K resistors (I actually already have some, but they're dirt cheap) and 1uF 10% caps (because 10uF breaks the budget) and build the meter and test them. It's almost certain that I will find one that will be very close to exactly 1uF, then I will replace the resistor with the thermistor and Voilà, now I have a resolution based on microseconds (assuming I use this library) which is much higher.
Problems? Actually, there are a few... Biggest one is that I'm still using a 10bit ADC to measure the point that the charge gets to 1 Tau.
For the past day I've been struggling with math to determine if this way will be more accurate than the divider. Still working on it.

Ricky, however, I'm pretty sure no "software improvements" can compensate for inaccurate hardware.

There are ways software can improve hardware, for example with your ntc routine, what happens to your result if a spike is caused for whatever reason, eg lightning, power rail etc.
A selective averaging routine can eliminate these and other problems.

Think you also have to accept a device for what it is, while a simple, effective and cheap device I don't think you can class a thermistor as precision.

If you are looking for better accuracy then why not look at resistance devices built for that purpose like the Resistance Temperature Detector aka RTD PT100 /500/1000 sensors.

The DS18B20, fixed digital device, while good, seems a strange choice while striving of precision with ntcs ..?

C4lculated:
But that would give an even lower ADC resolution.

Uhh, slightly higher according to my calcs.
Leo..

So, with the exception of the complexity, why is your circuit better than mine?

A misconnected wire, wrong component or bad connection won't lead to destruction of the ADC or the Arduino by applying 12V.

jremington:
A misconnected wire, wrong component or bad connection won't lead to destruction of the ADC or the Arduino by applying 12V.

I think that's not relevant here.
Worst case is that the Arduino will be off and the thermistor is disconnected.
12volt - 0.5volt pin protection diode = 11.3volt. >> 11.3 / 39k = ~300uA will flow into the pin.
The pin protection diode will survive that.
Leo..

I'd like to thank everyone for the great suggestions. I've decided to wait for the hardware to arrive and then do a lot of reading and a lot experimenting. If it's been more than a month and I didn't update this topic, it probably means that I was overwhelmed and decided to cancel the whole project.

C4lculated:
I'd like to thank everyone for the great suggestions. I've decided to wait for the hardware to arrive and then do a lot of reading and a lot experimenting. If it's been more than a month and I didn't update this topic, it probably means that I was overwhelmed and decided to cancel the whole project.

Think you will now see that while many sensors can be very accurate over a small temperature range, covering a wider range can cause some deviations.

If it was so easy to have a wide range and accurate device for a few dollars they would be all around, but as you will see if you look in the catalogues you can pay several hundreds of dollars for quality thermometers.

Rather than overwhelm yourself, why not experiment with each type and see what level of accuracy you can achieve, its not just down to what devices you use, its how you construct and program them that has an effect on the end results.

Try a ntc, pt100, DS18b20, LM35 , DHT22 and even Infra Red sensors

Arduino /electronics is supposed to be a Fun hobby.. enjoy it !

Normally an NTC thermistor varies by aboout 4% per degree C - eg a '3950'

will vary by 3.95% for any 1 degree variation from where you are.

A typical one is say 4.7k at 25C. Though this absolute value may vary by a few percent, the
3.95% / C remains very accurate. So get an accurate thermometer, next to your thermistor, and measure it's value with a multimeter.. Reduce to 25 C by this equation and you have an accurate start point.

value of the thermistor is (25C value) ^ (1+(temp/C - 25))*1.0395

regards

Allan.

ps 1/ though a current source - integrator is a great idea for better resolution, don't use an electrolytic
capacitor ! their temperature coefficient is ghastly and unpredictable..... buy a polycarbonate or polystyrene.

Calibrate your integrator with a known value resistor - even a good cap will be +-5%, though very stable

2/ I've built one of these just using the on-board 10-bit ADC - the resolution with a 10bit convertor is
0.1 - 0.2 C from 0-50C

absolute accuracy - probably a lot worse.

Is this good enough?

I'll post the code if you're interested

regards

Allan.

WATER FLOW TOOLS

To maintain our water resources there are some latest technology has invented. The most of the water we use in our agriculture section while irrigation. Now a day, we can monitor the amount t of water store in the soil to help irrigators decide when and how much to irrigate. With recent advances in cellular telemetry and computer software, many new tools are available to monitor soil moisture and use that information to make irrigation soil moisture and use that information to make irrigation water management decisions.

Rezahannan:
WATER FLOW TOOLS

To maintain our water resources there are some latest technology has invented. The most of the water we use in our agriculture section while irrigation. Now a day, we can monitor the amount t of water store in the soil to help irrigators decide when and how much to irrigate. With recent advances in cellular telemetry and computer software, many new tools are available to monitor soil moisture and use that information to make irrigation soil moisture and use that information to make irrigation water management decisions.

This might be helpful and interesting 8 Best Types of Digital Water Irrigation Flow Meter Sensor

Water has been one of the most precious resources in the world,and more and more places are facing the problem of water lacking.Most of countries and areas have charged fees for water consumption.Agricultural irrigation always requires plenty of water for crops.Thus, a precise irrigation flow meter for DN50-DN100mm is essential to measure how much water has been used. Meanwhile, as agricultural irrigation has its unique application:irrigation flow meters may be carried for different of applications in different farm,so its weight shouldn't be too heavy.

WATER FLOW TOOLS

What has this to do with making an accurate thermometer?

Suggest you start a new thread.

Allan

allanhurst:
What has this to do with making an accurate thermometer?

Suggest you start a new thread.

Allan

No, it's a puppet show to promote the website.