International Journal of Electronics and Computer Science Engineering 331 Available Online at www.ijecse.org ISSN- 2277-1956 Change-Exchange Currency based Vending Machine using VHDL Nikita Khandelwal 1, Arjoo Agarwal 2, Harsha Jaisani 3, Kavita Bhagwani 4, Prachi Singh Kuntal 5 Mr. Arvind Sharma 6 1 2 3456 Department of Electronics and Communication Engineering Govt. Women Engineering College Ajmer Makhupura, Rajasthan, India 12345 Student (ECE Deptt), GWECA 6 Astt Professor (ECE Deptt), GWECA Email- 1 niks65.scorpion@gmail.com 2 arjooagarwal@gmail.com 3 harshijaisani@gmail.com 4 kavitabhagnani043@gmail.com 5 prachi.kuntal15@gmail.com 6 engg.arvind85@gmail.com, Abstract- A vending machine is a coin-operated, automatic device which dispenses items such as snacks, beverages, lottery tickets, consumer products and even gold and gems to customers automatically, after the customer inserts currency or credit into the machine. These are more accessible and practical than the convention purchasing method. It is for the reason that vending machines provide us for our necessities almost instantly and with high quality, that people consider it as a very much reliable choice. In this paper a new approach is proposed to design a Vending Machine with automatic currency change or exchange multi select feature using which user can get a change of its currency or can exchange its currency to other available currency options. The machine also supports a cancel feature which means that the user can withdraw the request and the money will be returned back to him. This machine can be used at various places like Hotels, Restaurants, Stations and shopping centers. This reduces the time and cost. The proposed model is implemented using FPGA, the simulation results and circuit parameters are also presented. Keywords VHDL, Vending Machine, FPGA I. INTRODUCTION The world is globalised and the economic integration by 'globalization' enabled the cross country free flow of information, ideas, technologies, goods, services, capital, finance and people. More or less the economic integration results in Movement of capital and Flow of finance. Thus the exchange of currency dimensions has widened these days. Along with this the modern lifestyle of people is increasing day by day which make them inconvenient to carry the change of the currency everywhere and thus increased the use of credit cards, debit cards etc. These two needs are overlapped together in the form of vending machine. Economic growths, development of cities, lifestyle and eating & drinking habits have opened a huge market for these machines which can cater to consumers directly. Its demand is on the top these days because of their high quality services. Another vending advantage is the mobility. Taking into account the results obtained, the vending machine can be moved to a new place. There is no cashier so that the client is the only one who decides if he wants to buy a product. These can be used everywhere like at stations selling tickets, in schools and offices, in banks and at various shopping centers. [3] VHDL is a versatile and powerful hardware description language which is useful for modeling electronic systems at various levels of design abstraction and in electronic design automation to describe digital and mixed signals systems such as FPGA and Integrated Circuits. The abbreviation of VHDL is VHSIC (Very high Speed Integrated Circuit) Hardware Description Language, it is an industry standard language used to describe hardware from the abstract to the concrete level. In the proposed vending machine Bottom up methodology of VHDL is used [1][2][7]. A FPGA is a semiconductor device that is made up of reprogrammable logic components. These logic components are made up of a combination of look-up tables (LUT) and flip-flops (FF). [10] Previous CMOS and SED based
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 332 machines are more time consuming than the FPGA based machines. The FPGA based machine is also more flexible, programmable and can be re-programmed. But in microcontroller based machine, if one wants to enhance the design, he has to change the whole architecture again but in FPGA user can easily increase the number of products. Also FPGA based vending machine give fast response and uses less power than the microcontroller based vending machine. [4][6][8][9] The rest of the paper is organized as follows Implementation of Vending Machine is explained in section II. Design Methodology in section III. Experimental and Simulation results are presented in section IV. Concluding remarks are given in section V. Operation of Vending Machine I. When the user puts in money, money counter tells the control unit, the amount of money inserted in the Vending Machine. II. When the user presses the button to purchase the item that he wants; the control unit turns on the motor and dispenses the product if correct amount is inserted. III. If there is any change or user wants to withdraw its request by not pressing yes, machine will return the inserted amount back to the user. Operation of Change-Exchange Vending Machine II. IMPLEMENTATION OF VENDING MACHINE This Vending Machine provides two operations (a) Exchange: This provides user to exchange the currency in Rupee (Indian Currency) to any one of the following currencies: (i) Dirham (ii)dollar (iii)pound (b)change: This provides user to get a change for the money inserted. Features: 1. Firstly the user inserts the money and chooses the option either for Exchange or Change by pressing the respective buttons. 2. When the user puts in money, money counter tells the control unit, the amount of money inserted in the Vending Machine. 3. When the user presses the button of the respective currency option, he will be asked for a confirmation and when he confirms (by pressing button) the control unit turns on the motor and dispenses the amount if correct amount is inserted. 4. If there is any change, machine will return the inserted amount to the user. 5. The respective currency or change is delivered to the user.
Change-Exchange Currency based Vending Machine using VHDL 333 Table no.1 Product with their Prices and cost Serial No. Products Amount(in Rupee) 1. Dirham 20/- 2. Dollar 50/- 3. Pound 100/- 4. Re 1 coin 1/- 5. Rs 2 coin 2/- 6. Rs 10 note 10/- 7. Rs 50 note 50/- Table no. 2: s/outputs with Remarks Serial No. Name Direction Description 1. Clk Clock 2. Ex Exchange 3. Ch Change 4. Y Yes 5. C(0 to 2) C(0):Dirham C(1):Dollar C(2):Pound 6. R1(0 to 2) R1(0):Rs 100/- R1(1):Rs 500/- R1(2):Rs 1000/- 7. D D(0): Re 1/- coin D(1):Rs 2/- coin D(2):Rs 10/- note D(3):Rs 50/- note
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 334 8. R2 9. Op Output R2(0):Rs 10/- note R2(1):Rs 20/- note R2(2):Rs 50/- note R2(3):Rs 100/- note Output Currency out III DESIGN METHODOLOGY: A bottom-up approach is the piecing together of systems to give rise to grander systems. In this case first the individual blocks are defined and designed and then they are brought together to form the overall design, various different blocks are combined to operate the machine as the whole. [1][2][5] The machine can accept only following notes Rs100/-, Rs500/-, Rs1000/- for the Exchange operation and Rs10/-, Rs20/-, Rs50/-, Rs100/- for the Change operation. Let us suppose that the user selected the ex input. After this the control unit will move to the waiting state, where it will wait for the money to be inserted. The money inserted will be scanned and the respective input will be send to the control unit. After this the control unit will move to the waiting state, where it will wait for the product to be selected. Suppose Rs 100/- is inserted and c(0) (Dirham) is selected than the control unit will ask the user for the confirmation of the selected product if user selected y input then the control unit turns on the motor and the product is dispensed if correct amount is inserted. This methodology is explained through the following block diagram: Figure no. 1 Block Diagram of Proposed Vending Machine
Change-Exchange Currency based Vending Machine using VHDL 335 Description of Blocks: 1. Exchange Block: Figure no. 2 Block Diagram of Exchange Block The block shown in Figure no. 2 has following input and outputs: Table no. 3 / Output of Exchange Block with Remarks Serial No. 1. 2. 3. 4. Name Direction C(0 to 2) input R(0 to 2) input En input B(0 to 5) output Description C(0):Dirham Select C(1):Dollar Select C(2):Pound Select R(0):Rs 100/- Inserted R(1):Rs 500/- Inserted R(2):Rs1000/-Inserted Enable 6 bit output When exchange is selected by the user this block is enabled and comes into action. The system waits for the amount to be inserted. The amount inserted as input is any one among the following Rs 100/-, Rs 500/-, Rs 1000/- only. The system takes select currency input in the form of vector, R. The output is a 6 bit vector which indicates the no. of times the motor of the respective currency will be on with the help of counter. The output of this block is input to the counter.
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 336 1. Change Block: Figure no. 3 Block Diagram of Change Block The block shown in Figure no. 3 has following inputs and outputs: Table no. 4 / Outputs of Change Block with Remarks Serial No. 1. 2. 3. 4. Name Direction C(0 to 3) R(0 to 3) input En input B(0 to 6) output Description C(0):Re 1/- coin selected C(1):Rs 2/- coin selected C(2):Rs 10/- note selected C(3):Rs 50/- note selected R(0):Rs 10/- Inserted R(1):Rs 20/- Inserted R(2):Rs 50/- inserted R(3):Rs 100/- inserted Enable 7 bit output
Change-Exchange Currency based Vending Machine using VHDL 337 When change is selected by the user this block is enabled and comes into action. The system waits for the amount to be inserted. The amount inserted as input is any one among the following Rs 10/-, Rs 20/-, Rs 50/-, Rs 100/- only. The system takes select currency input in the form of vector, R. The output is a 7 bit vector which indicates the no. of times the motor of the respectivee currency will be on with the help of counter. The output of this block is input to the 6 Bit Counter Block: 2. 6 Bit Counter Block: Figure no. 4 Block Diagram of 6-Bit Counter The block diagram shown in Figure no. 4 has following inputs and outputs: Table no..5 / Outputs of 6 Bit Counter Block with Remarks Serial No. Name Direction Description 1. B 6 bit binary input 2. E Enable 3. Clk Clock 4. Yes Yes 5. Op Output Output of counter When any one of the following currency Dirham, Dollar, Pound is selected by the user this block is enabled and comes into action. This takes 6 bit data as the input which is the upper limit of this down counter. The yes input is the confirmation which is to be selected by the user so that the selected currency product can be dispersed. The output op drives the motor which is high until the counter returns to 0.
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 338 3. 7 Bit Counter Block: Figure no. 5 Block Diagram of 7 Bit Counter This block has following inputs and outputs: Table no. 6 / Output of 7 Bit Counter Block with Remarks Serial No. Name Direction Description 1. B 7 bit binary input 2. E Enable 3. Clk Clock 4. Yes Yes 5. Op Output Output of counter When any one of the following currency Rs 1/- coin, Rs 2/- coin, Rs 10/- note, Rs 50 note is selected by the user this block is enabled and comes into action. This takes 7 bit data as the input which is the upper limit of this down counter. The yes input is the confirmation which is to be selected by the user so that the selected currency product can be dispersed. The output op drives the motor which is high until the counter returns to 0. IV EXPERIMENTAL AND SIMULATION RESULTS: The block diagram shown in figure no. 1 is compiled and simulated in ModelSim SE 6.2c. The following figure no. 6 is the result generated when Exchange is chosen and Rs 100/- is inserted and Dirham is chosen as the currency product. When the user gives confirmation by pressing y the counter starts thus the respective output op1 will be high and drives the motor which dispenses Required Currency Exchanged in Dirham.
Change-Exchange Currency based Vending Machine using VHDL 339 Figure no. 6 Simulation Waveform showing selection of Exchange and currency as Dirham The following figure no.7 is the result generated when Change is chosen and Rs 10/- is inserted and Re 1/- is selected as the currency product. When the user gives confirmation by pressing y the counter starts thus the respective output op1 will be high and drives the motor which dispenses Re 1/- ten coins as can be viewed in the simulation result too that the output is high for ten clock cycles, thus ten coin will be dispensed.
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 340 Figure no. 7 Simulation Waveform showing selection of Change and currency as Re 1/- The RTL (Register Transfer Logic) view of the proposed Vending Machine is as shown in figure 8: Figure no. 8 RTL view of proposed Vending Machine
Change-Exchange Currency based Vending Machine using VHDL 341 The Detailed Internal RTL view of proposed vending machine is shown in Figure no.9 Figure no. 9 Detailed Internal RTL view of proposed Vending Machine The Technology View of proposed Vending Machine is as shown in figure no. 10:
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 342 Figure no. 10 Technology view of proposed Vending Machine The Design Utilisation Summary of Change-Exchange Vending Machine is as follows: Table no.7 Design Utilisation Summary of Change-Exchange Vending Machine Logic Utilization Used Available Utilization No. of 4 input LUT s 191 4896 3% No. of Slice Flip flops 46 4896 1% No. of occupied slices 101 2448 4% No. of slices containing only related logic 101 101 100%
Change-Exchange Currency based Vending Machine using VHDL 343 No. of slices containing 0 101 0% unrelated logic Total no. of 4 input 193 4896 3% LUT s No. of LUT s used as 191 logic No. of LUT s used as 2 route-thru No. of Bonded IOB s 25 108 23% No. of BUFGMUX s 1 24 4% Average Fan-out of 4.04 Non-clock Nets V.CONCLUSION The presented FPGA based proposed vending machine is implemented using bottom-up approach methodology. The design is verified on the FPGA Spartan 3 development Board. Vending Systems enhances productivity, reduces system development cost, and accelerates time to market. Also FPGA based vending machine give fast response and easy to use by an ordinary person. The designed machine can be used for many applications. The circuit parameters and simulation results obtained using ModelSim software are also presented. VI. REFERENCES [1] Fundamentals of Digital Logic with VHDL design by Stephen Brown and Zvonko Vranesic [2] VHDL Programming by Examples Fourth Edition by Douglas L. Perry [3] Business of Vending Machine available at http://dare.co.in/opportunities/services/the-business-of-vendingmachines.htm [4] Chris Wright and Mike Arens, FPGA-based Systemon-Module Approach Cuts Time to Market, Avoids Obsolescence, FPGA and Programmable Logic Journal, Volume VI, No. 6, Feb. 2005 [5] Introduction to VHDL By Dr. Yaser Khalifa Electrical and Computer Engineering Department State University of New York at New Paltz [6] Electronics For You Magazine Career Opportunities in FPGA Designing June 2012 Edition and Designing with FPGA November 2012 Edition [7] Bhaskar VHDL primer Second Edition, [8] Steve Kilts, Advanced FPGA Design: Architecture, Implementation, and optimization, Wiley-IEEE
IJECSE,Volume2,Number 1 Nikita Khandelwal et al. 344 Press, 2007. [9] S. Brown & J. Rose, FPGA and CPLD Architectures: A Tutorial, IEEE Design & Test of Computers, Summer 1996, pp. 42-57. [10] Xilinx, Spartan-3 FPGA Family: Complete Data Sheet, available at www.xilinx.com