Temperature sensor with LM393 Comparator and NTC Thermistor

Thread Starter

q12x

Joined Sep 25, 2015
2,227
A little update. I changed with a new glass NTC but of 50K this time. I also put a 47k resistor to form a VCC*1/2 volt-div.
I still got a big shift, of 8*C at #2 and 2*C at #1. Dang. I was so enthusiastic for these new values. It didnt correct the shift.
At least I tried something new.
 

Ian0

Joined Aug 7, 2020
13,158
Note that the thermistors has a thermal time constant of up to 10 seconds, so the temperature needs to be perfectly stable for at least that long to get a valid reading. Also note that the thermal conductivity of copper is 400 times that of glass, so the thermistor is most likely telling you the temperature of its leads not of its case.
If you want consistent readings, enclose both thermistor and temperature meter in a thin plastic bag and place in a water bath.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
Note that the thermistors has a thermal time constant of up to 10 seconds, so the temperature needs to be perfectly stable for at least that long to get a valid reading. Also note that the thermal conductivity of copper is 400 times that of glass, so the thermistor is most likely telling you the temperature of its leads not of its case.
Yes, Im mentioning this detail about the glass as a thermic insulator in my movie there, I also modify it but... probably as you say, 10sec... although it did changed quite precise to those shifted values, most of times, especially when I didnt intervene, by blowing air for ex. Its a very strange phenomenon. I might make a very stupid mistake somewhere... but I dont see it yet. I still believe WE can make this thermometer very precise, WITH these cheap glass NTC thermistors. Im not sure they are the problem 100%, they are like 70 maybe... but I think there might be some unexplored doors for serious tweaking that we dont see them yet.
Im very curious how they do it on a regular, cheap thermometer, that usually has a COB (chip on board) or just a laser scratched uC. Hmmm....
I only want a very basic thermometer cct but with decent precision. What Im having and actually building one with 4 comparators, is very imprecise.
These things should be trivial ! Why aren't ? Very strange !
 

MrChips

Joined Oct 2, 2009
34,953
I am going to guess that TS means “non-linearity” when he says “shift”.

All thermistors have non-linearity.

Either eliminate the non-linearity with a compensation circuit or with software. Or get a linear temperature sensor.

Please stop calling it “shift”.
 

Ian0

Joined Aug 7, 2020
13,158
I am going to guess that TS means “non-linearity” when he says “shift”.

All thermistors have non-linearity.

Either eliminate the non-linearity with a compensation circuit or with software. Or get a linear temperature sensor.

Please stop calling it “shift”.
I'm guessing that the TS means the difference in measured temperature due to poor experimental technique.
 

Ian0

Joined Aug 7, 2020
13,158
Hi,
I would agree, the test rig set up, is not ideal for calibration checking.
E
You can only really calibrate at two points: ice water and boiling water. For the third point which is needed to derive B, I use the ambient temperature and try to keep it out of draughts. But mainly, I buy curve matched thermistors from a reputable source and trust the datasheet.
Because the temperature varies as the natural log of resistance, the tolerance of the resistance maps to a tighter tolerance of temperature.
 

Alec_t

Joined Sep 17, 2013
15,131
(By 'shift') I'm guessing that the TS means the difference in measured temperature due to poor experimental technique.
I agree. Having watched the video it's clear that the thermistor is being heated rapidly (by the hot resistor) but cools slowly to ambient temperature. The thermal gradient between the thermistor inner and outer parts will thus differ between heating and cooling, which likely results in a difference in switching points.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I agree. Having watched the video it's clear that the thermistor is being heated rapidly (by the hot resistor) but cools slowly to ambient temperature. The thermal gradient between the thermistor inner and outer parts will thus differ between heating and cooling, which likely results in a difference in switching points.
So you agree the shift is because of the glass. It might be. We can never be too sure. Remember that the other type NTC, like @Ian0 presented, did also showed this shift. So Im not completely sure its ONLY the glass that is creating this shift.
 

dl324

