Can Direct Input from AudioPort harm Arduino


I need to communicate to my Arduino Uno board via Android phones Audioport,

Now, just for testing reasons, I want to connect headphone jack directly to one of pins on Arduino and use them as input to read voltage in arduino use that value somehow (for example to control servo later).

So question is: Android phone outputs sound, creates voltage to pins - Can this harm or fry my Arduino board? :-D I do not know how much voltage can it withstand, nor do I know how much voltage outputs the audioport of phone. (but I guess not too much). Also, if and only if my idea sounds not that insane, how exactly should I connect it? I mean to digital ports or to analog? which wire goes where? Or there is no way to do it direct, and I need to do some circuit mambo jumbo in between?

You are not supposed to connect negative voltages to the Arduino… Your audio signal is AC, which means it swings positive and negative.

What kind of “information” do you need from the audio signal? Do you just need to know if the signal is present or not? Do you need loudness? Pitch/frequency?

"Can this harm or fry my Arduino board?"

Yes it can. It has +/- voltage on it. Arduino can only accept + voltage.

"I need to do some circuit mambo jumbo in between?" Yes you do. Get yourself a 10uF cap, two 10K resistors. Wire like this: +5V 10K audio out -- cap -- analog input - should sit @ ~2.5V 10K GND GND

Should see analog output swing 2.5V +/- ~1V.

Okay, that makes sense, thanks a lot! I'll get the cap and resistors and connect it that way.

Basically what I need in the end, is to communicate from audio port to arduino, and do as much as possible with software, as I am totally new to hardware.

I guess because the voltage will swing what I need somehow is to to amplify the sound to get desecrate values, and be able to send particular data to arduino. My Final goal is to have a scrollbar on phone that moves the servo on arduino.

So is the following correct? I output the sound the way I get average voltages with some specific numbers and use them as data? can I get some type of PWM signal with that? or I am in completely wrong direction here?

I am sorry that I do not know much about this yet, and maybe I say nonsense some time, but I'll try to make and understand as much as possible from what you guys can say :)

I would suggest having the phone output discrete frequencies, have the arduino recognize those. Or do bursts of sound with various intervals, might be easier to recognize patterns: beep - beep - beep - beeeeeep - beeeeeep - beeeeeeep - beep - beep - beep

Then go from pattern to servo control.

Thanks a lot! I guess I have a day of trying and failing ahead :slight_smile:

I am not sure though, I understood the circuit correctly,

audio out – cap – analog input

this part is clear, but,

the +5V and GND with resistors should both connect to wire between cap and analog input? I think I got this little part wrong. (Sorry)

There is a link you may be interesting:

and audio input/amplification:

You might be able to use the interval beep idea with some IR libs...

I would take the audio out, probably buffer it with an opamp first just for good measure, then rectify it with a diode, and use that as a pulsed digital input. IR libraries can do the work of translating timed sequences into discrete codes.

What I was describing was the right hand circuit here as drawn in Magician's 2nd link. Didn't have drawing capability at the time I posted.