What is the max voltage allowed on the analog input pins of the arduino?
I believe the limit is set with reference to the Vcc voltage that is powering the chip, such as max analog input voltage = Vcc +.5vdc. There are internal clamping diodes that start conducting if the analog input voltage is one diode drop higher then Vcc or lower (negative) then ground. The AVR data sheet covering the device will cover all the maximum and minimum voltage limits.
Lefty
There are internal clamping diodes that start conducting if the analog input voltage is one diode drop higher then Vcc or lower
Yes but don't rely on those to protect you as it won't take much current before they blow. For better protection add external clamping diodes and a series resistor.
Those diodes are limited to around 1mA.
The last time this question came up someone found this spec in the
app note AVR182: Zero Cross Detector. On page 7 the
maximum current listed is 1mA.
(* jcl *)
The datasheet says the inputs should be <= VREF, but it's not clear whether exceeding that will cause damage, or just incorrect readings.
Note that that info is in the "Electrical Characteristics" section for the ADC, not the "Absolute Maximum Ratings" section. Also, it doesn't have the sort of "Vcc+.3V" qualification that the digital pins do: it just says "0-VREF".
Since the ADC is actually powered by AVcc, which is supposed to be the same as Vcc, I'm going to guess that clipping the inputs to Vcc will keep the magic smoke from being released from the chip. But, if I were making an actual product, instead of just tinkering, I'd definitely be calling Atmel for confirmation from one of their engineers.
Ran
but it's not clear whether exceeding that will cause damage
Yes it is because the data sheet says:-
Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent dam-
age to the device. This is a stress rating only and
functional operation of the device at these or
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.
Voltage on any Pin except RESET
with respect to Ground................................-0.5V to VCC+0.5V
Voltage on RESET with respect to Ground......-0.5V to +13.0V
Voltages below these absolute readings but above the Aref will just result in a reading of all ones being returned (that is 1023)