I'm trying to calibrate a LM335. The spec sheet says it outputs 2.98V at 25degC. Which, I think, would mean that it the Arduino should read (2.98/5*1023)=610... However, it doesn't. When I was checking everything I measured the 5V output from the Arduino at 5.15V. So here are my questions...
Is it normal for the 5V pin to read 5.15V? Will it drop once there is a load on the board?
Should I use the 5.15V supply to power the LM335 (and change my expected value calculation) or should I build a stand-alone stable 5V power supply and use the ARef pin?
5.15V is "normal" in the sense that it's only 3% higher than nominal, which is quite normal for most regulators (which are +/-5%) and for USB (you didn't mention whether you were using external power or USB power).
It will probably not drop by too much with additional load.
The LM335 power supply doesn't matter since it is essentially a shunt regulator (you are using a resistor in series with it, right?) So powering it with 5.15V vs. 5V won't make a difference.
Hooking up AREF to a high-precision supply will make more of a difference. If you can construct a precision 5V supply for AREF, that would be a good way to go.
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons
I was taking power from the USB, and changing to a wall-wart gave me 5V on the nail. Ultimately I will built a precision 5V power supply, but the wall-wart will do for testing purposes.
As RC said, for a voltage devider the reference voltage is irrelevant, as long as you use the same voltage for the chip and the resistors.
A precision power supply is - well, if you enjoy it, do.
A good solution for compensating for changing supply voltage is just reading the value of the supply voltage with a tricky ADC setting. You will find the code somewhere in playground.
If the voltage is steady at 5.15 V I'd tweak the sketch to compensate for it.
The problem is that the LM335 will out put a fixed voltage for a given temperature no matter what voltage you feed it with (within its spec), the aref on the arduino takes whatever is on the 5V line.