Commodore 1541 for TRULY Floppy Audio 5 1/4"

Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Mon Dec 19, 2011 11:09 pm

Hey everyone!

I've been watching this thread with interest as well as Jeri Ellsworth's video.

I decided I'd like to experiment with using the Commodore 1541 5 1/4" for truly floppy audio. To start with, I have disassembled two of them, and gotten rid of the useless, huge, transformer-based power supplies and the motherboard.

Next, I'm taking an information theoretic approach, trying to estimate record time, bit rate, etc.

The original motor speed is approximately 300 RPM. That means 5 revs/second or 200 milliseconds per revolution. There are 35 tracks, so total record time is approximately 7 seconds. Not bad! That's as long as a microdec, no? :)

Anyway, my friend and I were wondering about audio quality. From what I've read, the drive has 17 to 21 sectors per track. Each sector is 256 bytes. This means each track has between (17*256*8=34816) and (21*256*8=43008) bits on it. So, let's work with an average of 38kbits, b/c this is floppy audio, not a mars rover.

So one thing we may want to compute is the bit rate of audio coming off of the disk. It looks like it can stream data about 38k/.2 = 190kbps. Pity the good old C64 couldn't get anywhere that fast!

To estimate audio quality, I would like to plug this number into the Shannon-Hartley theorem which states that C = B*log2(1+S/N), where C = bitrate and B is bandwidth and S/N = linear signal to noise ratio. Note that by comparison, a CD player has a bitrate of approximately 750 kbps per channel, about 4 times better than a 1541!

