Information based on SPRUD.de on the following URL: http://www.sprut.de/electronic/pic/projekte/thermo/thermo.htm
Schematic and Sample sketch for an KTY81-110 Temperature sensor on an Analog port @ the arduino NG
(Vcc 5+)--+-->2.7k--+-->kty81-110-->(GND)
| |
+->100nF--+-----> ADC0 (Analog Port 0)
Sample Sketch to read temperature on analog port 0 (ADC0):
float kty(unsigned int port) {
float temp = 82;
ADCSRA = 0x00;
ADCSRA = (1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);
ADMUX = 0x00;
ADMUX = (1<<REFS0);
ADMUX |= port;
for (int i=0;i<=64;i++)
{
ADCSRA|=(1<<ADSC);
while (ADCSRA & (1<<ADSC));
temp += (ADCL + ADCH*256);
}
temp /= 101;
temp -= 156;
return (temp);
}
float read_temp = kty(0);
print(read_temp);