Thermistor simple measurement

Very simple Temperature (Celcius) measureent with Thermistor (10K) B25/100=4300 I got inspired from the above comment read in this article.

I bought thermistors from DigiKey 10K 5% at $1 each. I Wanted to get a fair temperature measurement without floating and complex math. Connecting to a Arduino as follow: Vref to 3.3v; analog-0 A0 through a 10K resistor and 3.3v. ; Thermistor A0 to ground. I get the temperature in Celcius as follow: Partial code: analogReference(EXTERNAL);
ADC = analogRead(0);
Th = 10000 / (1023 / ADC) -1; // 10000 is the fix resitor used in the divisor.
T = (775 - Th) / 10 ;

Accruacy is: +1 at 25C, +0 at 20C, -1 at 0C, +2 at -20C. You change the 775 constant to ajust closer to the desire range you want. For example, use 765 instead of 775 to get 0 error around 25C. As this is integer math, I added 5 to 770 before dividing by 10 to round off.

Thermistor-775-small.jpg

And what type is the variable ADC? If its int then you'll get truncation on the division (1023 / ADC) and if its float then you are using floating point...

The B-coefficient math isn't complex (for a computer), and gets you much more accurate results if your range is more than about +/- 3°C from your calibration point.