How To Identify Stepper Motor Lead Wires – The Fool Proof Way

A guide on identifying the lead wires of Unipolar Stepper Motors. Minimize screw ups and frustration especially for beginners and first-timers tinkering with stepper motors.

Stepper motor is an impressive piece of engineering. Instead of making full turns like a normal motor, stepper motor make steps, one small degree at a time. It is commonly used in photocopy machines, printers, CNC machines, robotics, etc where precision motion (steps) and controls are needed.

UPDATE 2015: How Stepper Motor, Stepper Driver and Stepper Controller Work - Unipolar and Bipolar Motor Examples

The Basics

Stepper motors fall into 3 main categories namely Unipolar, Bipolar, or Hybrid  (Unipolar + Bipolar).

A Unipolar stepper motor must be driven in Unipolar mode;
A Bipolar stepper motor must be driven in Bipolar mode;
A Hybrid stepper motor can be driven in Unipolar or Bipolar mode.

I’m going to focus on Unipolar. They normally have 5, 6, and (sometimes) 8 wires.

The stepper motor I have lying around. A 6-wire Unipolar Stepper Motor

For the 6-wire variant, it consists of 4 Coil End wires and 2 Center Tap wires; and for the for 5-wire variant, there are 4 Coil End wires and 1 Center Tap wire.

How Stepper Motor Works (Unipolar)

Although in reality there are several set of coils in a stepper motor forming what is known as a phase, for understanding purposes it is best to imagine the there are 4 coils in a stepper motor ( namely Coil 1, 2, 3 and 4). If any one of the coil is energized, the motor will make one step, then stays in that place (after 1 step is completed). The motor I have lying around as pictured above turns 1.8 degree per step.

In order for the motor to complete one full revolution, it needed to make multiple steps. The coils need to be energized in the proper sequence to achieve this. In all, 200 sequential steps (1.8 degree x 200 steps) are needed for the motor pictured above to make 360 degree turn (one full revolution). Read the specification of your motor carefully to find out the details.

The animation below on the other hand shows the steps and coil energizing sequence depicted in a simplified 90 degree per-step motor with 4 coils. Therefore it needed 4 steps to make one 360 degree turn. In principle, all stepper motor works in the same way.

how stepper motor works
The coils/wires need to be energized in the sequence of A-C-D-B for the motor to turn/step clockwise.

If you are interested in reading on further, there are tons of resources to dig online. Google is your friend.

Step One – Identify The Center Tap Wires

This is the part where we map out the wires. You will need a multimeter, and set it to measure resistance. You will have to go through series of elimination process to map out which colored wire corresponds to which Coil End / Center Tap.

By referring to the diagram above:

1) The resistance between Coil End A and Coil End B is DOUBLE the resistance between Coil End A to the Center Tap 1.

2) The resistance between Coil End B and Coil End A is DOUBLE the resistance between Coil End B to the Center Tap 1.

3) The resistance between Coil End C and Coil End D is DOUBLE the resistance between Coil End C to the Center Tap 2.

4) The resistance between Coil End D and Coil End C is DOUBLE the resistance between Coil End D to the Center Tap 2.

The resistance readout 4.8 ohm. That means either White or Blue is the Center Tap while the other is the Coil End. Repeat the same process with the other wires.

Well..somewhat double resistance, 8.3 ohm. That means both Blue and Red are the Coils End wires and therefore White is their Center Tap. Repeat the same process with other pairings to find the next Center Tap.

NOTE: For a 5-wire unipolar stepper motor. Center Tap 1 and Center Tap 2 are internally connected together with just one wire out, but the rules above still apply. The resistance between Coil End B and Coil End A as well as the resistance between Coil End C and Coil End D are DOUBLE the resistance between any of the Coil Ends A, B, C and D to the single Center Tap.

NOTE: For a 6-wire unipolar stepper motor such as mine, There is no internal connection between (Coil End A - Coil End B - Center Tap 1) and (Coil End C - Coil End D - Center Tap 2).  Therefore there is no current flow.

No current flow (Readout = 1). We therefore can establish that White, Red, Blue wires are isolated (no internal connection) from the Green, Black Yellow wires.

Step Two – Identify the Coil End

At this point, we’ve identified the 2 Center Tap wires. Join the two together (for 6-wire motor). In my case the Center Tap are the yellow and white wires. Attach (+) end of the batteries to the joined Center Taps (or in the case of 5-wire motor, the sole Center Tap).

Randomly choose any one of the Coil End and attach the (-) of the batteries. In the set-up below, I attach the (-) to the red wire, no special reason.

The set-up (click to enlarge)

Label the random wire you have chosen as Coil End A and with it you are energizing Coil 1. It doesn’t matter which wire you choose just assume it as Coil End A (Coil 1).

By touching the unattached end of the (black) alligator clip to the to the remaining 3 wires one by one, you will see the motor twitches (it makes half or no step). This is because there are now 2 coils that are being energized simultaneously (Coil 1 plus 1 other). The motor stator will move half way between the two energized coils (half step). No step when the two energized coils are adjacent to each other.

By closely looking at the direction of the half step, you can identify which wire and coil are being energize, as below.

how stepper motor works

On my motor, I have identified that Center Tap 1 is White, Center Tap 2 is Yellow, Coil End A is Red, Coil End B is Black, Coil End C is Green, Coil End D is Blue.

By energizing the coils/wire in repetitive sequence of Red-Green-Blue-Black, the motor will turn (step-by-step) clockwise.

Energize the coils/wires in repetitive sequence of Red-Black-Blue-Green will cause the motor will turn (step-by-step) counter-clockwise.


Anonymous said...

Simply the best explanation I have found on the net. Now at last I can use the 6 stepper mtors I have laying around. Many thanks.
Paul from Melton

Teja.M said...

I got a very good explanation. These kind of minor but important things have to consider.
Thank you very much sir.

Teja.M said...

I got a very good explanation. These kind of minor but important things have to consider.
Thank you very much sir.

Anonymous said...

Great guide. Unfortunately I have Bipolar motor, do you know how to identify that one (it has 4 wires)?

Anonymous said...

please help me
I have motor 6 wire
I have skype : garmoska89

Anonymous said...

for the person who says "Unfortunately I have Bipolar motor, do you know how to identify"

It is the same motor. Steppers can be used in Monopolar or Bipolar modes. What changes is the Driver.

In Bipolar mode you simple ignore the Center tap leads and you will work with the 4 end leads. The Drivers will use the two leads and will switch polarity of voltage applied and current as necessary in the Bipolar mode.

Anonymous said...

I concur with above posts. Best explanation on the web so far. Better so, accompanied with a video. Great job! Thanks for helping out so many noobs like me.

Sebastian - Denmark48 said...

God video and explanation, now I know how my stepper motor works.

Anonymous said...

Thank you very much for taking the time to create this clear and simple explanation! I found it very helpful and managed to get a stepper motor that I found working. Thanks!

Anonymous said...

most useful explanation that I found so far for knowing the wire diagram without having documentation.

Stephen said...

Nicely done. Many thanks.

cmnemonic smnemonic said...

very helpful. I been trying to identify a motor with 10 wires coming out and this article gave me a much better understanding of what I need to to do. thanks!

Anonymous said...

I'm curious - I have the same motor as you and I'm not sure what type of motor it is. Is there any way you could tell me what kind of motor you have there?