|
CONTENTS Home Projects Electronics Graphics Java Java Mobile Android Other Stuff Resume Music Pictures Contact |
Tape Data RecorderMore electronics projects on mikekohn.net here. Date Posted: February 6, 2010 Introduction Back in the days when the Commodore 64 and Atari 400's first came out, most home computers would store and retrieve data from standard audio cassette tapes. Lucky for me, my C64 had a floppy disk drive so I never got to suffer through waiting for games to load off tape, but years later I thought it would be fun to recreate this system myself. So after completing the Sony SIRC Infrared project, it seemed like I could take this firmware and make some pretty minimal changes to make it record data on tape and read data off tape. Pictures
Explanation So to play tones on this project, instead of using the microcontroller to make the carrier frequency like I did in the SIRC project, I'm using a 555 timer chip. It probably would have been easier to just do this in the chip, but it's more fun to try something new :). On the receiving side I'm taking the output of the tape player and filtering it through an LM2917 frequency to voltage chip. Between the ATtiny2313 microcontroller and the LM2917 I used 2 NAND gates to buffer the output of the LM2917 and turn a 4v output to a logical 0v or 5v (so it's equivalent to the IR receiver in functionality). The NAND gate wouldn't react to the output of the LM2917 directly so I put a transistor in between. I'm kind of tempted to remove the LM2917 and try this with a little bridge rectifier type circuit or maybe just an opamp to rectify and amplify, and then a single capacitor to even-out the output. So the idea is to record bursts of 10kHz tones where the length of the tone decides what kind of bit it is. I chose 10kHz since audio cassettes seem to have a frequency range peaking at around 20kHz. I was originally going to use mini-cassettes but the frequency range of those seemed to peak around 3000 to 5000Hz. So the format I used was 7.2ms start bit, 3.6ms logical 1, 1.8ms a logical 0, and 1.8ms spaces of silence between. The data comes in Start Bit, LSb to MSb, and 1 stop bit. So because of this PWM format, the data rate and amount of data that can be recorded to tape depends on what the data is. I wrote two programs (included in the source code tarball/zipfile below) that can write and read files from tape. After recording a 2k GIF file it seemed to average 20 bytes per second. At this data rate one side of a 90 min tape (45 min per side) can hold about 52.7k. Not bad if this was 1970 :). One interesting thing I learned from this project. I almost never use bypass capacitors since everything I've ever done seem to work without them and it's extra hardware: costs money, waiting for parts if I don't have them, and more soldering. Anyway, one this project I found that whenever the 555 timer chip is oscillating, garbage is sent out on the RS232 line. I put a bypass capacitor on the VCC pin of the micro and this stopped it. I'm actually wondering if this capacitor belongs closer to the DS275 or the LM555, but it works on the micro so that's where it's staying for now. Source code
Copyright 1997-2012 - Michael Kohn
|