I know for some point, people like myself tend to ask questions about the accuracy of sensors and readings.
Background of my setup:
1x LM35 sensor
2x 220 ohm resistors acting as voltage divider
measure temperature and voltage across the divider
I know people tend to use 5v*sensor reading/1024 to get the feed back voltage. And i know it is not accurate, after googling i have found this to get the real voltage reading, codes are here :
// Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate AVcc in mV
(adopted from http://code.google.com/p/tinkerit/wiki/SecretVoltmeter
and i have also read up some information about using the Aref in http://tronixstuff.wordpress.com/2010/12/07/tutorial-arduino-and-the-aref-pin/
So, lets keep it short, which method is better?
Thanks in advance!!