CSE 241 DESIGN PROJECT Summer 2015 ...

advertisement
CSE 241 DESIGN PROJECT Summer 2015 VENDING MACHINE CONTROLLER
Due: July 2, 2015 5:00pm (340 Davis or 338K Davis or preferably by email)
100 points
You are asked by a Vending machine company to design the controller of a vending. The vending machine has a
money detector and items dispenser mechanism taken from an old vending machine. Your task is to design a
sequential machine controller (a finite state machine) that will interface with the money machine and the dispenser
for an effective implementation of the vending machine.
Specifications and other design details are provided below. You must design the complete system (on paper) that
includes the detailed state diagram, Karnaugh maps for next state value and outputs and reduce to develop the
hardware diagram, and give a detailed report. {You must work independently on the project.}
You can build this as a Moore machine. The design should have at least five states (requiring at least 3 state
variables). You can make choices as you see fit.
The vending machine controller interfaces with a coin machine that detects the drop of a coin (CNDT) (input to the
controller), and provides a signal indicating the coins (NK DM and QR signals (input to the controller) of which only
one will be ‘on’ indicating the coin value). The Controller can be developed from a simple flowchart indicating the
various stages of the operation of the vending machine and converting into a state machine. The controller should
be able to output the following signals DISP (Dispensing product) (output of controller), NEJ DEJ QEJ for the coin
return (output of the controller). Also, it should output a RDY signal (lighting up a green light) and NRDY signal
(saying machine down). When coinbox is empty, you can display CHNG (correct change only) light. You may have
at least three or more products.
Additionally, if you choose to, you can keep track of the coins in each coinbox and keep track of the products
dispensed and remaining numbers. These could be used to light up additional signals.
The money machine can accept only quarters, nickels, and dimes, and they are stored in separate bins. Each bin can
store up to 100 coins. The money machine can also give change back only in quarters, dimes or nickels from their
respective bins. The coin input mechanism has 3 bits NK and DM and QR which indicates 001 if a quarter was
received, 010 for a dime, 100 for a nickel. (These will be input signals to your controller)
The money machine has three input signals which control the change returned in Quarters (QEJ), Nickel (NEJ) and
Dimes (DEJ); a value of one at these signals will eject those coins (these are signals output from your controller).
When the coin boxes are full (for quarter, dime and nickel) CNF (input to controller) signal will be activated by the
coin machine. This signal should be used to set an LED {coin‐box‐full‐led} (output of the controller) to warn the
customer that some change may not be accepted by the machine. You may also keep track of the number of coins
in each coin box. The operator could set an initial number of coins in each box.
Any abnormal condition such as power failure and coin jam will be indicated by a {machine not ready} condition (this
is input to the controller), indicated by lighting a specific LED for that purpose. (NRD - output from the controller).
To get a product, the customer must deposit enough money and push the specific product button. After dispensing
a product, the vending machine should always return all changes before accepting new coins.
The out-of-stock LED for a product should light up after the last item of that product is dispensed. The {``Use Correct
change''} LED is activated if the coin bins are empty. A {coin‐box‐full} LED is activated whenever any coin bin is full.
(these are optional)
The report should include brief write-up explaining the design, flowchart and state diagram, K maps of Next state
values, implementation in hardware.
(Any design/report taken from outside sources and used, will be considered to violate academic integrity policy.)
Download