Record digital data to audio recorder?

Thread Starter

prometei

Joined Apr 13, 2008
98
hi,

in the past audio cassette tapes were used to store digital data, games (atari,...) etc. I reckon the communication was at a low baud rate, few hundred bits per second. I was wondering if the same could be done with digital audio recorders that record at 44.1KHz?
 

Roderick Young

Joined Feb 22, 2015
408
It certainly would be possible with a low enough data rate. You could encode several bits into tones, and play them like 64th notes of music. For good data integrity, you would also put in some error correction. It's tempting to want to record at the 44.1 kHz sampling rate, but the problem would be that the device is built to process audio, and may not have the precision to record an arbitrary sample value each time. And syncing up to the sampling rate would be hard. Finally, if the digital audio recorder does any kind of lossy compression like MP3, then the original digital data would be corrupted if the data rate was too high.
 

Thread Starter

prometei

Joined Apr 13, 2008
98
I tried recording some serial data (UART) on two recorders at 600 baud rate, one was a Zoom H1 set to wav 44.1khz/16bit and the other was a Cowon D2 set to 256kbps mp3. I lowered the logic levels from 5V to a little below 1V with an opto-coupler and inverted the signal with a pnp transistor because UART idle is high and I don't think a constant dc off-set is good for AD converters.

I sent a few digits over the UART at 600 baud through a USB to TTL converter to the Zoom H1, it did not record anything, the input VU level meter did not even show that there was anything coming in. The Cowon D2 did record the data, but when I played it back and looked at it on an oscilloscope it looked totally messed up, an ac signal instead of a clean square wave.

So I'm thinking that my circuit need changing or perhaps instead of recording pure serial data streams (i.e. square waves), I should convert the data to some kind of tones and then when played back convert them back to square waves. What IC's are there for this purpose, if any?
 

Kermit2

Joined Feb 5, 2010
4,162
the digital to analog conversion,( your output ) is probably filtered. You would need to hack into the signal path before that point to get the raw digital signal. Maybe a different machine will offer a digital line out. Have you browsed the units by TASCAM?
 

Thread Starter

prometei

Joined Apr 13, 2008
98
the digital to analog conversion,( your output ) is probably filtered. You would need to hack into the signal path before that point to get the raw digital signal.
You mean the Cowon D2, since the Zoom H1 didn't even record anything. The Cowon most likely has something, plus it's recording in mp3 not raw wav.

Maybe a different machine will offer a digital line out. Have you browsed the units by TASCAM?
Actually I need this method to work with a Roland VSR-880 multi-track recorder. I want to use one of the 8 tracks to record specific sync and other digital data. The VSR880 has a coaxial in/out, although I'm not sure how that might work, gonna have to do some researching on the spdif format.
 

alfacliff

Joined Dec 13, 2013
2,458
audio cassettes used to be used for digital data, why cant you find any of the techniques used back then? and some of the cassettes were digital tape, made to saturate, unlike audio tape which is not allow to saturate due to distortion. some of the trouble you are having might be due to the bias, an ultrasonic signal recorded with the audio. the NCR c399 accounting computer used digital cassettes that looked like audio cassettes, but sounded lousy when used for music. the trs80 mdl 4 used a cassette tape at 1500 baud with regular audio tape.
check out "manchester encoding" for one method of recording digitalo data on tape.
 

MrChips

Joined Oct 2, 2009
30,806
Audio recorders are band limited. They do not go all the way down to DC.

It would be better to use a phase encoded signal. Google Manchester coding.
 

WBahn

Joined Mar 31, 2012
30,055
I tried recording some serial data (UART) on two recorders at 600 baud rate, one was a Zoom H1 set to wav 44.1khz/16bit and the other was a Cowon D2 set to 256kbps mp3. I lowered the logic levels from 5V to a little below 1V with an opto-coupler and inverted the signal with a pnp transistor because UART idle is high and I don't think a constant dc off-set is good for AD converters.

