subjcet: Re-calibration of ATmega328's (Sn-X1) Internal Temperature Sensor using LM35 (Industry Standard Factory Calibrated Temperature Sensor) as a Secondary Calibrator.
1. Among 140 Arduino UNO Kits of the students, I monitored the temperatures (in 0C) of the following 51 Kits using the response equation ( T*104 = 2625h * ADCT - 2B7E01h; as per Atmel data sheet) which exclusively belongs to Sn-X1.
98, 98, 100, 98, 79, 74, 88, 90, 89, 96, 89, 73, 90, 101, 70, 79, 69,
82, 86, 89, 75, 84, 86, 79, 85, 93, 93, 92, 99, 94, 92, 96, 81, 94,
94, 94, 94, 91, 89, 89, 101, 86, 91, 80, 88, 98, 99, 85, 92, and 79.
2. Re-calibrated Data for the ATmega328 of Sn-X1 using LM35 Temp. Sensor as a Secondary Calibrator
VREF T0C of LM35 (1.1/10.24*ADCT) ADCT of ATmega328(Sn-X1)
1.1V 31.15 015Fh
1.1V 23.84 0157h
1.1V 18.26 014Eh
The response equation for ATmega328 (Sn-X1) has appeared as follows based on A(31.15, 015F) and B(23.84, 0157):
T*104 = 23B1h *ADCT - 2C2F92h.
Now, the ATmega328 (Sn-X1) shows ambient temperatures that are very much matching with LM35 compared to the previous response equation(T*104 = 2625h * ADCT - 2B7E01h) deduced based on Atmel data sheets..
3. Conclusion
The data of Step-1 clearly indicates that the gain and offset of the internal temperature sensors of all the ATmega328 chips are not the same. So, we need to calibrate each sensor separately before we use it. The calibration can be easily done using an LM35 Temperature Sensor which holds factory trimmed response equation (T0 C = 1.1/10.24 * ADCT with 10-bit ADC and Vref=1.1V). For two known temperatures (Say, Room Temperatures about 300C and 200C), we record the ADC counts (with Vref = 1.1V) of the ATmega328 and then derive the temperature equation as *T0C = mADCT + c.