38644035 ieee format vending machine report

6
Vending Machine Karim I. Chevelwalla #1 , Onkar P. Chauhan *2 # Electronics (T.E), M.H.S.S.C.O.E 8, Saboo Siddik Polytechnic Road, Byculla, Mumbai-400008, India. 1 [email protected] * Electronics (T.E), M.H.S.S.C.O.E 8, Saboo Siddik Polytechnic Road, Byculla, Mumbai-400008, India. 2 [email protected] Abstract— The main purpose of designing our project was to create a vending machine which could provide a number of soft drinks, juices and water to the people using extremely simple steps. These steps would not be time consuming at all. The user would get all the details on the screen which he/she should follow. We have made an attempt to vend products of different prices in the same machine. The machine will also provide the balance money to the user depending on the product selected. We have tried to implement various combinations so that people can get a wide range of drinks to choose from. Despite a few difficulties and a lot of support from our project in charge we were able to incorporate our program and have a vending machine which could actually be implemented in actual sense. Keywords— Put your keywords here, keywords are separated by comma. I. INTRODUCTION Vending machines are coin-operated machines that can dispense snacks, drinks, sandwiches, coffee, tea and other products. These are an extremely convenient outlet for the industry known as automatic retailing. We find vending machines in public buildings, transportation hubs and subways, at gas stations, courthouses, hospitals, and the local automotive repair shop. Any place that people gather, pass by, or must wait, is a good location for vending machines. In our vending machine, we have tried to incorporate cold beverages ranging from a Rs. 20/- to Rs. 40/-. It is possible for the people to buy drinks of his/her choice from a variety of drinks available in the machine. Also he/she can buy a combination of drinks depending on the money he/she would like to spend. The machine will return back the balance amount if he/she provides excess money into the machine. II. DESIGN & SIMULATION Our main aim was to try and make a vending machine which would provide the user a variety of drinks to choose from but 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. The block diagram of the vending machine will explain our concept. Fig. 1 Block Diagram of Vending Machine The block diagram of the vending machine has the following blocks: Reset Input Selection options (Cold drinks) Output (Desired Cold drink) Balance money Initially the user is required to provide the input in the fom of coin i.e.Rs.10/-. As soon as the input is provided the user is asked provided with a variety of options to choose from. The user can select the drink of his/her choice and then proceed to towards the output. At the output the desired cold drink is available. If the user provides extra money in case he does not have change then along with the cold drink, the machine will also return back the excess money to the user.

Upload: moeed-iqbal

Post on 26-Nov-2015

74 views

Category:

Documents


12 download

DESCRIPTION

.....

