Seminar Presentation on FSM based vending machine

13

Click here to load reader

description

A vending machine is a machine which dispenses items such as snacks, beverages, lottery tickets, consumer products to customers automatically, after the customer inserts currency or credit into the machine. Nowadays, Vending Machines are well known among Japan, Malaysia and Singapore. The quantity of machines in these countries is on the top worldwide. This is due to the modern lifestyles which require fast food processing with high quality. The objective here is to design Vending Machine Controller which accepts money inputs in any sequence and delivers the products when the required amount has been deposited and gives back the change. Here an additional facility is provided to the user. It is possible to withdraw the deposited money in between if the customer wishes so by pressing a push button. The Verilog Code for the proposed Vending Machine model is developed and the Simulation results are successfully verified using Xilinx ISE 9.2i tool.

Transcript of Seminar Presentation on FSM based vending machine

Page 1: Seminar Presentation on FSM based vending machine

Mini- Project Seminar on

Finite State Machine based Vending Machine Controller with

Auto-Billing Features

By: Pratik Patil

Department of Electronics And Communication(M. Tech VLSI and Embedded Systems)

Page 2: Seminar Presentation on FSM based vending machine

Contents

• Overview of Finite State Machine

• MEALY & MOORE Machine Model

• Vending Machine their History

• Operation of the Proposed Vending Machine

• Implementation of Vending machine

• Design Methodology

• FSM diagram of Vending Machine

• Advantages & Disadvantages

• References

Page 3: Seminar Presentation on FSM based vending machine

Overview of FSM

• It is a mathematical model of computation used to design both computer programs and sequential logic circuits.

• It is conceived as an abstract machine that can be in one of a finite number of states.

• The machine is in only one state at a time; the state it is in at any given time is called the current state.

• It can change from one state to another when initiated by a triggering event; this is called a transition.

• The state to which the state machine makes the next transition is known as Next State

• In control applications, there are Two types of State machines

– Mealy Machine– Moore Machine

Page 4: Seminar Presentation on FSM based vending machine

Mealy and Moore Machine Model

• Mealy– Output depends on the present state as well as on the input.

• Moore– The output depends only on the present state.

Page 5: Seminar Presentation on FSM based vending machine

Vending Machine and their History

Q. What is a Vending Machine?Ans. A vending machine is a machine which

dispenses items such as snacks, beverages, lottery tickets, consumer products to customers automatically, after the customer inserts currency or credit into the machine.

HISTORY:

• The earliest known reference to a vending machine is in the work of Hero of Alexandria, a first-century engineer and mathematician. His machine accepted a coin and then dispensed holy water.

• The first modern coin-operated vending machines were introduced in London, England in the early 1880s, dispensing post cards.

Page 6: Seminar Presentation on FSM based vending machine

Operation of the Proposed Vending Machine

• When the user puts in money, money counter tells the control unit, the amount of money inserted in the Vending Machine.

• 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.

• If there is any change, machine will return it to the user.

• The machine will demand for servicing when the products are not available inside the machine.

THIS MODEL HAS BEEN DEVELOPED USING MEALY MACHINE MODEL

Page 7: Seminar Presentation on FSM based vending machine

Implementation

• State diagram is constructed for the proposed machine which can vend four products that is snacks, coffee, cold drink and candies.

– Select1 → Snacks– Select2→ Coffee– Select3→ Cold Drink– Select4→ Candies

• Rs.10 and Rs.20 inputs represents rupees 10/- and 20/- notes respectively.

• 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.

• The machine will work on the positive edge of clock and will return to its initial state when reset button is pressed.

Page 8: Seminar Presentation on FSM based vending machine

Design Methodology(Flowchart)• Initially when the reset button is pressed, the machine

will be ready for the users to select the product.

• The machine can accept only two types of notes i.e. rupees 10/- and 20/-.

• Let us suppose that the user selects sel1 input.

• The machine will firstly check that whether the products are available in the machine.

• After this the control unit will move to the waiting state, where it will wait for the money to be inserted.

• When the desired amount is inserted the machine will go to the snacks state and snacks will be delivered at the product output.

• If products are not available in the machine then the control unit will demand for servicing and after service the machine will get reset.

Page 9: Seminar Presentation on FSM based vending machine

FSM Diagram of Vending Machine

• Let us suppose that the user selects sel1 input.

• Then if rupees 10/- note is inserted then the machine will go to state_1 and wait until the desired money is inserted.

• And if rupees 20/- note is inserted the machine will move to state_2 and then wait until 30/- rupees are inserted to the machine.

• When the desired amount is inserted the machine will go to the snacks state and snacks will be delivered at the product output.

Page 10: Seminar Presentation on FSM based vending machine

Advantages & Disadvantages

• Advantages– The vending machines are more accessible and practical than

the convention purchasing method.– Finite State Machine (FSM) modeling reduces the hardware– FSM model is easy to design.– Due to their simplicity, FSMs are quick to design, quick to

implement and quick in execution.

• Disadvantages– Vending Machines Costs more.– The conditions for state transitions are fixed.– All states, transitions and conditions need to be known up front

and be well defined which is not possible in cases.

Page 11: Seminar Presentation on FSM based vending machine

References

• International Journal of VLSI design & Communication Systems (VLSICS) Vol.3, No.2, April 2012

• Introduction to Embedded Systems, Shibu K. V., Tata McGraw Hill Education

• http://en.wikipedia.org/wiki/Finite-state_machine

• http://en.wikipedia.org/wiki/Vending_machine

Page 12: Seminar Presentation on FSM based vending machine
Page 13: Seminar Presentation on FSM based vending machine