I sent a few digits over the UART at 600 baud through a USB to TTL converter to the Zoom H1, it did not record anything, the input VU level meter did not even show that there was anything coming in. The Cowon D2 did record the data, but when I played it back and looked at it on an oscilloscope it looked totally messed up, an ac signal instead of a clean square wave.

So I'm thinking that my circuit need changing or perhaps instead of recording pure serial data streams (i.e. square waves), I should convert the data to some kind of tones and then when played back convert them back to square waves. What IC's are there for this purpose, if any?
You can't directly record digital data because you can't record DC onto the tape. If nothing else, all of the intervening circuitry will be AC coupled.

You need to modulate the signal. A simple way to do this is to have your data be either 01 for a 0 or 10 for a 1. That ensures a transition at least once during each bit period. There are other schemes, as well. Not only does this create better spectral characteristics in order to record, but it also introduces artifacts into the data stream that can be used for synchronization during readback.
 

davebee

Joined Oct 22, 2008
540
30 years ago I used to have my Timex Sinclair computer store programs to cassette. It converted the data to audio tones, if I remember right, a pair of tones that an ordinary cassette recorder stored just like voice or music. A 44.1 kHz digital recorder will save tones perfectly well, with even higher fidelity than a cassette recorder, I'm sure.

If you did it this way, it would be up to you to make a writer that creates and sends an initial tone sync sequence of some kind, then reads data from memory and sends it as tones to the recorder. Then you'd need to make a receiver that knows how to wait for the special sync signal, converts the following tones back into data and writes that data into memory.
 

ErnieM

Joined Apr 24, 2011
8,377
The output of a "digital audio recorders that record at 44.1KHz" is digital data, and frequently captured on a device knows as a "compact disk" or CD for short.

While originally intended for music playback only they expanded into computers, and now a days all desktop computers come with a device to read digital data directly from this "CD".
 

Thread Starter

prometei

Joined Apr 13, 2008
98
while searching for more info I found out about the concept of frequency shift keying (FSK). With a modulator circuit I could encode low baud rate digital stream and then use two band pass filters to convert the analog audio back into the digital data.
 

Thread Starter

prometei

Joined Apr 13, 2008
98
One of the early methods of recording digital data on an audio cassette was the Kansas City Standard:
Yep, that's also FSK.

I'm also thinking of trying out OOK, On Off Keying, seems easier.
 

WBahn

Joined Mar 31, 2012
30,055
Yep, that's also FSK.

I'm also thinking of trying out OOK, On Off Keying, seems easier.
The problem with straight OOK is framing. If you have several zeroes (no signal) in a row then how do you know how many zeroes there were? If there were, say, six zeroes, the mismatch between your system and the tape might lead you to believe there were either five or seven.
 

Thread Starter

prometei

Joined Apr 13, 2008
98
If there were, say, six zeroes, the mismatch between your system and the tape might lead you to believe there were either five or seven.
Well doesn't the UART unit of a MCU take care of that? In normal MCU to MCU serial communication as long as the start and stop bits are in place it doesn't matter how many zeroes there in between.

I assume that the playback speed of my VSR880 digital recorder is constant. So as long as the demodulator circuit is fast enough and doesn't introduce too much distortion, it should be ok.
 

WBahn

Joined Mar 31, 2012
30,055
Well doesn't the UART unit of a MCU take care of that? In normal MCU to MCU serial communication as long as the start and stop bits are in place it doesn't matter how many zeroes there in between.

I assume that the playback speed of my VSR880 digital recorder is constant. So as long as the demodulator circuit is fast enough and doesn't introduce too much distortion, it should be ok.
It's not a matter of being constant -- it's a matter of being matched to the other end. The length of the frame determines the amount of mismatch that is allowed, so a UART that is going to be used with 10-bit packets does not need to be as tightly matched to one that can be used with 20-bit packets.
 

rogs

Joined Aug 28, 2009
279
Thinking a bit sideways.....touch tone (DTMF) is audio, and therefore easy to record on an audio recorder. You'd probably only be able to realise a rate equivalent to about 200 baud , but it is a very robust data format, and no framing issues to worry about.....
 
Top