Hi
I d like to know the maximum dc voltage that i can apply to a analog pin of an Arduino UNO , A0 to A5? is it 0-5V max?
when applying a voltage, is it right to connect the +ve from a regulated power supply to the analog pin and -ve from the power supply to the GND pin??
Emmanuel
Look at the 328 datasheet. ALWAYS do so. It specifies that voltage applied to any pin (except RESET) must be between -0.5V and Vcc+0.5V. Vcc is typically around 4.8-4.9V when powered over USB so yes, 5V is the maximum you should apply to analog pins (that gives a security margin).
If your board is powered correctly, yes, you can do what you describe, given that +Ve is not more than 5V from -Ve.
Connect a 10k resistor in series with the pin and you have some protection against mistakes. This limits the maximum current to a level the protection diodes can handle.
ok...thank you very much..will try your suggestions
But why would you connect the power supply to an analog input pin...... unless it's the voltage of the supply that's the subject of your measuring? Normally it's a signal from eg a temperature sensor like an LM35 that goes to the analog input, with 5V from (say) the Arduino output to the sensor's power in.