Design of Digitalised Vending Machine Using Verilog
Design of Digitalised Vending Machine Using Verilog
Design of Digitalised Vending Machine Using Verilog
submitted in partial fulfillment of the requirement for the completion of VIII semester
of
BACHELOR OF ENGINEERING
in
ELECTRONICS & COMMUNICATION ENGINEERING
Submitted by
The controller is implemented with Field Programmable Gate Array and simulated using
Xilinx and ModelSim software. The acceptance of coins or digital currency is simulated
as a digital pulse and then that transaction of item is viewed by using waveforms through
simulation which is later implemented through hardware.
List of Figures
3.1 The block diagram of Vending machine. . . . . . . . . . . . . . . . . . . . . 5
3.2 The flow chart of Vending machine controller . . . . . . . . . . . . . . . . . 6
3.3 The flow chart of Vending machine controller . . . . . . . . . . . . . . . . . 7
4.1 Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Pin diagram of Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Arduino Uno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.4 Pin diagram of Arduino Uno . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.5 RFID Reader EM18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.6 RFID tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.7 Coin Acceptor Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.8 Coin Acceptor Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.9 Pin diagram for Coin Acceptor . . . . . . . . . . . . . . . . . . . . . . . . 14
ii
List of Tables
iii
Chapter 1
Introduction
The primary and essential component for any human being to survive is food. The avail-
ability of the food is not efficient till date. Therefore Vending machine reduces this barrier.
The main aim is to design and implement digitalized vending machine which is an up-
dated version of a coin operated vending machine and to design a digital vending machine
controller using the Finite State Machine methodology and the FPGA kit which reduces
the timing difference and power.
1.1 Motivation
The Vending machine provides various products such as snacks, beverages, water, tick-
ets, and others products. Vending machine has many benefits such as no need of human
energy, flexible in time, and saving time. The Vending machine does not use any human
energy on it and it is managed by operator. The labor work can be reduced from Vending
machine. It is flexible in time and can operate in 24 hours a day, seven days a week. It
can be operated anytime although that is a holiday or a weekend.
The Vending machine can save time. In a business, an employee does not need to waste
time for lunch. With a Vending machine in the cafeteria, all they have to do is place
some coins and push some buttons to get a drink or a snack. The Vending sector has seen
significant growth over the years and it will continue to do so in the years to come. The
Vending machine now needs to improve to give more contribution and benefits to human
life.
1
Design of Digital Vending Machine using Verilog HDL 2018-19
through reloadable prepaid cards or through digital payment using android mobile appli-
cation.
[2] Finite State Machine based Vending Machine Controller with Auto-Billing
Features:
The designing of multi select machine using Finite State Machine model with AutoBilling
is described. Finite State Machine (FSM) modelling is the most crucial part in devel-
oping proposed model as this reduces the hardware. The process of four states ( User
selection, Waiting for money insertion, product delivery and serving) has been modelled
using MEALY model.
3
Chapter 3
System Overview
This chapter discusses about the block diagram and different components used in Vending
machine using Verilog HDL as shown in Figure.
4
Design of Digital Vending Machine using Verilog HDL 2018-19
Outputs:
1. Product A (Pa):
It delivers product A.
2. Product B (Pb):
It delivers product B.
3. Product C (Pc):
It delivers product C.
4. Change 5 (Ch5):
The extra 5 rupees inserted by the user for the product is returned back.
5. Change 10 (Ch10):
The extra 10 rupees inserted by the user for the product is returned back.
6. Change b (Chb):
The entire amount inserted by the user for the product is returned back if the user cancels
it or the provided amount doesnt meet the required cost of the product.
The Raspberry Pi may be operated with any generic USB computer keyboard and mouse.
It may also be used with USB storage and virtually any other device or component with
USB capabilities. The pin diagram of Raspberry Pi is shown in figure 4.2.
8
Design of Digital Vending Machine using Verilog HDL 2018-19
read from various analog sensors simultaneously, and also features a Serial Data (SDA)
line and a Serial Clock (SCL) line. Both an SDA line and an SCL line are required to
support I2C sensors. With these input ports, the Arduino Uno is able to read from three
different analog sensors and two digital sensors simultaneously. Furthermore, the Arduino
Uno includes Serial Peripheral Interface (SPI) functionality, which allows it to interface
with certain peripheral hardware devices, such as SD card modules. On top of this, the
board also allows digital ports to be configured to act as Serial Receive (RX) or Serial
Transmit (TX) lines. These are necessary to connect with a Bluetooth module correctly.
Finally, because of its popularity, many hardware modules are designed to work specif-
ically with Arduino microcontrollers, including those that the Sensor Interface requires,
like Bluetooth modules and SD card modules. The pin diagram of Arduino Uno is shown
in figure 4.4.
nology which uses the electromagnetic fields in the radio frequency range for non-contact
operation as shown in figure 4.5. RFID Technology is similar to that of bar codes or
magnetic strips i.e. they all provide unique identification system. The data retrieving
operation is also similar to the other two technologies. Bar codes and magnetic strips
must be scanned against their corresponding readers and similarly RFID devices must
also be scanned or swiped against their readers. The advantage of RFID technology over
bar codes or magnetic strips is that RFID doesnt need any physical contact as in case of
magnetic strips (ATM or credit cards) or neednt be placed in a particular position as in
case of bar codes. The RFID tags are shown in figure 4.6.
The pin diagram for Coin Acceptor module is shown in figure 4.9.
15
Design of Digital Vending Machine using Verilog HDL 2018-19
19
Bibliography
[1] Abhishek Luthra, Akshat Jain, Parnika Mishra, Vikas Gupta and Sunil Aggarwal,
“Design and Implementation of Vending Machine using Verilog HDL on FPGA”,Vol.
4, Issue 11, November 2015, IJIRSET.
[2] Ana Monga and Balwinder Singh, “Finite State Machine based Vending Machine Con-
troller with Auto-Billing Features”, International Journal of VLSI design Communi-
cation Systems(VLSICS) Vol.3, No.2, April 2012.
[3] Charles H. Roth, Jr. “DIGITAL SYSTEMS DESIGN USING VHDL”, the University
of Texas at Austin.
20