Thanks for your help! I made very good use of the epcos tool and
everything is working great now.
--- In AVR-Chat@yahoogroups.com, Ralph Hilton <ralph@...> wrote:
>
> On Thu, 19 Apr 2007 20:03:43 -0000 you wrote:
>
> >Does anyone know where I might find some example Winavr code for
> >reading the temperature from an NTC Thermistor Probe
> >
(http://www.epcos.com/inf/50/db/ntc_06/ProbeAss__B57020__M2020.pdf)
> >connected to one of the adc pins of an avr (atmega32)?
> >
> >I would also like to know how the 2 wire probe should be
connected.
> >Should one wire go to ground and the other to an adc pin? Or
should
> >one go to ground and the other go to an adc pin with voltage
connected
> >in line via a resistor? etc...
>
> The butterfly code was, I seem to remember, ported. I would check
AVRfreaks.
>
> Basically one has a lookup table like
> flash unsigned int ntclookup[69]=
> {774,765,755,745,735,724,714,703,692,
> 682,671,659,648,637,626,614,603,592,580,
> 569,557,546,535,523,512,501,490,479,468,
> 457,446,436,425,415,405,395,385,375,365,
> 356,347,338,329,320,311,303,295,287,279,
> 271,264,256,249,242,235,229,222,216,210,
> 204,198,193,187,182,177,171,167,162,157};
>
> And use it like
> ntc2data=read_adc(2);
> roomtemp=0;
> while ((ntc2data < ntclookup[roomtemp])&&(roomtemp<70))
roomtemp++;
>
> Epcos have a tool on their site somewhere for calculating all the
resistance
> values at different temperatures.
>
> The connection is from the NTC to ground and an ADC pin and a
resistor from the
> ADC pin to V+ .The value of the resistor would be around the NTC
resistance at
> the average operating temperature or the middle of the desired
temperature
> range.
>
> The Epcos tool puts the resistance values in an MSAccess database.
> You can get the values for the lookup table with an Access query
like
>
> SELECT Result.t, Result.r_soll, Int(([r_soll]*1024)/([r_soll]+10000)
+0.5) AS
> adcval INTO adcvals
> FROM Result
> ORDER BY Result.t;
>
> Replace 10000 by the resistance value connected ADC/V+
> --
> Ralph Hilton
> http://www.ralphhilton.org
> C-Meter: http://www.cmeter.org
> FZAOINT http://www.fzaoint.net
>Message
Re: NTC Thermistor Probe
2007-04-20 by jasonparkerhendrix
Attachments
- No local attachments were found for this message.