5.0 Objectives/Expected Outcomes:

In this project, I will design, simulating, and realize a simple synchronous machine. I will also make assumptions to complete functional specification. Finally, I will design Mealy machine for a gas pump controller. In designing and completing this design project, I will be able to do the following:

Make assumptions to complete an incomplete functional specification.

Write a complete functional specification.

Build, and debug a synchronous sequential machine.

Apply engineering criteria to select a “best” design.

Use classical design techniques to design a synchronous sequential machine starting with a functional specification. For example: state diagrams, state transition tables, and Karnaugh Maps.

Develop reasonable engineering criteria for comparing different designs.

Gas Pump Controller: (functional specification given)

“A petroleum company is interested in reducing pollution in the atmosphere by preventing people from excessively ‘topping-off’ their gas tanks. They realize that when people overfill their gas tanks, gas is spilled and evaporates causing air pollution. To minimize this problem, their pumps currently turn off when the back pressure from the gas tank gets too large while the nozzle switch is activated (i.e., compressed). Design a controller that does the following: If the nozzle switch is depressed and the pump pressure sensor indicates low pressure, then allow gas to be pumped. If the pump pressure sensor indicates high-pressure when the nozzle switch is depressed, then turn the pump off. (The system clock pulses every two seconds and you may assume that once the pump shuts off, the pump pressure returns to normal within two seconds.) Once the pressure returns to normal, allow the pump to be controlled again by the nozzle switch. If the pump pressure sensor indicates high pressure a second time, your design will permanently shut down the pump until reset by the gas station attendant. (Note that there are two inputs to your synchronous machine: the nozzle switch position, and the pump pressure sensor indicator. Your synchronous machine has one output that controls the pump.)”

Design of Synchronous Sequential Machine

Assumptions:

I assumed that when a customer comes to the gas pump his tank is empty.

The pump pressure is independent.

Assume we have a pressure reader and we can read the pressure even if the nozzle switch is low.

Assume no customers will pump gas if their tank is full.

Description of Mealy Design

My design for this gas pump controller is a Mealy Machine.

This design has 3 states. See figure 5-1c and 5-1d. The only time the output will be 1, which means pumping, is in states S0 and S1. S0 is the initial state and pumping is allowed in this state. S1 is temporary shutdown and pumping is also allowed here. S3 is permanent shutdown until an “attendant” resets the machine. See table 5-1c for truth table and table 5-1d for K-maps on the sheets attached.

Figure 5-1c: This is the state diagram for the Mealy Machine. The assumption of having a pressure reader and we can read the pressure even if the nozzle switch is low is taken into account here is the figure. (N,P)

Demonstration of Mealy Design

See attached papers.

Description of Moore Design

This design has 5 states. The only time the output will be 1, which means pumping, is in states S1 and S3. S0 is the initial state. S2 is temporary shutdown and S4 is permanent shutdown until an “attendant” resets the machine. See figure 5-1a for better understanding. (Note: can never go back to S0, unless from S1 or reset by “attendant”.) See table 5-1a for truth table and table 5-1b for K-maps which are on the sheets attached.

Figure 5-1b: This is the state diagram for the Moore Machine. The assumption of having a pressure reader and we can read the pressure even if the nozzle switch is low is takeninto account here in this figure.

Draw state diagrams (N,P)

This design requires three D flip flops. There are five variables, two inputs, Nozzle and Pressure. This design is a synchronous machine and has a synchronous output. This means that there maybe overflow for the customer. Meaning when the customer is done, he/she will turn the nozzle off, but he/she will have to wait for two seconds due to the clock.

The Criteria to Pick the Best Design

Using the criteria and weighting system I picked the Mealy machine to be the best design. I pick the Mealy for many reasons. The Mealy circuit is less complicated. It has only 3 states versus the Moore’s 5 states. The mealy I designed is a synchronous machine with a synchronous output. For example, when the customer is done, he/she will not have to turn the nozzle off, it will get switched of as the pressure sensor is high. The Moore also uses a lot of hardware and is difficult to understand than mealy is.

Therefore, the Mealy is the “best” design and I will build it in the

Hardware Lab.

What I’ve Learned…

In this project, I designed, and simulated the Moore and Mealy machine for a gas pump. I also practiced making assumptions to complete functional specification. In designing and completing this design project, I am now able to do the following:

Use classical design techniques to design a synchronous sequential machine starting with a functional specification. For example: state diagrams, state transition tables, and Karnaugh Maps.

Make assumptions to complete an incomplete functional specification.

Write a complete functional specification.

Build, and debug a synchronous sequential machine.

Develop reasonable engineering criteria for comparing different designs.

Apply engineering criteria to select a “best” design.

1