19

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.

roman
  • 409
  • 2
  • 5
  • 9
  • 2
    http://electronics.stackexchange.com/questions/7715/best-method-for-sending-data-over-a-mono-audio-channel – Toby Jaffey Jan 23 '11 at 15:45
  • 3
    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 :) – AngryEE Jan 23 '11 at 19:52

4 Answers4

12

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.

Robert Harvey
  • 1,056
  • 1
  • 10
  • 22
Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
  • 2
    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. – Kellenjb Mar 05 '12 at 18:23
11

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.

Jim Rush
  • 211
  • 1
  • 4
  • 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). – roman Jan 23 '11 at 15:45
  • 3
    @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. – Jim Rush Jan 24 '11 at 12:14
7

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)

mctylr
  • 1,570
  • 9
  • 12
3

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.

  • 1
    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. – supercat Apr 08 '13 at 16:25
  • 3
    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. – Jerry Penner May 30 '17 at 16:35