I NEED SOMEONE TO DO FOR ME A DESIGN PROJECT /
Hardware Lab 4: EEE 120 Design Project
Deliverables
You are to design TWO finite-state synchronous machines, one being a Moore design and the
other being a Mealy design. Depending on the application you have to decide whether you have
to synchronize the outputs of the Mealy machine or not. You can use either D flip flops or J-K
flip flops for your designs. Mixing different types of flip flops with different trigger edge
sensitivity is possible but not recommended. Note that two designs which differ by only the type
of flip flop (e.g., J-K vs. D) or number of states (i.e., changing the type of FF or inserting more
unnecessary states) is not considered conceptually different.
First, you will need to implement BOTH designs using Logisim and include these simulations
into your lab report template. Second, you will need to build ONE design using the TTL parts
you used in earlier lab work and report your findings on the lab report template. You can use any
part that you have available, J-K or D flip flops. The 4-bit D Register (74LS175 with clock and
reset already wired together for the four D flip flops) that you have not used before might come
in handy for the design project, in case you have it.
Grading Policy
The grade will be allocated as follows:
30% Design Simulation with Logisim
15% for submission of your first design in a fully working condition (partial credit is granted).
15% for submission of your second design in a fully working condition (partial credit is granted).
70% Build One Design in the Hardware Lab and Lab Report
30% demonstration of one design in the hardware lab.
11% for documentation in the report of how the first circuit performs the application.
11% for documentation in the report of how the second circuit performs the application.
5% for establishing reasonable criteria for picking one design as the “best” design. (The one design you build in the hardware lab does not need to be the “best” design.)
8% for picking a preferred, “best” design.
5% for following template guidelines. 2% (Extra Credit) Completed Self-Assessment Worksheet
2
Washing Machine Controller
The Clean Laundry Company (CLC) is interested in reducing the risk of personal injury to their
customers while operating their washing machine. When a customer wants to open the
machine’s door, the machine should stop and the drum (motor) should come to a standstill before
the door is allowed to open. Otherwise, the customer might get injured. The company installed a
switch that the customer activates to indicate they are requesting to open the door. They also
installed an electromechanical lock on the door that keeps the door locked. Usually, it would be
sufficient to unlock the door when the power to the motor is switched off. But since the motor
doesn’t stop immediately, the company installed a sensor that senses the motor’s rotation. Only
if this sensor indicates the motor has stopped the door can be unlocked. Your task is to design a
controller that releases the lock once the door is safe to open.
The controller should do the following: Normally, the machine is on where the motor is rotating
in the normal washing cycle and the door is locked. If, in the middle of the cycle, the customer
activates the door switch because of a need to open the door, the controller should power off the
motor so that it comes to a halt. However, since it doesn’t stop immediately, the lock should
remain engaged until the motor comes to a complete stop. In addition to addressing the customer
safety issue, this time gives the customer the opportunity to deactivate the door switch in case
they change their mind and want the machine to continue the cycle that was interrupted.
However, once the rotation sensor gives a 0 signal indicating that the motor has stopped while
the door switch is active, the lock should unlock and the electric current supply to the motor
should remain off. At this point, no matter what the customer does, the lock should NEVER lock
back again NOR should the motor be able to rotate again. If the customer needs the motor to
return to normal operation, they need to call the laundry attendant to reset the controller via a
switch that the customer does not have access to.
Note that there are two inputs to your controller: the rotation sensor (R, where R=1 means the
motor is rotating) and the door switch (S, where S=1 means the user is requesting to open the
door). Your controller has two outputs that control the washing machine: the electric power
output (P, where P=1 means the power is powering the motor) and the door lock output (L,
where L=1 means the door is locked).
All information to complete this design may not be specified. Write down and report any
assumptions that you make in your design.
3
Assumptions
1. Answers to (some) the following questions might be good candidates to being your assumptions:
1. Does your machine need/use an asynchronous reset? 2. If your system has more than one input, which one is what (on your state diagram)?
(Also don’t forget to name your input switches in your Logisim file. Graders might
consider your Logisim files not working if you did not label your input switches:
CLOCK, Reset….etc.).
3. Some “motor breaks” respond extremely fast. Can your design allow for the case where the motor stops immediately after the customer activates the door switch? If yes/no,
how will your controller respond to that case?
2. Mention anything you want as long as it makes common sense and such that it does not
make the problem trivial. For example do not say: “I’m assuming that the motor always
stops immediately once the customer activates the door switch”. This means that there is no
need to have a rotation sensor. This over simplifies the problem which is not accepted.
3. A good designing engineer should take all possible input combinations into consideration rather than assuming some of them will not happen. Do not assume that an input
combination (for example the input 01) will not happen unless its occurrence is
physically/practically illogical. At that case, mention that explicitly in your assumptions and
justify it. Otherwise all input combinations need to be taken into consideration while writing
your state diagram.
4. We don’t want a large list of assumptions. 2-3 assumptions are enough. 5. You don’t have to list the assumptions before finishing your design. You might need to
modify it while designing your machine. That’s nature of any design process. We
recommend listing your assumptions after the diagram is complete.
6. Your assumptions for Design 2 could be the same as those for Design 1, but don’t have to.
Check List
1. First step is to define the inputs and outputs of your design, as well as the values that each input and output might take.
2. Make sure you have included your assumptions for your project. 3. Make sure your state diagram is complete: no missing arrows/states/inputs/outputs. 4. Make sure your state diagram is readable: Which value mentioned on the arrow corresponds
to which input.
5. Make sure if you need to use synchronization flip flops at the outputs of the Mealy machine. We will not penalize if you don’t have them, but if you test your circuit without them, you
need to know how to verify your circuit is working according to the specifications. It needs
some experience.
6. In task 4-5, the clocks of the flip flops need to be connected to one of the Logic switches. Some students connect them to a Data switch, which suffers from bouncing and could make
you think that your machine does not work correctly. This has caused students to debug
their circuits for one hour or more when nothing was wrong with the build to begin with!
7. When filling in the column of the output in the transition table, you need to look at the present state not at the next state because in a state transition table, the output depends on
the present state and not the next state. Thus, if you found your output changes with the
change in the input when you simulate your Moore circuit, then you have missed this fact.
8. Any state diagram should be complete: Each state has to have 2n arrows coming out of it where n is the number of inputs to the system. This is the case for both the Mealy and the
Moore machine.
4
9. Don’t forget to connect the PRE’ and the CLR’ of your chips to the Vcc or to a Data switch that has been set to “1” while you build your hardware portion of this lab.
10. Do not build the FFs from scratch when simulating your design on Logisim. Use the FFs built-in already in Logisim. They are found under the “Memory” folder in the Logisim
software.
Tasks 4-3 and 4-4
In Task 4-5 you will be asked to build one of these two designs on hardware, so you need to
choose one of them to build. Which one will you choose? Answering Tasks 4-3 and 4-4 will
answer this question for you. In these tasks you have to think about some criteria upon which
you decide which design to build. These criteria differ from a student to the other.
It may include (but is not limited to):
1- Number of gates 2- Number of chips 3- Number of wires (tedious to count) 4- Your understanding to the machine 5- Is it working? 6- Amount of time needed to build it on Hardware.
You need to give a weight to each criterion based on how important you think this criterion is
(for example: I care about the cost more than I care about the time needed to implement the
system, so I will give criterion 1 more weight than criterion 6). The sum of weights should add
up to 100. Then start dividing these weights among the Moore and the Mealy. So for example
my weights are:
1- 60 —-> (out of the 60, I will assign 40 points for the first design and only 20 for the second since the second requires more gates).
2- 10 —-> (7 and 3) 3- 0 4- 20—-> (5 and 15) 5- 0 6- 10
Then you add the weights for the 1st design and compare them with the sum of the weights for
the 2nd. The design giving you higher aggregate weight wins. Note that you don’t have to use all
criteria (this is why some of them have 0 weights indicating that I don’t care about these criteria).
So it’s up to you what to choose. Feel free to add more criteria that you care about. The weights
do not have to be numerical, although numerical weights will allow you to arrive at a
quantitative answer. If you want to arrive at a qualitative judgment, you might choose a
weighting system such as ‘very important’, ‘important’, or ‘somewhat important’. Answer these
tasks using a table whenever possible.
5
Guidelines
Hardware lab 4 (H4) is the capstone project for this class. Read the following guidelines to get
the most out of this project.
1. DO NOT submit a project other than the one assigned. If you happen to know what project we assigned to students in previous semesters, DO NOT submit their project. This is
considered an academic integrity violation.
2. Your design has to be synchronous which means that all clocks of all FFs have to be connected to a single switch. This switch should not be connected to anything else.
Asynchronous designs will not be accepted.
3. Start early because, unlike H0 through H3, the project doesn’t have step by step procedure. 4. Although we allow and encourage cooperation and discussions, we will not tolerate copying
or sharing answers. Even if there might be some similarities between your design and the
designs of your peers, your solution has to be written by yourself in your own way of
presenting it. Ideas allowing you to understand the project can be
shared, solutions cannot.
5. If you scanned/photo’d your handwriting, make sure the scanned version is clean and the grader can read it easily.
6. If your design is not working in simulation please make sure to include what the problem is (i.e. how it is working), and what solutions you advice yourself to do if you had more time
to spend on the project. Please note that there are not many points dedicated to a working
simulation as there are points for your correct explanations and showing how much you
understand what you are doing. The grader will deduct points depending on how much
they see you have accomplished in this project. A working design is not the main goal of the
project (even if it is important), a deep understanding of the system is.
7. Make sure you have included two designs in your report. We always ask the students NOT to just add hardware to one of the designs to make it look different. Rather we ask them to
start from the scratch and make use of the systematic procedure that we teach them in class
to build the second design.
8. Building one Mealy and one Moore machines yields a totally conceptually different design. This is what most of the students do and what we encourage them to do.
9. Although you will implement two designs in Logisim, you only have to only implement one design in the hardware lab (task 4-5)
10. You will only have two hours to build your hardware circuit in the lab and you have to complete the build all by yourself. The TAs will not be allowed to help.
11. If the build in the hardware lab does not work at first, don’t panic. Depending on how long it took you for the initial build, you have two options: Rip everything apart and start new or
try to find the flaw in a systematic way, based on the knowledge you have of these circuits.
Latter is often the quicker way to obtain a working circuit. Remember that if you have an
existing device, only the second method works to begin with. Even if your circuit does not
work in hardware, you will not lose many points (partial credit!). The only sure way to lose
points is to not sign up for the hardware build.
12. When coming to the lab to build your hardware circuit you need to have your report all written up and ready to submit. The TA will collect it from you right after the build.