Starting from:
$35

$29

Project 3 FSM Design Solution

This project asks you to design a finite-state machine.




Your task is to design the control for a newspaper vending machine per the following specification.




The news paper costs 35 cents. The vending machine accepts nickels, dimes and quarters. The customer presses a START button and then begins entering coins, one at a time. The coin sorter logic inside the vending machine (you do not have to design the coin sorter logic; it provides some inputs to your controller) indicates to the FSM whether a nickel (N), dime (D), or quarter




has been deposited. (Assume that the FSM advances from one state to the next when a coin is deposited.) If exact changed is entered, a mechanical latch is release (Unlatch) so the customer can get the paper. If the amount of money deposited exceeds 35 cents, change is given if possible (i.e., if there is enough change in the repository). Otherwise, deposited coins are refunded to the customer and the mechanical latch is not released.



Assume that the money just deposited is kept separated from previously accepted coins. The later are help in a coin repository. Change is given in dimes and nickels. If one nickel is in the repository, a signal N1 is asserted. If two nickels are there, N2 is true (note: N1, N2 will both be asserted if repository contains two or more nickels), and so on. D1, D2 … behave the same way for dimes. If sufficient change is available, the FSM pulses a nickel release (NR) or a dime release (DR) signal to release one coin of change at a time (it would jam the machine to release more than one coin at a time).




If insufficient change is available, the coins just deposited are refunded by the FSM by asserting a refund (REF) signal. Otherwise, the deposited coins join the repository as the FSM asserts a release (REL) signal.




Consider for a moment the signals that indicate the number of nickels and domes available to make change (N11, N2… D1, D2…). What is the maximum number of nickels that might be needed at any time? What is the maximum number of dimes that might be needed? Understanding the answers to these questions will help you in deciding how many N1, N2… signals and how many D1, D2…signals there should be.




Develop a specification for the vending machine controller. Briefly explain your specification using sate diagrams, state-transition tables, PLA tables, Boolean equations or a combination of these.

More products