-design summary-
This project pulled out all the tricks! As one of the final projects, this one was cumulative in nature and tested my ability to compile all of my knowledge to make a working electrical circuit.
The idea behind the activity was to create a state machine that operated a toll booth arm. The state machine had four state, and was controlled by two push buttons and two limit switches. When the operator pressed the open button to raise the toll booth arm, the circuit would transition to the next state and stop when the arm was fully raised. The arm knew when to stop because a limit switch was added to let the circuit know when the arm had reached it's upper limit. Likewise, the opposite would happen when the operator pressed the close button.
The idea behind the activity was to create a state machine that operated a toll booth arm. The state machine had four state, and was controlled by two push buttons and two limit switches. When the operator pressed the open button to raise the toll booth arm, the circuit would transition to the next state and stop when the arm was fully raised. The arm knew when to stop because a limit switch was added to let the circuit know when the arm had reached it's upper limit. Likewise, the opposite would happen when the operator pressed the close button.
-procedure-
Creating a state machine involves four simple tasks...
Create a state Graph;
create a Transition Table;
simplify Logic Expressions; and
design a circuit.
Create a state Graph;
create a Transition Table;
simplify Logic Expressions; and
design a circuit.
3: Simplify Logic Expressions
I utilized two different techniques to gain the logic expressions needed to build the state machine. Since there were six different inputs, creating a K-Map for Qa and Qb could have been tricky. I chose to write the un-simplified SOP expression, and use Boolean Algebra to further simplify.
Even though there were six inputs, Circuits MO (Motor Open), MC (Motor Close), GO (Gate Open), and GC (Gate Close) only reacted to three specific inputs. For this reason, I K-mapped this specific portion of the circuit. It is important to note that I used EN in my K-maps, however, OS (Open Switch), CS (Close Switch), OL (Open Limit), and CL (Close Limit) would have been more appropriate. |
4: Create a circuit
The following circuit was created based on the logic expressions derived from the transition table. The circuit was tested in simulation and then exported to the PLD board. In addition to the PLD design, an external power supply, voltage dividers, pull-down resistors, and an SN75was also needed to drive the motor, much like we did for the Copier Jam Detector. |
Limit switches were intentionally left out to clean up the image.
-errors-
Two errors were experienced in designing this circuit. While making the Gate Close circuit, I accidentally left the bar off of Qa while creating the K-map. This caused the circuit only function in states 1 and 2, but not 0 and 3. After some quick trouble shooting the problem was resolved.
The second error was in the motor polarity. Once the circuit was ready to be tested, pressing the Gate Open button, nothing happened. This was because the polarity was backwards, resulting in the arm operating in the wrong direction. I simply turned the motor inputs 180 degrees on the DMS board and the circuit then operated properly.
The second error was in the motor polarity. Once the circuit was ready to be tested, pressing the Gate Open button, nothing happened. This was because the polarity was backwards, resulting in the arm operating in the wrong direction. I simply turned the motor inputs 180 degrees on the DMS board and the circuit then operated properly.