TRANSCRIPT

  • Vending Machine Karim I. Chevelwalla#1, Onkar P. Chauhan*2

    #Electronics (T.E), M.H.S.S.C.O.E 8, Saboo Siddik Polytechnic Road, Byculla, Mumbai-400008, India.

    [email protected] *Electronics (T.E), M.H.S.S.C.O.E

    8, Saboo Siddik Polytechnic Road, Byculla, Mumbai-400008, India. [email protected]

    Abstract The main purpose of designing our project was to create a vending machine which could provide a number of soft drinks, juices and water to the people using extremely simple steps. These steps would not be time consuming at all. The user would get all the details on the screen which he/she should follow. We have made an attempt to vend products of different prices in the same machine. The machine will also provide the balance money to the user depending on the product selected. We have tried to implement various combinations so that people can get a wide range of drinks to choose from. Despite a few difficulties and a lot of support from our project in charge we were able to incorporate our program and have a vending machine which could actually be implemented in actual sense. Keywords Put your keywords here, keywords are separated by comma.

    I. INTRODUCTION Vending machines are coin-operated machines that can

    dispense snacks, drinks, sandwiches, coffee, tea and other products. These are an extremely convenient outlet for the industry known as automatic retailing. We find vending machines in public buildings, transportation hubs and subways, at gas stations, courthouses, hospitals, and the local automotive repair shop. Any place that people gather, pass by, or must wait, is a good location for vending machines. In our vending machine, we have tried to incorporate cold beverages ranging from a Rs. 20/- to Rs. 40/-. It is possible for the people to buy drinks of his/her choice from a variety of drinks available in the machine. Also he/she can buy a combination of drinks depending on the money he/she would like to spend. The machine will return back the balance amount if he/she provides excess money into the machine.

    II. DESIGN & SIMULATION Our main aim was to try and make a vending machine

    which would provide the user a variety of drinks to choose from but 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. The block diagram of the vending machine will explain our concept.

    Fig. 1 Block Diagram of Vending Machine

    The block diagram of the vending machine has the

    following blocks: Reset Input Selection options (Cold drinks) Output (Desired Cold drink) Balance money

    Initially the user is required to provide the input in the fom of coin i.e.Rs.10/-. As soon as the input is provided the user is asked provided with a variety of options to choose from. The user can select the drink of his/her choice and then proceed to towards the output. At the output the desired cold drink is available. If the user provides extra money in case he does not have change then along with the cold drink, the machine will also return back the excess money to the user.

  • III. IMPLEMENTATION

    Regardless to say this was our first attempt to make such a big project using VHDL. Our knowledge about VHDL was also quite scarce.

    As this was our first project using VHDL little did we know about the programming and tools available for it. But the World Wide Web has helped us a lot with the same. We decided to use Xilinx programming software for our project. The Model-Sim software helped us to write the program in its program window and simulate the program. The software also pointed out the errors present in the particular line in the program. After simulating, it the waveform depending upon the input provided.

    VHDL code of Vending machine:

    library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity om_car is Port ( Clock : in STD_LOGIC; Reset : in STD_LOGIC; Cr : in STD_LOGIC; Qi : in STD_LOGIC; Ci : in STD_LOGIC; Bi : in STD_LOGIC; Wi : in STD_LOGIC; Ei : in STD_LOGIC; Fi : in STD_LOGIC; Si : in STD_LOGIC; Mi : in STD_LOGIC; Vi : in STD_LOGIC; Gi : in STD_LOGIC; Ai : in STD_LOGIC; DP : in STD_LOGIC; RR : in STD_LOGIC; CW : in STD_LOGIC; CB : in STD_LOGIC; BW : in STD_LOGIC; WW : in STD_LOGIC; CC : in STD_LOGIC; BB : in STD_LOGIC; CRo : out STD_LOGIC; Qo : out STD_LOGIC; Co : out STD_LOGIC; Bo : out STD_LOGIC; Wo : out STD_LOGIC; DQo : out STD_LOGIC; Fo : out STD_LOGIC; Eo : out STD_LOGIC; So : out STD_LOGIC; Mo : out STD_LOGIC; Vo : out STD_LOGIC;

    Go : out STD_LOGIC; Ao : out STD_LOGIC; Q : out STD_LOGIC_VECTOR (4 downto 0)); end om_car; architecture Behavioral of om_car is TYPE State_type IS (A, B, C, D, E, F, G, H , I , J , K , L , M , N , O , P , W , R , S , T , U , V , X , YY , Z ) ; SIGNAL y : State_type ; begin Process Begin If Reset = '0' then -- to get back to the initial state. y

  • The program cannot be explained line by line. Instead it can be easily explained using the state diagram. The state diagram helps to understand the entire logic step by step. We have made an attempt to try and explain the entire program and logic using the state diagram.

    The exact step by step description and explanation of the program is as stated below:

    The machine takes Rs. 10/- only. The input is denoted by Qi. As soon as the machine gets Rs. 20/-, it gets activated and performs the operations as directed by the user and provides the output.

    The machine can dispense the following items at the output: Coke (Co): Rs. 20/- Water (Wo): Rs. 20/- Milk (Bo) : Rs. 20/- Apple Juice (Ao): Rs. 30/- Guava Juice (Go): Rs. 30/- Cocktail Juice (Fo): Rs. 30/- Fruit Beer (Vo): Rs. 40/- Mango Shake(Mo): Rs. 40/- Mosambi juice (So): Rs. 40/- Energy Drink (Eo): Rs. 40/- Coin Return out (Cro) The above mentioned beverages are the output which the machine will give out after performing following the users instructions.

    The machine has a Coin Return button (Cr) Only one input may be active at a time. A product can be dispensed in one clock cycle. If more than 40/- Rupees is inserted, then along with

    the required cold drink, the extra money is returned back to the user. Similar is the case when 30/- Rupees is inserted and the user selects a 20/- Rs. drink, the extra money is returned back. And so on.

    If no inputs are active, the state machine stays in the current state.

    How will this work? State 1:

    If nothing has happened, or if the machine has been reset, the machine is in state A.

    Fig. 2.1 State-1

    State 2:

    If the user gives Rs.10/- as input (Qi), the machine goes to state B.

    The user can now: Do nothing & stay in State B. Hit the Coin Return & go to state C and take the

    money back.(Cro)

    Fig. 2.2 State-2 State 3:

    Again if the user gives Rs. 10/- (i.e.Total of Rs. 20/-) the machine goes into state D and waits for the next instruction.

    Fig. 2.3 State-3

    State 4:

    Now the machine is in state D (Rs. 20/-) The user can now: Do nothing & stay in State D. Hit the Coin Return & Go to state C and take the

    money back. (Cro) Select Coke (Ci) & go to state E, get coke at the

    output (Co), then go to state A. Select Milk (Bi) & go to state F, get Milk bottle

    at the output (Bo), then go to state A. Select Water (Wi) & go to state I, get water bottle at

    the output (Wo), then go to state A. Fig. 2.4 State-4

  • State 5: Again if the user gives Rs. 10/- (i.e.Total of Rs. 30/-) the machine goes into state G and waits for the next instruction.

    Fig. 2.5 State-5

    State 6: Now the machine is in state G (Rs. 30/-)

    The user can now: Do nothing & stay in state G. Select Cocktail juice (Fi) & go to state H,

    get Cocktail juice at the output (Fo), then go to state A.

    Select Apple Juice (Ai) & go to state O, get Apple juice at the output (Ao), then go to state A.

    Select Guava juice (Gi) & go to state P, get Guava juice at the output (Go), then go to state A.

    Fig. 2.6 State-6

    State 7: If the user feels that he wants to buy only an item of Rs.20/- then the machine will provide the item worth Rs.20/- at the output and he/she will also get back the balance money.(i.e. Rs.10/- back)

    Fig. 2.7 State-7

    State 8: Again if the user gives Rs. 10/- (i.e. Total of Rs. 40/-) the machine goes into state J and waits for the next instruction.

    Fig. 2.8 State-8

  • State 9: If the user feels that he wants to buy only an item of Rs.30/- then the machine will provide the item worth Rs.30/- at the output and he/she will also get back the balance money.(i.e. Rs.10/- back)

    Fig. 2.9 State-9 State 10:

    If the user feels that he/she wants to buy only an item of Rs.20/- then the machine will provide the item worth Rs.20/- at the output and he/she will also get back the balance money.(i.e. Rs.20/- back)

    Fig. 2.10 State-10

    State 11: Now the machine is in state J (Rs.40/-) The user can now: Do nothing & stay in State J. Take the cash back (Cr). Select Energy drink (Ei) & go to state K, get

    Energy drink at the output (Eo), then go to state A.

    Select Mango Juice (Mi) & go to state M, get Mango juice at the output (Mo), then go to state A.

    Select Fruit beer (Vi) & go to state P, get Fruit beer at the output (Vo), then go to state A.

    Select Mosumbi juice (Si) & go to state N, get Mosumbi juice at the output (So), then go to state A.

    The machine will remain in J state if it receives another 10/- Rs. at the input.

    F

    Fig. 2.11 State-11

    IV. RESULTS We would gladly say that our first attempt at a project of

    this magnitude did pay off well and the program did work. We synthesized the program using Xilinx 9.1 and got the successful CPLD report. The test bench which was performed was also carried out successfully without any errors. We gave several inputs into the machine keeping the user in mind and got the waveforms accordingly. The output waveforms indicated the successful working of the vending machine when an input is given to it. The waveform is shown below :

  • Also the synthesis generated the CPLD report along with

    the corresponding integrated circuit equivalent to the vending machine. The integrated circuit has pins corresponding to the inputs, outputs and reset. The integrated circuit that is generated by the software is of 100 pins. The figure below shows the pin diagram: Device : XC2C64A-5-VQ100

    Fig. 4.2 Equivalent Pin Package Pin Signal Pin Signal No. Name No. Name 1 Fi 51 VCCIO-1.8 2 Ei 52 KPR 3 DP 53 KPR 4 Cr 54 NC 5 VCCAUX 55 KPR 6 Ci 56 KPR 7 CW 57 VCC 8 CC 58 KPR 9 CB 59 NC 10 Bi 60 KPR 11 BW 61 KPR 12 BB 62 GND 13 Ai 63 NC 14 Ao 64 KPR 15 CRo 65 NC 16 DQo 66 NC 17 Eo 67 KPR 18 Fo 68 KPR 19 Go 69 GND 20 NC 70 KPR

    21 GND 71 KPR 22 Clock 72 KPR 23 Q 73 NC 24 Q 74 KPR 25 NC 75 NC 26 VCC 76 WW 27 Q 77 Vi 28 Q 78 Si 29 Q 79 Wi 30 Bo 80 NC 31 GND 81 Reset 32 Wo 82 NC 33 Co 83 TDO 34 Qo 84 GND 35 KPR 85 NC 36 KPR 86 NC 37 KPR 87 NC 38 VCCIO-1.8 88 VCCIO-1.8 39 KPR 89 Vo 40 KPR 90 So 41 KPR 91 Mo 42 KPR 92 RR 43 KPR 93 NC 44 NC 94 Qi 45 TDI 95 NC 46 NC 96 NC 47 TMS 97 Mi 48 TCK 98 VCCIO-1.8 49 KPR 99 Gi 50 KPR 100 GND Another advantage of the software was that it performed all the operations without much prompts. Thus we were able to successfully synthesize the code and get the desired results.

    V. CONCLUSION When we realised that we have at last made a code that

    could actually work as a user friendly vending machine, we were over-joyed at our achievement. Yes! This code can actually provide a variety of options to the user and also return him/her the balance money. Thus we would conclude saying that we tried our bit to modify the present day complex vending machine into a user friendly and user specific vending machine. We humbly thank our project incharge who through his motivative ways helped us in successful completion of the project.

    REFERENCES 1. www.images.google.co.in/imgres?imgurl=http://teeeph.net/blog/w

    pcontent/uploads/2009/08/vending_machine.jpg&imgrefurl=http://teeeph.net/blog/&usg=__ub4r6Uwgb7u0JeCapV_XZjyyXBo=&h=428&w=300&sz=26&hl=en&start=1&tbnid=iPCk4WIYMKF_qM:&tbnh=126&tbnw=88&prev=/images%3Fq%3DVENDING%2BMACHINE%26gbv%3D2%26hl%3Den%26sa%3DG

    2. http://www.xilinx.com/prs_rls/2007/software/0715_webpack.htm 3. http://www.xilinx.com/company/press/kits/planahead/backgrounde

    r.pdf 4. http://www.wikipedia.org/wiki/Vending_machine.htm