Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/344053444

Design and Implementation of FPGA based Vending Machine for Integrated


Circuit (IC)

Conference Paper · July 2020


DOI: 10.1109/ICCSP48568.2020.9182375

CITATIONS READS

13 782

2 authors:

Edison Kho Manoj Kumar


National Institute of Technology, Silchar National Institute of Technology, Manipur
4 PUBLICATIONS 14 CITATIONS 49 PUBLICATIONS 179 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Edison Kho on 04 September 2023.

The user has requested enhancement of the downloaded file.


International Conference on Communication and Signal Processing, July 28 - 30, 2020, India

Design and Implementation of FPGA based


Vending Machine for Integrated Circuit (IC)
Edison Kho and Manoj Kumar

Abstract—Vending machine that dispense items like as snacks, This flexibility is not possible in case of Embedded based
coffee, beverages, lottery ticket, consumer products automatically machine. In this vending Machine designed using FPGA the
when a customer insert a coin or token are increasing rapidly in user can add more number of items with other facilities. In our
metropolitan’s cities due to contemporary and fast life style
research, to vend out IC a mealy based state machine is design
requiring excellent quality products. This paper give the details
account of the designing and implementation of a multi select
and implemented on FPGA. The machine is design in way
state vending machine using State Machine with which users can that user can select the desired IC and insert the token; each
select the product and insert the desired token for respective token for each IC is uniquely designed. This machine also
products to dispense the Integrated Circuit (IC) or it will return support cancel and return features which mean the costumers
the inserted token if wrong token is inserted for each Integrated can withdraw the request and the token will be returned back
Circuit (IC). We choose FPGA for this vending machine since to costumers if he had inserted the tokens to the machine. This
FPGA based vending give quicker response and absorbed less machine was mainly design for use in the college LAB and
power and reprogrammed anytime as compared to CMOS other research LAB where electronics component are used for
vending machine. The intended design is implemented in VHDL
design purposed to reduce time and put them in uniform order.
and simulated using Xilinx VIVADO 2019.1 and it’s implemented
on FPGA basy -3 Artix 7 series FPGA (xc7a200tfbg676) A. Design operation for vending machine
development board. Synthesis results and FPGA experimental
results are shown in this paper.
I. When the users presses select button to select the IC
he wants to vend out, the control units will direct
Index Terms—FSM, FPGA, VHDL, integrated circuit(IC), the command the token sensor.
Vending machine II. When the users insert the token, sensors will detect
I. INTRODUCTION
the token and inform the control units the
inserted token if the inserted token match with
V ENDING machine are an automated machine which
dispenses a products like coffee, cold drinks, snacks, the selected IC it will dispense the IC out.
III. If the inserted token doesn’t match with selected IC
tickets etc. to costumers when a costumers inserts a coin,
token or cards into the machine[1]. The first modern vending it will automatically return the inserted token.
machine was introduced in England in around early 1880s IV. The machine needs to be servicing if the available
which was used to vend out postcards. The machine was later product is less than 1.
invented by Percival Everett in late 1883 and after which it The paper is organized as follows. The section II describes
become popular features at railway stations, bank and post
the related work. Section III explains about the work
offices, for vending envelopes, postcards and notepaper.
Nowadays this can be found everywhere in railway station for implementation. Section IV clarifies about the design
dispensing rail ticket, in school and street for dispensing cold methodology. Section V and VI discuss about the simulation
drinks and beverages and snacks, in bank as ATM machine and experimental results respectively. Section VII explains
and token generators. about the performance analysis. At last, Section VIII
The vending machines designs from FPGA based are concludes the paper with the conclusion.
flexible and quicker than the machine designed from CMOS
based [2]. The vending machine designed from FPGA based II. RELATED WORK
are easier to program and can be reconfigured anytime without Various researches has carried out different ways of
changing the whole machine design architecture if the designing a vending machine of which some are discussed
designers want to enhance the design of the machine. below as: B Jyothi [1] proposed a vending machine for
implementation of FPGA based smart vending machine in
Edison kho is pursuing M.Tech program from NIT Manipur, India. which process has four main state (Selection, waiting for user
Dr.Manoj kumar is working as an assistant professor in NIT Manipur, India.

978-1-7281-4988-2/20/$31.00 ©2020 IEEE


0246

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on August 19,2023 at 05:09:43 UTC from IEEE Xplore. Restrictions apply.
to insert token, product delivery and servicing) which
TABLE II
emphasis on the process flow and control logic to construct
PRODUCT WITH RESPECTIVE TOKEN _ IN
smart street snack vending machine application. In [2] Coffee Serial Number Products Token _ in Token_ in
vending machine has been carried out using SEEL singled (binary encoding) (colors)
electron encoded logic. The designed circuit is tested and its 1 ANDGATE 001 Green
power and switching time is compared with the CMOS 2 ORGATE 010 Blue
technology. 3 NOT 011 White
4 NORGATE 100 Yellow
Fauziah zainuddin[3] designed a steaming frozen food 5 NANDGATE 101 Black
vending machine using conceptual modeling in which the three
6 EXORGATE 110 Orange
main states (user’s selection state, freezer and steaming) has 7 EXORGATE 111 Red
been implemented considering the approach which focus on
the process flow and control logic to implement the model for TABLE III
steam buns machine application. The different ways of INPUT / OUTPUT WITH DESCRIPTION
designing a vending machine using VHDL are described in
Name Width Direction Description
[4],[5],[6],[7],[8]. Clock 1 Input Clock
Reset 1 Input Sysn. reset
III. IMPLEMENTATION cancel 1 Input Cancel
Product 1 Input Check for
The propose machine state diagram[9],[10],[11],[12] is available available of
constructed to vend out seven Integrated Circuit (IC) that is product
ANDGATE,ORGATE,NOTGATE,NORGATE,NANDGATE, Key or 1 Input If any key or
EXORGATE and EXNORGATE. The seven select input are token invalid token is
inserted
of 3bits vectors with encoding as (AND_GATE (001),
Select product 3 Input Selection of
OR_GATE (010), NOT_GATE (011), NOR_GATE (100), product
NAND_GATE (101), EXOR_GATE (110) and Token _ in 3 Input Token for
EXNOR_GATE (111) for selection of IC. The select respective product
AND_GATE is used for selection of ANDGATE, similarly the Product out 3 Output Dispense of
product
select OR_GATE, NOT_GATE, NOR_GATE, Return token 3 Output Return the
NAND_GATE, EXOR_GATE, EXNOR_GATE are for inserted token
selection of ORGATE, NOTGATE, NOTGATE, NORGATE, The IC with respective token is shown in Table II. Here the
NANDGATE, EXORGATE, EXNORGATE. The Token_ in tokens are of different colors with unique encoding for its
is an input of 3bits vectors for respective IC with different product token i.e. For ANDGATE the token color is GREEN
colors and encoded as (GREEN (001), BLUE (010), WHITE (001) this token is used to dispense ANDGATE. Table III
(011), YELLOW (100), BLACK (101), ORANGE (110) and shows the respective input and output with their description.
RED (111). A cancel is used when the customers want to
withdraw the process, if the user has inserted the token and IV. DESIGN METHODOLOGY
want to cancel the process then the inserted token will be
The state diagram composed [15],[16],[17] of four states
automatically return to the user. The Token- returns are of 3
(selection, waiting state, product delivery and token return)
bits vectors to return the inserted token if it doesn’t match with
here it is assumed the product available is always greater than
selected IC [13]. There are two input signal clock and reset.
1. The machine is in initial state when reset signal is low.
This machine work when clock signal is on positive edge and
When reset is high the users can select IC to be dispensed.
when reset signal is high the process will return to the initial
This state can be anyone of the select state (AND_GATE,
state [14]. The proposed vending machine is designed using
OR_GATE, NOT_GATE, NOR_GATE, NAND_GATE,
VHDL. Table I shows the selection of IC with their respective
EXOR_GATE and EXNOR_GATE). The machine will accept
encoding. Here to select ANDGATE user has to input binary
seven types of Token _ in i.e. Green, Blue, White, Yellow,
code 001 so that the controller will transfer the command to
Black, Orange, and Red their encoding are
waiting state.
TABLE I (001,010,011,100,101,110,111). Assuming that the users want
SELECTION OF IC WITH THEIR RESPECTIVE BINARY ENCODING to dispense ANDGATE he has to select AND_GATE input
from the selection option. The availability of product is check
Serial number Selection Binary in the first state of the machine. After this the control units will
Encoding for
selection
direct the command to the waiting state where it will wait for
1 AND_GATE 001
users to insert the token. And if product available is less than 1
2 OR_GATE 010 it will go back to initial state for servicing. If the users insert
3 NOT_GATE 011 token GREEN (001) for select AND_GATE then it will
4 NOR_GATE 100 dispensed the Integrated Circuit (IC) ANDGATE.
5 NAND_GATE 101 Else if the users has selected AND_GATE and inserted the
6 EXOR_GATE 110 token Blue, White, Yellow, Black, Orange, Red (010,
7 EXNOR_GATE 111 011,100,101,110,111) it will automatically return the inserted

0247

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on August 19,2023 at 05:09:43 UTC from IEEE Xplore. Restrictions apply.
Fig. 1. Flow chart of the proposed vending machine

Fig.. 2. State diagram of proposed vending machine

0248

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on August 19,2023 at 05:09:43 UTC from IEEE Xplore. Restrictions apply.
token. If in any state of process cancel is pressed then it will token for EXNORGATE i.e Red (111) then it will go to
return the inserted token and return to the initial state. The product_ out state and will dispense the EXNORGATE.
algorithmic stages of the proposed design are shown Fig. 1. A. Product delivery after inserting the token for EXNOR_GATE
Fig. 2 represents the state diagram of the proposed design. (111)
Description of states Fig. 3. Shows the simulated waveform for product delivery
The selection of product and all the state are shown in after the users has selected the product, product available is
followings ways greater than zero and also after the users has inserted the token
¾ When initial => for EXNOR-GATE i.e. Red (111).
Product out =”000”
Return token =”000”
¾ When select is on AND_GATE =>
AND_GATE&! OR_GATE&! NOT_GATE&!
NOR_GATE&! NAND_GATE&! EXOR_GATE&!
EXNOR_GATE
¾ When product available =1 =>
Next state < waiting1;
When product available = 0 =>
Next state <= initial;
¾ When waiting1=>
When Green&! Blue&! White&!
Yellow&! Black&! Orange&! Red
Token return = 000;
Next state <= product _out;
¾ When product_ out=>
Fig. 3. Simulated waveform for Product delivery
When token_ in =Green;
Product _out = ANDGATE;
B. When selection of product and token _in is different
Token _return =”000”
Fig. 4. Shows the simulated waveform for Token_ return in
Next state <= initial;
This state the users has selected NOR-GATE(101) and has
¾ When Token_ return=>
inserted the token for AND-GATE i.e. GREEN(001) in this
When
case since the selected product and inserted token does not
Token_ in = Blue;
match as results it will return the inserted token GREEN(001)
Token_ return =Blue;
and ask the users to insert the desired token.
Next state <= initial;
Product_ out = “000”;
¾ When cancel =>
Cancel = ‘1’;
Product_ out =”000”;

Similarly we can select the other products in this manner to


vend out the other different products.

V. SIMULATION RESULTS
The state diagram shown in the above is simulated using
Xilinx Vivado 2019.1 simulator. The simulation wave form for
selection of all seven products with token_ in, product available
and return token when users insert wrong token for selected
product are as shown below.
Taking the example that the users wants to dispensed
EXNORGATE he has to select the EXNOR_GATE (111) from
select option. The machine will check whether the product is Fig. 4. Simulated waveform for Token return
available or not, if available then it will go waiting7 state and
wait for the users to insert the token once the users inserted the

0249

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on August 19,2023 at 05:09:43 UTC from IEEE Xplore. Restrictions apply.
C. Register transfer level schematic
Fig. 5. represents RTL schematic of proposed vending
machine.

Fig. 6. Experiment results for product_ out

B. When selection of product is NOT_ GATE ( 011) and


Token_ in is RED (111)
Fig. 7. shows the experiment results for the Token_
return.
Here the Token_ return is assigned to LED (w3),
(v3) and (v13) and the LED is high showing Token
return since we have inserted token RED (111) for
selected product NOT_ GATE (011).

Fig. 5. RTL diagram of proposed vending machine

VI. EXPERIMENT RESULTS


The experiments results of the vending machine designed as
carried out on FPGA basy-3 Artix-7 series FPGA
(xc7a200tfbg676) development board are as shown below. Here
the output is assigned to LED (V16), (E19), (V19). And the
input selection of product is assigned to switches pin (W16),
(V16), (V17) and switch pin (V15) is assigned for PRODUCT
AVAILABLE HIGH. And the Token_ in input pins is assigned
to switch’s pin (T2), (T3), (V2) of FPGA basy-3 board.
A. When selection of product is EXNOR-GATE (111) and
the Token_ in is Green (111)
Fig. 6. shows the experiment results for product Fig. 7. Experiment results for token return
delivery of EXNOR-GATE.
VII. PERFORMANCE ANALYSIS
Here the Selection of product input switches pins
(W16), (V16), (V17) are making high to select Comparisons between the existing and the proposed design
EXNOR_GATE from select option. Switches Pin we can observed that the VHDL base machine give lesser
delays as compared to that of the CMOS base machine
(V15) is make high for PRODUCT AVAILABLE.
technology and the existing machine. Table IV shows the
And the Token_ in input switch’s pin (T2), (T3), (V2) contrast of switching speed between proposed and existing
of the FPGA board is making high to dispense the vending machine. Table V represents device utilization reports
product. The output is assigned to LED (V18), (E19), for proposed and existing vending machine. Fig. 8 represents
(V19) shows high signal indicating product delivery. the power results of the implemented vending machine.

0250

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on August 19,2023 at 05:09:43 UTC from IEEE Xplore. Restrictions apply.
TABLE IV REFERENCES
COMPARISONS OF SWITCHING SPEED [1]
[1] B. jyothi, Isarah, A.srinivas “Implementation of FPGA based smart
parameter FPGA[1] CMOS[1] Proposed
vending machine ” international journal of engineering research
design
Switching speed 9.3ns 300ns 4.956ns and application (IJERA) 2248-9622. National conference on
TABLE V development advances and trend in engineering science (NCDATES
THE DESIGNED DEVICE UTILIZATION SUMMARY COMPARISON WITH EXISTING 09th and 10th January 2015.
MACHINE [2] M. Zhou, Q. Zhang & Z. Chen (2006), “What Can Be Done to
Automate Conceptual Simulation
Resource Used Available Utilization [3] Modelling?” Proceedings of the 2006 Winter Simulation Conference,
pp. 809 – 814.
Number Of Slices[1] 228 3584 6%
[4] International Journal of VLSI design & Communication Systems
Number of slice flip flop[1] 98 7168 1% (VLSICS) Vol.3, No.2, April 2012
[5] Fauziah Zainuddin, norlin Mohd Ali, roslina Mohd sidek, Awains
Number of 4 inputs LUTs[1] 432 7168 6%
romli, nooryati talib and mohd izham Ibrahim(2009) “conceptual
Number of bonded IOBs[1] 31 173 17% modeling for simulation; steaming frozen food processing in vending
machine” . International conference on computer science and
Number of GCLKs[1] 1 8 12%
information technology, Universities Malaysia Pahang pp.145-
Proposed architecture 149.2009.
[6] P smith (1997)”automatic hot food vending machine” trends in food
Number of slice flip flop 14 41600 0.03% science and technology vol.81 and pp. 349. October 1997.
slice LUTs 35 20800 0.17% [7] Muhammad Ali Qureshi “Design and implementation of vending
machine using Verilog” 2nd international conference on networking and
information technology. IPCSIT vol.17, pp-6 (2011).
[8] Peter minns, ian elloit, “FSM-based digital designed using VHDL”,
John Wiley and sons,ltd 2008.
[9] P.Pradeepa “Design and implementation of vending machine using
Verilog HDL” International journal of advanced engineering
technology E-ISSN 0976-394 vol.IV, PP-51-53. 2013.
[10] Kaushal Mahesh Ambani, Harshil Mayur Ghandi, Priyank jayesh Shah.
“Automatic Ticket vending via massaging service (ATVMS)”
international journal of computer application (0975-8887) volume 42-
NO.17.pp25-29.march 2012.
[11] Biplab Roy and Biswarup Mukherjee.” Design of a coffee vending
machine using single electron devices” international symposium of
Electronic system design pp38-43.2010.
Fig. 8. Power results for design vending machine [12] Shatrughan Modi, Dr.Seema Bawa,”Automated coin recognition
system using ANN” international journal of computer application
VIII. CONCLUSION (0975-8887) volume26,N0.4 pp13-17.2011.
[13] Ana Monga Balwinder Singh “Finite state machine based vending
The intended designed of vending machine based on the
machine controller with auto-billing features”in2012 International
FPGA is carry out by using a Finite State Machine and
journal of VLSI design and communication system (VLSICS) Vol.3,
simulated using Xilinx Vivado 2019.1. The design is verified in N0.2, pp19-28. 2012.
the BASY-3 development board. The code works as a user [14] Seyed bahram, zahir azami &mohammad tanabian”automatic mobile
friendly machine and the code can actually provide a variety of payment on a non- connected vending machine”proceedings of
options to the users. State machine based vending escalate Canadian conference on Electrical and computer Engineerin,pp-731-
productivity, lower the system development cost. The vending 734. 2004.
machine gives quick responses and can be easily operated by [15] C.J clement singh, k smith kumar jayanto gope suman basu and subir
even an ordinary person. The proposed vending machine can be kumar sarkar (2007). “Single electron device based automatic tea
utilized in many application and the users can very well vending machine” proceeding of international conference on
manipulate the number of selection of product based on information and communication technology in electrical science
requirement. Proposed designed has less LUT as compared to (ICTES 2007). PP 891-896. 2007.
existing vending machine. The proposed vending machine has [16] Sakshi Sharma, Ana Monga, (2011), Implementation of Reverse
Vending Machine Based on FPGA, International Journal of Emerging
less speed as compared to that of existing vending machine.
Technologies in Computational and Applied Sciences (IJETCAS)
.2011.
ACKNOWLEDGMENT [17] M.Bhuvaneswari, S.Sukhumar, N.Divya, S.Kalpanadevi,
I am so much greatfull to my project supervisor Dr. N.SuthanthiraVanitha, (2013), Embedded System Based Automatic
Manoj Kumar who has assisted in my project work without his Ticket Vending Machine for Modern Transport System, International
guidance this paper would have not been accomplished. I am Journal of Advanced Research in Computer and Communication
also much thankful to all my respected teachers and friends Engineering Vol. 2, Issue 11. 2013.
for their excellent contributions and support for the
completion of this paper.

0251

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on August 19,2023 at 05:09:43 UTC from IEEE Xplore. Restrictions apply.

View publication stats

You might also like