stepper motor identification

A stepper motor with five wires is almost certainly 4-phase unipolar.  A stepper motor with six wires is probably also 4-phase unipolar, but with two common power wires.  They may both be the same colour.  A stepper motor with only four wires is most likely bipolar.  There are two stages to sorting out which wire is which in a five- or six-wire unipolar stepper motor.  First, isolate the common power wire(s) by using an ohmmeter to check the resistances between pairs of wires. The common power wire will be the one with only half as much resistance between it and all the others.  This is because the common power wire only has one coil between it and each other wire, whereas each of the other wires have two coils between them.  Hence half the resistance.  Second, identify the wires to the coils by supplying a voltage on the common power wire(s) and keeping one of the other wires grounded while grounding each of the remaining three wires in turn and observing the results.  

Select one wire and ground it, assume it's connected to coil four.  Keeping it grounded, ground each of the other three wires one by one.  Grounding one wire should make the rotor turn a little clockwise; this is the wire connected to coil three.  Grounding one wire should make the rotor turn a little counterclockwise; this is the wire connected to coil one.  Grounding one wire should do nothing; this is the wire connected to coil two.  The above has been excerpted from http://www.doc.ic.ac.uk/~ih/doc/stepper/others

stepper motor controller

The schematic below shows the electronics required to drive a stepper motor.  Three commonly available chips and four power transistors are pretty much all that is needed for complete control of a stepper motor.  The clock is the 555 timer chip.  It produces an unending stream of pulses at the rate defined by the variable resistor, or speed control.  The two counters on this chip each divide the clock pulses by two.  The result is a steady, two-bit binary code: 00, 01, 10, 11.  The four XOR gates on this chip do several things.  The binary code is turned into Gray code: 00, 01, 11, 10.  The Gray code is made to count backwards if the direction switch is closed: 10, 11, 01, 00.  Finally, the Gray code is expanded into stepping sequences for each coil: 1100, 0110, 0011, 1001.  Four PNP power transistors boost the weak electronic signals into current powerful enough to drive the motor coils.  The diodes next to each transistor short out the reverse induction that is generated each time a coil switches off.  The reason for using PNP transistors instead of the more common NPN variety is that TTL chips are better at sinking current than sourcing it.  The 7805 power regulator will take any voltage between 6V and 12V DC and turn it into a smooth 5v to power the chips.

Within the circuit are a 555 timer, a dual D flip-flop 74HCT74, a quad XOR 74HCT86, and four 10W PNP power transistors (cf the UCN5804 or ULN2003 stepper motor driver chips).  The completed circuit has two controls; the speed potentiometer, and the direction switch.  The higher the resistance of the potentiometer, the slower the motor will turn.  At low resistance settings the motor will turn at several revolutions per second, but beyond a certain limit the motor will be unable to keep up and will start to skip steps and vibrate.  At the other extreme one can easily achieve speeds lower than 1 rpm.  Power is applied to one coil after another in proper sequence for the motor to turn.  In order to obtain the maximum torque, two coils are always on at any time.  Each step only turns the shaft a degree or two.  This four step cycle has to be repeated about fifty times for a full revolution (not just once, as shown in the diagrams).  If all four coils are switched off, the motor will be free to idle.  Otherwise it is always locked in its current position. If the load on a stepper motor is too great or if the stepping sequences are being cycled too fast, it will skip a step.  The above has been excerpted from http://vv.carleton.ca/~neil/robotics/stepper/ttl.html