What is the bandwidth, given: C = 190kpbs and desired S/N > 8-bit, e.g. 256:1? Well B = C/(log2(1+S/N), which is 190k/(~8) ~= 23.750 kHz! That's not bad!

Of course, that's only at 8-bit quality! What if we want, e.g. 12-bit quality? Then B = 190000/(~12) = 16kHz! That's not CD quality, but it's still the highest frequency many can hear! Woo-Hoo! This is encouraging.

However, I should add that this is only a *theoretical maximum* information storage limit. These limits are only approachable in the real-world using complex modulation schemes. I don't plan to do any of that! It's floppy audio, not a robot-guided stent.

On the other hand, the original drives had more bits on there for framing purposes, which means the bandwidth of the medium may a bit greater. It looks like they used 5 bits to encode 4, so bandwidth may be up to 25% greater (half a bit!) than base estimation.

Ok, that wraps up tonight's exploration. My drives are 10 miles away in my studio and I'm going to get a good night's rest. Here's the summary of my first exploration of using the Commodore 1541 5 1/4" floppy drive for audio:
Total record time: 7 seconds ( 35 loops of 200 milliseconds each)
Maximum frequency at 12-bit quality: 16kHz

--
http://diydsp.com http://diydsp.com ? http://diydsp.com !
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby guest » Tue Dec 20, 2011 9:49 pm

so what are the limits for analog recording
the floppy audio project reads and writes in analog
so its more a function of noise floor i would think
and tape isnt much better than -60dB
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Tue Dec 20, 2011 9:51 pm

Okay! So, yesterday I started considering some of the theoretical math related to audio quality when using a Commodore 1541 for audio. Prior to that, I had disassembled my 1541s and extracted only the drive part - no circuit boards or power supplies, etc.

Here are two photos showing what the insides of a 1541 look like. View these images separately in your browser to see as much detail as possible.

In the top view, you can see four plastic headers with different numbers of wires coming off of various places on the drive. From left to right, these are the 1. Stepper motor header, 2. Read/Write head, 3. LED Header, 4. DC Spindle motor. Note also the sliding drive head and and a small orange single-sided through-hole circuit board and the classic Commodore brown plastic drive window.

Top.jpg
Top.jpg (211.44 KiB) Viewed 17774 times


In this photo of the underside, notice the spindle motor and the stepper motor. Also, the underside of the read/write head is found in the center of the photo. The read/write read has two small components soldered onto it, a diode and a resistor (15k?).

Bottom.jpg
Bottom.jpg (243.04 KiB) Viewed 17774 times
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Tue Dec 20, 2011 9:58 pm

This is the stepper header. Since it has six wires, it's most likely a unipolar stepper, meaning that it can be controller with a simple circuit that uses four identical transistors - no H-bridge needed.
stepper header.jpg
stepper header.jpg (107.07 KiB) Viewed 17773 times


This is the LED header. It had six wires. One pair is for the front panel LED. The other two pairs were for the write tab on the floppy, I think. But who cares about stupid LEDs. Let's do some floppy audio!
led header.jpg
led header.jpg (104.03 KiB) Viewed 17773 times
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Tue Dec 20, 2011 10:15 pm

Ok, I admit that last post was a bit underwhelming.

Well I did that on purpose, but it's about to get fascinating. Here is the read/write head on the 1541:
read write head .jpg
read write head .jpg (205.41 KiB) Viewed 17773 times


Here is the header for the read/write head. If you are reading this and haven't read Macanulty's article on read/write heads on this forum, go check it out.

head header.jpg
head header.jpg (135.8 KiB) Viewed 17773 times


On the 1541, we are lucky because the header terminals are larger than the ones found on new-fangled 3 1/2" Steve Jobs-style diskettes. We are double happy because as you can see, the manufacturer has taken the time to clearly identify which of the signals is ground and which ones are for the heads. Just like Dan's drive, there are three heads. I don't know which is which yet. I measured their impedances and they came out to be: 14, 16.3 and 13.2 Ohms.

I started to wonder if these were maybe supposed to be roughly identical and I'm seeing manufacturing variations. After all, I assume they're supposed to be coils and they're small, so diameter must be rather small leading to variation in cross sectional resistivity? Who cares though, really! We're listening to ska Christmas carols and making *floppy music* here, folks.

Here is a close up of the diode and resistor which form part of the circuitry *right below the head itself*.
Make sure you right-click on this picture and view it in its own tab so you can see it with the benefit of high-resolution. I can see details here that I couldn't see with my bare eyes. Camera FTW.

head electronics.jpg
head electronics.jpg (179.08 KiB) Viewed 17773 times
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Tue Dec 20, 2011 10:30 pm

Ok, pay attention, this will be my last post of the evening... In it, I will reveal the most exciting thing I discovered about hacking on the 1541 today!

Yes, it has to do with the spindle motor speed! I don't recall how it works on other drives but the 1541 is kind of nice because, yes, you guessed it, it has a built in speed controller with feedback! yaaaay!!! That means that if we really decide to take this project further, it can go further because the pitch will be more stable from play to play! It's just too bad it doesn't matter a single iota, because we're just making floppy audio here, people. This doesn't tune atomic clocks or bullseye wombats from a T-15.

Anyway! The only problem is the wiring for this board is in Japanese! If anyone out there can read Japanese, can you please help me? I'm making an international plea for assistance! In the meantime, I have taken matters into my own hands and I'm reversing some of the traces through the transistor, etc.

So, here's the motor control board with the motor. Note the encoder terminals on the shaft returning to the board and Guess What else!?!? There is an adjustment pot!!! It looks like the motor speed can be at least finely-tuned, if not then coarsely!
DC control board with motor.jpg
DC control board with motor.jpg (126.79 KiB) Viewed 17771 times


Here's the bottom of the board that I've started to BACKTRACE.

DC control board with motor underside.jpg
DC control board with motor underside.jpg (172.01 KiB) Viewed 17771 times


The big question that's running through my mind now is "What is the third wire for on the Motor controller board?" Could it be power/gnd/enable or something like that? I think I should get some rest for now. Good night everyone, thank you for turning me on to this neat hobby.
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Tue Dec 20, 2011 11:35 pm

guest wrote:so what are the limits for analog recording
the floppy audio project reads and writes in analog
so its more a function of noise floor i would think
and tape isnt much better than -60dB


I believe Shannon-Hartley is applicable here. Generally, people use it to compute the bit rate of a noisy channel given the analog bandwidth and s/n ratio of that channel. I've applied it in reverse, saying that if the data rate of the channel was known to be ~240 kbps, then the product of the analog bandwidth and s/n ratio will be equal to *or greater* than that. We can't know how much greater from these calculations until we measure. It depends on the quality of the medium, the head and how much margin the engineers felt comfortable putting into the product :)

Anyway, there is a tradeoff between s/n ratio and maximum frequency. In order to know one, we must know the other, so I tried to find the frequency limits of tape and I haven't found any sources yet that give hard details.

I am dazzled by the various reported values. In this page: http://stephan.win31.de/tech_en.htm a German named Stephan says the dynamic range of cassette ranges from 50-56 dB from Type I to Type IV.

Here's what another guy says about frequency ranges:
A really good cassette deck will have a high frequency response in the range of 16-18 kHz using Type II tape. Metal tape can be as high as 20kHz, and normal bias form 12 - 16, depending on the tape deck and noise reduction used or not used.


Here's another guy:
[quote]
Specs for my ReVox B215 deck:
Type I : 30 Hz 18 kHz +2/-3 dB (Normal)
Type II : 30 Hz 20kHz +2/-3dB (Chrome)
Type IV : 30 Hz 20kHz +2/-3dB (Metal)
[\quote]

