Sei sulla pagina 1di 25

ABSTRACT

A precision stepper motor controller capable of both independent and synchronized control of a multiple
number of stepper motors is discussed. The controller is built around a 16-bit microprocessor to provide fast
and reliable control operations. In addition, micro stepping techniques are used to achieve high resolution
electronically and to suppress mechanical resonance. The controller also includes two output ports. Such a
controller has wide applications in manufacturing. For instance, it can be used to control a robot having
multiple degrees of freedom. The controller was tested with a simultaneous control (synchronous) of two
stepper motors for precision trajectory control applications. Stepper motors are being used more often these
days for various applications because they are economical and easy to control. They have become easy to
control because of the emergence of various low cost microcontrollers which can be programmed to control
them. This has enabled stepper motors to be controlled with more flexibility and versatility for various
applications.

M.Hrushikesh
Ashith Sankar
Hasthi Bharath Varma
N.Guru Rakeshreddy

Signature of minor project guide


Mrs.A,Lavanya B.E, M.E, Ph.D
Asst. Professor (O.G)

LIST OF FIGURES

Figure-1

speed torque characteristics

Figure-2

working principle of stepper motor

Figure-3

windings to the poles

Figure-4

phase current waveforms

Figure-5

darlington array

Figure-6

schematic diagram

CHAPTER-1
INTRODUCTION
A stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical
movements. The shaft of a stepper motor rotates in discrete step increments when electrical command pulses
are applied to it..It is utilised in a wide range of applications. Their popularity is due to the fact that they can
be controlled directly by computers, microprocessors and programmable controllers. Stepper motors are
ideally suited for situations where either positioning or speed control are required in automation systems and
,unlike Industrial motors,they utilise open-loop feedback.
Positioning systems have traditionally been implemented using DC motors, AC servo motors, Synchronous
motors, Stepper motors, etc. DC motors are relatively easy to control. However it has disadvantages in using
such motors for positioning systems like overheating of the armature windings. Also the torque to inertia is
relatively low.
For the above reasons positioning systems are now being implemented using stepper motors. Usually stepper
motors were designed to provide precise positioning control within an integer number of steps. They have
stable open loop operation to any step position and consequently no feedback is needed to control them
Stepper motors, due to their unique design, can be controlled to a high degree of accuracy without any
feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of
electromagnetic coils that are charged positively and negatively in a specific sequence, precisely moving it
forward or backward in small "steps".

CHAPTER-2

STEPPER MOTOR

A stepper motor or step motor or stepping motor is a that divides a full rotation into a number of equal
steps. The motor's position can then be commanded to move and hold at one of these steps without any
feedback sensor (an ), as long as the motor is carefully sized to the application in respect to torque and
speed
A stepper motor is an electromechanical

device which converts electrical pulses into discrete

mechanical movements. The shaft or spindle of a stepper motor rotates indiscrete step increments
when electrical command pulses are applied to it in the proper sequence. The motors rotation has
several direct relationships to these applied input pulses. The sequence of the applied pulses is directly
related to the direction of motor shafts rotation. The speed of the motor shafts rotation is directly
related to the frequency of the input pulses and the length of rotation is directly related to the number
of input pulses applied.

Characteristics
Stepper motors are rugged and inexpensive because the rotor contains no winding slip rings, or
commutator. The rotor is a cylindrical solid, which may also have either salient poles or fine teeth.
More often than not the rotor is a permanent magnet. Determine that the rotor is a permanent magnet by
unpowered hand rotation showing detent torque, torque pulsations. Stepper motor coils are wound
within a laminated stator, except for can stack construction. There may be as few as two winding
phases or as many as five. These phases are frequently split into pairs. Thus, a 4-pole stepper motor
may have two phases composed of in-line pairs of poles spaced 90o apart. There may also be multiple
pole pairs per phase. For example a 12-pole stepper has 6-pairs of poles, three pairs per phase.
Since stepper motors do not necessarily rotate continuously, there is no horsepower rating. If they do
rotate continuously, they do not even approach a sub-fractional hp rated capability. They are truly small
low power devices compared to other motors. They have torque ratings to a thousand in-oz (inchounces) or ten n-m (newton-meters) for a 4 kg size unit. A small dime size stepper has a torque of a
hundredth of a newton-meter or a few inch-ounces. Most steppers are a few inches in diameter with a
fraction of a n-m or a few in-oz torque. The torque available is a function of motor speed, load inertia,
load torque, and drive electronics as illustrated on the speed vs torque curve. (Figure ) An energized,
holding stepper has a relatively high holding torque rating. There is less torque available for a running
motor, decreasing to zero at some high speed. This speed is frequently not attainable due to mechanical
resonance of the motor load combination.
Stepper speed characteristics.

