A Worked Stepping Motor Example
Perhaps some of the most commonly available stepping motors, for the experimenter, are the head positioning motors from old diskette drives. These can be found at electronics swap meets, in computer surplus outlets, and even in trash dumpsters.
A common stepper to find in a full-height IBM or Tandon 5.25 inch diskette drive is the type KP4M4 made by either Japan Servo Motors or Tandon; this is a permanent magnet motor with 3.6 degrees per step and 150 ohms per winding, with the center-taps of each winding tied to a common lead. Many half-height 5.25 inch diskette drives use very similar motors, although there is much more variety in newer drives, including some that use bipolar steppers.
Another stepper sometimes found in half-height drives is the `pancake format' motor from a 1/2 height 5.25 inch diskette drive; for example, a permanent magnet motor made by Copal Electronics, with 1.8 degrees per step and 96 ohms per winding, with center taps brought out to separate leads. The leads on these motors are brought out to multipin in-line connectors, laid out as follows:
When the center-taps of these motors are connected to +12 and one end of either winding is grounded, the winding will draw from 170 mA to 250 mA, depending on the motor, so any of a number of motor drive circuits can be used. The original IBM full-height diskette drives used a pair of UDN3612N or UDN5713 chips; these are equivalent to chips in the SN7547X series (X in 1,2,3). The ULN2003 darlington arrays from Allegro Microsystems is probably the most widely available of the applicable chips, so it will be used in this example.
Consider the problem of controlling multiple steppers comparable to those described above from an IBM compatible DB25-based parallel output port. The pinout of this connector is given in Figure 6.2, as seen looking at the face of the female connector on the back of an IBM PC (or equivalently, as seen from the back of the male connector that mates with this):
The IEEE 1284 standard gives the best available definition of the parallel port, but as an after-the-fact standard, nonconformance is common. Some documentation of this standard is available in the net. There is an extensive set of tutorial material available on the web discussing the IBM PC Parallel port. Another index of parallel port information is available from Ian Harries.
There is some confusion in the documentation of this connector about the labels on the SLCT and SLCTIN lines (pins 13 and 17); this is because these names date back to a Centronics printer design of the early 1970's, and the name SLCTIN refers to an input to the printer, which is to say, an output from the computer.
The names of some of these lines are relics of the original intended purpose of this I/O port, as a printer port. Depending on the level at which you wish to use the printer, some may be ignored. If the BIOS printer support routines of the IBM PC or the parallel port driver under various versions of UNIX sare to be used, however, it is important to pay attention to some of these signals:
The BIOS handles reinitializing the printer by producing a negative pulse on INIT (pin 16). We can use this as a reset pulse, but otherwise, it should be ignored! In the reset state, all motor windings should be off.
When no output activity is going on, the BIOS holds the output signal lines as follows:
STROBE (pin 1) high, data not valid.
AUTOFD (pin 14) high, do not feed paper.
INIT (pin 16) high, do not initialize.
SELCTIN (pin 17) low, printer selected.
To print a character, the BIOS waits for BUSY (pin 11) to go low, if it is not already low, and then outputs the new data (pins 2 through 9). Following this (with a delay of at least 0.5 microsecond), STROBE (pin 1) is pulsed low for at least 0.5 microsecond.