0% found this document useful (0 votes)
7 views28 pages

Motor Interface

Uploaded by

SANTOSH VERMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views28 pages

Motor Interface

Uploaded by

SANTOSH VERMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Microprocessors & Microcontrollers

L25: Motor Interfacing


Stepper Motor Interfacing
Introduction to Stepper Motors
 A stepper motor is a widely used device that translates
electrical pulses into mechanical movement.
 In applications such as disk drives, dot matrix printers, and
robotics, the stepper motor is used for position control.
 Stepper motors commonly have a permanent magnet rotor
(also called the shaft) surrounded by a stator.
 The most common stepper motors have four stator windings
that are paired with a center-tapped common as shown in the
next slide. This type of stepper motor is commonly referred to
as a four-phase or unipolar stepper motor.
 The center tap allows a change of current direction in each of
two coils when a winding is grounded, thereby resulting in a
polarity change of the stator.
Introduction to Stepper Motors Cont.

Stator Windings Configuration


Stepper Motors Connection to the 8051
Introduction to Stepper Motors Cont.
 Notice that while a conventional motor shaft runs freely,
the stepper motor shaft moves in a fixed repeatable
increment, which allows one to move it to a precise position. This
repeatable fixed movement is possible as a result of basic magnetic
theory where poles of the same polarity repel and opposite poles
attract.
 The direction of the rotation is dictated by the stator
poles. The stator poles are determined by the current sent through
the wire coils. As the direction of the current is changed, the
polarity is also changed causing the reverse motion of the rotor.
 The stepper motor discussed here has a total of 6 leads: 4 leads
representing the four stator windings and 2 commons for the
center-tapped leads.
 As the sequence of power is applied to each stator winding, the
rotor will rotate. There are several widely used sequences where
each has a different degree of precision.
Step Sequence and Step Angle
Table 17 – 3: Step Sequence
Step Sequence and Step Angle Cont.
 It must be noted that although we can start with any of the
sequences in the 1st Table of the last slide, once we start we must
continue in the proper order. For example, if we start with step 3
(0110), we must continue in the sequence of steps 4, 1,2, etc.
 How much movement is associated with a single step?
 This depends on the internal construction of the motor, in
particular the number of teeth on the stator and the rotor.
 The step angle is the minimum degree of rotation
associated with a single step. Various motors have different
step angles.
 Table 17-4 shows some step angles for various motors. In Table 17-
4, notice the term steps per revolution. This is the total number of
steps needed to rotate one complete rotation or 360 degrees
 All the stepper motors discussed in this section have 4 leads for the
stator winding and 2 COM wires for the center tap.
Example 2
Q: Describe the 8051 connection to the stepper motor of
the following Figure and code a program to rotate it
continuously.
Solution Example 2
The following steps show the 8051 connection to
the stepper motor and its programming:
 The common wire(s) are connected to the positive side of
the motor’s power supply. In many motors, +5 V is
sufficient.
 The four leads of the stator winding are controlled by four
bits of the 8051 port (Pl.0 - P1.3). However, since the
8051 lacks sufficient current to drive the stepper motor
windings, we must use a driver such as the ULN2003 to
energize the stator.
Code for Example 2

 Change the value of DELAY to set the speed of rotation.


 We can use the single-bit instructions SETB and CLR instead of RR A to
create the sequences.
Steps per second and rpm Relation
 The relation between rpm (revolutions per minute), steps
per revolution, and steps per second is as follows.
The four-step sequence and number of teeth
on rotor
 The switching sequence shown earlier in Table 17-3 is called
the 4-step switching sequence since after four steps the same
two windings will be “ON”
 How much movement is associated with these four steps?
 After completing every four steps, the rotor moves only
one tooth pitch.
 Therefore, in a stepper motor with 200 steps per revolution,
the rotor has 50 teeth since 4×50 = 200 steps are needed to
complete one revolution.
 This leads to the conclusion that the minimum step angle is
always a function of the number of teeth on the rotor. In other
words, the smaller the step angle, the more teeth the
rotor passes.
Example 3
Q:Write a program to rotate a motor 64º in the clockwise
direction. The motor has a step angle of 2º. Use the 4-step
sequence in the table 17-3.
Solution
A motor with a 2º step angle has the following characteristics:
 Step angle: 2º
 Steps per revolution: 180
 No. of rotor teeth: 45
 Movement per 4-step sequence: 8º
Solution Example 3 Cont.
To move the rotor 64º, we have to send eight consecutive 4-step sequences, i.e., 32 steps.

ORG 0000H
MOV A, #66H
MOV R0, #32
BACK: RR A
MOV P1, A
ACALL DELAY
DJNZ R0, BACK
END
Half-Step 8-Step Sequence
 Looking at Example 3, one might wonder what happens if
we want to move 45 degrees, since the steps are 2 degrees
each.
 To allow for finer resolutions, all stepper motors allow
what is called an 8-step switching sequence.
 The 8-step sequence is also called half-stepping, since in the
8-step sequence each step is half of the normal step angle.
 For example, a motor with a 2-degree step angle can be
used as a 1-degree step angle if the sequence of Table
given in the next slide is followed.
Half-Step 8-Step Sequence Table
DC Motor Interfacing
Introduction to DC Motor
 A direct current (DC) motor is another widely used device that
translates electrical pulses into mechanical movement.
 In the DC motor we have only + and – leads. Connecting them to a
DC voltage source moves the motor in one direction. By reversing
the polarity, the DC motor will move in the opposite direction.
 One can easily experiment with the DC motor. For example, small
fans used in many motherboards to cool the CPU are run by DC
motors. By connecting their leads to the + and – voltage source,
the DC motor moves.
 While a stepper motor moves in steps of 1 to 15 degrees, the DC
motor moves continuously.
 In a stepper motor, if we know the starting position we can easily
count the number of steps the motor has moved and calculate the
final position of the motor. This is not possible in a DC motor.
Introduction to DC Motor Cont.
 The maximum speed of a DC motor is indicated in rpm
and is given in the data sheet.
 The DC motor has two rpms: no-load and loaded. The
manufacturer’s data sheet gives the no-load rpm.
 The no-load rpm can be from a few thousand to tens of
thousands.
 The rpm is reduced when moving a load and it decreases
as the load is increased. For example, a drill turning a
screw has a much lower rpm speed than when it is in the
no-load situation.
Introduction to DC Motor Cont.
 DC motors also have voltage and current ratings.
 The nominal voltage is the voltage for that motor under normal
conditions, and can be from 1 to 150V, depending on the motor.
 As we increase the voltage, the rpm goes up.
 The current rating is the current consumption when the nominal
voltage is applied with no load, and can be from 25mA to a few
amps.
 As the load increases, the rpm is decreased, unless the current or
voltage provided to the motor is increased, which in turn increases
the torque.
 With a fixed voltage, as the load increases, the current (power)
consumption of a DC motor is increased. If we overload the motor
it will stall, and that can damage the motor due to the heat
generated by high current consumption.
DC Motor Image
DC Motor Connection with 8051
Introduction to DC Motor Cont.
Bidirectional Control
 With the help of relays or some specially designed chips
we can change the direction of the DC motor rotation.

H-Bridge Motor Configuration H-Bridge Motor Clockwise Configuration

H-Bridge Motor Counterclockwise Configuration H-Bridge in an Invalid Configuration


Example 4
Q: A switch is connected to pin P2.7. Using a simulator,
write a program to monitor the status of SW and perform
the following:
1. If SW = 0, the DC motor moves clockwise.
2. If SW = 1, the DC motor moves counterclockwise.
Outline

You might also like