Stepper motors move one step at a time, the step angle, when the drive waveforms are changed. The
step angle is related to motor construction details: number of coils, number of poles, number of teeth. It
can be from 90o to 0.75o, corresponding to 4 to 500 steps per revolution. Drive electronics may halve
the step angle by moving the rotor in half-steps.
Steppers cannot achieve the speeds on the speed torque curve instantaneously. The maximum start
frequency is the highest rate at which a stopped and unloaded stepper can be started. Any load will
make this parameter unattainable. In practice, the step rate is ramped up during starting from well
below the maximum start frequency. When stopping a stepper motor, the step rate may be decreased
before stopping.

figure-1
The maximum torque at which a stepper can start and stop is the pull-in torque.
This torque load on the stepper is due to frictional (brake) and inertial (flywheel)
loads on the motor shaft. Once the motor is up to speed, pull-out torque is the
maximum sustainable torque without losing steps

2.1 WORKING PRINCIPLE


Stepper motors consist of a permanent magnetic rotating shaft, called the rotor, and electromagnets on the
stationary portion that surrounds the motor, called the stator. illustrates one complete rotation of a stepper
motor. At position 1, we can see that the rotor is beginning at the upper electromagnet, which is currently

active (has voltage applied to it). To move the rotor clockwise (CW), the upper electromagnet is deactivated
and the right electromagnet is activated, causing the rotor to move 90 degrees CW, aligning itself with the
active magnet. This process is repeated in the same manner at the south and west electromagnets until we
once again reach the starting position.

Figure 2

In the above example, we used a motor with a resolution of 90 degrees or demonstration purposes. In
reality, this would not be a very practical motor for most applications. The average stepper motor's
resolution -- the amount of degrees rotated per pulse -- is much higher than this. For example, a motor
with a resolution of 5 degrees would move its rotor 5 degrees per step, thereby requiring 72 pulses (steps)
to complete a full 360 degree rotation.
You may double the resolution of some motors by a process known as "half-stepping". Instead of
switching the next electromagnet in the rotation on one at a time, with half stepping you turn on both
electromagnets, causing an equal attraction between, thereby doubling the resolution. As you can see in ,
in the first position only the upper electromagnet is active, and the rotor is drawn completely to it. In
position 2, both the top and right electromagnets are active, causing the rotor to position itself between the
two active poles. Finally, in position 3, the top magnet is deactivated and the rotor is drawn all the way
right. This process can then be repeated for the entire rotation.

Figure 2.1
There are several types of stepper motors. 4-wire stepper motors contain only two electromagnets,
however the operation is more complicated than those with three or four magnets, because the driving
circuit must be able to reverse the current after each step. For our purposes, we will be using a 6-wire
motor.
Unlike our example motors which rotated 90 degrees per step, real-world motors employ a series of minipoles on the stator and rotor to increase resolution. Although this may seem to add more complexity to the
process of driving the motors, the operation is identical to the simple 90 degree motor we used in our
example. An example of a multipole motor can be seen in . In position 1, the north pole of the rotor's
permanent magnet is aligned with the south pole of the stator's electromagnet. Note that multiple
positions are aligned at once. In position 2, the upper electromagnet is deactivated and the next one to its
immediate left is activated, causing the rotor to rotate a precise amount of degrees. In this example, after
eight steps the sequence repeats.

Figure 2.2
The specific stepper motor we are using for our experiments (ST-02: 5VDC, 5 degrees per step) has 6 wires
coming out of the casing. If we follow , the electrical equivalent of the stepper motor, we can see that 3 wires

go to each half of the coils, and that the coil windings are connected in pairs. This is true for all four-phase
stepper motors.

figure 3
However, if you do not have an equivalent diagram for the motor you want to use, you can make a
resistance chart to decipher the mystery connections. There is a 13 ohm resistance between the center-tap
wire and each end lead, and 26 ohms between the two end leads. Wires originating from separate coils are
not connected, and therefore would not read on the ohm meter

2.2 TYPES OF STEPPER MOTOR

