You have a third type of motor: A "Universal" motor.
This is a motor can can be configured as either a unipolar or a bipolar motor.
General rules:
- 4 Wires: Bipolar only
- 5 Wires: Unipolar only
- 6 Wires: Universal
- 8 Wires: Universal
A unipolar only motor has the center of both windings connected together internally. This precludes the use of the motor in a bipolar system.
With a motor with six leads, if you connect the leads from the center of each winding together, you get a unipolar motor. If you leave the center connections unconnected, and drive each winding using only the connections to the winding ends, you are using it in bipolar mode.
Compleat Solution:
Identify two coils.
(1) If coils have no connection between them do "Main Test": below.
(2) If there is resistance measurable between windings provide a resistance map. as follos. 6 connections A B C D E F
Measure and report resistances AB AC AD AE AF BC BD BE BF CD CE CF DE DF
Main Test:
Coil 1 will have 3 wires A B C
Measure resistances AB BC CA
Two combinations should measure R ohms. (R an arbitrary value)
One combination should measure 2 x R ohms.
For combination that measures 2 x R ohms, name wire that is NOT connected = B
So now
AB = R ohms
BC = R ohms
CA = 2 x R ohms.
Provide voltage V+ which is voltage that stepper is rated at AND which can provide rated currrent. Power supplu has outputs V+ and ground.
Connect B to +V
Brush A against ground briefly.
Then brush C against ground briefly.
Repeat A C A C.
Motor should jump backwards and forwards a smal amount on each touch of A or C to ground with
Coil 2 will have 3 wires DEF.
repeat as above for coil 1.
E = centre tap as above.
Motor should jump backwards and forwards a small amount at each touch.
If no jumping then something is wrong.
If motor jumps do "Run Test" below .
Run Test:
Remove controller and put safely away for now.
Do following.
"Connect to" = electrically connect and leave connected.
Disconnect = disconnect previous connection.
Windings are ABC DEF
B = centre tap
E = centre tap
Connect B to V+
Connect E t V+
These will remain connected.
Then
Initialise: Connect C to ground, Connect F to ground.
Run:
- Disconnect C, Connect A to ground.
Disconnect F, Connect D to ground
Disconnect A, Connect C to ground
Disconnect D, connect F to ground
Repeat from Run: above
Motor should go through one step cycle for the 4 steps above.
Report.
Fix controller.
Best Answer
A stepper motor can certainly be used as a rotary encoder, with the caveat that both reliability and precision will be questionable at low rotation speeds and small numbers of steps.
Now, working towards a solution:
This YouTube video demonstrates the use of a Hard Drive motor as a rotary encoder.
This article discusses the use of stepper motors as rotary encoders in some detail.