19
\$\begingroup\$

I'd like to pass some data over an audio cable (i.e from audio card to my cellphone) with a short cable.

I'm looking for some ideas for algorithms for achieving this. They of course should include the proper modulation technique to transfer the data over audio signal, so the cellphone could interpret it over it's microphone jack.

Ideas? ;)

(P.S - my current idea is using Biphase mark code. is it any good for this?)

Thanks.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ electronics.stackexchange.com/questions/7715/… \$\endgroup\$ Jan 23, 2011 at 15:45
  • 3
    \$\begingroup\$ I'm just getting a kick out of this question - it makes me feel so old. Back when I was a kid computers came with cassette drives to store data in an audio format. So yes, it is possible to transfer data over an audio cable and in fact it was one of the first ways to do so :) \$\endgroup\$
    – AngryEE
    Jan 23, 2011 at 19:52

4 Answers 4

12
\$\begingroup\$

Here is an example project using FSK: http://sree.cc/electronics/arduino-as-an-fsk-modem

An FSK modem basically convert a digital signal into analog signal or sound signal by frequency shift keying technique. Here we can make our Arduino as an FSK modem by uploading a simple code. This project produce and play a sound corresponding to a digital signal and demodulate a sound signal into the corresponding digital signal.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Can you give us any more context? These links by themselves should not be a full answer. In fact your second link doesn't even work any more. \$\endgroup\$
    – Kellenjb
    Mar 5, 2012 at 18:23
11
\$\begingroup\$

Consider using Baudot (specification EIA/TIA-825). It is the protocol used for TDD, a modem technology for deaf users. It transmits at 45.5 bits per second and deals well with poor audio coupling environments.

I've seen it implemented with some simple frequency analysis(window sampling/filtering at key frequencies) software. I know the Astrix project implements it so there may be some code to review if you aren't concerned with licensing.

\$\endgroup\$
2
  • \$\begingroup\$ thanks for the great idea. Do you know anything even simpler? I need to transfer about 4-8 bits of data each time, with some possible pause between them. (data bursts). \$\endgroup\$
    – roman
    Jan 23, 2011 at 15:45
  • 3
    \$\begingroup\$ @roman - For that amount of data I would just pick two easily distinguished tones to play and then apply a notch filter at each frequency and test the energy level. You could use two other frequencies that switch back and forth and use them as a clock. A quick search should get you a notch filter in nearly any language you want. \$\endgroup\$
    – Jim Rush
    Jan 24, 2011 at 12:14
7
\$\begingroup\$

Any particular reason not to use the modem that is likely already contained in your mobile phone?

Otherwise I would suggest your look at low-speed modem standards used for POTS (plain-old-telephone service/system) land-lines back in the 1980s and 90s. I suspect from Bell 103, 212 (300, 1200bps) to V.32 (9600bps) should be usable using the audio portion which I believe roughly the same as (US) Bell land-line standard of 300 to ~3000 Hz (corrected) frequency response plus/minus wireless digital voice codec issues.

300 bps via two-tone audio frequency shift keying (AFSK), V.21, is fairly easy to implement in software or hardware if you wish to roll your own. Otherwise a modem IC such as Silicon Labs SI2401 or CML Microcircuits FX/MX614 or CMX869B. (There are many others)

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I've used 300bps AFSK over a pair of FRS radios before. Works great! \$\endgroup\$
    – Brad
    Jan 24, 2011 at 17:18
3
\$\begingroup\$

If you have a very small amount of data, ( <= 4 bits ) you can simply use DTMF. Easy to encode, easier to decode. works great in noisy environments.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Hardware exists to decode DTMF, but in general I wouldn't say it's "easy" to decode. Encoding is not overly difficult, but it's not the easiest thing in the world. Decoding is comparatively difficult without specialized hardware. \$\endgroup\$
    – supercat
    Apr 8, 2013 at 16:25
  • 3
    \$\begingroup\$ Since the OP is looking for algorithms to use on his phone, specialized hardware is not needed. The phone already has enough computing power to decode DTMF into values. \$\endgroup\$ May 30, 2017 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.