Getting the stepper windings properly hooked up to the parallel port controlled driver circuit (notes by Chuck Shaw)

Any stepper motor with 5 or more leads will do.  The stepper will have 4 windings and from 1 to 4 power leads.  If a single power lead, then the inputs to all 4 windings are tied together inside the motor.  If 8 total wires, then each winding has its own power lead.

You can puzzle out the leads if you use an ohmmeter.  For instance, in a 5 lead stepper, the resistance of a winding to a winding lead will be double that of the power lead to any of the winding leads.  If a 6 lead stepper, 2 windings are tied to a common power lead.  Here, an ohmmeter will indicate which of the 3 leads belong together.  Then for each of the grouping of 3 leads, you can use the rule of winding lead to winding lead giving twice the resistance of a power lead to winding lead.

The 6 wires are connected like so:

        1             2             3
        |             |             |

        |             |             |
        4             5             6

where the "m"s are the windings of the motor.  If you have a volt/ohmmeter,
measure the resistance between each pair of wires:

        pair                    approximate resistance (ohms)
        1-2, 2-3, 4-5, 5-6      40
        1,2,3-4,5,6             infinite
        1-3,4-6                 80

Alternately, you can use a 1.5v battery and a red LED.  It will glow dimmer across the 80 ohms than the 40 ohms.  Chances are with your motor one set of 3 is 1-2-3 and the other set is 4-5-6.

Now, you have only to figure out the proper sequence.  Here are some additional notes by Chuck Shaw on this subject:
If a 6 lead motor with red/blue powered by a white lead, and green/black powered by a yellow lead:
Tie White and Yellow together, and apply them to +12v
The signals from pins 6,7,8,9 go thru the circuitry to the bases of the transistors to turn them on/off
The 12v goes in via White/Yellow, and the circuit is completed to ground for a specific coil by setting the base for that coil’s transistor high.

You can confirm the order that the pins are pulsed by using the Track test in config.dat (open config.dat, change the last line in the file to read "Track" rather than "NoTest" then resave config.dat. Run scope.exe and select a VERY slow rate). Rig a simple test set up to see which wire is "hot" by sending the power that would normally go thru the motor windings and send it thru a resistor and an LED and then to ground. Build 4 of these, one for each pin output. Pay attention to the LED’s polarity... The longer lead is usually "+" and the shorter one is the one that attaches to ground. The resistor should be sized to drop the 12v to 2 v (a 10v drop), assuming a 0.02 amp current thru the LED (V=IR, 10=(.02)(R), R=~500 ohms). Now use TestString = Track and watch the light show!!!! If you want to watch the output of the parallel port pins directly, the voltage will not be 12v dropped to 2, it will ~5v dropped to 2, so the resistor would be about 150 ohms. Note: you can keep this little test setup hooked up in parallel with the TIP120 outputs while the motor is running and hooked up too to verify which windings are being pulsed, and it makes a cool light show when the motors are driving the telescope too!!!!