Types
There are four main types of stepper motors:
1. Permanent magnet
2. Hybrid synchronous
3. Variable reluctance
4. Lavet stepping
Permanent magnet motors use a permanent magnet (PM) in the rotor and operate on the attraction or
repulsion between the rotor PM and the stator electromagnets. Variable reluctance (VR) motors have a
plain iron rotor and operate based on the principle that minimum occurs with minimum gap, hence the
rotor points are attracted toward the stator magnet poles. Hybrid stepper motors are named because they
use a combination of PM and VR techniques to achieve maximum power in a small package size.

Two-phase stepper motors


There are two basic winding arrangements for the electromagnetic coils in a two phase stepper motor:
bipolar and unipolar.

Unipolar motors
A unipolar stepper motor has one winding with per phase. Each section of windings is switched on for
each direction of magnetic field. Since in this arrangement a magnetic pole can be reversed without
switching the direction of current, the circuit can be made very simple (e.g., a single transistor) for each
winding. Typically, given a phase, the center tap of each winding is made common: giving three leads per
phase and six leads for a typical two phase motor. Often, these two phase commons are internally joined,
so the motor has only five leads.
A or stepper motor controller can be used to activate the drive transistors in the right order, and this ease
of operation makes unipolar motors popular with hobbyists; they are probably the cheapest way to get
precise angular movements.

(For the experimenter, the windings can be identified by touching the terminal wires together in PM
motors. If the terminals of a coil are connected, the shaft becomes harder to turn. one way to distinguish
the center tap (common wire) from a coil-end wire is by measuring the resistance. Resistance between
common wire and coil-end wire is always half of what it is between coil-end and coil-end wires. This is
because there is twice the length of coil between the ends and only half from center (common wire) to the
end.) A quick way to determine if the stepper motor is working is to short circuit every two pairs and try
turning the shaft, whenever a higher than normal resistance is felt, it indicates that the circuit to the
particular winding is closed and that the phase is working.

Bipolar motors
Bipolar motors have a single winding per phase. The current in a winding needs to be reversed in order to
reverse a magnetic pole, so the driving circuit must be more complicated, typically with an arrangement
(however there are several off-the-shelf driver chips available to make this a simple affair). There are two
leads per phase, none are common.
Static friction effects using an H-bridge have been observed with certain drive topologies.
Dithering the stepper signal at a higher frequency than the motor can respond to will reduce this "static
friction" effect.
Because windings are better utilized, they are more powerful than a unipolar motor of the same weight. This
is due to the physical space occupied by the windings. A unipolar motor has twice the amount of wire in the
same space, but only half used at any point in time, hence is 50% efficient (or approximately 70% of the
torque output available). Though a bipolar stepper motor is more complicated to drive, the abundance of
driver chips means this is much less difficult to achieve.

2.3 PHASE CURRENT WAVEFORMS


A stepper motor is a polyphase (see Theory below), and it is ideally driven by sinusoidal current. A full
step waveform is a gross approximation of a sinusoid, and is the reason why the motor exhibits so much
vibration. Various drive techniques have been developed to better approximate a sinusoidal drive
waveform: these are half stepping and microstepping.
Wave drive (one phase on)
In this drive method only a single phase is activated at a time. It has the same number of steps as the full step
drive, but the motor will have significantly less than rated torque. It is rarely used. The animated figure
shown above is a wave drive motor. In the animation, rotor has 25 teeth and it takes 4 steps to rotate by one
tooth position. So there will be 25*4 = 100 steps per full rotation and each step will be 360/100 = 3.6
degrees
Full step drive (two phases on)
This is the usual method for full step driving the motor. Two phases are always on so the motor will provide
its maximum rated torque. As soon as one phase is turned off, another one is turned on. Wave drive and
single phase full step are both one and the same, with same number of steps but difference in torque.
Half stepping
When half stepping, the drive alternates between two phases on and a single phase on. This increases the
angular resolution. The motor also has less torque (approx 70%) at the full step position (where only a single
phase is on). This may be mitigated by increasing the current in the active winding to compensate. The
advantage of half stepping is that the drive electronics need not change to support it. In animated figure
shown above, if we change it to half stepping, then it will take 8 steps to rotate by 1 teeth position. So there
will be 25*8 = 200 steps per full rotation and each step will be 360/200 = 1.8. Its angle per step is half of
the full step.
Microstepping
What is commonly referred to as microstepping is often "sine cosine microstepping" in which the winding
current approximates a sinusoidal AC waveform. Sine cosine microstepping is the most common form, but
other waveforms can be used.Regardless of the waveform used, as the microsteps become smaller, motor
operation becomes more smooth, thereby greatly reducing resonance in any parts the motor may be
connected to, as well as the motor itself. Resolution will be limited by the mechanical ,, and other sources of
error between the motor and the end device. Gear reducers may be used to increase resolution of positioning.
Step size repeatability is an important step motor feature and a fundamental reason for their use in
positioning.

