Fybertech Forums
July 22, 2017, 11:44:43 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: 06/21/08 - Fybertech: Forgotten History
06/13/08 - Fybertech: The De Novo Project, part 14
06/04/08 - Fybertech: The De Novo Project, part 13
 
   Home   Help Search Calendar Members Login Register  
Pages: [1]
  Print  
Author Topic: Floppy Disk Eraser  (Read 14286 times)
FyberOptic
King of Earth
Administrator
*****
Posts: 2520


Oh god what is that?


WWW
« on: March 29, 2010, 02:04:29 PM »

So, floppy drives have always been an item of interest to me. My ultimate goal is to read a 1.44MB floppy's contents using my own homebrew floppy controller. I haven't reached that point just yet, since I still have to create a PLL to keep in sync with the bit stream, not to mention decode the MFM, neither of which I've done before. But I did think up something recently which doesn't require that level of complication, and might actually be useful. And that's a floppy disk eraser! It came to mind when I found a ton of old floppy disks that I needed to erase.

To do it, I interfaced with the parallel port of the PC for now. That's definitely not fast enough to read or write to the floppy, but it's fine for controlling the signals to manipulate the heads and motor. I connected with 7 signals: the track 0 detection, drive select, motor enable, step direction, write enable, and head select. All are outputs except the track 0 detect, which you use to know when you've pulled the heads back all the way. The basic procedure is: select the drive, enable the motor, pull the head back to track 0, then for the next 80 tracks you activate the write head for both sides of the disk, waiting long enough for one rotation for each erase, then step the head to the next track. After doing that multiple times to cover the entire disk, you drag the head back to track 0, then deselect the drive.

Here's a boring Youtube video doing basically what floppy drives always do:

<a href="http://www.youtube.com/watch?v=-r3ieR6LStY" target="_blank">http://www.youtube.com/watch?v=-r3ieR6LStY</a>

The reason this works to erase the disk, despite not sending it any data, is because activating the write-enable line also enables the erase head. It's like writing lots of 0s to the disk, pretty much. Even the floppy controller in a PC can't make the disk this blank to my knowledge, because during a format it's writing track information back to the disk. We just leave the write data pin disconnected, and since the drive uses TTL logic, it should float "high" automatically. All the floppy signals are inverted, so that makes the data write pin indicate binary "0" all the time.

In the end, and after some math, I realized that it's not as fast as I had hoped. I found that it's probably about the same speed as ripping a floppy disk image on the PC, since there's a finite period of time required for the actual rotations to occur, so that the head can pass over the entire media. At 300rpm, that's 5 rotations a second, meaning a minimum of 200ms needed for each rotation. And you have to do this for both sides of the disk for each track. So even if you don't account for the time it takes to step and everything, the bare minimum time of erasure would be 32 seconds. Though I suppose if one didn't mind messing up the drive, you could make it spin faster!

For powering this particular drive, which requires both 12v and 5v, I used an external hard drive power supply, which has a standard molex connector. I rigged up a male connector onto the end of a string of connectors from an old dead power supply, which gave me the floppy power connector I needed.




I only took one photo, and this was from before I switched cables to one that didn't keep falling apart on me:




Lastly, here's the C code I wrote to make it happen.  It requires the inpout32.dll DLL for interfacing with the parallel port.  floppyclear.c


I might still interface this with a basic microcontroller sometime, then just add a pushbutton. Then you get a standalone floppy eraser. But you'd probably want to use one of the smaller 5v-only drives, like what they use in laptops, so that you'd only need one voltage rail to power the entire device.

So yeah, a simple little project. Might be a good learning experience for anyone wanting to understand the interface of floppy drives.  I would go into more detail on how they work in general, but I'll save that for another time!
« Last Edit: March 29, 2010, 02:10:41 PM by FyberOptic » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.043 seconds with 19 queries.