Project 2
Project 2
A PROJECT REPORT On
LIST OF FIGURES
FIGURE1: - MELAY MACHIINE... (3) FIGURE2 :- MOORE MACHINE.(3) FIGURE3: - FINAL SYMBOL OF VENDING MACHINE ... (8) FIGURE 4: - SCHEMATICS DIAGRAM OF VENDING MACHINE... (9) FIGURE 5: - LAYOUT OF VENDING MACHINE. . (9) FIGURE 6: - LVS RESULT OF VENDING MACHINE. . (10) FIGURE 7: - OUTPUT WHEN 2 RUPEES (INPUT B) COIN IS PROVIDED BY USER (10). FIGURE 8: - OUTPUT WHEN 5 RUPEES (INPUT C) COIN IS PROVIDED BY USER. .. (11) FIGURE 9: - OUTPUT WHEN CANCEL BUTTON IS PRESSED BY USER. ...... (12)
TABLE OF CONTENTS
LIST OF FIGURES...... (1) CHAPTER 1: - VENDING MACHINE 1.1 Introduction .......... (2) 1.2 Operation of vending machine.................. (2) 1.3 FSM .......(2) 1.4 Implementation of vending machine............................. (3) CHAPTER 2: - DESIGN METHODOLOGY.... (4) CHAPTER 3: - SIMULATION RESULT.. (7) CHAPTER 4: - CONCLUSION . (12) References.................. (13)
CEERI
When the user puts in money, money counter tells the control unit, the amount of money inserted in the Vending Machine. Here user can only insert 1 Rs, 2 Rs and 5 Rs coin. When the user presses the button to purchase the item that he want, the machine will dispenses the product if correct amount is inserted. If there is any change, machine will return it to the user. If cancel button is pressed user will get his money back. 1.3 FSM (Finite State Machine) In a Finite State Machine the circuits output is defined in a different set of states i.e. each output is a state. A State Register to hold the state of the machine and a next state logic to decode the next state. An output register defines the output of the machine. In FSM based machines the hardware gets reduced as in this the whole algorithm can be explained in one process. Two types of State machines are:
CEERI
MEALY Machine: In this machine model, the output depends on the present state as well as on the input. The MEALY machine model is shown in figure 1.
MOORE Machine: In Moore machine model the output only depends on the present state. The MOORE machine model is shown in figure 2.
1.4 Implementation of Vending machine In this project a state diagram is constructed for the proposed machine which can vend the product of cost four rupees. User has flexibility to insert coin of 1 Rs, 2 Rs and 5 Rs. An internal counter will keep counting the amount and when it becomes equal to 4 Rs, machine will provide the product along with change if present. A cancel input is also used when the user wants to withdraw his request and also the money will be returned through the return output. Product and change are the outputs. Change vector is three bits wide(x, y. z). If the inserted money is more than the total money of products then the change will be returned through the change output signal.
CEERI
Name A B C Ch (x, y, z) 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 P D
Output Input
Description of states: Table 1 describes different states which are used in design of vending machine.
CEERI
State S0
S1 S2 S3 S4
Table 1:- Description of different states Table 2 represents the relationship between different states along with output as input is provided by user. For example if present state is S1 and inserts 1 rupees coin then it will move to next state (S2 as shown below) and corresponding output is shown by x, y, z and P. Similarly at state S1 if user insert 5 rupees coin then it will move to state S4 and corresponding output is shown (product P=1, change =2 rupees).
Present state
Input d C 0 0 1 0 0 1 0 0 0 B 0 1 0 0 1 0 0 0 1 A 1 0 0 1 0 0 0 1 0
Next state
Output x y 0 0 0 0 0 1 0 0 0 z 0 0 1 0 0 0 1 0 0 P 0 0 1 0 0 1 0 0 1
S0 S0 S0 S1 S1 S1 S1 S2 S2
0 0 0 0 0 0 1 0 0
S1 S2 S4 S2 S3 S4 S0 S3 S4
0 0 0 0 0 0 0 0 0
CEERI
S2 S2 S3 S3 S3 S3 S4
0 1 0 0 0 1 0
1 0 0 0 1 0 0
0 0 0 1 0 0 0
0 0 1 0 0 0 0
S4 S0 S4 S4 S4 S0 S0
0 0 0 0 1 0 0
1 1 0 0 0 1 0
1 0 0 1 0 1 0
1 0 1 1 1 0 0
Table 2:- Input output relationship along with states This is designed by using D Flip Flop as shown in table 3. Here d0, d1, d2 represent the input of Flip Flop. Present state q2 q1 Input C 0 0 1 0 0 1 0 0 0 1 0 0 B 0 1 0 0 1 0 0 0 1 0 0 0 A 1 0 0 1 0 0 0 1 0 0 0 1 Next state q2 q1 q0 Output X 0 0 0 0 0 0 0 0 0 0 0 0 y 0 0 0 0 0 1 0 0 0 1 1 0 z 0 0 1 0 0 0 1 0 0 1 0 0 p 0 0 1 0 0 1 0 0 1 1 0 1 d2 0 0 1 0 0 1 0 0 1 1 0 1 d1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 d0
q0 d 0 0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 1
0 0 1 0 1 0 1 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0
CEERI
0 1 1 0 1 1 0 1 1 1 0 0
0 0 1 0
0 1 0 0
1 0 0 0
0 0 0 0
1 0 0 1 0 0 0 0 0 0 0 0
0 1 0 0
0 0 1 0
1 0 1 0
1 1 0 0
1 1 0 0
0 0 0 0
0 0 0 0
Table 3:- I/O relationship along with Flip Flop input. This is solved by K-map and desired solution is.
CEERI
Figure 3 shows final overall look of vending machine where left side all are inputs and the right side pins will provides the outputs. Global inputs (vdd and gnd) will be provided internally.
CEERI
Figure 4: - Schematics diagram of vending machine. Figure 5 represents the layout of vending machine (schematics shown in figure 4).
Figure 5: - Layout of vending machine. Figure 6 shows the match between layout and schematics which represent that the schematic
CEERI
Figure 6: - LVS result of vending machine. Figure 7 represent the output of vending machine when user provides input b; that is when user provides 2 rupees coin each time.
10
CEERI
As shown above internal counter will count money at each clock pulse so at first clock it will be 2 rupees and at second it will become 4 rupees and machine will provide the product (P) with no change. So here P will be high at second pulse and all other outputs are low. Figure 8 represents the output when 5 rupees coin is provided by user.
As shown above internal counter will count money at each clock pulse, at first clock it will be 5 rupees so machine will provide product (P) along with change of 1 rupee (z) and at second it will again become 5 rupees so machine will again provide the product (P) with change. So here at each pulse P and z will be high and all other outputs are low.
Figure 9 represents the output when cancel button is pressed in between the process.
11
CEERI
Figure 9: - Output cancel button is pressed by user. As shown above user is providing 2 rupees (b) coin and during process user pressed cancel button (d) so as user press cancel button machine will return his inserted money back, in this case it is 2 rupees. So here as d is high y will become high keeping all other outputs to low level.
CHAPTER 4 CONCLUSION
The present FSM based vending machine is implemented at transistor level with the help of Cadence-Virtuoso. The design is verified by simulating schematics and checking the simulated waveform by providing desired inputs. State machines based vending System enhances productivity; reduce system development cost, and easy to implement. The designed machine can be used for many applications and we can easily enhance the number of selections. The next stage of this vending machine is to convert it into more general way in which user can get multiple products according to his choice.
12
CEERI
REFERENCES [1] Zhang Wen & Zhang Xin Long (2010) Design and Implementation of automatic vending machine Based on the short massage payment International Conference on Information and Communication technology in Electrical Sciences, Neijiang, Sichuan, China.pp.978-981. [2] B. Caulfield & M.O Mahony (2005) Passenger Requirements of a Public Transport Ticketing System Proceedings of the 8th International IEEE Conference on Intelligent Transportation Systems Vienna, Austria, pp-32-37. [3] Biplab Roy & Biswarup Mukherjee (2010) Design of Coffee Vending Machine using Single Electron Devices Proceedings of 2010 International Symposium on Electronic System Design. Pp 38-43. [4] C. J Clement Singh, K Senthil Kumar, Jayanto Gope, Suman Basu & Subir Kumar Sarkar (2007) Single Electron Device based Automatic Tea Vending Machine proceedings of International Conference on Information and Communication Technology in Electrical Sciences (ICTES 2007) , pp 891-896.
13
CEERI