CS122A-Fall Quarter, 1998
Lab 6 : Controlling a Stepper Motor
Prof. Frank Vahid
Purpose:
The purpose of this lab is to control a stepper motor, with instructions received from the PC via a serial communication link to the 8051.
Description:
Stepper motors are often used in conjunction with microcontrollers to provide precisely controlled motor power. Stepper motors are devices that rotate a precise number of degrees for each ``step'' applied, as opposed to regular motors, which simply rotate continuously when power is applied. Driving a stepper motor involves applying a series of voltages to the four(typically) coils of the stepper motor. The coils are energized one or two at a time to cause the motor to rotate one step.
Assignment:
In this lab, you'll design a program to do the following jobs:
- Set up the stepper motor and stepper motor driver circuit
- Interface the PC to the 8051 through a serial communication link. Refer to Lab 3 for details on the schematic and programming.
- Control the movement of the stepper motor by characters received from the PC. For eg:
- When a character (say L) is received from the PC, make the stepper motor turn left. Also display the message ``Moving left'' on an LCD interfaced to the 8051.
- When a character(say R) is received from the PC, make the stepper motor turn in the opposite direction and the mesasge ``Moving Right'' should be displayed on the LCD.
Apparatus Required:
- MJE3055T NPN transistors(4)
- MJE2955T PNP transistors(4)
- MC3479P Stepper motor driver
- LB82773-M1 Bipolar Stepper Motor
- 1k resistors
- 0.1mF capacitors
- Serial communication cable, connectors
- LT1130CN
- LCD
- 5V power supply
- Philips PDS51 development board
Schematic:
Refer to the pinout and the application example in the Datasheet to connect theStepper motor and the driver. The LCD and the serial communication setup can be connected as was done in the earlier labs.

Fig 1. Pinout

Fig 2. Stepper Motor Connections
Steps to be followed:
- Set up the circuit for the stepper motor as shown in the datasheet.
- Set up serial communication between the PC and 8051 and interface the LCD as was done in the earlier labs.
Conclusion:
- You will have to demonstrate that your program works to the T.A.
- Turn-in your well commented C program for the stepper motor and also a
brief write-up explaining what you did and knowledge gained from this
experiment.
File translated from TEX by TTH, version 1.1.