(following diagram by Wayne Topa:)
These pins go to Ground to 'Light' each LED.
9 8 7 6
| | | |
| | | |
- | -| -| -|
- - - -
L L L L <-- (LED's)
+ | +| +| +|
| | | |
| | | |
\ \ / /
\ 1000 Ohm Or 4 each 470 ohm. One on each LED
/ line to +12V
Pins 1-2-3-4-5 to +12V

This matrix assumes the pins are pulsed in the 6,7,8,9 order:

Test # / Results (Buzz, turn direction, etc)

























The idea is to test and capture the results of the different combinations of pulsing windings.....

The software will pulse one coil from the Red/Blue pair, then pulse one from the Black/Green pair , then will pulse the other one from the red/blue pair, and finally will pulse the other one from the black green pair. Your challenge is to figure out what the order is within each pair......

For 5 or 6 wire motors you are done!!! For 8 wire motors the test matrix gets bigger since you also need to identify the polarity of each winding in addition to its order!!!!!

Here's the color winding order for Oriental Vexta motors.

1.      red     green   blue    black
2.      green   red     blue    black
3.      green   red     black   blue
4.      red     green   black   blue

In the end, you will not hurt anything by hooking up the stepper incorrectly.  The motor will buzz or jump erratically.  When you have the leads hooked up correctly, the motors will move smoothly during microstepping and halfstepping.

A little checkout procedure for you to try:

1.  Disconnect everything from the parallel port,  open config.dat with notepad and change the last line to read "TestParallelPort" to be able to run the  parallel port test and save config.dat.  Then start scope.exe and set the logical outputs to "high"

2.  Measure the voltage from the "high" pins to ground.  The high pins are 2,3,4,5,6,7,8,9 and should each all be about +5v with respect to the ground pins (18,19,20,21,22,23,24,25).  Then set the logical outputs to "low" in scope.exe and verify the voltages all drop to zero on the previous +5v pins......

3.  If all of that was fine, hook up the PCB via the parallel port cable and turn on the power to the PCB.  Do not have the LEDs or the motors attached to the output DB9 connectors.

4.  Now, the idea is to set the logical outputs high as before, and trace the voltages along the PCB to the inputs to the first chip on the PCB.

Mel's circuit, when the Opto isolators are added, has the parallel port inputs initially going to a hex inverter, then to an optical isolator, then to a 2nd hex inverter, then to the base of the TIP120 transistors, then to the motor.  Pat's circuit seems different.  To start with, Pat only uses one Hex inverter and one opto isolator for each motor instead of two hex inverters and one opto isolator for each motor in Mel's version.  Either system works, just be aware of the difference...  On Pat's sheets 3of7 and 5of7, the parallel port goes to the Hex inverter first, then the opto isolator.  However, on sheets 2of7 and 4of7, the circuit shows the parallel port goes to the opto isolator first, then the hexinverter......  Either order will work.

The thing to trace out, as the signal goes into the chip is which pin is connected to that output. If it was a +5v input, then the output should be 0 v.  If the input is +5 and the putput is 0v, then toggle the parallel port to the other state and the input should go to zero and the putput should be +5....  Then follow that output from the first chip to the 2nd chip and do the same thing....

Repeat this for all 8 pins controlling the motors......

If you trace the signals across the PCB from the parallel port and all is well, then look to the transistors.  The circuit has +12v going to the motor, then through the winding, and then coming out and coming back to the transistor, where the transistor then closes and lets the circuit be completed to ground.    You can test the transistors with your meter set to ohms.  The transistor will be shorted (i.e. no resistance from pins 6,7,8,9 to ground, same config on both db9 connectors)  NOTE, do NOT measure between any of the "HOT" pins on the DB9 (pins 1,2,3,4,5) to the ground pins while your meter is set to ohms... or "poof"... :-(

 To hook up the LED's, attach one led/470ohm resistor between pin 1 and 6, with the short lead on the LED attached to pin 6 (which goes to ground).  Do the same for the other LED's (pin2 is +, pin 7 is neg), (pin 3 is +, pin 8 is neg), (pin 4 is +, pin 9 is neg).

With power ON to the PCB Box, toggle the parallel port outputs from low to high to low to high and the LED's should come on and off, etc.    With the outputs set high, the LED's should be on, when they are set to low, the LED's should be off.  If this is backwards, check the config.dat file for the optical isolator term....

If things still do not work right on the PCB, using the parallel port test, its a problem on the PCB.  Check to see the orientation of the chips in sockets, etc...  Also follow the +5 voltages from the regulators to see if that voltage gets to the chips OK.  Double check the orientation of the TIP120 transistors to make sure the leads are oriented correctly......

If the parallel port does not act correctly we need to review the config.dat file settings........

Chris Rowland contributes the following:

I have recently wired up an 8 wire motor made by Superior Electric, it is possible to work out the connections, even without a meter. The 8 wires are connected to 4 coils and you need to sort out not just which wires go to each coil but also which coils are in the same phase and which way round they need to be connected.

(1) Find the pairs of wires for each coil. There are two ways, one is to connect the wires to an ammeter and turn the motor. When you have the two ends of a coil you will see the meter needle move as the rotor moves. The other way is to short two wires and try to turn the rotor. When you have a coil the motor will be much more difficult to move and will also feel "notchy". The difference is obvious.

(2) Sort the pairs into two sets for the two phases. Connect two windings together in series and measure the current when you rotate the rotor as you did to find the windings. Try this for all the other windings, connected both ways round. When you have the two windings for the same phase, connected in the opposite direction, the current produced will be zero. It is easy to see this. If you don't have a meter then you can also use the same trick as above, when the two windings of the same phase are connected together there will be no additional resistance to movement. You now have the two windings for one phase but they are connected the wrong way round, reverse one of the windings. This will give you the common power connection and the two connections for one phase. (Phase A) Do the same for the other phase. (Phase B) Connect the common for the two phases to the power and the two phases to the drivers in the order ABAB. This should work, if you change the order of the Phase A or Phase B connections then the direction will change, if you are not in the ABAB (or BABA) order then the motor will not rotate correctly.

I hope this helps.Chris Rowland

Remember that the software expects the winding sequence to be A B A- B-, not the A A- B B- that some other controllers ask for.  Here's a diagram contributed by Bob Rubendunst with the 9 pin connector pin numbers