You are on page 1of 9

Air University, Islamabad.

Digital logic design lab Project re


.
Vending Machine

Group Memebers:-

Zeshan Haider(180530)

Humayun Khalid(180580)

Raja shahzaib(180528)
Objective:
The objective of our project is to make vending machine by applying different logics
and combinations that we have practiced in our digital logic design class. Before
implementation on hardware we have to make a logic on software i.e. proteus. The version of
software we have used is proteus 8.1 professional.

Abstract:
The purpose of our project was to create a vending machine. A typical vending
machine provide customer drinks and juices but our vending machine is a bit different, because
it is a lab project we use LED s to show different products. The customer can enter the amount
of money and can choose any product which he likes to purchase. These steps would not be
time consuming at all. The machine will also display the remaining balance depending on the
product selected. We have implemented various combinations so people can choose any item
from the tray. Despite few difficulties, and a lot of support from our project in charge we were
able to incorporate a program and have a vending machine that could actually be implemented
in actual sense.

Introduction
Vending machines are the coin-operated machine that can dispense snacks,
coffee, sandwiches’, juices, tea etc. These are extremely convenient outlets for industry known
as automatic retailing. We find vending machine in public buildings, transport hubs, gas station,
hospitals etc. Any place where people gather, pass by, or must wait is a good location for
vending machine. We tried to incorporate a vending machine using logic circuits and LEDs. The
price ranges from 1 to 18. Customer can choose a product from tray containing eight LEDs as
products and can also enter the amount of rupees using switches. The machine will return back
the balance amount on 7-segment display if he/she provides excess money to the machine.

The components required for this project are given below:

1. Nine 4 bits adder IC SN54/74LS83A


2. One 3 x 8 decoder IC 74HC238
3. Nine LEDs and seven resister(only on proteus)
4. Seven switches (three to select products and remaining four for product selection).
5. One magnitude comparator IC 74LS85
6. Four 7-segment displays

Design and Simulation


Our aim was to try and make a vending machine which would provide user
different items with extremely simple operation. It is not like the conventional vending machine
which ask the user to provide exact change. Even if the user provides excess money, the
machine returns the money back on 7-segment display. The block diagram of the vending
machine explain our concept.

Block diagram

Input(m
oney)

Choose Choose item Choose item


item

Balance money
output
The block diagram for vending machine has following parts.

 Input
 Selection
 Output
 Balance remaining

Initially the user is required to provide the initial amount of money using combination of
switches. Assuming that vending machine can only have 1, 2, 5 and 10 rupee coins available
(according to pre-condition specified by instructor). The different type of coins can be denoted
by four different switches. From the left corner vertically down, the four switches representing
1, 2, 5 and 10 rupee coins respectively. If you press switch No. 1, you enter one rupee coin, if
you press switch No.2, you enter 2 rupee coin if you press switch No.3, you enter 5 rupee coin if
you press switch No.4, you enter 10 rupee coin. And if you press both switch 2 and 3, your net
amount is sum of both coins i.e. 7 rupee. These input of these switches is added using full
adders and then displayed on two seven segment displays, showing your input amount. There
are total of 8 LEDs acting as eight different products whose prices are fixed. The customer can
choose one LED at a time using combination of three switches. Here we use a 3x8 decoder, the
output of decoder is going to each LED and input is connected to each of three switches. These
three switches act as three bit binary number. If user entered 000 then product 1 will be issued
and the price of that product will also be shown next to it and change will also be shown next to
the price of the product. Similarly if user press 001 then product 2 will issued to the customer
following the same procedure that is price will shown next to the product 2 and change of the
price next to the price of the product. If user press 010 then product 3 will be issued following
the same procedure, if user press 011 then product 4 will be issued, , if user press 100 then
product 5 will be issued, , if user press 101 then product 6 will be issued, if user press 110 then
product 7 will be issued and if user press 111 then product 8 will be issued. The prices of LEDs
are fixed using different combination of binary adder.

 The prices of LEDs (products in eight different shelf) are as follows:-

Led1 6 Led2 8 Led3 9 Led4 3


Led5 7 Led6 4 Led7 12 Led8 11

At the end we have used a binary subtractor that can subtract the amount of money entered by
the customer and the price of product and give the balance remaining on two 7-segment
displays. If the remaining amount is greater than 9 then we have used a BCD (binary coded
decimal) which adds 6”0110” to the sum and display the remaining balance on two 7-segment
displays.
In addition if the input money is less than the price of selected item, then at the
output pin of magnitude comparator IC 74LS85 (A<B, where A is input money binary
code) we have 9th LED, which is the indication that your input money is less than the
item price so this purchasing is not possible (apology).

Proteus stimulation image/Results


The customer input amount is 8 rupee by pressing
switch 1,2 and 3 (1+2+5=8) , and then he select the 4th product by pressing right corner two
switches ‘011’, the price of selected product is 3, hence the enter amount is greater than price
of item so, credit amount is shown at the end on seven segment display i.e. 5 rupee.
 The customer input amount is 15 rupee by pressing switch 3 and 4
(5+10=15) and then he select the 4th product by pressing right corner two switches ‘011’,
the price of selected product is 3 and hence the enter amount is greater than the price of
selected item so credit amount is shown at the end on seven segment display i.e. 12 rupee
(display in two segments).

 The customer input amount is 5 rupee by pressing switch 3 only


th
(5) and then he select the 5 product by pressing right corner one switch ‘100’, the price of
selected product is 7, and here the enter amount is less than the item price, so according to
our condition specified 9th led (from magnitude comparator IC) glow, which is the indication
that the input money is less than the item price and you are unable to purchase the respective
product.

 CONCLUISION:-
In this CEP, we have learned how to implement the
logical circuits that we study in our subject in real practical works. This vending
machine is a practical implementation of logics that we study in our subject. By
using the knowledge that we gain in this course, we built a logic of real work
machine. Hence using self-made logic we can build a vending machine that ask the
user to enter coin/coins and select the desired product at the end return left amount.
If the input money is less the machine not respond. As proteus software is used for
simulations so by this we have learned practically its working and usage.

You might also like