From Electron Cloud
Revision as of 02:17, 30 September 2010 by Ecloud (Talk | contribs) (Created page with 'I have several old Teac FD-55GFR 5 1/4" floppy drives, and wondered if the steppers could be used for a miniature 3-axis CNC machine; it would be especially nice to re-use the co…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I have several old Teac FD-55GFR 5 1/4" floppy drives, and wondered if the steppers could be used for a miniature 3-axis CNC machine; it would be especially nice to re-use the controller boards as well, since they are compact enough to be practical. As an experiment I wanted to try to control them from a DLP Design DLP-2232 board which I already had handy. That's quite a versatile board - it connects via USB and can provide two logic-level serial ports, or a bunch of GPIO pins, and there are drivers for Linux, MacOS and Windows. I have used it in the past mostly for monitoring serial communications between microcontrollers: the connection between the micros is full-duplex (RX and TX lines) but with just one of these boards you can monitor both at the same time by connecting to the two RX lines of the two separate serial ports (and the TX lines on the 2232 go unused, unless you need to inject data somewhere).

To do bit-banging on Linux though, there is libftdi, which includes some example code. I started with examples/bitbang.c and went from there.

The other tutorials I've found about re-using floppy drives seem to focus on the PC end of the connection, so I was having trouble at first figuring out which pin on the drive's card-edge connector is "drive select". Going by this pinout you'd tend to think pin 10, but it turned out to be pin 12. All of the signals on that connector are active low, BTW.

So after making the wrong assumption at first, I connected all of the possible "select" pins to GPIO pins on the 2232, so that I could experiment and find out which one it was necessary to bring low. I did that by cutting some short wires, about 1/2 inch or so, stuck them into pins 6 and 10-20 of the "PC" end of a floppy cable, and then connected those to pins 33 and 35-40 on the 2232 board, which I had plugged into a solderless breadboard. Then I was able to "select" the drive, control the main motor (on and off), and step the head back and forth (there are 80 tracks on a high-density floppy, so you can step 79 times until you run into the limit on either end).

Then I was able to correct the wires I had soldered onto another floppy drive, and verify that it still worked. I found that the maximum step speed is about 1 millisecond per step, but only for short distances (e.g. 20 steps), and I'm not sure that it didn't miss any steps in that case. With 1.6 milliseconds per step it is able to seek from one end to the other more reliably.

Then I removed the board and stepper from that floppy, and verified that they can stand alone. It doesn't seem to mind having the other board with the main motor disconnected. Indeed, with no physical stop, the stepper can run indefinitely as long as you do not block the photo-interrupter, which normally detects that the head has reached the "track 0" position. If you let it step in a long loop, and then suddenly interrupt the light beam with a business card or some such, it will not allow any more stepping until you allow both the step and direction signals to go high, and then try again. So ideally when using these for a CNC machine, maybe it can be mechanically designed so that the photo-interrupter detects the end of travel of the axis, and the machine will be "safe" on at least one end of the axis: it will be impossible to go beyond that point. Or maybe two photo-interrupters could even be wired in parallel to the same pins.

The torque seems a bit weak though compared to the NEMA 23 steppers I have on my Sherline milling machine; it's not very hard at all to stop it with my fingers, even at slow step rates. But I still suspect the torque might be sufficient for a really lightweight mini-Mendel design. (After I get my first RepRap machine built, maybe I will try to build a mini one with floppy steppers.) These are relatively beefy steppers for PC floppies; some newer drives had wimpier ones, and 3 1/2" drives definitely have much smaller steppers. Also they run cool, so it might be possible to greatly increase the torque by using a higher voltage, or just using a modern Allegro controller chip with settable current limiting.