Stepper Motors - Introduction by Jim Fuller
Like many conventional electric motors, a "stepper" motor consists of a magnet and coils of wire. Whereas conventional motors spin continuously, a stepper motor moves around one small step at a time (hence the name).

Inside a Stepper Motor
The stepper motors we are concerned with are those taken out of old 5 ¼" floppy disk
drives. Some of the comments below may therefore not apply in all cases
A |
B |
C |
D |
The simplest way to think of a stepper motor is a bar magnet and four coils.
When current flows though coil "A" the magnet is attracted and moves one step to the right. Coil A is then turned off and coil "B" turned on. The magnet moves another step to the right. Coil "B" is then turned off and coil "C" turned on. The magnet moves another step to the right and so on
A similar process occurs inside the stepper motor, but the 'magnet' is cylidrical and rotates inside the coils.
In order to make a stepper motor rotate you must turn on each coil in the correct sequence. The motor will continue to rotate as long as you continue the sequence. A typical code sequence would be:
| count := 1 repeat |
|
| port[888] := 1; delay(50); port[888] := 2; delay(50); port[888] := 4; delay(50); port[888] := 8; delay(50); count := count + 1; |
|
| until count > 50; |
NOTE1: The "delay" is needed provide enough time for the magnetic field inside the coils to build up and the magnet to move. Without the 'delay', the coils will switch on and off so fast that the magnet will not get a chance to be attracted and it will not move.
NOTE2: To reverse the direction, simply reverse the output order.
The Coil Switch-on Sequence
The stepper motor in a 5 ¼" floppy drive (the one that moves the head back
and forth over the disk - NOT the one that spins the disk) has FIVE wires coming out of
it. If you are lucky they will be coloured Brown, Yellow, Red, Blue and White. (Many of
the ones I've looked at have five brown wires!)
The 'four' coils described above are actually arranged as two 150 ohm coils with centre taps. The centre taps are lines "1" and "2" in Figure 1.1. This line is generally called the "common".
Figure 1.1
Measuring the resistance between each of the wires coming out of the motor produces the
following readings:
Measured Resistance (ohms)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One of the five wires is the 'common'. You can easily identify the common with a multimeter. It will be the one that reads 75 ohms between it and all the other four lines in turn. The other four are impossible to identify using a multimeter. You will need to use an interface and connect it to a computer for the next step. (You could just use wires from a 12 volt battery if you wanted.)
Using the Demonstration Interface to Drive a Stepper Motor
(For details about the Demonstration Interface see: robokit.html)
Hopefully your motor moved in a consistent direction. Now you need to write code as outlined above and try for complete rotations.
If your motor is a standard type and rotated when you tried the procedure above it means that the correct sequence for energising the coils is:
1a 2a 1b 2b 1a 2a 1b 2b 1a 2a 1b 2b
etc
|
Unipolar Motors The full document can be found at: http://www.cs.uiowa.edu/~jones/step/index.html Unipolar stepping motors, both Permanent magnet and hybrid stepping motors with 5 or 6 wires are usually wired as shown in the schematic in Figure 1.2, with a center tap on each of two windings. In use, the center taps of the windings are typically wired to the positive supply, and the two ends of each winding are alternately grounded to reverse the direction of the field provided by that winding.
The motor cross section shown in Figure 1.2 is of a 30 degree per step permanent magnet or hybrid motor -- the difference between these two motor types is not relevant at this level of abstraction. Motor winding number 1 is distributed between the top and bottom stator pole, while motor winding number 2 is distributed between the left and right motor poles. The rotor is a permanent magnet with 6 poles, 3 south and 3 north, arranged around its circumference. As shown in the figure, the current flowing from the center tap of winding 1 to terminal a causes the top stator pole to be a north pole while the bottom stator pole is a south pole. This attracts the rotor into the position shown. If the power to winding 1 is removed and winding 2 is energised, the rotor will turn 30 degrees, or one step. To rotate the motor continuously, we just apply power to the two windings in sequence. Assuming positive logic, where a 1 means turning on the current through a motor winding, the following two control sequences will spin the motor illustrated in Figure 1.2 clockwise 24 steps or 4 revolutions:
Douglas Jones' complete paper can be read at - http://www.cs.uiowa.edu/~jones/step/index.html |
Also see: http://www.doc.ic.ac.uk/~ih/doc/stepper/