Documents

Tutorial - How to Use Disk Drive Stepper

Description
Tutorial - How to Use Disk Drive Stepper
Categories
Published
of 9
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  How to use disk drive stepper-motors Written by Tomi Engdahl Why to use components from old disk drives You might ask why use components from old disk drives. The answer is that disk-drives have many expensive components and you can get old bad disk-drives freely or very cheaply. They are good sources for following components with not much effort: 1. Small stepper motors and controllers 2. Optical sensors or microswitches 3. Accurately speed-regulated DC-motor 4. Useful accurate mechanic parts for small projects Disk drive interface description Power connector pinout  Normal floppy disk drives use normally +12V and +5V power supplies. They can load each power-line with current of less than 100 mA up to even more than 1 A. That depens on the model of the disk drive. Here is the power connector pinout when you look the CEE-type connector on the drive back:  _______ / \ | 1 2 3 4 | |_________| Pin Function 1 +5 V 2 Ground 3 Ground 4 +12 V Shugart disk-drive interface The following table shows signals of the most commonly used floppy disk drive computers. The pinout is somehow de-facto and the use of certain signals may be different in various systems. This interface is used in both PC and Amiga computers, but the use and handling of various signals are different. Anyway those signals are always TTL-level signals. Pin Function 1 GND 2 High density select 4 Head load / In Use, Eject 6 Drive select 3 8 Index pulse + 10 Drive select 0 / Motor on A 12 Drive select 1 / Drive select B 14 Drive select 2 / Drive select A 16 Motor On / Motor on B 18 Direction 20 Step 22 Write data 24 Write enable  26 Track Zero + 28 Write Protect + 30 Read Data + 32 Select Head 34 Disk Changed + / Ready + 3-33 Odd pins are GND PC/AT disk drive signals PC/AT computers use those disk drive signals in the following way. In this system the drives are  jumpered to be type A or B depending the situation. Usually PC and AT systems use a special cable which changes singal positions of drive A and B motor on and select signals between disk drive connectors. This makes it possible to have both drives to be jumpered as drive A and one drive works in this way as A and another as B. Pin Function Direction 1 GND 2 High density sel ??? 8 Index pulse fromdrive 10 Motor on A to drive 12 Drive select B to drive 14 Drive select A to drive 16 Motor On B to drive 18 Direction to drive 20 Step pulse to drive 22 Write data to drive 24 Write enable to drive 26 Track Zero fromdrive 28 Write Protect fromdrive 30 Read Data fromdrive 32 Select Head to drive 34 Disk Changed ??? 3-33 Odd pins are GND How to use disk-drive stepper motor What kind of stepper motors there are in disk drives ? Floppy disk drives use stepper motors for controlling read/write head position. Even early hard disk drives also used steppers, but nowadays hard drives have replaced the teppers with voice-coil servo motors. The stepper motors used in 5 1/4 floppy disk drives usually move the read/drite head using wheel and spring mechanism which works quite well. According one informatin source those stepper motors used in disk drives were usually 200 or 400 steps per revolution models. 200 steps per revolution models are are used in standard density (40 track per disk) drives. High-density floppy-drives have 80 tracks and they use 400 steps per revolution stepper motors. One other information source says that in the old disks steppers each step was 3.6 degrees meaning that it takes 100 steps to fully rotate, in the HD drives each step was 1.8 degrees i.e. 200 steps. I have not have calcualted the exact step number myself, so I am not completely sure which of those is correct (mybe there could be different motors used on different drivers, there has been different kind of drive mecnanics) Whatever type you have, those motors are very useful for your own projects. Stepper motors usually use +12V power, but some new low-power drives use +5V power source for driving steppers. Small 3 1/2 floppy disk drives usually use screw-type mechanics, where motor rotates the screw-like axle, which moves the read/write head. This type of mechanics makes it possible to make smaller drives  and depends on th screw characteristics the motor can have bigger steps. Those motors are usually driven from +5V source, because many modern 3 1/2 drives use only +5V power-supply. How to use those motors in your own projects Stepper motors are quite useful for robotics, plotter and control projects. Stepper motors are accurate way of making desired mechanical movements. Stepper-motors are not very powerful or fast (about 300 steps/sec). You can build your own controller or use ready-made controllers with them. You just have to identify the type, wiring and operating voltage of the stepper motors to be able to use them. Unfortunately stepper motors are not the easiest motor types to control and ready-made controllers are usually quite expensive. If you want to make your own controller for a stepper motor takenfrom a disk drive then take a look at http://www.doc.ic.ac.uk/~ih/doc/stepper/. When you have just taken the motor out of the disk drive, you might have thought that there must be also a stepper controller inside the disk drive electronics. You are right that there is a controller, which is capable to drive the motor. It is quite easy to send signals to that controller using PC parallel port and small program. How to use controller in disk-drive electronics The controller in the disk drive electronics can be succesfully used in the following way: 1. The electronics needs +5V to operate and usually +12V for motors 2. If the disk-drive has function to automatically got to track zero on powerup, you have to disable that option unless you want to use that option and the track zero detectio in your project. This option can be found from modern disk-drives, but old drives does not have it. Sometimes there is jumper for enabling and disabling this option. 3. Make sure that the electronics does not need to detect the disk in the drive to be able to move the stepper motor. This sensor can be easily easily make to give electronics the info that the disk is in drive. You only have to put some tape or glue to the sensor to make it think that disk is always in the drive. You can also accomplish this by cutting one wire or adding one extra wire to bypass the sensor. 4. Use drive select signal to select the drive electronics. Then use direction and step pulse signals to control the steper motor. Disk drive interface stepper motor control signals The following signals are used to control the disk drive stepper motor controller circuit. First you have to select the drive by connecting the correct drive select signal to ground. Then you use the direction signal to select the direction which you want the motor to take step. The stepping is controlled using step pulse signal, which is normally high. One low going pulse at step pulse line makes the motor to take the one step. Make sure that pulse signals are longer than 1 microsecond and you are not sending then faster than the motor can take steps. Pin Function Direction 1 GND 12 Drive select B to drive 14 Drive select A to drive 18 Direction to drive 20 Step pulse to drive 26 Track Zero fromdrive 3-33 Odd pins are GND  There are limitations hiw fast pulses those disk drives can take. Limitations are basically electromechanical (how fast the stepper motor can react), but sometimes electronics can limit it. For disk drives like NEC FD1155C (High density) floppy drive it seems that the minimum cycle time required for the step pulse is 6 ms using 50% duty cycle. And for NEC FD1053 (Low density) step cycle pulse must not be less than 10 ms. For the direction signalt it seems that the drive sample the direction signal at  positive flank of the step signal. Do not thake those as absolute guarantes, but as general guidelines where to start experimenting. PC parallel port to stepper-motor interface This is a simple example how to control disk drive stepper motor using PC parallel port. I expect that the drive is jumpered to be as drive A. The parallel port pin numbers are according the 25 pin connector numbering which is in the the back of your PC. Connect parallel port pin 20 (ground) to disk drive connector pins 17 and 19 (ground). Connect disk drive connector pin 14 (drive select A) to disk drive connector 17 (ground). Connect parallel port pin 2 (D0) to disk drive connector pin 20 (step pulse). Connect parallel port pin 3 (D1) to disk drive connector pin 18 (direction). Parallel port (25 pin) Disk drive (34 pin) 2 ------------------------- 20 3 ------------------------- 18 +--- 14 20 ---------------------+--- 17 +----19 In this way you have made a cable with which you can easily control the stepper motor using parallel port datapins D0 and D1. Those pins can be easily controlled in your software by directly writing to parallel  port hardware. You can't use the DOS, BIOS or other operating system functions, because this interface does not generate the handshaking signals those routines need. Directly controlling the parallel port is very easy. First you have to read the I/O address from the BIOS data area. LPT1 I/O address is the 16-bit word which can be found from memory address 0008h at segment 0040h. Then you simply write the data you want send to parallel port data pins to this I/O address. The writing can be easily done using following commands in different languages: out in assembler, outp in borland c and port in pascal. You can find more programming details from my Parallel  port interfacing made easy article. You can also try Floppystepper C++ source code for DOS from Circuit Cookbook Archive.  Using stepper motor as constantly rotatating motor Stepper motors can be also used as contantly rataing moros in applications where a slower speed that is easily avaialble using direct drive DC motor is needed or the speed has to be very accurately adjusted. Disk drive stepper motor can be used as freely rotating motor quite easily by using the stepper motoro controller from the disk drive. You just need to activate drive select line and then select the rotation direction using direction pin. Then all you need is to send constant clock signal to the step pin (or adjustable if you want). Suitable oscillator can be quite easily made using for example 555 timer IC or from oscillator built out of TTL logic gates. If you build a small board with 555 chip (giving suitable clock pulses at frequency you need, from few Hz to few hundred Hz) and few sitches to ocntrol other signals (one controlling if clock from 555 gets to disk drive, other controlling direction, third maybe drive select). With this kind of controller you can start, stop, step front/back, spin... No big deal. No code needed!
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks