resistance to adc value

Bloody-orc

Senior Member
hi there. i have a graph of a thermistor on what temperature is what resistance. but how do i know what value will my readadc give if i connect the thermistor to picaxe adc input? resistance is 950- 4500 ohms.
 

manuka

Senior Member
Most Picaxe thermistor ADC uses a voltage divider, with the fixed R value ~the same as the NTC at 25°C. In your case maybe try 4.7k initially but it depends on the temps. you're most interested in. You'll then have to calibrate it yourself & produce a look up table of READADC values versus temp.

A DS18B20 is far preferred of course (if you can justify the higher cost). Stan
 

Bloody-orc

Senior Member
thanks for the reply. i was afraid i'ld have to do it but was hoping something bettter.

as for those cool digital sensors, well they cost like 10$ here (ntc is under 1$) and as i need more than one sensor i preferre to use thermistors.
 

Jeremy Leach

Senior Member
I agree with Stan. However it depends how accurate you need your results. You've got a graph, you know the series resistor value (even better, measure it), so you can work it all out with maths and create your own graph of ADCvalue against temperature.

Rt = Thermistor resistance
Rs = Series resitance
VADC = input ADC voltage

Assuming Rt connects to ground ...
[Rt / (Rt + Rs)] * VSupply = VADC

And VADC / VSupply = ADCValue/1023 (for ReadADC10)

So [Rt / (Rt + Rs)] * VSupply = [ADCValue * VSupply]/1023

Or ADCValue = [Rt / (Rt + Rs)]* 1023

So plot a new graph of ADCValue against Temperature by selecting a temperature, reading Rt from your existing graph, working out ADCValue with this formula.

 

xstamp

Senior Member
As a mid-price solution (£3 from Farnell Electronics) you could use an Analog Devices AD590 temperature sensor, which gives you a nice linear 1uA/C output. Simply place a 10K resistor across ground and adc pins and connect the AD590 between this input and +9 volts (supply need not be regulated). Using this two-component solution, the picaxe will see an offset of about 2.5 V at 0C. However, by using 10-bit adc measurements you should still have adequate resolution.

 

flyingnunrt

Senior Member
Is the resistance data on your thermistor correct?
The reason I ask is because the one I have goes from about 20 ohms at 125 deg C to about 1Meg at -20 deg C and is about 100k ohms at 20 deg C ambient. ie it is very logrithmic etc.
You could test your thermistor with a multimeter eg at freezing, ambient and at boiling points and see how it measures up.
 

Michael 2727

Senior Member
Hi Bloody-orc,

<code><pre><font size=2 face='Courier'>Some examples of Thermistor Resistance/Temperature resistances.

10K Thermistor was used here.

69K Ohms = -10 &#186;C
37K Ohms = 0.0 &#186;C - Freezing point of water.
21K Ohms = 10 &#186;C
13K Ohms = 20 &#186;C
10K Ohms = 25 &#186;C - Devices rating (10K NTC) is taken from here @ 25 &#186;C.
7K8 Ohms = 30 &#186;C
5K Ohms = 40 &#186;C Try to match the opposing resistor to the sensors
3K3 Ohms = 50 &#186;C resistance value at the temperature or light level
2K2 Ohms = 60 &#186;C you require, this gives a better &#177; Pot rotation.
590 Ohms = 100 &#186;C - Boiling point of water = 20mA current flow @ 12V. </font></pre></code>


I did some tsting a few weeks ago using a
10K NTC andcomparing it to a DS18B20.
Same setup as an LDR on an ADC input, just inserted
the NTC Thermistor in place of the LDR.

The result as follows -
Using a 10K pot to NEG and calibrating it
to equal the DS18B20 @ 80 DegC.
<code><pre><font size=2 face='Courier'>
Thermistor DS18B20
80 C 80 C
74 C 71 C
70 C 65 C
58 C 50 C
50 C 42 C
43 C 35 C
</font></pre></code>
The drift was about the same if calibrated
@ 25 Deg C and increasing the temp.

If you calibrate the NTC to a known temperature
Using a Pot you should get + or - 3 Deg C
with reasonable accuracy.
This may be enough for some non critical apps.

Michael
PS: the code I used was the one I posted on my
website that converts ADC from 0-255 to 0-99.



Edited by - Michael 2727 on 05/05/2006 13:47:35
 

hippy

Ex-Staff (retired)
One way of calibrating a thermister is to wire it up to a PICAXE along with a DS18B20 and drag it around to places with varying temperatures and log what voltage is returned for a particular temperature in data Eeprom. The program can print out all results so far via serial, say once a minute, so at the end of the sampling period, plug it into a PC, capture and analyse the results.
 

Bloody-orc

Senior Member
im using sensor- KTY81-210. so the graph is almost linear (the ends are a little curved).
i think i have to od some maths in excel with it.
 

premelec

Senior Member
I wouldn't call it 'problems' just considerations - calculate the power dissipation of the thermistor at voltage and current [p = V^2/R] and compare with dissipation constant for the thermistor. Normally you can keep it low enough to not be a significant factor. In the instance of using a thermistor to measure flow you intentionally heat it.... and, for instance, measure the power it takes to keep it at a constant temperature [= resistance].

If your thermistor physical size is large you can turn the power to it just before you measure and off right after and be assured of no self-heating temperature rise.
 

premelec

Senior Member
Yes... however normally to measure the resistance you have a series resistor with the thermistor or a current source - which then limits the maximum current. Otherwise with a negative temperature coefficient thermistor if you put voltage across it sufficient to heat it that makes the resistance go down causing further heating and more current etc.... this effect has been used to 'slow start' an appliance - when you turn appliance on with the thermistor in series thermistor heats up and puts more and more power into the appliance... I've see such used at the base of an incandescent lamp to lengthen its inefficient life [use LEDs and CFLs :)]
 
Top