How difficult is it to build a thermometer using a thermistor?

I have a couple of thermistors laying around and I was thinking maybe it's possible to use them for a thermometer project. I have a very entry-level knowledge about arduino and electronics, so please keep that in mind if you decide to help me figure this out. I think it might be more helpful if I ask specific questions that come to my mind about this, so...

  1. How accurate is a crude voltage divider? Is it fine to use a resistor and a thermistor to form a voltage divider or does the current draw make it too inaccurate to measure anything?
  2. What properties of a thermistor should I consider? I assume the rate in which the resistance changes in response to temperature? Do different thermistors have different range, response etc.? How should I go about measuring those properties using a multimeter or maybe arduino ADC?
  3. How can I calibrate it if I ever succeed in building it? My initial plan is to stick it to a metal container with melting ice for 0 degree celsius, and holding it above the steam from boiling water for 100 degree celsius?
  4. Is there anything else I should think of? Maybe I should use op amps somewhere in the circuit Read more about thermistors etc.?
    Am I making it too complicated in my head? I've seen people have done it on the internet with just a resistor in addtition to the thermistor, but honestly it looks too simple to be doing anything.

Thermistors have a non linear resistance change with temperature that is dependent on the material used. A simple two point calibration (0 and 100) will not work. You will need several points to build a calibration table.

You first have to calculate the resistance from the voltage change in the voltage divider. Next you need to convert the resistance to a temperature. This can be done with an equation specific to the particular sensor, or via a table lookup for the sensor.

I avoid thermistors in favor of something like a DS18B20 or an LM34 or LM35. The LM series have their own problems related to the lack of current source capability (this fault is hidden in one sentence deep in the spec sheet).

1 Like

Thanks for the quick reply.
Ok now I have a couple more questions:
Do you have any recommendations about reference temperatures between 0 and 100 degree celsius?
Does an equation already exist or do I have to create one? Maybe by taking multiple measurments and then building a curve etc.? Although I have only a vague idea that might be possilbe but I don't know of any mathematical methods or anything to form an equation from a curve or multiple points.
The only other thing I have at the moment is a couple LM35's but I don't know how to use them in the first place so I have no idea about the limitations

...Super easy to use, rated for 1/2 degree accuracy, and you can probably do better with calibration. LM35 datasheet.

