You are on page 1of 2

ME 462 - Lab 5 - Stepper Motor Light Tracker

Goal Implement a stepper motor controller and build a light mapper/tracker Stepper motor A stepper motor is a simple way to achieve precise position control without using feedback devices. The purpose of this lab is to build a hardware/software system to properly sequence the windings of a stepper motor and use the motor to map an environment using a light sensor. Procedure 1) Build a drive circuit using Darlington transistors to activate the four windings of a stepper motor using four digital I/O lines from an Atom28 as shown below. You must use opto-isolators between the digital output lines and the Darlingtons. Note that the opto-isolators are used in a slightly different configuration than Lab 2. Why? 2) Write a driver program which will turn the individual windings on and off in the proper sequence to achieve CW and CCW rotation of the stepper motor. The rotation speed should also be programmable. 3) After the stepper motor can be controlled, attach a light sensor to the motor shaft so that it can be rotated horizontally to scan the room. You may use either a photo-transistor or a CdS photo-resistor. Use an ADC0831 A/D or an Atom 28 internal A/D to measure the light sensor's output as the stepper motor is rotated. 4) Your program should do a rapid 360 degree scan of the area and record light intensity as a function of angle. Once the full scan is complete, home in on the region of maximum intensity and point the stepper motor to that position. Be creative and find the light source as accurately and rapidly as possible. 5) Demonstrate your system to the TA. Write a lab report following the ME 462 General Lab Report Requirements. You may cut and paste text and figures from this document to assist you.
ATOM28 +5 VDC EXTERNAL +5 VDC A R2 Q1 R1 R1 R1 R1 = 500 R2 = __________ R3 = __________ power resistor Q1 = TIP 122 Darlington R2 Q1 R2 Q1 R2 Q1 MOTOR WINDINGS B D C R3 EXTERNAL +5 VDC

ATOM28 DIGITAL I/O LINES

R1

FOUR PHASE STEPPER MOTOR DRIVE SEQUENCE


(Ref: Allegro Microsystems UCN5804 spec sheet)

Wave Drive Sequence (full steps) Step A B C D 1 ON 2 ON 3 ON 4 ON 5 ON

Two-Phase Drive Sequence (full steps) Step A B C D 1 ON ON 2 ON ON 3 ON ON 4 ON ON 5 ON ON

Half-Step Drive Sequence (half steps) Step A B C D 1 ON 2 ON ON 3 ON 4 ON ON 5 ON 6 ON ON 7 ON 8 ON ON 9 ON

A e c

B A

You might also like