Pages: [1]   Go Down
Author Topic: Storing data in an audio channel  (Read 2482 times)
0 Members and 1 Guest are viewing this topic.
Smithfield, Rhode Island
Offline Offline
God Member
*****
Karma: 3
Posts: 843
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All...

I am trying to think of the best way to store data in the audio channel of a video recorder. My first thought is to use a chip like an XR2206 to convert a data stream to audio tones and just inject it into the mic input. I assume I'll need some impedance matching and level adjustment. I have been Googling with little luck, does anyone know of a reference circuit for something like this?

Also, would I use the Nyquist theorem to determine the maximum data rate I can encode in a 3KHz audio channel?

Thanks...
 
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27145
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nyquist says 1.5 Kits/sec. Need to  be able to capture a high and a low to reproduce the original data.
Mic input likely expecting +/- 1V signal ("line level"), I would think take your digital signal, divide it down with a couple of resistors, and run thru a 10uF polarized cap to remove the DC component.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 69
Posts: 2557
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As Crossroads shows Nyquist theorem basically says you need to sample 2x faster than your required sample rate. So turning it on it's head if you have 3KHz signal then expect to store no more than 1.5KHz data rate. You also need to take into account the encoding method you use as methods like SMPTE and Manchester will half that value again. For SMPTE a 1 bit is twice the frequency of a 0 bit.
Logged


Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the XR2206 is an awesome chip.  but you can probably just generate the tones with the tone() library.  what is your plan for decoding?  if you need a higher data rate you might be able to send a series of different tones, each representing a different value.
Logged

Smithfield, Rhode Island
Offline Offline
God Member
*****
Karma: 3
Posts: 843
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone, this is all very helpful!

For decoding in hardware I could use the XR2211. Years ago (more than I care to admit) I used the XR2211 and XR2206 to build a radio teletype (RTTY) terminal unit for my HF ham rig. Worked great. These days, such a thing is obsolete.

So at 1.5Kbit/sec (assuming a 10 bit byte for stop bits and such) I could store 150 bytes per second, which would do.

Decoding will (hopefully) be done by software that reads the digital video and extracts the data from the audio channel. This seems like the hard part.

Corssroads, I am a bit confused, were you saying I don't need a modulator chip?

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27145
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You didn't ask about modulate/demodulate (modem).   You might get better results with your approach.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the data rate you will get will depend upon the lock time of the PLL (XR2211).  this is typically set the by the lowpass filter time constant on the output filter, which is usually pretty slow.  a better estimate would probably be closer to 250bps.  always makes me impressed with 56kbps telephone modems.  also, why is the audio bandwidth of the recorder so low?  im assuming the 3kHz is the max frequency it can accept, and not the sampling rate, which means you can go higher than 1.5kHz (all the way to 3kHz).
Logged

Smithfield, Rhode Island
Offline Offline
God Member
*****
Karma: 3
Posts: 843
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Aren't most audio channels on video recorders, and other things not intended for high quality audio, 3 KHz?
 
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27145
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't know, never measured one.
You could try a simple test - use an arduino to make various test pitches, see what a video recorder with mic will pick up.
Simple high/low output loop with various delays.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34246
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Aren't most audio channels on video recorders, and other things not intended for high quality audio, 3 KHz?
3KHz is not high quality audio is is much less quality than you get from a telephone.

Basically you need a modem of some sort. The data rate is determined by the modulation method. A simple on / off of a tone will give a data rate the same as half the audio bandwidth. By having quadrature modulation and amplitude modulation on top of that you can extend the data rate to be multiples of the audio bandwidth.
Logged

Smithfield, Rhode Island
Offline Offline
God Member
*****
Karma: 3
Posts: 843
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basically you need a modem of some sort. The data rate is determined by the modulation method. A simple on / off of a tone will give a data rate the same as half the audio bandwidth. By having quadrature modulation and amplitude modulation on top of that you can extend the data rate to be multiples of the audio bandwidth.

Well thats good news, thanks! More good news is that the audio bandwidth is 48KHz per channel. Sadly, the bad news is that it records directly to a memory card and it uses AAC, which uses lossy compression. Grumpy Mike, do you know of a modulation technique that can get around lossy compression? I'm Googleing with no luck :-(
« Last Edit: August 10, 2013, 04:36:41 am by skyjumper » Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i made a mod/demod for transmitting data over the audio channel in skype (which uses lossy compression).  but, i found that it would drop continuous tones more often than varying tones.  so making sure the signal is chaging a lot might help.  dont send lots of FF or 00.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 69
Posts: 2557
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe a Barker code will do it.
Logged


Smithfield, Rhode Island
Offline Offline
God Member
*****
Karma: 3
Posts: 843
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Barker code looks interesting, thanks. I could also fill dead time with random data. I think what will happen is that the loss will reduce my mit rate, but I can probably find a modulation technique and data rate that works reliably.

Thanks everyone! This is very helpful...
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34246
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
do you know of a modulation technique that can get around lossy compression?
Sorry I don't, and I don't think there is one.
The problem is that any sort of lossy compression and ACC in particular works by removing:-
Quote
    Signal components that are perceptually irrelevant are discarded;
    Redundancies in the coded audio signal are eliminated.
It is this means you can never be sure how any audio is going to be treated.

Quote
so making sure the signal is chaging a lot might help
It is not as simple as that, it depends on if the changes result in a perceptually difference in the sound enough to pass the threshold of the encoder.
Logged

Pages: [1]   Go Up
Jump to: