Sunteți pe pagina 1din 10

Center for Advanced Studies in Engineering, Islamabad

Industrial Automation Lab

Experiment # 04: Controlling Speed and Direction of Stepper


Motor Using PIC18

Name of Student: …………………………………………………….

Roll No.: ……………………………………………………………….

Date of Experiment: ………………………………………………….

Report submitted on: ……………………………………………….

Marks obtained: ……………………………………

Remarks: ……………………………………………

Instructor’s Signature: ……………………………...

Spring 2020-Semester VI

Sir Syed CASE Institute of Technology Industrial Automation Lab 1


Controlling Speed and Direction of Stepper
Objectives:
1. Design a dual H-bridge for stepper motor control using BJT
2. Controlling the speed and direction of stepper motor.
3. To use a PIC18 microcontroller to control the H-bridge.

Introduction to Stepper Motors


Stepper motor is a brushless DC motor that rotates in steps i.e. it divides the full rotation into a
number of equal steps. This is very useful because it can be precisely positioned without any
feedback sensor, which represents an open-loop controller. The number and rate of pulses
control the position and speed of motor shaft. For example, in the case of a 200-step motor, one
complete rotation (360°) is divided in to 200 steps, which means one step is equal to 1.8°. It can
take only one step at a time and each step are equal. The exact position of a stepper motor can
be controlled without using any feedback. Generally, stepper motors are manufactured with
steps per revolution of 12, 24, 72, 144, 180, and 200, resulting in shaft increments of 30, 15, 5,
2.5, 2, and 1.8 degrees per step. It finds great application in field of microcontrollers such as
robotics.

A stepper motor is a permanent magnet or variable reluctance dc motor that has the following
performance characteristics:

1. Rotation in both directions,


2. Precision angular incremental changes,
3. Repetition of accurate motion or velocity profiles,
4. A holding torque at zero speed, and
5. Capability for digital control.

A stepper motor can move in accurate angular increments knows as steps in response to the
application of digital pulses to an electric drive circuit from a digital controller.

Stepper motors are either bipolar, requiring two power sources or a switchable polarity power
source, or unipolar, requiring only one power source. They are powered by dc current sources
and require digital circuitry to produce the coil energizing sequences for rotation of the motor.
Feedback is not always required for control, but the use of an encoder or other position sensor
can ensure accuracy when it is essential. The advantage of operating without feedback is that a
closed loop control system is not required. Generally, stepper motors produce less than 1
horsepower (746W) and are therefore frequently used in low-power position control
applications.

Sir Syed CASE Institute of Technology Industrial Automation Lab 2


Construction of Stepper Motor
As usual stepper motors work on the principle of electromagnetic induction. Ordinary DC Brush
motors rotate continuously when DC voltage is applied to their terminals. While a stepper motor
need a sequence of digital pulses for one complete rotation. The stepper motor consists of a
rotor that is generally a permanent magnet and it is surrounded by the windings of the stator. As
we activate the windings step by step in a particular order and let a current flow through them
they will magnetize the stator and make electromagnetic poles respectively that will cause
propulsion to the motor.

Figure-1: Construction of Stepper Motor

Unipolar Stepper Motors:


Unipolar stepping motors with 5 or 6 wires are usually wired as shown in the schematic in
Figure1.1, with a center tap on each of two windings.

In use, the center taps of the windings are typically wired to the positive supply, and the two ends
of each winding are alternately grounded The motor cross section shown in Figure1.1 is of a 30
degree per step motor –

The difference between these two motor types is not relevant at this level of abstraction. Motor
winding number 1 is distributed between the top and bottom stator pole, while motor winding
number 2 is distributed between the left and right motor poles. The rotor is a permanent magnet
with 6 poles, 3 south and 3 north, arranged around its circumference.

For higher angular resolutions, the rotor must have proportionally more poles. The 30 degree per
step motor in the figure is one of the most common permanent magnet motor designs, although
15 and 7.5 degree per step motors are widely available. As shown in the figure, the current
flowing from the center tap of winding 1 to terminal a cause the top stator pole to be a north
pole while the bottom stator pole is a south pole. This attracts the rotor into the position shown.
If the power to winding 1 is removed and winding 2 is energized, the rotor will turn 30 degrees,
or one step.

To rotate the motor continuously, we just apply power to the two windings in sequence.
Assuming positive logic, where a 1 means turning on the current through a motor winding, the
following two control sequences will spin the motor illustrated in Figure 1 clockwise 24 steps or
4 revolutions

Sir Syed CASE Institute of Technology Industrial Automation Lab 3


Figure 1.1
The unipolar stepper motor operates with one winding with a center tap per phase. Each section
of the winding is switched on for each direction of the magnetic field. Each winding is made
relatively simple with the commutation circuit, this is done since the arrangement has a magnetic
pole which can be reversed without switching the direction of the current. It can be a 5 or 6 lead
stepper motor as shown in figure 2.

Figure-1.2 : Unipolar Stepper Motor

In most cases, given a phase, the common center tap for each winding is the following; three
leads per phase and six leads for a regular two phase stepper motor. You will usually see that
both these phases are often joined internally, this makes the stepper motor only have five leads.
Often a stepper motor controller will be used to activate the drive transistors in the proper order
for continuous rotation.

