Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read data through iPhone audio jack

I am looking for a way to read raw data that is being sent from the Arduino through iPhone's audio jack.

I searched a lot and found this which detects whether a jack plug is connected or not but couldn't find any code to read the raw data.

Any help in this regard will be greatly appreciated!

Thanks.

like image 254
vivek takrani Avatar asked Mar 26 '17 07:03

vivek takrani


1 Answers

If the bandwidth of the incoming signal fits into the bandwidth of the iPhone's A/D converter (± 20Hz to 20kHz) you can read it.

You'll need audio jack to audio jack cable with Tip/Ring1/Ring2/Sleeve pinout (Balanced plug on the picture) on both sides (Tip/Ring/Sleeve (Conventional stereo plug) won't work).

enter image description here

The incoming signal will be analogue so you'll need to convert it (through Frequency-shift keying modem) to digital, this modem library should do the trick (I've used it to convert into digital, unfortunately I do not have my old project to share but it's tested):

https://github.com/jensmeder/FSKModem https://en.wikipedia.org/wiki/Frequency-shift_keying

Also take a look at this lib (Did you try it? Maybe it will help better in your case):

https://github.com/billhsu/jackDuino

Also check this out (Audio Jack Modem for iPhone):

https://www.sparkfun.com/products/retired/10331

like image 144
Oleh Zayats Avatar answered Oct 07 '22 01:10

Oleh Zayats