Você está na página 1de 12

ME 104

Sensors and Actuators





Laboratory #7
Stepper Motors








Department of Mechanical Engineering
University of California, Santa Barbara

(Rev. 2006)
Introduction
In this Laboratory, a LabVIEW VI for generating digital TTL signals is used to provide the
stepping sequence for a four-phase unipolar stepper motor. You will then use a function generator and an
analog drive circuit to control the rate of rotation of a unipolar stepper motor in full-step mode.
The stepper motor you will use in this Laboratory is a four-phase unipolar stepper motor
produced by Jameco Electronics (Part #166705). The motor requires a DC Supply Voltage of 12 V and
a Current of 140 mA. The motor has a Step Angle of 3.8, Phase Resistance of 84 , and Phase
Inductance of 16 mH. The phase and field coil schematic for this stepper motor is shown in Figure 1.
stepper
motor
coil
+12

4
w
h
t
/
o
r
a
n
g
e

o
r
a
n
g
e

b
r
o
w
n

b
l
u
e

b
r
o
w
n

w
h
t
/
b
r
n


Figure 1: Jameco stepper motor phase and field coil schematic. Colors refer to lead wires.

Background Reading
Please read the following material prior to this lab:

1. Histand and Alciatore, Introduction to Mechatronics, Section 6.3 and Sections 10.6.
2. Data Sheet, IRLIZ34N HEXFET Power MOSFET, International Rectifier. Available on melab share
drive: Z:\ME 104\Lab 7
3. Data Sheet, 74LS191 Synchronous 4-Bit Binary Up/Down Counters with Mode Control. Available on
melab share drive: Z:\ME 104\Lab 7
4. Data Sheet, 74LS86 Quad 2-Input Exclusive OR Gate. Available on melab share drive: Z:\ME
104\Lab 7

2
Experiment #1: Run VI to Simultaneously Generate Four Digital
Signals
In this experiment, you will use a LabVIEW VI that simultaneously generates four digital TTL
signals that can be used to provide the stepping sequence for a four-phase unipolar stepper motor.
The PCI-6024E DAQ Board has one digital input/output port (P0) with eight channels, all of
which are TTL (transistor-to-transistor logic). Of these eight channels, the first four channels (P0. 0,
P0. 1, P0. 2, and P0. 3) have been configured to Read (acquire) TTL signals, while the last four
channels (P0. 4, P0. 5, P0. 6, and P0. 7) have been configured to Write (generate) TTL signals.

1. Open Write_DigOut.vi from the melab share drive. The VI is shown in Figure 2.
Figure 2. This VI generates four digital output signals that are used to provide the stepping
sequence for a four-phase unipolar stepper motor.

2. Choose an appropriate
*
Digital Ground (D GND) pin on your CB-68LP connector block and provide
(define) ground to that pin using the black (-) terminal of the 5 V FIXED 3 A output from your
Tektronix PS280 DC Power Supply
*
. You do not need to turn on the power supply.

*
Choose a D GND pin that is reasonably close to the four Digital I/O channels (pins) you are using.
3
3. For viewing purposes, connect Digital I/O Channel 4 (P0. 4) and Digital I/O Channel 5 (P0.5) to
your oscilloscope. (Use the Connector Pinout sheets at each station to determine pin number for each
digital output channel.)
4. Run your VI by clicking the Run button. Press the different Phase buttons to toggle them between
ON (high) and OFF (low) states. Using your oscilloscope display, verify that the outputs from
Digital I/O Channel 4 (P0. 4) and Digital I/O Channel 5 (P0. 5) are what you expect them to be.
5. Now connect Digital I/O Channel 6 (P0. 6) and Digital I/O Channel 7 (P0. 7) to your oscilloscope
and verify that the outputs from those two channels are what you expect them to be (i.e., repeat Step 3
above for those two channels).
6. Stop running the VI by clicking theStop button.
7. Ask your TA to check that you have successfully completed Experiment #1.

Experiment #2: Increment the Position of a Unipolar Stepper Motor
Using an Analog Current Amplification Circuit
In this experiment, you will use the LabVIEW VI to produce the stepping sequence for the Jameco
four-phase unipolar stepper motor. The current from the Digital I/O Channels on the DAQ Board is not
sufficient to drive the stepper motor. Therefore, before being sent into the stepper motor, the current from
each of those digital channels must be amplified using a Power MOSFET. A power MOSFET is used to
interface a low output current device such as a data acquisition board or computer port to another device
(such as a stepper motor) that requires larger currents. The power MOSFET you will use in this
laboratory is an IRLIZ34N HEXFET Power MOSFET manufactured by International Rectifier. (See
Figure 3)

S
o
u
r
c
e
D
r
a
i
n

G
a
t
e

Figure 3. IRLIZ34N Power MOSFET

*
Since the ground terminal from the DC Power Supply has already been connected to your electronic breadboard,
you can use the ground connection from that breadboard to define ground.
4

1. Build and connect the circuits shown in Figure 1 and Figure 4. Your gate phase (G) signals will be
generated by the Digital I/O Channels. Obtain G
1
from P0. 4, obtain G
2
from P0. 5, obtain G
3

from P0. 6, and obtain G
4
from P0. 7.


S =Source
D =Drain
G =Gate
(P0.4) (P0.5) (P0.6) (P0.7)
Figure 4. Current amplification circuit using Power MOSFET

Your goal is to verify that the phase sequence shown in Table 1
*
does, in fact, induce 3.8 full-steps
(increments) in shaft angular position.
Table 1: Unipolar full-step phase sequence
Step
1

2

3

4
1 ON OFF ON OFF
2 ON OFF OFF ON
3 OFF ON OFF ON
4 OFF ON ON OFF
CCW
CW

2. Open your name_l ab8_ex1. vi .
3. Press the Phase buttons so that they specify Step 1 (from Table 1) and then run your VI (once) by
clicking the Run button. Your stepper motor shaft may move initially, but it will quickly come to a
stop.

*
This is a direct copy of Table 10.1 from the Mechatronics textbook.
5
4. Now set (specify) Step 2 (from Table 1) and then run your VI (once) by clicking the Run button.
The position of your stepper motor shaft should full-step (increment) once by 3.8 in the clockwise
(CW) direction
*
.
5. Specify Step 3 (from Table 1) and then run your VI (once) by clicking the Run button. Verify that
the position of your stepper motor shaft full-steps (increments) once by 3.8 in the clockwise (CW)
direction.
6. Specify Step 4 (from Table 1) and then run your VI (once) by clicking the Run button. Verify that
the position of your stepper motor shaft full-steps (increments) once by 3.8 in the clockwise (CW)
direction.
7. Specify Step 1 (from Table 1) and then run your VI (once) by clicking the Run button. Verify that
the position of your stepper motor shaft full-steps (increments) once by 3.8 in the clockwise (CW)
direction.
8. Repeat the step sequence as indicated above (in Table 1) and verify that each step results in a CW
full-step (increment) of 3.8.
9. Now reverse the step sequence and verify that each step results in a CCW (counter-clockwise) full-
step (increment) of 3.8.

You can also verify that the phase sequence shown in Table 2

does, in fact, induce 1.9 half-steps


(increments) in shaft angular position. Notice that, to jump between any two adjacent steps shown in
Table 2, you would need to change the state of only one phase at a time. Therefore, you can conveniently
verify the half-step sequence by running the VI continuously.

Table 2: Unipolar half-step phase sequence
Step
1

2

3

4
1 ON OFF ON OFF
1.5 ON OFF OFF OFF
2 ON OFF OFF ON
2.5 OFF OFF OFF ON
3 OFF ON OFF ON
CCW
CW

*
Although it is not practical for the human eye to exactly verify a small angle such as 3.8, you should make sure
that the step (increment) you observe is within the ballpark.

This is a direct copy of Table 10.2 from the Mechatronics textbook.


6
3.5 OFF ON OFF OFF
4 OFF ON ON OFF
4.5 OFF OFF ON OFF

10. Press the Phase buttons so that they specify Step 1 (from Table 2).
11. Continuously run your VI by clicking the Run Continuously button. Your stepper motor shaft may
move initially, but it will quickly come to a stop.
12. Now set (specify) Step 1.5 (from Table 2). Verify that the position of your stepper motor shaft half-
steps (increments) once by 1.9 in the clockwise (CW) direction.
13. Now set (specify) Step 2 (from Table 2). Verify that the position of your stepper motor shaft half-
steps (increments) once by 1.9 in the clockwise (CW) direction.
14. Continue this process by specifying the half-step sequence shown in Table 2. Verify that each half-
step results in a CW half-step (increment) of 1.9.
15. Now reverse the half-step sequence shown in Table 2 and verify that each half-step results in a CCW
(counter-clockwise) half-step (increment) of 1.9.
16. Stop running the VI by clicking theAbort Execution (stop) button.
17. Ask your TA to check that you have successfully completed Experiment #2.

Experiment #3: Observe the Output of a Binary Counter Chip
In this experiment, you will use a function generator and an oscilloscope to verify the behavior of
the four output bits of a binary counter chip. The binary counter chip you will use in this Laboratory is
the 74LS191 Synchronous 4-Bit Binary Up/Down Counter. The pin diagram for this counter chip is
shown in Figure 5.
7
Figure 5. Pinout for 74LS191 binary counter chip

1. Make sure that your CB-68LP connector block is no longer connected to your power MOSFETs. In
particular, disconnect the CB-68LP connector block from Pin 1 of each of the four power
MOSFETs. (Recall that you made these connections during Experiment #2). Retain the connection
from the stepper motor to the power MOSFETs.
2. Connect the MAIN OUT terminal on the function generator to Channel 1 on your oscilloscope. Set
the vertical scale on your oscilloscope to 5.00 volts/division.
3. Find the FUNCTION selection buttons on your function generator. Select (press down) the square
wave function () button. Make sure that none of the other buttons on that row are pressed down.
4. On your function generator, select the 0-20Vp-p OPEN CIRCUIT setting by pressing up that
button. This will extend your voltage output range to 0-20 volts, peak-to-peak.
5. Generate a square wave with the following characteristics:
Amplitude =5 V peak-to-peak
DC offset = 2.5 V (all parts of the square wave should be above 0 V)
Frequency =100 Hz.
6. Verify the properties of your square wave using the oscilloscope display. The period of your square
wave should be T =10 milliseconds. For best viewing, set the horizontal scale on your oscilloscope
to 10 ms/division.
8
7. Using an electronic breadboard, build and connect the circuits shown in Figure 6. For the purposes of
this Laboratory, the direction switch shown in Figure 6 will consist of a black wire. You can use
this direction switch to make the counter count up or count down.

10K
Figure 6. Binary up/down counter circuit

8. Turn on (engage) the direction switch. When you do this, Pin 5 on your counter chip has been
connected to 0 V (low), so your counter should count up (increment).
*

9. Connect the least significant bit Q
A
(pin 3) of the counter chip output to Channel 2 of your
oscilloscope. Verify that the output Q
A
is a digital pulse train with period 2T, where T is the period of
your clock input (from the function generator). Make a sketch.
10. Now connect the second least significant bit Q
B
(pin 2) of the counter chip output to Channel 2 of
your oscilloscope. (Remove the connection to Q
B
A
). Verify that the output Q
B
B is a digital pulse train
with period 4T. Make a sketch.
11. Connect the third least significant bit Q
C
(pin 6) of the counter chip output to Channel 2 of your
oscilloscope. (Remove the connection to Q
B
). Verify that the output Q B
C
is a digital pulse train with
period 8T. Make a sketch.
12. Connect the most significant bit Q
D
(pin 7) of the counter chip output to Channel 2 of your
oscilloscope. (Remove the connection to Q
C
). Verify that the output Q
D
is a digital pulse train with
period 16T. Make a sketch.
13. Ask your TA to check that you have successfully completed Experiment #3.

*
See counter data sheet for explanation.
9


Experiment #4: Control the Angular Velocity of a Unipolar Stepper
Motor Using an Analog Drive Circuit
In this experiment, you will use a function generator and an analog drive circuit to control the rate
of rotation of a unipolar stepper motor in full-step mode. Your analog drive circuit will consist of a
binary counter chip and an exclusive OR (XOR) gatechip. For this laboratory, the XOR gate chip we
will use is the74LS86 Quad 2-Input Exclusive OR Gate. This XOR gate chip has four XOR gates
(Figure 7), but you will only need to use three of them for this Laboratory.


Figure 7: Pinout for 74LS86 Exclusive OR chip

1. Set your function generator to output a square wave with amplitude 5V and frequency 1 Hz.
2. Build
*
and connect the circuits shown in Figure 8. Dont forget to provide power (V
CC
=+5V) and
ground (GND) to your XOR gate chip.


*
Hint: before building the circuit, refer to Figure 7 and select appropriate pins on your XOR chip to implement the
logic circuit shown in Figure 8. Write down those pin numbers on Figure 8.
10

10K
Figure 8: Unipolar stepper motor full-step drive circuit

3. Turn on (engage) the direction switch.
4. Vary the frequency of your clock signal (square wave from the function generator) between the range
0-400 Hz and observe the direction and rate of rotation of the shaft of the stepper motor. The rate of
rotation should increase with frequency.
5. Verify that the direction of rotation changes depending on whether the direction switch is on
(engaged) or off (disengaged).
6. Ask your TA to check that you have successfully completed Experiment #4.


Saving Files
Before you leave, remember to save all of your files to your ECI account (for later use and
backup purposes).
Laboratory Report
1. For the VI you wrote in this laboratory (listed in the preceding section), provide a printout that shows
the front panel and block diagram.
11
2. In instruction 4 during Experiment #2, you were told that Your stepper motor shaft may move
initially, but it will quickly come to a stop. In which scenario will the stepper motor not move at all?
In which scenarios will the stepper motor initially move, but quickly come to a stop? Explain.
3. In Experiment #2, you ran your VI using the Run button to verify the full-step sequence, but you
used the Run Continuously button to verify the half-step sequence. Explain why using the Run
Continuously button to verify the full-step sequence would have been problematic.
4. Figure 10.28 in the Mechatronics textbook shows the timing diagram for the two least significant
output bits of a binary counter. Draw a timing diagram that shows the clock input bit and the output
bits for the binary counter you observed in Experiment #3. That is, provide a timing diagram that
clearly shows CLOCK, Q
A
, Q
B
, Q B

C
, and Q
D
. Make sure that your signals are in phase.
5. In Experiment #3, the clock input to your counter chip had a voltage in the range [-5V, +5V], but the
output from the counter chip was in the range [0, +5V]. From a physical point of view, explain why
the output from your counter chip could not take negative values.
6. Redraw the analog drive circuit shown in Figure 8, but include the pin numbers you used for the XOR
gate chip.
7. In this Laboratory, you controlled the angular position and/or the angular velocity of the stepper
motor shaft. Would you describe your control methods as open loop or closed loop? Explain.
8. What is the (listed) detent torque and holding torque of the stepper motor used in this Laboratory?
*


Additional Reading
Feel free to read the following material to learn more about Jameco stepper motor specifications.

1. Jameco Electronics Catalog, , Page41 (Stepper Motors), J ameco Electronics. Available online at
www.jameco.com/J ameco/Products/ProdCT/motor.pdf.


*
Refer to Additional Reading section.
12

Você também pode gostar