Atmel Mega 328P ADC Temperature Sensor

Thread Starter

geofreyr

Joined Jul 25, 2017
6
Hi,

I am reading the internal temperature sensor of this chip and using the left-justify to read the 8 bit ADCH register and the output doesn't seem right.

The reading consistently sits at around 360mV. When I apply cooling to the chip it drops to around 355mV, and when I apply heat it goes up to around 370mV, so it appears to be working, but according to the datasheet for this chip, 314mV equals around 25C, therefore my temperature reading is something like 65C.

I am using the internal 1.1 voltage reference with an external capacitor on the AREF pin. I haven't done any other noise cancellation or calibration and the room temperature is less than 20C. Why is the temperature so high?

Thanks,
Geof.
 

be80be

Joined Jul 5, 2008
1,927
Most new AVR chips (used in the Arduino) have an internal temperature sensor. It is not often used, since it is not accurate
 

DickCappels

Joined Aug 21, 2008
5,873
"...the accuracy of the temperature measurement is +/- 10°C.", but you cite a temperature of 40° above ambient, so that leaves about 30° unaccounted for.

If your power supply voltage and clock rate are high enough, it might just be that the temperature of the die is 20 or 30 degrees over ambient. Please take that into account.

From the datasheet it seems to me that the temperature measurement feature is only there to tell you whether the chip is nearing melt-down, possibly from excessive loading, not to measure the ambient temperature accurately. I think that be80be's assertion that its not very accurate is somewhat of an understatement.:p
 
Top