28-12-2012, 05:14 PM
Quick Start for Beginners to Drive a Stepper Motor
1Quick Start.pdf (Size: 119.04 KB / Downloads: 61)
Introduction
This application note is for novices who want a general quick-start guide showing how to control a stepper
motor. Because stepper motors can be used in a variety of ways and are driven by a variety of devices,
there is a great deal of information available about how these motors work and how to use them. To
reduce confusion, the focus of this application note is on stepper motors that can be driven by
microcontrollers. This document includes basic information needed to get started quickly, and includes a
practical example that is simple and easy to implement.
What is a Stepper Motor?
A stepper motor is an electrically powered motor that creates rotation from electrical current driven into
the motor. Physically, stepper motors can be large but are often small enough to be driven by current on
the order of milliampere. Current pulses are applied to the motor, and this generates discrete rotation of
the motor shaft. This is unlike a DC motor that exhibits continuous rotation. Although it is possible to drive
a stepper motor in a manner where it has near continuous rotation, doing so requires more finesse of the
input waveform that drives the stepper motor. Figure 1 illustrates some basic differences in stepper and
DC motor rotation.
Types of Stepper Motors
There are a variety of stepper motors available, but most of them can be separated into two groups:
• Permanent-magnet (PM) stepper motor — This kind of motor creates rotation by using the
forces between a permanent magnet and an electromagnet created by electrical current. An
interesting characteristic of this motor is that even when it is not powered, the motor exhibits some
magnetic resistance to turning.
• Variable-reluctance (VR) stepper motor — Unlike the PM stepper motor, the VR stepper motor
does not have a permanent-magnet and creates rotation entirely with electromagnetic forces. This
motor does not exhibit magnetic resistance to turning when the motor is not powered.
What is Inside?
Generally, a stepper motor consists of a stator, a rotor with a shaft, and coil windings. The stator is a
surrounding casing that remains stationary and is part of the motor housing, while the rotor is a central
shaft within the motor that actually spins during use. The characteristics of these components and how
they are arranged determines whether the stepper motor is a PM or VR stepper motor. Figure 2 and
Figure 3 show an example of these internal components.
Waveforms that can Drive a Stepper Motor
Stepper motors have input pins or contacts that allow current from a supply source (in this application
note, a microcontroller) into the coil windings of the motor. Pulsed waveforms in the correct pattern can
be used to create the electromagnetic fields needed to drive the motor. Depending on the design and
characteristics of the stepper motor and the motor performance desired, some waveforms work better
than others. Although there are a few options to choose from when selecting a waveform to drive a twophase
PM stepper motor, such as full-stepping or micro-stepping, this application note focuses on one
called half-stepping. A graph of the waveform is given in Figure 4.
In Figure 4a), four signals are shown. These signals can be produced by a dedicated stepper driver or a
microcontroller. Each signal (a, a, b, b) is applied to a coil terminal. Because each coil has two terminals,
two signals must work together to drive a single coil. If we consider terminal a as a positive reference,
then the combination of signals a and a cause the coil to see an effective signal A, shown in Figure 4b).
Likewise, signal B in Figure 4b) is produced by combining signals b and b from Figure 4a).
It is worth noting that the individual waveforms (a, a, b, b) directly from the microcontroller pins to the coil
terminals only vary from 0 V to +5 V. However, the effective signal (A, B) applied to the coil varies from
–5 V to +5 V, and has positive and negative duty cycles. Two of these effective waveforms shown in
Figure 4b), 90 degrees out of phase can be used to drive the PM stepper motor. Both waveforms are
applied to the motor simultaneously. Each transition in one of the waveforms corresponds to a state
change (movement) in the motor. Altogether, Figure 4a) and b) show eight different states for halfstepping.
A step by step description of how these particular waveforms work together to move the motor
shaft follows.