Sei sulla pagina 1di 3

Daniel Craig

3/2/2018
EET 240

Lab 8/9
Driving a Stepper Motor with the STK500

Outcomes:
The following report is a companion to Labs 8 and 9 from the EET240 course. It is designed
to guide all who read it in the process of driving a stepper motor with the STK500
microcontroller. Not only should this report assist in the use of a stepper motor with this
specific microcontroller, but it should serve as a solid starting point for all microcontrollers and
the interfacing they require to be used with an external device. It will include the following
steps and results:
1. Developing all the necessary planning materials needed to coincide with the
development, interfacing, and driving of a stepper motor from the microcontroller.
2. Writing and maintaining complete code to step the motor in multiple directions and at
different speeds. This code will be all-inclusive with comments, notes, and guides to
piece apart and re-assemble different functions.
3. Building the interfacing and regulating circuits that will be used to isolate the motor and
control from the microcontroller. This entails:
a. Using the Darlington 8-channel array for isolation
b. Creating a portable version of a 5V DC power supply with the use of a 5V
regulator
c. Building an input sensor circuit using an LDR and voltage division
4. Recording the different characteristics of each schematic, including voltage, current, and
logic analyzation.
5. Well-documenting the explanations for testing and troubleshooting the circuitry as well
as coding in multiple different fashions. This includes:
a. Basic operation at a single frequency and single direction
b. Operation on a “per-degree” basis, such as turning the motor 180° clockwise
(CW) followed by 720° counter-clockwise (CCW)
c. Using an LDR as an input sensor to change direction and speed of the motor
References:
NTE2018 Datasheet:
The NTE2018 is the main isolation chip that is used
throughout Labs 8 and 9. The datasheet is located here:
http://www.nteinc.com/specs/2000to2099/pdf/nte2016.pdf

LM7805 Datasheet:
The LM7805 is a 5V regulator that is used to create the portable
power supply used to drive the motor. The datasheet is located
here:
https://www.sparkfun.com/datasheets/Components/LM7805.pdf

AD820 Datasheet:
The AD820 is a rail-to-rail op amp that is used in tandem with an LDR in
Lab 9. The datasheet is located here:
http://www.analog.com/media/en/technical-documentation/data-
sheets/AD820.pdf

STK500 Documentation:
The STK500 is the main focus of the project, and there exists a lot of good documentation on its
use. The user manual can be used as a general guide for most all needs:
https://people.ece.cornell.edu/land/courses/ece4760/AtmelStuff/stk500.pdf

Sample Code:
The sample code is provided via Blackboard, and almost entirely sets up what the stepper
motor needs to be driven. There are a few issues. (Note: One needs to be signed into
blackboard to use the following link:)
https://roguecc.blackboard.com/bbcswebdav/pid-686098-dt-content-rid-
1421768_1/institution/Academic%20Departments/School%20of%20Science%20and%20Techno
logy/Electronics%20Technology/mEET240/programs240/lab9_stepper1.asm
Materials:
STK500 Microcontroller
The STK500 is a microcontroller system that can house many different processing chips, and
includes integrated switches, LEDs, and other hardware systems. For the purposes of this
report, the software development will all be done in Atmel’s assembly language with the use of
the Atmel 7 software. All interfacing and routing will be done through the ports and pins on the
STK500 board, so those processes will use the respective electrical characteristics of the board.
The chip being used for this report will be the Atmega32.
NTE2018 Darlington Array
LM7805 5V Regulator
AD820 Op Amp
Stepper Motor
Circuitry Essentials
 Resistors (150Ω, 4.6KΩ, 10KΩ)
 Capacitors (100nF)
 9V Battery
 Jumper Wires
 Alligator Clips
 Protoboard
 LEDs

Potrebbero piacerti anche