Joined Mar 30, 2015
18,404
So Im not completely sure its ONLY the glass that is creating this shift.
If you don't have your heart set on banging your head over this, you can switch to a transistor junction. Its time constant will be much shorter than 10 seconds and you just have to account for the voltage offset. LM35 takes care of this for you and the temperature coefficient is 10mV/C. If you don't already have some, a transistor junction makes more sense. I used an amplification of about 5.7 to get in that ballpark for the LM3915.

I couldn't find any LM3914, so I took a gamble and ordered some from AliExpress. If they work, I'll build a 0-100C thermometer circuit. What I have now is about that range, but the scale isn't linear, so I used Excel to get approximate actual temperatures.
 

schmitt trigger

Joined Jul 12, 2010
2,129
In the late 1990s I worked for a company who manufactured all sorts of electronic assemblies for appliances.
Relevant to this discussion was the fabrication of fridge and A/C thermostats. Back then, bi-metal thermostats were rapidly waning and thermistor based thermostats were far easier to obtain tight accuracy. We could produce almost 10,000 units per week.
The final assemblies were 100% tested against a bridge PT100 sensor, which was accurate to better than 0.1 degree C. Unless there was a defect, the untrimmed thermistor-based sensors would already agree to the PT100 within 1.5 degree C. And they would correlate no matter how many times they were tested. Trimming would bring the accuracy close to 0.5 C.
Mind you, these were not expensive thermistors, they were low cost catalog items from Vishay.

How did we achieve such tight correlation at an industrial scale? Easy peasy, the sensors were tested in a stirred liquid bath, made of equal parts DI water and glycol.
Conclusion for the TS: you are obtaining inconsistent values for the simple reason that your setup, from the thermal point of view is very, very poor.
 

MrChips

Joined Oct 2, 2009
34,953
Please don’t call it a shift. Nothing has shifted.
Call in error or deviation from reference data.

The thermistor has not shifted. The resistance is what it is supposed to be at that temperature.
It is your conversion to the expected temperature that is at fault.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
the sensors were tested in a stirred liquid bath
Very good.
Is confirming with my finding. I also find myself a page where I got a bit more information specifically for this MF58 thermistor I have here. And in it too is mentioning about a "bath" and "a test tank" and Im quoting them because they are exactly those words used. They are also mentioning something I was vaguely familiar (I know it but bury it in the past memory) that these are not meant to be tested in air because "accuracy bias" -their words. So in other words, my conclusion is they are meant to be used in a liquid or solid block. I totally forgot this detail.
I also searched for that B or beta -number- what it means, since no one here could give me a straight answer. It means the resistance of the thermal index (material coefficient) B value: 395 × 10 (K) representing the Nominal value in (Kelvin). This might sound weird because its auto-translated from kineza.
The next logical thing is to test them into a cup of water I guess. Hmmm...hahaha.
Please don’t call it a shift. Nothing has shifted.
But the reading is shifting and Im naming it correctly.
Please read my #61 post and all will be clarified.
In a large sense you are right and it is an error or deviation as you put it, but is also a too vague description of what really is happening. My naming is more on point.
you can switch to a transistor junction.
Yes, my good friend. I will in the end. But will remain as plan B for the moment since I have so many of these glass thermistors, I need to demystify them and know exactly when and where to use them. So far, Im making slowly but surely progress about their applicability, and the impressions here in the forum, are helping in this direction, so many thanks to all so far.
 
Last edited:

panic mode

Joined Oct 10, 2011
5,087
if you want stable reading you need to hit at least some of mentioned points.

first one is that sensor supply need to be steady and low noise. i see no regulator or any filtering.

the next is that thermistor are great, robust and very reliable but response is rather slow compared to alternatives. since the curve is known to be exponential, one can match it pretty closely using three points. but one can add more points as well. and this is why so many have mentioned MCU and lookup tables. since you are using comparators, setpoint voltages can be arranged to give you same response.

