CSE 466 Lab2
Goals
- Learn about stepper motors
- Learn about the use of internal timers and the timer interrupt system
Instructions
- Our motor driver will need a power supply of 7 volts in addition to the
normal 5 volts used to power the 89c55. Turn on the bench supply and turn the
current dial up mid way. Then set the voltage to 7volts.
- Setup the circuit in figure 11 of the MC3479 data
sheet.
Don't worry about the diode between Vm and Vd; Use a wire instead.
Don't hook up Phase A (pin 11). You want half step mode with OIC being tied to
Gnd. Also, the bias/set pin should go through a resistor to Gnd. You will need
to find the correct value of this resistor to limit the output current to
350mA. NOTE: Vm is 7 volts.
All this should leave you with two pins to
control from the 89c55, one controls the speed of the motor, the other
controls the direction. We will be providing two 20 ohm resistors to hook in
series with each motor coil.
- For this lab we'll need two switches hooked to the 89c55. These will be
used to control the operation of the motor.
- The first goal is to get the motor to turn. To do this, write an assembly
program that controls the clock line of the MC3479. We've provided a template
for a 89c55 assembly program here.
Each cycle, the motor should move one half step. To get a decent speed you
need to pulse it between 10 and 300 times a second. In the last lab you used a
delay loop to get the right timing. This time, your motor control program should be
interrupt driven, using one of the internal timers of the 89C55. Stepper
motors are interesting devices. Here is some info on
stepper motors.
- After you get the first part working, you need to implement the switches
as follows:
- We want the motor to speed up to some preset max speed when the first
switch is closed. Once the motor reaches the max it should stay there until
you open the switch, at which time it should ramp back down.
- The second switch should change the motor's direction. If the motor is
turning, nothing should happen. You should only allow the direction to
change after the motor has ramped back down to stop.
Turn-In (Neatness Counts)
- Your code for the motor driver. Include a description of how your code
works, how you used the timers and interrupts, etc.
- The total memory requirements of your system (code, data)
- The is the effective utilization of your CPU, not counting busy-waiting
instructions.
- What relationship can you observe between motor's torque and its speed.
What is a likely explanation for this?
- What's the max step speed the motor can go before it stops moving
Smoothly? This assumes that you ramp up to speed rather from a cold start.
- Look for evidence of back-EMF on the coil drivers (will discuss in class). Is the motor driver IC
operating within its limits?
- Why did you need to use the 20ohm resistors?
- Your schematic
Last update: 10/9/2001 3:15 PM