Hi I have Arduino Mega, and I would like to ask if the borad has any Overvoltage protection on Analog input pins? What happend if I connect more then 5 V on analog input pin?
No, there is no protection. If you connect more than 5V on any I/O pin you are likely to damage the microcontroller. Small overvoltages (<5.5V or so) for short durations should be OK.
You can add avalanche diodes such as SP0503BAHT to the input pins to suppress transient over voltage.
But it won't help much if the input resistance is too low as these diodes are not able to handle high current for a prolonged period of time. For general signal input, it should offer sufficient protection.
If you connect too much voltage, it will damage the input, and possibly the whole chip.
Not only that, but you could damage other onboard components if the voltage is high enough.
the easiest way to protect you MC from over voltage is to use a voltage divider. Figure out the highest possible voltage on you input, then use 2 1% resistors to make a voltage divider, GND--r1--MCinput--r2--input_voltage; for example having max 10V input, then you need to divide by 2, so r1,r2 would be let's say 10k 1%.
Here's a link to my page talking about protection.
The 20R resistor is for over voltage spikes if they are going to be long standing over voltage levels make it 100R or so,.
What about using some thing like this? http://www.maxim-ic.com/datasheet/index.mvp/id/1084
I picked up some to test as a way to protect my finished projects from the out side world. Have not hooked one up yet.
It's a switch debouncer so not suitable for fast switching signals but great for slow stuff.