Vous êtes sur la page 1sur 28

Interfacing Stepper Motor to

MB90F387S using ULN2003A


Driver
Stepper Motor
• Electromechanical device
• Favored for ease of positional control
• Has high torque on larger versions
• Used mostly in old printers and scanners and
low to medium precision CNC’s (computer
numerical control)
• Digitally controlled which allows precise
rotation
Stepper Motors
Stepper Motor
• Stepper motors have
multiple "toothed"
electromagnets
arranged around a
central gear-shaped
piece of iron
• The electromagnets are
energized by an
external control circuit
How does it work?
• To make the motor shaft turn, first, one
electromagnet is given power, which magnetically
attracts the gear's teeth
• When the gear's teeth are aligned to the first
electromagnet, they are slightly offset from the next
electromagnet
• So when the next electromagnet is turned on and
the first is turned off, the gear rotates slightly to
align with the next one, and from there the process
is repeated
The top electromagnet (1) is
turned on, attracting the
nearest teeth of the gear-
shaped iron rotor. With the
teeth aligned to electromagnet
1, they will be slightly offset
from right electromagnet (2).

* Images & text from Wikipedia


The top electromagnet (1) is
turned off, and the right
electromagnet (2) is
energized, pulling the teeth
into alignment with it. This
results in a rotation of 3.6° in
this example.

* Images & text from Wikipedia


The bottom electromagnet (3)
is energized; another 3.6°
rotation occurs.

* Images & text from Wikipedia


The left electromagnet (4) is
energized, rotating again by
3.6°. When the top
electromagnet (1) is again
enabled, the rotor will have
rotated by one tooth position;
since there are 25 teeth, it will
take 100 steps to make a full
rotation in this example.

* Images & text from Wikipedia


Two Phase Stepper Motors
• Unipolar Stepper Motor
– requiring only one power source
– exhibits lower torque (holding and dynamic)
– easy to control from the driver perspective
• Bipolar Stepper Motor
– requiring two power sources or a switchable polarity
power source
– bipolar motors have logically a single winding per phase.
– driving circuit must be more complicated
– more powerful than a unipolar motor of the same weight
torque Phase B types.
and 8 for 1.8- and 0.9-degree Phase A
A N
3
hang- 5 4
It is the relationship between the S
ore Figure number
5. Magnetic fluxpoles
of rotor pathandthrough a
the equival- Stator A
e two-pole entstepper
statormotor
poles,with
and athelag betweenthe
number
utputthe rotor and stator.
number of phases that determines the Stator B
ound full-step angle of a stepper motor. IB
“Drive Phase B VM Phase B
Step angle=360 ÷ (NPh × Ph)=360/N
N
NPh = Number of equivalent poles per N
8 1 poles IA
phase = number
7 of rotor 8 1
ping Phase A S 7
Ph = Number of phases 2 S
VM S Rotor N S Rotor
2
N
6 Phase A 6 N
o N IA = Total number Nof poles for all
Phase A phases together4 3 3
se 5 5 4
S S
If the rotor and stator tooth pitch is
ases Stator A Stator A
unequal, a more-complicated relation-
ipolar ship exists.
center Stator B Stator B
IB IB
nipolar
Phase B Phase B Phase B
“four- Stepping Modes VM
nly has The following are the most common Figure 6. Unipolar and bipolar wound
drive modes.
Unipolar N stepper motors. Bipolar
e IA
8 1
these • Wave Drive (1 7phase on)
motors with the same winding param-
or • Full Step Drive (2 phases on)
2
S eters this excitation mode would result
Phase A S 6 Rotor N
N in the same mechanical position. The
of the • Half Step Drive (1 & 2 phases on)
disadvantage of this drive mode is that
Drive Modes
• Wave Drive (1 phase on)
• Full Step Drive (2 phases on)
• Half Step Drive (1 & 2 phases on)
• Microstepping (Continuously varying motor
currents)
Drive Mode Waveforms
Coil

Rotor (25 teeth)

Wave Drive Unipolar Stepper Motor


Wave Drive Stepper Motor
• A rotor with 25 teeth takes 4 steps to rotate
by 1 teeth position
• Full rotation = 25 * 4 = 100 steps
• 1 step = 360/100 = 3.6 degrees
• For a rotation of 270 degrees:
• 270/3.6 = 75 steps
Software Control
• The software implementation to control the
stepper depends on the drive mode being
used.
• To control the direction of rotation (CW/
CCW), reverse the phase order.
• To control the speed of the rotation, vary
the time to energize one phase.
Coil

Clockwise
C

Counter-Clockwise
B

Direction Control
Coil

Slower
C

Faster
C

Speed Control
Using ULN2003A as SM Driver
• The stepper motor requires large amount of
current to energize the electromagnets
• MCU could not directly drive the stepper
due to its low current output
• A two-stage amplifier shall drive the motor
such as Darlington pair transistors
• ULN2003A is an array of 8 Darlington pairs
in one IC package
LKS Expansion Board
ULN2003A

Stepper Motor
Connector

LCD + Keypad + Stepper Motor


Seatwork
• Draw a flowchart for a program that will
rotate the stepper motor (key * 10) degrees.
If the key is even, the motor shall rotate
clockwise otherwise it shall rotate counter-
clockwise. Keys ‘*’ and ‘#’ shall not rotate the
motor. For example: pressing 5 will rotate the
SM 50 degrees counter-clockwise. Assume
that the SM has 0.9 degree/step.
Sources
• Wikipedia.com (some images)
• Industrial Circuits Application Note: Stepper
Motor Basics
• http://www.aps.anl.gov/bcda/hardware/
motion_control_stds/phases.html

Vous aimerez peut-être aussi