Explanation of Variables
Our state machine has four states (S0, S1, S2, S3) that are based off of flip flop outputs (that become inputs) Qa and Qb, which are the binary equivalent of each state. We have four inputs and four outputs. The inputs consist of two buttons, one to open and another to close the toll booth, as well as two limit switches that are a part of the VEX build, with one above and another below the toll arm in order to limit the movement in both directions. The state machine cycles through the four states with each movement onto the next being based on the toggling on of a single variable. For example, the machine stays in S0, the closed state, until the open switch is turned on, allowing it to move into the "opening" state, or S1. The four outputs consist of two motor functions, up (open) and down (close), and two LEDs, one that comes on when the gate is closed and another that lights up when the gate is open. The outputs are based on the current state, not the state that the machine will be moving to next.
Brief Description of Physical Process
Using VEX materials, we put together a "toll booth" structure with an arm connected to a motor and placed on an axle in between two limit switches. We then connected the motor and limit switches to a breadboard, after converting electrical power into mechanical power in order to allow the motor to function. The toll booth starts in S0: the closed state. When in S0, an LED is displayed to show that the gate is closed. The machine stays in S0 until the open button is pressed, which transitions into the S1 state, or the opening state, which activates the motor to open. The LED that was on now turns off, and the machine stays in S1 for as long as there in no input from the open limit switch. When the open limit is reached, the state moves from S1 to S2, so the motor stops opening the arm, and a new LED turns on to indicate that the toll booth is now open. The toll booth remains open until the close button is pressed, which moves from S2 to S3, turning off the LED and powering the motor to close the arm simultaneously. The arm continues to close as long as the close limit is not reached. When the close limit is reached, the machine moves from S3 back to S0, which stops the motor close and turns back on the original LED that indicates that the toll booth is closed once again. This process repeats as many times as needed.
Conclusion
We started by building the toll booth with the provided VEX materials and creating a state machine flow chart, and then moved on to filling out the packet. In the packet, we first wrote out the actions of the inputs and outputs so that we could better understand how the toll booth would function before we began to design the circuit. Next, we filled in the blanks of the state transition table, which took us a while because we found some mistakes that we had overlooked and we didn’t want to design the circuit and then find out that we had a problem. After that, we simplified our expressions, at least those that could be simplified, and moved on to the PLD circuit on MultiSim and wiring the board. Originally, we had some trouble with MultiSim, so we remade the circuit using a bus. We then waited for the upload chip and the toll booth worked on the first try! This project was more complicated than other recent projects because we incorporated VEX materials, specifically motors and limits, which we haven’t used in a while, as well as MultiSim, and a breadboard with a CMOD6 chip and our uploaded circuit. We used skills that we have learned throughout the semester, and it seems like it has been a while since we have used a breadboard. The schematics diagram allowed us to understand how the SN754410 chip is set up. We could look at the diagram and trace the wires on our board. I learned that reading schematics can sometimes be a lot more complicated than just simple inverter gates. This project was definitely easier than in the beginning of the year. I have learned so much and I’m now able to do and understand much more, and I’m so sad that the semester is ending. Next time, I would change the location of the limit switches so that the arm of the toll booth can open wider and close at a 90 degree angle with the structure because it bothered me aesthetically.