How to read phone's output (headphones) with Arduino.

Hello,

is it possible to read the sounds which are output of my mobile phone with an Arduino Pro Mini?

I want to send simple sounds, not voice.

Thanks.

is it possible to read the sounds which are output of my mobile phone with an Arduino Pro Mini?

I want to send simple sounds, not voice.

Define "simple sound".

Hello,

thanks for the interest.

When I say "simple sounds", I mean sounds which are not hard to recognize, making easy the interpretation.

Basically, what I want to do, is to transfer data by sounds. Or "tones".

Do - re - mi - fa - sol - la - si
0 1 2 3 4 5 6

for example. I think the analogRead can give me information about the sound. But I don't know how to connect it...

thanks!

pd. I found that right now, maybe you can understand me now better. http://es.slideshare.net/wolfpaulus/android-arduino-and-the-headphone-jack
I want to do it, but making arduino the receiver and the phone the emitter. Can it be possible? How ? Thanks!

I think the analogRead can give me information about the sound.

I think it won't.

If you are sending notes at specific frequencies, there are examples around to read the frequency. They don't work for sounds that have multiple frequencies involved.

But I don't know how to connect it...

It? If you mean the headphone jack, then you have some issues to resolve, first. First, audio data is AC. Negative voltages into the Arduino are not a good thing. You'd need an op-amp to bias the voltage into the positive range. You may need to amplify it, too.

At first, thanks for replying so fast.

How can arduino send tones to a piezo and can't read that sounds?

How can arduino send tones to a piezo and can't read that sounds?

If you mean why is it that the Arduino can make a piezo make noise at a specific frequency, but can't read that frequency, then the question is misguided. It can read the frequency, when the input is a single frequency.

So, I can read single frequency tones with the Analog port of the Arduino.

Then, Can I connect phone's audio output to Arduino directly, and write/read single freq. tones from my android's phone to my Arduino? Which are those frequencies? How should I connect it? Do I need and AMP ?

Thanks a lot PaulS.

So, I can read single frequency tones with the Analog port of the Arduino.

No. It is done using a digital pin.

Then, Can I connect phone's audio output to Arduino directly

No.

So I can read the tone by a Rising Edge interrupt on digital pin 3, for example. Isn't it?

So basically there's a time where the pin is HIGH, and same where the pin is LOW. Then a different tone is played by the piezo, depending of the time between HIGH and LOW. Isn't it? Or how does it work?

Thanks PaulS!

pd. then they're square form waves. then I can use http://arduino.cc/en/Reference/PulseIn isn't it?
but how to connect it?

There is a library that measures frequency already. There is no need to reinvent the wheel.

And, no, the frequency library does not use pulseIn() to measure time intervals - way to slow.

Well, thanks a lot. I'd found that: FreqMeasure Library, for Measuring Frequencies in the 0.1 to 1000 Hz range, or RPM Tachometer Applications

Seems it's what I need. But, where can I find for building or buying the needed amp? I don't want to use sine waveforms, just square ones. as they're simpler.

I connected jack to arduino's pin 2 but seems there's so low voltage, and I can't catch it up. (always reading 0).

Thanks a lot PaulS!