The Arduino Uno's 10-bit ADC has a resolution of 1024 "steps" (1023 if you don't count zero). So that's about 0.1% resolution over the whole range. I believe the accuracy/linearity is plus-or-minus one or two counts, so it's pretty good. I'm not sure how much of that range you'd be using and you MIGHT lose some of that 1/2 degree of resolution. (I'll leave that calculation to you.)

You can get better digital resolution at low voltages with a lower ADC reference, and your software can switch automatically depending the reading you're getting at the moment. I've got an Uno in an application (not temperature related) that switches to the 1.1V reference when the voltage is below about 1V. (Of course, I have to account for the different raw-readings in the code.)

If you want to use a thermistor you can research the formula.

The accuracy & non-linearity of the thermistor isn't much of a problem. The "difficulty" is that a voltage divider isn't "linear". i.e. A 50% change in resistance doesn't result in a 50% change in voltage and it's a curve rather than a straight line.

Once you have the thermistor voltage divider formula, a straight-line calibration is a two-point calibration and it's based on the formula for a straight line (y = mx + b).

"b" is the "offset" (added or subtracted to get the correct reading) and it's normally calculated at zero, or the minimum. The the offset is done first because it shifts the whole line. (If the reading is perfect and no zero-calibration is needed, the offset is zero.)

"m" is the "slope" (a multiplication factor) and it's normally calculated at the maximum (or near the maximum). But it can also be done at the "the most important temperature" such as room temperature. Since it's multiplication it doesn't affect the already-done zero-calibration. (If the reading is perfect, the slope is 1.)

1 Like

Given a choice between a thermistor and an LM35, all other things being equal, I'd go with the LM35: far simpler to use and you can get temperature data with a single line of code.

1 Like

An equation does exist.
It is called the Steinhart - Hart equation.

1 Like

There are plenty of standard approaches (search for "curve fitting"), but for thermistors, there are on line calculators to fit the Steinhart-Hart equation to a couple of measurements you can make, using your multimeter.

This one works well SRS Thermistor Calculator

Many indoor and outdoor electronic temperature sensors use a thermistor as the sensor.

1 Like

Thank you very much, I guess this equation is what I'm going to use, and luckily it doesn't involve any calculus :slightly_smiling_face:
According to wikipedia I can use three know temperature points to find the Steinhart–Hart coefficients so I still need a third temperature reference point since I don't have the datasheet and it's just some random thermistors I found on my desk.

I looked up "curve fitting" and almost lost in the rabbit hole of the methods and libraries like numpy and scipy, etc. god bless Steinhart and Hart :slightly_smiling_face:
Also thanks for mentioning that there are alraedy products that use thermistors, now I'm more confident that it can be done.

Use your multimeter, a thermometer and some warm water for more resistance measurements.

I can't find the thermometer and I guess I have to buy one :slightly_smiling_face: I'll try my luck with LM335(which I initially thought is LM35) and post the results if it's succussful.

Using a temperature sensor is always better.

It is quite easy, I do it all the time. You need a reference voltage, or two voltage measurements, and a second resistor, similar in value to the base resistance of the thermistor.

Here is the page from ,y notebook that describes how to do it.

To implement this I usually measure and average the voltages over a few seconds. In my set up, with a 16 bit ADC and precision voltage reference, it seems pretty reproducible.

I use it to run temperature control loops and etc., and for all of those experiments, it is part of the recorded data. But, that said, no guarantee or warrantee of any sort whatsoever is given, implied nor anything else. You have to check it for yourself. Good luck, enjoy.

P/S Re Calibration:

  1. The base resistance and B are usually specified for the thermistor. I find those are usually pretty good. Note that larger base resistance means less susceptibility to other resistances in your circuit. Nowadays, I use a 100K thermistor.

(My analog input happens to have a 100K resistor to ground and my DAQ has a 2.5 precision voltage output, so it is all pretty convenient.)

  1. To calibrate, you need a ground truth reference that you are sure is better than your thermistor.

  2. Fitting a curve between your readings and your reference is easiest, fitting B is not to tough. Fitting R0 is a little tougher because of the logarithm. Try measuring it instead.


Nota bene! (And P/S to the above).

One think that I neglected to mention, is that I use an instrumentation amplifier to read the divider network. The very high impedance of the InAmp lets you read the divider without effecting the voltage you read in a discernible way.

From the number of posts about this on forums, it that connecting a thermistor divider directly with an Arduino input is popular misstep. The main reason is because the large resistor in the upper arm of the divider adds to the series resistor built into the analog input and lengthens the settling time for the sampling capacitor. A divider with a 10K thermistor is large enough that the sampling capacitor is not yet at the right voltage by the end of the sampling interval and converter sees the wrong voltage.

That said, if you dont happen have an InAmp, there is another very simple solution, with not too many part, and may have something on hand that will do it. Make
an opamp follower, it looks like this. You are reading slow voltages, so you can even breadboard it if you have to (and a bit breadboard noise is not a problem).

Think of this as one side of an InAmp in one key way, it gives you a high input impedance to read the divider, a low output impedance so that you do not effect the settling time (or more than enough current) for the analog input of the Arduino.

But also, remember the analog input still has its own internal 5k'ish resistor, so be sure to set a long enough sampling time, it may need a few usecs to settle to an accurate voltage reading.

First you have to be sure about the value of each thermistor (in ohms) and what type is it (I mean NTC or PTC).

For example you have a thermistor NTC 10k at 25 Celsius degrees. It means you have 10k at this temperature, this is a good point of reference in program for Arduino code. Be sure to use board analog ports by this application.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.