data interface A data store can be built using a domestic audiocassette recorder. David Smith describes an inexpensive, but reliable system. An interface is described which enables a standard audiocassette recorder to be used as a digital data store. The system is cheap to build, and can be used to check cassettes for dropouts before use. Tests extending over 7OOMbits have proved the system to be very reliable.
P-yEJFl Figure 1, Block diagram of the system
This system enables large amounts of digital data to be stored on an audiocassette recorder. The system is cheap to build and, although not rock bottom in cost, it has a number of advantages on other published systems, and is much cheaper than systems based on special digital cassettes. The performance and cost make it ideal for many mlcroprocessor applications. Provided the microprocessor system has a serial interface (as is used to interface to a Teletype, for example) the circuitry is simple and easily set up. The recording system will work without modification at any data rate up to a maximum (which in practice is a little above 1200baud with a normal cassette recorder). The recording system is FSK (frequency shift keying) so the response is derived from the signal integrated over a short length of tape. This system is therefore more tolerant of small imperfections in the tape; these would affect the individual flux reversals used in many systems. Using this system, the tape can readily be checked for such imperfections as dropouts, which would otherwise cause errors. Using the standard serial format of one start bit, an 8-bit word and two stop bits, 3 Mbits of data can be stored on a C60 cassette and over 4 Mbits on a C90. Tests in which more than 100 Mbits of data were recorded and retrieved have proved the system to be very reliable. Many articles have been published which describe other interfaces for audiocassettes, but these articles usually say nothing about the operational reliability of the system or methods of checking cassettes for dropouts.
The system works by recording and replaying tones. These tones were chosen to be in the audio range so that massproduced domestic cassette recorders coula be used. The system outline is shown in Figure 1. The modulator uses a voltage-controlled oscillator arranged to give a 4.8 kHz signal when the input is low and 6.0 kHz when the input is high. The demodulator circuit uses a phase-locked loop to provide the inverse of the modulator circuit function, and is set so that 4.8 f 0.6kHz inputs give a low output, and 6.0 f 0.6 kHz gives a high
University ofoxford, Parks Road, Oxford
vol2 no 3 june 78
of Physics, Clarendon
output. It is also biased to give a high output in the absence of an audio signal, so that on the blank leader and trailer tapes on the cassettes, and on unrecorded tape or when the recorder is off, the output is high. This biasing is important, as the rest state of a serial interface IS traditionally high or ‘mark’; thus when the recorder is stopped or playing blank tape this is interpreted as a rest condition The frequency shift is kept well below an octave, so that even in conditions of heavy distortion there should be no confusion between the upper fundamental and harmonics of the lower frequency.
The modulator circuit is shown in Figure 2. The input data is fed via a pull-up resistor to the input buffer which comprises ICs la and lb. Oscillator IC2 is set with RV2 to oscillate at 19.2 kHz when the data is zero. When the input is high, an additional charging path for Cl is provided by R2 and RVI which increases the frequency, and this new frequency is set by RVl to 24 kHz. The oscillator frequency is divided by four in IC3 so that a symmetrical square-wave output is generated at 4.8 or 6.0kHz; this IS attenuated to a suitable level and fed to the recorder. Figure 3 shows the demodulator circuit. The PLL (phase-locked loop) IC4 is set with RV3 so that it runs free at 5.8 kHz - a little below the upper working frequency. The locking time constant C4RlO is shown with values suitable for working at 1200baud. If the circuit is always used at a lower baud rate, this time constant should be Increased in proportion. The PLL output IS
$01 .OO 0 1978
IPC Business Press
filtered and compared in IC5 with the bias set by RV4. The bias is set to equal the PLL output for a 5.4kHz input, and the output of IC5 is buffered in ICs lc and l d to give data out at correct levels.
Many dropouts were found on standard cassettes, but none were found on the chrome oxide and ferrochrome cassettes checked (except in one old cassette where the
RECORDER AND CASSETTES
Audio slgnoI$ ~o Ond [r3m recorde~
The system was tried with stx different cassette recorders. Twc were old cheap machines; they had high flutter levels whtch were obvious to the ear or if output signals were Inspected with an oscdloscope. These did not function
I~/V~A~ betq~ L~ ~ \ 17es,
~; x....m(Q,~ 0 2
? ..... ~...... '
Figure 4. Cassette testing rig
, n ~ F
/ 4 F / 5 II
2 2 0 I~Jr~
V* I ~:
Figure 3. Demodulator circuit satlsfactonly with the system. The other four recorders all worked well two were inexpensive portables retailing at E40 or £50 (National Panasonic type 312 and Aiwa type TP -- 748), and two were stereo recorders with the channels connected m parallel. One of the stereo recorders gave some nngtng on the replay of the 4.8kHz wave. As the PLL responds primarily to zero crossings, nnging is likely to give trouble, so Jt was filtered out by loading the recorder output with a 10nF capaotor. Various cassettes were tried. Standard tapes showed several dropouts on most tapes and their use is not recommended. Chrome oxide and ferrochrome tapes appear much better in thls respect and well worth the extra cost. Using a stereo recorder to double the recording density is not recommended A mono channel is l.Smm wide; stereo channels are 0 6ram wide and are separated by 0.3mm There is a risk of cross talk, and a much greater risk of dropouts with the narrower track.
TAPE TESTING One advantage of this system ts that there is a simple method of checking the cassettes. The cassette under test is recorded with the data input to the modulator held low for the entire recording. On playback, the output should remain low, but if any dropouts occur the PLL would run free and give a high output. Figure 4 shows the orcmt of a rig built to check tapes. QI and Q2 act as a f l i p - f l o p set by the override switch and reset by a high from the demodulator. The f l i p - f l o p drives a relay which swltches the supply to the recorder. Thus if there is a dropout on replay, the f l i p - f l o p is reset and the relay cuts the supply and stops the recorder. The tape can then be vlsually inspected where the fault occurred.
edge of the tape had been damaged mechanically). Often tapes would trip in the last 10cm before the end splice: this was presumably the result of mechanical damage or contamination from adhesives from handling the tape at the splice. The first few seconds after a splice should therefore not be used.
SYSTEM TESTS The interface was coupled to an Intersil IM6100 microprocessor system that had been built with a serial interface for a Teletype. Some tests were made at 110baud, but for the majority of the tests the speed was increased to 1200baud. A series of incrementing 8-bit words was recorded, and the series repeated 21 o times for a C90 cassette. Thus a total of 21 s words or 221 bits of data were recorded, i.e. 2Mbits. On replay the series was checked, and any errors noted. In tests using cassettes that had been checked free of dropouts, the only errors that occurred in 50 recordings was one occasion when one of the recorder heads needed cleaning. Surprisingly this trouble developed suddenly: one cassette had just run without hitch, and the next logged thousands of errors on the second half of the recording. That recorder could then reread old tapes, but not record satisfactorily. Recorder heads should be cleaned regularly, but this had not been done in these tests. The heads of the faulty recorder were cleaned and the trouble disappeared. Apart from this one episode, over 100 Mbits of data were recorded and recovered without error. Observations on standard cassettes showed that dropouts can last several milliseconds. When they occur, several bits may be lost with the possible loss of synchronism in the serial interface. Tests showed that the time to regain synchronism varies with the data being read, but resyncronization can be ensured by leaving a gap of at least one word duration periodically during the recording.
CONCLUSIONS The tape heads of any system using magnetic tape for recording data should be regularly cleaned: this system is no exception. Tests have shown this circuit to give a very reliable method of recording data at a low capital cost.