Sampling audio from headphone jack.

I searched the forum and found this post http://arduino.cc/forum/index.php/topic,42833.0.html but I'm not able to reply to it.

I have a question in reference to the schematic on that page.

What happens if the "audio in" voltage is greater than 5 volts? Will the voltage going to the arduino still max out at 5 volts?

Thanks,
Bill

Yes. The internal ESD diodes in the ATmega will bleed off the excess (to a certain extent). Too much, though, and you risk blowing the chip.

You should attenuate the signal first if it's going to be too loud.

That's not what I wanted to here =(

Thanks for the reply

Do you think placing a 5.1 volt zener diode between the analog pin and ground would be enough protection?

That plus a resistor is a common way of protecting the inputs, yes.

The other thing you can do is just add a simple pot as a variable attenuator to turn down the volume :slight_smile:

Bill2k:
Do you think placing a 5.1 volt zener diode between the analog pin and ground would be enough protection?

No that only protects from over voltage, you also have to protect against negative voltages. Use a pair of rail clamping diodes.
See:-
http://www.thebox.myzen.co.uk/Tutorial/Protection.html

Thank you both for your help.