Example: many modern hybrid step motors are rated such that the travel of every full step (example 1.8
degrees per full step or 200 full steps per revolution) will be within 3% or 5% of the travel of every other full
step, as long as the motor is operated within its specified operating ranges. Several manufacturers show that
their motors can easily maintain the 3% or 5% equality of step travel size as step size is reduced from full
stepping down to 1/10 stepping. Then, as the microstepping divisor number grows, step size repeatability
degrades. At large step size reductions it is possible to issue many microstep commands before any motion
occurs at all and then the motion can be a "jump" to a new position.

figure-4

2.4 ADVANTAGES & DISADVANTAGES


Advantages
Low cost for control achieved
High torque at startup and low speeds
Ruggedness
Simplicity of construction
Can operate in an open loop control system
Low maintenance
Less likely to stall or slip
Will work in any environment
Can be used in robotics in a wide scale.
High reliability
The rotation angle of the motor is proportional to the input pulse.
The motor has full torque at standstill (if the windings are energized)
Precise positioning and repeatability of movement since good stepper motors have an accuracy of 3
5% of a step and this error is non-cumulative from one step to the next.
Excellent response to starting/stopping/reversing.
Very reliable since there are no contact brushes in the motor. Therefore the life of the motor is simply
dependant on the life of the bearing.
The motors response to digital input pulses provides open-loop control, making the motor simpler
and less costly to control.
It is possible to achieve very low-speed synchronous rotation with a load that is directly coupled to
the shaft.
A wide range of rotational speeds can be realized as the speed is proportional to the frequency of the
input pulses.

Disadvantages
Require a dedicated control circuit
Use more current than D.C. motors
Torque reduces at higher speeds
Resonances can occur if not properly controlled.
Not easy to operate at extremely high speeds.

2.5 APPLICATIONS
Computer controlled stepper motors are a type of motion-control . They are typically digitally controlled as
part of an system for use in holding or positioning applications.
In the field of lasers and optics they are frequently used in precision positioning equipment such as , , , ,
and . Other uses are in packaging machinery, and positioning of valve pilot stages for fluid control systems.

CHAPTER-3
CIRCUIT OPERATION
3.1 LIST OF COMPONENTS
Arduino or Genuino Board
10k ohm potentiometer
stepper motor
U2003 Darlington Array (if using a unipolar stepper)
SN754410ne H-Bridge (if using a bipolar stepper)
power supply appropriate for your particular stepper
hook-up wires
breadboard

3.2 ARDUINO BOARD


HARDWARE
An Arduino board historically consists of an 8-, 16- or 32-bit AVR (although since 2015 other makers'
microcontrollers have been used) with complementary components that facilitate programming and
incorporation into other circuits. An important aspect of the Arduino is its standard connectors, which
let users connect the CPU board to a variety of interchangeable add-on modules termed shields. Some
shields communicate with the Arduino board directly over various pins, but many shields are
individually addressable via an so many shields can be stacked and used in parallel. Before 2015,
Official Arduinos had used the Atmel series of chips, specifically the , , , , and . In 2015, units by other
producers were added. A handful of other processors have also been used by Arduino compatible
devices. Most boards include a 5 V and a 16 MHz (or in some variants), although some designs such
as the LilyPad run at 8 MHz and dispense with the onboard voltage regulator due to specific formfactor restrictions. An Arduino's microcontroller is also pre-programmed with a

that simplifies

uploading of programs to the on-chip , compared with other devices that typically need an external .
This makes using an Arduino more straightforward by allowing the use of an ordinary computer as the
programmer. Currently, optiboot bootloader is the default bootloader installed on Arduino UNO
At a conceptual level, when using the Arduino integrated development environment, all boards are
programmed over a serial connection. Its implementation varies with the hardware version. Some
serial Arduino boards contain a level shifter circuit to convert between logic levels and (TTL) level
signals. Current Arduino boards are programmed via (USB), implemented using USB-to-serial adapter
chips such as the FT232. Some boards, such as later-model Uno boards, substitute the FTDI chip with
a separate AVR chip containing USB-to-serial firmware, which is reprogrammable via its own ICSP
header. Other variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable USBto-serial adapter board or cable, or other methods, when used with traditional microcontroller tools
instead of the Arduino IDE, standard AVR (ISP) programming is used