most of the circuit components are resistors. they need to be thermally stable. this means then need to be metal film or cermet, not carbon type. in this application carbon resistors are completely out of question. just test it yourself -connect any carbon resistor to your multimeter and direct some hot or cold air at the resistor. you will be probably be amazed how much they change and how quickly. then do the same with metal film resistor and compare results.

the self-heating was mentioned couple of times. to combat that one usually uses low current source or sink (50 or at most 100uA) or large series resistance or MCU to do periodic sampling very quickly and turn off sensor power between readings. if using analog approach, this also means signal is small and needs amplification. and that needs zero drift, zero offset amplifier. and unless you are ok with dual supply, you will want to avoid sensor connecting to GND. you probably want to float it up a bit and make virtual ground.

for example an automotive thermistors used in car seat heaters, are about 28k at 0degC, about 8k at room temperature and very little at higher temperatures. like all thermistors they are non-linear... and from what i see you are looking at temperatures in 50-70degC which is where values would be low. i do not know what thermistor you have. MF51 and MF58 are not a single products, each is an entire family covering products with different base value, different tolerances etc.

i agree about using correct language. but i would not use shift or drift to describe non-linearity. circuit can be non-linear and still have chosen point rock stable. and this would still apply to other points even if they are not spaced evenly. as stated before, in your approach one could linearize that by choosing suitable trigger level for all comparators.
 

MrChips

Joined Oct 2, 2009
34,953
If you want to use your glass thermistors, give us 10 data points of resistance vs temperature over your temperature range of interest. Then we can take it from there.
 

Ian0

Joined Aug 7, 2020
13,158
Very good.
Is confirming with my finding. I also find myself a page where I got a bit more information specifically for this MF58 thermistor I have here. And in it too is mentioning about a "bath" and "a test tank" and Im quoting them because they are exactly those words used. They are also mentioning something I was vaguely familiar (I know it but bury it in the past memory) that these are not meant to be tested in air because "accuracy bias" -their words. So in other words, my conclusion is they are meant to be used in a liquid or solid block. I totally forgot this detail.
I also searched for that B or beta -number- what it means, since no one here could give me a straight answer. It means the resistance of the thermal index (material coefficient) B value: 395 × 10 (K) representing the Nominal value in (Kelvin). This might sound weird because its auto-translated from kineza.
The next logical thing is to test them into a cup of water I guess.

But the reading is shifting and Im naming it correctly.


Yes, my good friend. I will in the end. But will remain as plan B for the moment since I have so many of these glass thermistors, I need to demystify them and know exactly when and where to use them. So far, Im making slowly but surely progress about their applicability, and the impressions here in the forum, are helping in this direction, so many thanks to all so far.
  • B doesn't measure anything. It is dependent on a purely arbitrary choice of reference temperature.
  • "Shifting": You can use whatever euphemism you like for "poor laboratory technique"
  • To calibrate the thermistor one would use a waterbath, so that it ensures that the thermistor is at the same temperature as the reference thermometer. In use, the thermistor is perfectly capable of measuring air temperature provided that the reading is not influenced by self-heating.
 

Thread Starter

q12x

Joined Sep 25, 2015
2,227
I used my hot air tool on the transistor and observed the voltage changing with temperature. I heated the transistor enough to go off the scale (lowest voltage determined by R6). Since LM3915 isn't linear, I didn't bother to try to calculate actual temperatures.
Whats the range of temperatures with your cct?
Can you set it at specific values? All I want is 30,40,50 and 70*C. Nothing in between, only these specific values. Can your cct open only on these values? I think it will swing through an entire range with a set minimum and set maximum, and it will open its outputs for each 1/10'th between these set values. Right? The best you can do is to catch the closest to 40 or 50 and set that as my point. Is how I see it.
 

Alec_t

Joined Sep 17, 2013
15,131
All I want is 30,40,50 and 70*C. Nothing in between, only these specific values.
If you mean, for the 30C example, its LED should be on in the range say 29.9C to 30.1C but otherwise be off, then that calls for respective window comparators for each of those specific values.
 
Top