yet another estimate:
[quote]
Normal: 14 KHz
Chrome Dioxide: 16.5 KHz
Metal: 19 KHz
[\quote]

So anyway, let's compare the best and wost case possibilities:
Worst tape: Type I, 14 kHz bandwidth, 50 dB dynamic range. Estimated maximum bitrate is 14k*(1+log2(50)) = 93 kbps
Best tape: Type IV, 20kHz bandwidth, 56 dB dynamic range. Est. max birate: 20k*(1+log2(56)) = 136kbps
1541: Calculated bitrate = 5 rots/second * (19 sectors*256 bytes*8 bits =38912) * 5/4 (encoding rate) = 243kbps
CD: Computed bitrate = 44.1 k samples/sec * 16-bit per sample = 705kbps

As calculated in a previous post, given the rotation speed and data density of the 1541, the max bitrate is about 243kbps. So, we can see the 1541 has the *potential* to produce somewhat better quality than a Type IV cassette, but still not very close to CD quality (unless we triple the motor speed?! reducing the record time to 2.3 seconds?)

What this means for your original question about audio quality is that it depends on the bandwidth that we want to record onto the medium. In this model, the medium is noisy enough that at some bandwidth, we simply won't be able to read analog signals from it without a minimum of noise. For example, if we attempt to record full-spectrum information up to 18 kHz, then we compute the linear s/n of what we will be able to read back like this: log2(1+s/n) = 243k / 18k = 13.5 Since s/n is greater than 100, we can safely ignore the "1+" and say that we have a linear dynamic range of about 11586. Therefore, 20*log10(11586) = 81.2 dB @ 18kHz.

I believe the German guy's numbers may be a little pessimistic. There are many more details. For example, I believe the bias signal sucks up some of the bandwidth, too. If it's running at 40kHz, that's approximately double the bandwidth and s/n will go down by 6 dB to 75.2 dB. Another issue: the bandwidth of the cassette tape is not uniformly-spaced across the bands. Anyway, this should give some ballpark information about what to expect.
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby guest » Wed Dec 21, 2011 2:55 am

thanks for the teardown
those older drives seem a lot easier to work with

tape speed seems to be the main concern here
how fast is the floppy surface velocity versus a tape deck
a common casette is 1.875ips and gets around -55dB noise or so
and the bandwidth is pretty low
on my reel to reel at 15ips i get 18khz bandwidth
although i dont know the noise floor off hand
it is at least -60dB
running at 7ips gets 9khz bandwidth
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Wed Dec 21, 2011 9:43 am

Let's see... a spinning disk is not exactly the same as tape, but close enough, so let's try it. I mean, it's just floppy audio after all :)

8-bit floppy disk @300 RPM (5 RPS) @maximum radius of 5.25"

Circumference = pi*d = 3.14159*5.25 = 16.5". It's spinning through that diameter 5 times per second, so I believe it's 82.5 ips! That seems rillly fast compared to tape hahaha.

    Common cassette: 1.875ips (50-56dB, 15-20kHz bandwidth)
    Reel-to-Reel: 7ips gets 9kHz bandwidth, approx. 60 dB
    Reel to reel: 15ips gets 18kHz bandwidth
    1541 disk, outer diameter: 82.5ips, estimated bandwidth @ 18kHz is 75 - 81.2 dB
    1541 disk, inner diameter (est. 2.625"): 41.3 ips.

Oh! now that I've slept a little bit (on my couch, cat peed on the bed) I'm wondering if perhaps the third wire on the motor speed controller is an adjustment that changes the drive speed on the "radial extremes."
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Re: Commodore 1541 for TRULY Floppy Audio 5 1/4"

Postby diydsp » Thu Dec 22, 2011 9:13 pm

Well it was a long, busy day, so I didn't get to play with my 1541s today... but fortunately, it was easy to find the schematic diagrams for them thanks to all of the hardcore preservationists out there! :) Internally, my drives are model "1542."

This schematic answers a lot of mysteries, such as the components on the head and the pinout of the head!!!
It also shows the supply voltage for the speed controller is 12V, which is good to know :)

BUT this schematic also opens up some more questions about the head! It has complimentary "bias" and head inputs.

NEWTRON.GIF
NEWTRON.GIF (169.41 KiB) Viewed 17755 times
http://diydsp.com is where I teach people Do-It-Yourself Digital Signal Processing for music instruments and other applications.
diydsp
 
Posts: 21
Joined: Mon Dec 19, 2011 10:44 pm

Next

Return to Floppy Audio Project

Who is online

Users browsing this forum: No registered users and 1 guest


cron