SOFTWARE
Arduino programs may be written in any with a compiler that produces binary machine code. Atmel
provides a development environment for their microcontrollers, AVR Studio and the newer Atmel Studio.
The Arduino project provides the Arduino (IDE), which is a application written in the programming
language . It originated from the IDE for the languages and . It is designed to introduce programming to
artists and other newcomers unfamiliar with software development. It includes a code editor with features
such as, , and automatic indentation, and provides simple one-click mechanism to compile and load
programs to an Arduino board. A program written with the IDE for Arduino is called a "sketch".
The Arduino IDE supports the languages and using special rules to organize code. The Arduino IDE
supplies a called Wiring from the Wiring project, which provides many common input and output
procedures. A typical Arduino C/C++ sketch consist of two functions that are compiled and linked with a
program stub main() into an executable program:
setup(): a function that runs once at the start of a program and that can initialize settings.
loop(): a function called repeatedly until the board powers off.
After compiling and linking with the , also included with the IDE distribution, the Arduino IDE employs
the programavrdude to convert the executable code into a text file in hexadecimal coding that is loaded
into the Arduino board by a loader program in the board's firmware.

3.3 ULN 2004A Darlington array

The ULN2003A is an of seven NPN capable of 500mA, 50V output. It features common-cathode for
switching inductive loads. It can come in , , or packaging.In the same family are ULN2002A,
ULN2004A, as well as ULQ2003A and ULQ2004A, designed for different logic input levels

figure-5

Darlington Transistor
A (also known as Darlington pair) achieves very high current amplification by connecting two bipolar
transistors in direct DC coupling so the current amplified by the first transistor is amplified further by the
second one. The resultant current gain is the product of those of the two component transistors:
The seven Darlington pairs in ULN2003 can operate independently except the common cathode diodes
that connect to their respective collectors.

Features
The ULN2003 is known for its high-current, high-voltage capacity. The drivers can be paralleled for even
higher current output. Even further, stacking one chip on top of another, both electrically and physically, has
been done. Generally it can also be used for interfacing with a , where the motor requires high ratings which
cannot be provided by other interfacing devices.
Main specifications:
500 mA rated collector current (single output)
50 V output (there is a version that supports 100 V output)
Includes output flyback diodes
Inputs compatible with and 5-V logic

Applications
Typical usage of the ULN2003A is in for , lamp and , stepper motors, logic buffers and line drivers.

3.4 Schematic diagram

figure-6

CHAPTER-4

PROGRAM
4.1 SPEED CONTROL
#include <Stepper.h>

const int stepsPerRevolution = 100;


Stepper myStepper(stepsPerRevolution, 8,9,10,11);

int stepCount = 0;

void setup() {
}

void loop() {
int sensorReading = analogRead(A0);
int motorSpeed = map(sensorReading, 0, 1023, 0, 100);
if (motorSpeed > 0) {
myStepper.setSpeed(115);

myStepper.step(stepsPerRevolution/100);
}
}

4.2 CLOCKWISE & ANTICLOCKWISE

#include <Stepper.h>

const int stepsPerRevolution = 200;


Stepper myStepper(stepsPerRevolution, 8,9,10,11);

void setup() {

myStepper.setSpeed(115);
Serial.begin(9600);
}

void loop() {
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500);
}

CHAPTER-5

CONCLUSION
are good for precision. You will always know how many steps you've taken with a stepper motor. in
comparison are unreliable and difficult to control. One drawback to stepper motors is that they are
inefficient. They typically sink more current than geared dc motors do.
Controlling stepper motors is a gigantic leap in the right direction if you desire to make your own
mobile robotics project. The inherint control that these motors have to offer allows for quick
implementations

in

robotics

where

tracking

movement

is

necessary.

Please note that the methods and circuits we've used and looked at here today are not the only
ones available to us, I just offer one that I feel is simple enough for anyone to do.

REFERENCES

1. Stepper Motors : Fundamentals, Applications And Design


By V. V. Athani
2. Beginning Arduino
by M I C H A E L M C R O B E RTS
3. MICROPROCESSORS & MICROCONTROLLERS , by Nagoor Kani

Potrebbero piacerti anche