Bipolar Stepper Motors:


Bipolar permanent magnet and hybrid motors are constructed with exactly the same mechanism
as is used on unipolar motors, but the two windings are wired more simply, with no center taps.
Thus, the motor itself is simpler but the drive circuitry needed to reverse the polarity of each pair
of motor poles is more complex. The schematic in Figure 1.2 shows how such a motor is wired,
while the motor cross section shown here is exactly the same as the cross section shown in
Figure1. The drive circuitry for such a motor requires an H-bridge control circuit for each winding.
Briefly, an H-bridge allows the polarity of the power applied to each end of each winding to be
controlled independently

Sir Syed CASE Institute of Technology Industrial Automation Lab 4


Figure 1.3

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 H-bridge arrangement. Unlike the unipolar stepper motor, the bipolar stepper motor has two
leads per phase, neither of which are common.

Figure-1.4: Bipolar Stepper Motor

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 but required complicated circuit for driving.

Motor Speed
The motor speed measured in step per second (step/s) is a function of switching rate. So by
changing the length of delay between the energizing sequences of coil, we can achieve various
speed.

Driving Modes
The unipolar stepper motor can be drive in three mode.
1. Wave Drive Mode
2. Full Drive Mode
3. Half Drive Mode

Sir Syed CASE Institute of Technology Industrial Automation Lab 5


1. Wave Drive Mode
In this mode only one stator electromagnet is energized at a time. It has the same number of
steps as the full step drive but the torque is significantly less. It is rarely used. It can be used
where power consumption is more important than torque.

Table-1: Wave Drive

2. Full Drive Mode


In this mode two stator electromagnets are energized at a time. It is the usual method used for
driving and the motor will run at its full torque in this mode of driving.

Table-2: Full Drive

3. Half Drive Mode


In this stepping mode, alternatively one and two phases are energized. This mode is commonly
used to increase the angular resolution of the motor but the torque is less approximately 70% at
its half step position (when only a single phase is on). We can see that the angular resolution
doubles in Half Drive Mode.

Table-3: Half Drive


PM 55L-048 Stepper Motor
PM55L-048 Permanent Magnet Stepper can be the perfect solution for your application's power
output needs. The step angle for this stepper motor is 7.5 degree which results in to complete
one revolution in 48 steps. We can drive this stepper motor by using h-bridge driver IC.

Sir Syed CASE Institute of Technology Industrial Automation Lab 6


Experimental Work
Task 1
In this experiment, you will perform ohmic test to identify the winding connections. After
identifying winding connections, you will identify phase excitation sequence for bidirectional
motion.

Line 1 Line 2 Line 3 Line 4 Line 5 Line 6


Color /phase Ω Ω Ω Ω Ω Ω
Line 1 0
Ω

Line 2 0
Ω

Line 3 0
Ω

Line 4 0
Ω

Line 5 0
Ω

Line 6 0
Ω

Phase: A=_______________ Phase: B=________________Phase: 1=_______________

Phase: A’=________________Phase: B’=________________Phase: 2=________________

Sir Syed CASE Institute of Technology Industrial Automation Lab 7


Task 2
After sequence is identified, write a code to drive the stepper motor according to the block
diagram as shown below in figure-4.
NOTE Add three button for motor driving mode(Wave Drive, Full Drive, Half Drive)

Figure-1.5: Block Diagram


Verify that the output is as per expected and then demonstrate these to your teacher.

Sir Syed CASE Institute of Technology Industrial Automation Lab 8


Stepper Motor Drive

The Board layout and Schematic of the stepper motor drive is show below in Figure 1.3 and 1.4
respectively.

Figure 1.3

Figure 1.4.

Sir Syed CASE Institute of Technology Industrial Automation Lab 9


Department of Electrical and Computer Engineering

Industrial Automation Spring 2020

Name: ________________________________ LAB No___________ Roll No: _________________

Rubric Good Satisfactory Poor Marks


(75-100 %) (50-75 %) (0-50 %)

On-Chip resource Judicious use of on- Not careful in using on- Not careful in using 1
management chip resources like chip resources like on-chip resources
RAM, code size, RAM, code size, timers, like RAM, code size,
timers, interrupts interrupts etc or timers, interrupts etc
etc and judiciously carelessly selected and carelessly
selecting the data data type of variables. selected data type of
type of variables. variables.
Code indentation and Proper indentation Indentation of code or No indentation of 1
descriptive variable of code with partially descriptive code and no
name descriptive variable variable names. descriptive variable
names. names.

Lab Report Writing The report is well The report is not The report is not 1
formatted with all formatted or the formatted and the
the queries queries asked are not queries asked are
answered in a answered clearly. answered incorrectly
thoughtful manner. or not clearly.

Task Completion Task completed by Partially complete task None of the 5


fulfilling all the by fulfilling some requirements are
requirements. requirements. fulfilled.

Neat and clean wiring All the components Few but not all the All the components 2
of circuit are wired in a neat, components are wired are not wired in a
clean and safe in a neat, clean and safe neat, clean and safe
manner. manner. manner.

Sir Syed CASE Institute of Technology Industrial Automation Lab 10

S-ar putea să vă placă și