Intro to Stepper Motors

Stepper motors provide a versatile and inexpensive means of implementing "precision animation".

----------
Here is our collection of information on stepper motors...
----------
 

General Theory of Stepper Motors (Unipolar)

An ordinary DC motor will turn around and around as long as power is supplied. No intelligent circuitry is required to drive such a motor, unless you want to slow it down or reverse direction - just apply power and it spins.

A stepper motor is very different. If you just feed it power, it will stay where it is. In order to make the motor move, you have to feed it a changing signal.

This is best illustrated by thinking of a magnetic compass with electromagnets around it:
The drawing on the left shows power applied to the N electromagnet, drawing the compass toward it.

On the right, power is instead applied to the E electromagnet, and the needle has rotated toward that side.

Just four electromagnets would give coarse, jumpy motion. Now imagine a similar arrangement with 100 electromagnets around the compass. By energizing each electromagnet in sequence, the needle takes 100 steps around the circle.

But driving 100 individual electromagnets would require complex electronics. So we fake it:
In these drawing, the circled letters represent electromagnets. All the magnets with the same letter are wired together. When you energize that circuit, all of the electromagnets turn on at once.

On the left, there are 8 magnets, but only 4 circuits. Sequencing through the four circuits gives half of a rotation. One more run through the sequence completes the rotation. This setup requires that both ends of the compass needle be north-seeking.

On the right, the same 4 circuits energize 16 magnets. This setup requires 16 steps (4 repetitions of a 4-step cycle) to complete one rotation.


In actual practice, just four control wires can provide just about as many steps as you might want. One of the characteristics of a given stepper motor is the number of steps necessary to make a complete circle, usually expressed as number of degrees per step.

Since computers are great at turning things on and off, let's look at the four electromagnet circuits as a computer might see them.
A B C D comment
1 0 0 0 take a step clockwise
0 1 0 0 another step clockwise
0 0 1 0 another step clockwise
0 0 0 1 another step clockwise
0 0 0 1 Wait right here!
0 0 1 0 Take a step back.

Here's an assortment of stepper motors.

 

What Good Is That?

What good is a motor that requires fancy electronic signals in order to move? All in all, stepper motors are great for precision movement. Floppy disk drives and CD players usually use stepper motors driving a lead screw to move the head in and out on the disk.

There is a down-side if you need absolute positioning. By counting steps, the controlling electronics knows where the motor shaft is, since the counting began. But it doesn't necessarily know where the motor shaft was pointing when the machine was turned on and counting began. In applications where absolute positioning is important, the drive electronics must calibrate the motor position. This may be done by:

 

More Complex Drive

As we have seen, it is very easy to drive a stepper motor, by simply turning one electromagnet fully on at a time. But there are other ways to drive a stepper motor.

 

Half Steps

By turning on two coils at once, the motor will take a position between the two steps.

This is a form of "microstepping", and gives improved resolution. A sequence might look like this:
A B C D comment
1 0 0 0 start here
1 1 0 0 half a step clockwise
0 1 0 0 complete the first full step clockwise
0 1 1 0 another half step
0 0 1 0 complete that step
0 0 1 1 another half step
0 0 0 1 complete that step
1 0 0 1 final half step
1 0 0 0 back to the starting position

 

Microstepping

The half-step is a specific form of microstepping. There are other variations, because you are not limited to turning the electromagnets fully on or off. You could feed 1/4 power to A and 3/4 power to B, and get a position that is nearer to B than A.

In fact, if you want smooth rotation, you can drive the magnets with carefully phased sine waves.

 

Bipolar Stepper Motors

So far, we have discussed "unipolar" stepper motors. There are also "bipolar" stepper motor is a bit tricky, because you must reverse the polarity of the drive signal.

This is a "bipolar" stepper:
Note that the electromagnets are hooked up in pairs, such that each of the magnets in the pair presents a different pole to the compass needle.

The compass needle aligns itself so that its magnetic field points in the same direction as the field from the coils.

We have turned off the N/S magnets and turned on W/E magnets.

Although magnets on both sides are turned on, the situation is not ambiguous. The needle turns in the only direction that aligns it with the electromagnets.

We have turned off the W/E magnets and turned back on N/S magnets. But this time we apply the power with reverse polarity.

The needle turns in the only direction that aligns it with the electromagnets.

Here's the driving sequence for a bipolar stepper motor:
N/S W/E comment
+ 0 take a step clockwise
0 + another step clockwise
- 0 another step clockwise
0 - cycle complete
+ 0 back to the starting position

There are good things and bad things about bipolar stepper motors.

Here's a tiny bipolar stepper motor. The actual stepper is in the middle of the photo. The part to the left is a lead-screw assembly.

 

Speed Issues

As suggested earlier, stepper motors can be made to rotate with a speed proportional to the step rate. Increase the stepping speed, and the motor shaft spins faster.

But there is a limit to the speed.

Think back to the magnetic compass. When you shut off one electromagnet and turn on the next in the sequence, the needle rotates to face the newly energized magnet. But you must wait for the needle to reach the new position before stepping to yet another position. If you step faster than the motor can respond, the driver and motor fall out of synchronization, and you can't be sure exactly where the motor is.

Please note that the maximum stepping rate of a motor depends on the load that it is turning. If your motor is turning a heavy mass, it will take longer to spin into the new position.

 

Acceleration Issues

Even though a stepper motor may be rated for 100 steps per second doesn't mean that you can start clocking it at 100 steps per second from a standing stop. This doesn't mean that the step rating is bogus. It just means that you must work your way up to the maximum speed.

The spinning motor has mass in motion, i.e. inertia. When you hook up the motor shaft to turn something, you end up with more mass and more inertia. Going from a full stop to the maximum step rate means all that mass wants to stay at rest. You have to use plenty of torque to get it moving. (Remember Newton's laws of motion.)

But if the motor is already spinning at 90% of its maximum rate, less torque is required to speed it up a little more.

Of course, the same problem exists when you are slowing down and/or reversing.

All this means is that stepper motors can only be accelerated at a given rate. Specifications for this should be available from the manufacturer. Your driving circuitry must take this acceleration into account, in order to keep the motor locked to the driver.

 

Where can I buy one?

Stepper motors are electronic construction parts. Don't expect to find then at Sears or ordinary stereo shops.

Look in stores that cater to electronic experimenters, such as:

This page from the All Electronics catalog (#203, Spring 2003) shows some stepper motors.

 

Further Information

For more information on stepper motors, try the following web sites:
NAME WEB SITE CONTENT
Douglas W. Jones http://www.cs.uiowa.edu/~jones/step/index.html tons of detailed technical information
Ian Harries http://www.doc.ic.ac.uk/~ih/doc/stepper/ numerous assorted links
Jason Johnson http://eio.com/jasstep.htm assorted stepper info
Rustle Laidman http://209.41.165.153/stepper/Tutorials/UniTutor.htm assorted stepper info

 

Related Pages

You may be interested in these related pages:

----------

Thank you for visiting. Your comments are welcome.
[back] . . . [paper and pen] . . . [tip jar]

©Copyright 2004-2005 by The Wolfstone Group. All rights reserved. You must read and abide by our terms of service.