ABSTRACT
Establishing a Vending Machine
Ahmad Toheed / Abdul Haseeb
Digital Logic Design
TERM
PROJECT
Vending Machine
Department OfElectricalEngineering
School of Engineering
University of Management And Technology
Digital Logic Design Lab Student Name: Ahmad Toheed
Student ID: F2020019009
Student Name: Abdul Haseeb
Course code: EE-220L
Student ID: F2020019001
Resource Person: Hassan Tariq Sahib
Lab Report # (Vending Machine)
Lab Title: IMPLEMENTATION OF Vending machine(projected Lab)
Design the control circuit for a vending Machine with the following specifications:
The Vending machine accept two different currencies.it should deliver the package and return the change
when too much money has been added.
Release Candy
Coin Vending mechanism
Sensor Return change
mechanism
Sequential circuit
State Diagram:
The state diagram for the following project will be as follows:
Reset
Convention: ND
S0/00
state Si/YZ input
X output
S1/00
X
N D
S2/00
D N
S4/11 S3/10
Convention: ND/YZ
Si
So
state
Input/output
N/00 D/10
S1
D1/11 N/00
S2
N.D
Convention: ND/YZ
So
state
Input/output
N.D N/00 D/10
S1
D1/11 N/00
S2
N.D
Logic Table
Present Inputs Next state Output Present Inputs Next state Output
state D N Y state D N Y
Z A B A+ Z
S0 0 0 S0 0 B+
0 0 0 0 0 0 0 0
S0 0 1 S1 0 0
0 0 0 0 1 0 1 0
S0 1 0 S2 0 0
0 0 0 1 0 1 0 0
S0 1 1 x x 0
x 0 0 1 1 x x
S1 0 0 S1 0 x
0 0 1 0 0 0 1 0
S1 0 1 S2 0 0
0 0 1 0 1 1 0 0
S1 1 0 S0 1 0
0 0 1 1 0 0 0 1
S1 1 1 x x 0
x 0 1 1 1 x x
S2 0 0 S2 0 x
0 1 0 0 0 1 0 0
S2 0 1 S0 1 0
0 1 0 0 1 0 0 1
S2 1 0 S0 1 0
1 1 0 1 0 0 0 1
S2 1 1 x x 1
x 1 0 1 1 x x
S3 0 0 x x x
x 1 1 0 0 x x
S3 0 1 x x x
x 1 1 0 1 x x
S3 1 0 x x x
x 1 1 1 0 x x
S3 1 1 x x x
x 1 1 1 1 x x
x
Present Inputs Next state Output
state D N Y Z
A B A+ B+ Da
0 0 0 0 0 0 0 0
0 0 x 1
0 0 0 1 0 1 0 0 0 1 x 0
0 0 1 0 1 0 0 0 x x x x
0 0 1 1 x x x 1 0 x 0
0 1 0 0 0 1 0 0
0 1 0 1 1 0 0 Da=BN+A’B’D+AN’D’
0
0 1 1 0 0 0 1
0 Db
0 1 1 1 x x 0 1 x 0
x 1 0 x 0
1 0 0 0 1 0 0 x x x x
0 0 0 x 0
1 0 0 1 0 0 1
0
1 0 1 0 0 0 1 Db=BN’D’+A’B’N
1
1 0 1 1 x x
x
1 1 0 0 x x
x
1 1 0 1 x x
x
1 1 1 0 x x
x
1 1 1 1 x x
x
Present Inputs Next Output
state D state Y
A B N Z
A+
B+
0 0 0 0 0 0 0
0
0 0 0 1 0 1 0
0
0 0 1 0 1 0 0
0
0 0 1 1 x x
x Y
0 1 0 0 0 1 0
0
0 1 0 1 1 0 0 0 0 x 0
0 0 0 x 1
0 1 1 0 0 0 1 x x x x
0 0 1 x 1
0 1 1 1 x x
x Y=BD+AN+AD
1 0 0 0 1 0 0
0 Z
1 0 0 1 0 0 1
0
1 0 1 0 0 0 1 0 0 x 0
1 0 0 x 0
1 0 1 1 x x x x x x
x 0 0 x 1
1 1 0 0 x x
x
1 1 0 1 x x
x
1 1 1 0 x x
x
1 1 1 1 x x
x
Z=AD
Logic Diagram
IMPLEMENTATION:
Conclusion:
Hence The Vending Machine delivers the product when we insert 15 cents or more.it will
returns the change when we will insert more than 15 cents.