ECE
1315 UMD Fall, 2008
Experiment
10: FSM Design and Interface with
Stepper Motor
It is desired to design and implement a Finite State Machine that controls the motion of a bipolar stepper motor. The
controller will have three input variables, X, Y and Clock. The controller will have 4 output variables, Z3, Z2, Z1, Z0, one
for each wire of the Stepper. The inputs and outputs are specified below:
Inputs: X = {0, Motor Stopped (controller disabled); 1, Motor Active}
Y = {0, Motor Turns Clockwise; 1, Motor turns counter-clockwise}
Clock : Self explanatory (Pin 22 , set for 0.5 second pulses)
Outputs: Z3 – Red Wire; Z2 – Brown Wire; Z1 – Yellow Wire; Z0 – Orange Wire
Operation: If the stepper motor wires receive a current pulse in the order indicated, Red then Brown then Yellow then
Orange, the motor will rotate clockwise. Current pulses in the reverse order will produce counter-clockwise rotation. This is
summarized in the table below:
|
Y = 0, Forward Operation: |
Y = 1, Reverse Operation: |
|
Z3 Z2 Z1 Z0 |
Z3 Z2 Z1 Z0 |
|
1 0 0 0 |
0
0 0 1 |
|
0 1 0 0 |
0
0 1 0 |
|
0 0 1 0 |
0
1 0 0 |
|
0 0 0 1 |
1
0 0 0 |
|
Repeat |
Repeat |
TABLE 1: Output Patterns Required for Forward and Reverse Rotation
Design: Your design should incorporate at least four states for your FSM. Consider that the input variables, X and Y, will
just be wires that you connect to Ground (0) or Vcc (1). Also realize that the 74LS109 – Dual J-Kbar Flip Flop has Preset and
Clear inputs. These may be utilized to enable/disable the controller with the X input. Note that Table 1 above has only four
unique outputs and your controller need only count up through those states or count down through them, depending on the
status of the Y input.
Design Cost: You are required to implement your design on a maximum of 3 chips. Additional consideration may be given to the
Gate Cost of your design, based on the cost table from Lab 8 (Dr. Weber’s Lab 7), so be frugal!
For your report: Include a State Diagram, State Transition Table, J-Kbar Input Table and a Schematic of your implementation.
Demonstration: Demonstrate that your design and implementation work with a stepper motor supplied by the Lab Instructor.
Obtain a signature:
Instructor
Signature/ Chips/Gate Cost: _______________________________________