How to Wire Your Stepper

You have a stepper motor and you are wondering how to wire it to your driver board. If you have a four lead motor, then that is plenty easy. But what if the motor has five, six or even eight wires? What can you do with them?

In this article I do not detail how to determine which phase is which as I have covered that topic on a different posting. What I want to discuss are the implications of wiring your motors one way or another. Another? Is there more than one way? In some cases yes! So lets take a looksie, shall we?

The Four Wire Stepper Motor

There is not much detailing here. The four wire stepper denotes a single possible configuration and that is of a bipolar stepper motor. We do not need to bore us with details such as whether this motor is variably reluctance, permanent magnet or hybrid as that only relates to construction. What we need to realize is that two wires are for PHASE A and the other two wires are for PHASE B. Which one is PHASE A and which one is PHASE B is kind of arbitrary.

If you have the motor datasheet then you know which wires represent which. But if you do not have this document, just do a quick continuity test and determine which two wires are connected together through an inductor. You can also use a simple BACK EMF test in which you short two leads together. If it is harder to move the rotor, then those two wires form one of the phases. If the rotor moves as easy as with no wires crossed over, then those two wires are not connected through a winding. Keep on going until you find both phases.

4 Wire Stepper Motor (Bipolar)

FIGURE 1

Once you have determined both phases, you can wire your motor as shown on the picture above. If you do not know which one of the phases is A and which one is B, just wire the motor until you get the direction you want.

The Five Wire Stepper

This motor is also equally easy to deal with as it can only be wired as an unipolar stepper motor. There is really no way to use this motor in a bipolar configuration as all the center taps have been shorted together. Do note this motor style is quite rare. I think these motors were more common a few years ago when unipolar motors were much more cost effective. Today, however, since driving bipolar motors is not a superbly expensive endeavor, the five wire stepper motor is not as common as it used to be. Instead, the six wire stepper motor has replaced the five wire stepper motor because of what we will see next. If you do happen to get your hands on a five wire stepper motor, here is how you wire it:

FIGURE 2

But how do we learn which the center tap is? Chances are you will not have the documentation for this motor. If this is the case, then you will need to do a quick resistance measurement. You will find that a winding to center tap measurement will be either half or a quarter the measurement from a winding to winding measurement. The problem with this motor, however, is that you do need to get the order of the phases correct or you will not be able to step it correctly. What I prefer to do is rotate the rotor while looking at each winding output with an oscilloscope. You will then get the right sequencing order.

The Six Wire Stepper

We can now start to complicate things. As it turns out, the six wire stepper is optimized to operate as a unipolar stepper motor but it is rather doable to use it as a bipolar stepper motor as well. The trick, however, is that there are multiple ways of wiring the motor as bipolar and it all depends on what you will want to achieve. For example, do you want speed, or do you want torque? Maybe you want both? Well, I can only promise one or the other by utilizing conventional drive technology. If you want both (torque and speed) you will need to resort to some highly advanced drive technology, which although available out there, is not in the$5.00 range. Not yet at least…

So lets first see how to wire the six wire stepper as a unipolar motor:

 

FIGURE 3

Notice the stepper is wired very similarly to the five wire stepper, except that in this case you had to wire both center taps together. Determining the order of the phases in this case is a little bit simpler too. Since you know which three wires correspond to a phase, it is clear you cannot mix them together as easily. Wait! Do I know which wires pertain to a phase? Sometimes you do and sometimes you don’t. Don’t think because you see a six pin connector that the first three wires are PHASE A and the other three wires are PHASE B. This may be true in a motor you paid top money for and for which a datasheet exists. However, just the other day I bought a motor at a surplus place (in China, to add another intriguing data point) and the connector pins were all messed up with no sense in their ordering scheme. I bet that is why the motor was in a surplus store, and not in a distributor’s warehouse…

Fear not! The same resistance/inductance test can be used to determine which wire is which. Do note that if you use inductance, you will find the inductance from winding side to center tap to be a 1/4 of the L value from side to side. Why? Because this is a mutual inductance construction and you can no longer use the same inductance in series equation. If you use resistance measurement, however, you will then find that the resistance from side to center tap is 1/2 of the resistance from side to side. I portray these concepts below:

FIGURE 4

OK, now we can follow with the truly messy stuff. A six wire stepper wired as unipolar is a no brainer. Wiring it as a bipolar, however, can get tricky. Not because it is hard, but because it depends on what you want to do. To wire as bipolar we will ignore one of the winding connections, either the center tap, or one of the sides. Both methods will have different implications; that is advantages and disadvantages. I portray below both implementations and then we can see what kind of goodies and damage we are dealing with.

 

FIGURE 5

When we ignore the center tap, we get an inductance of 4L as seen on FIGURE 4. This may seem  like just a trivial conclussion but the implications are massive. What this means is the current will take four times as long to increase through the magnetic field. Hence, it is safe to assume the magnetic field will also take four times as long to build up and cause motion. If you arae thinking this will increase the trouble of moving the stepper faster and faster, then you are correct. What happens is that as the stepping rate is increased, a new step is issued long before the current step can take place. In mechanical terms, the rotor starts to lag the revolving magnetic field and eventually it falls behind with the motor stalling and losing synchronization. In other words, precisely what you don’t want.

What is the solution? There are only two things I can think of. Either you increase the voltage, which increases the rate at which the current charging through the winding goes up, or decrease the inductance. Before I go into the inductance, let me state that increasing the voltage is an excellent idea if you can. However do note that stepper drivers have a maximum voltage associated with them. You may also have very little flexibility on the power supply voltage, in which case this discussion is over long before it started.

Hence, decreasing the inductance is the only way. If you can get a stepper designed with lower inductance, then awesome! If not, you can always resort to the left side of FIGURE 5. Notice we have ignored one of the winding sides instead of the center tap. What does this buys us? Well, for one now your inductance is equal to L, instead of 4L as shown on FIGURE 4, which means the rate of current change is quadrupled from the center tap version. As  a result, you should easily see the maximum speed increasing accordingly.

There is one caveat, however. Perhaps you noticed that as we eliminate half of the winding per phase we are hindering the amount of torque the motor can put out. After all, half of the copper on the motor is not being used and if the current is being regulated to the same value, we should expect half of the available torque present. Like I stated before, you can either get torque or speed, hardly both. When you eliminate the half winding the motor will be able to move faster but only as long as the torque constraints are met. That will of course depend on the application.

WHAT NOT TO DO!!!

After so much discussion on tips and tricks, the reader may feel intrigued about one connection style we have not discussed. What if instead of ignoring half of the winding we connect both winding in parallel? Shouldn’t we gain from reduced inductance and resistance? YEAH BABY!!! Lets do it!

OK, Sorry to burst your bubble, but this is not going to work. Due to the mutual inductance what will actually happen is that one magnetic field will cancel the other and the motor will never move. But just so that you feel better, I did make this mistake once.

If we want to take on the advantage of a parallel connected winding we will need the eight wire stepper. This posting is already too long, but I may study it in a future release. In the mean time, I do hope you are wired!

7 comments for “How to Wire Your Stepper

Leave a Reply to Kim Madsen Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.