Built by Wolves for Wolves
EE267
EE267 Final Project:
Requirements: Finite state machine with at least 8 states
This was the actual proposal we turned in:
Final
Project Proposal for EE267
Problem statement:
Due to an increase in the need for stepper motor controls, we at
WolfTronix have come to the conclusion our final project should be a stepper
motor controller. The control will
drive a uni-polar (single phase) stepper motor in half-step mode in either
forward or reverse direction.
I/O Terminals:
|
Input |
Type |
Description |
|
CLK |
CLOCK |
Variable digital clock signal to control the motor speed. |
|
FWD/REV |
Switch |
On will rotate the motor forward, off will rotate the motor in reverse |
Implementation:
From the I/O terminal list it may appear that we are embarking on an overly simplified project. On the contrary, due to the particular step sequence the implementation is ungodly and shown in figure 1. The circuit contains: 1 switch, 1 inverter, 1 555 timer, 4 J-K flip-flops, 4 light emitting diodes, 8 two-input AND gates, 8 three-input AND gates, and 8 OR gates. Note the 555 timer will replace the 1 Hz clock signal and will be adjustable for variable rate. An old wolven proverb: “3 dimensional K-Maps suck.”
A stepper motor controller using half step mode was built using a Xilinx FPGA chip. Inputs were forward/reverse, enable/disable, and the clock signal, used to control speed.
The state machine was first designed and drawn as shown.
The next state k-maps were then drawn for j/k flip flops and simplifications were made resulting in the following.
The resulting equations are:
JA = CDE + CDE
JB = CDE + CDE
JC = ABE + ABE
JD = ABE + ABE
KA = BE + DE
KB = AE + CE
KC = BE + DE
KD = CE + AE
Using the simplified equation from the k-maps the following circuit was made and simulated.
The simulation showed the following results. The first pic is the step sequence. The last two pics are the sequence changing from forward to reverse and reverse to forward.
The design was downloaded to the FPGA and the following driver board was used to run a standard uni-polar stepper motor (the kind you get out of a 5 1/4 floppy drive).
No pics exist of the complete working project, because it was built on solderless breadboard and disassembled after the final presentation.