Vending machine

30
Vending machine Student name : Rand F. Al-Aqrabawi Dr. Abaza M. GH.

description

 

Transcript of Vending machine

Page 1: Vending machine

Vending machine

Student name : Rand F. Al-Aqrabawi Dr. Abaza M. GH.

Page 2: Vending machine

History

• Vending machine became popular during the industrial revolution .

• The first modern coin-operated vending machines were introduced in England in the early 1880s .

• The first vending machine in the U.S. was built in 1888 by the Thomas Adams Gum Company.

Page 3: Vending machine

• In 1897 games has been added to these machine .

• In December 1970, Ussery Industries of Dallas, Texas at its Dallas convention displayed its "talking" vending machine, the Venda Talker.

Page 4: Vending machine

What is the vending machine

• Electronic machine used to disperse a product to a consumer after a certain amount of money has been put into the machine.

• Vending machines are commonly used to disperse beverages and snack items, but in recent years companies have introduced vending machines that disperse other items, even including electronic items such as digital cameras or iPods.

Page 5: Vending machine

Simple vending machine

The vending machine delivers an item after it has received 15 cents in coins.

The machine has a single coin slot that accepts nickels and dimes, one coin at a time.

A mechanical sensor indicates whether a dime or a nickel has been inserted into the coin slot.

The controller's output causes a single item to be released down a chute to the customer.

Page 6: Vending machine

Block diagram

N

D open Reset

CLK

Vending machine FSM

coin sensor

Gum release

mechanism

Page 7: Vending machine

assume that N is asserted for one clock period when a nickel is inserted into the coin slot and that D is asserted when a dime has been deposited.

Furthermore, we'll postulate that it is enough if the machine asserts Open for one clock period to release an item after 15 cents (or more) has been deposited since the last reset.

Page 8: Vending machine

Abstract representations

• Three nickels in sequence: N, N, N• Two nickels followed by a dime: N, N, D• A nickel followed by a dime: N, D• A dime followed by a nickel: D, N• Two dimes in sequence: D, D

Page 9: Vending machine

State diagram

s1

s0

s3

s7

s2

s6

s8

s4 s5

reset

ND

N

D

ND

ND

Page 10: Vending machine

The machine will pass through the states S0, S1, S3, S7 if the input sequence is three nickels.

in state S0 if neither input N or D is asserted, we assume the machine remains in state S0 (the

specification allows us to assume that N and D are never asserted at the same time).

Also, we include the output Open only in states in which it is asserted. Open is implicitly unasserted in any other state.

Page 11: Vending machine

State Minimization

This nine-state description isn't the "best" possible. For one thing, since states S4, S5, S6,S7 and S8 have identical behavior, they can be combined into a single state.

To reduce the number of states even further, we can think of each state as representing the amount of money received so far. For example, it shouldn't matter whether the state representing 10 cents was reached through two nickels or one dime.

Page 12: Vending machine

0

5

10

15

reset

N

N

N

D

D

Page 13: Vending machine

State table

Page 14: Vending machine

Minimized symbolic state transition

Page 15: Vending machine

FSM IMPLEMENTATION

Page 16: Vending machine

Vending machine kinds

There are so many types of vending machines available from different vending machine manufacturers and suppliers.

Some machines need electricity to vend the products, while some others use mechanical motion to vend.

They come in several sizes, shapes, colors, and prices. Vending machines are found mostly in shopping malls, waiting areas, bowling alleys, businesses, and schools.

Page 17: Vending machine

Commonly vending machines

• Soda vending machine• Gumball vending machine• Snack vending machine• Food and toy vending machine • Coffee vending machine• Cigarette vending machines• Pop corn vending machine

Page 18: Vending machine

Gumball vending machine

Page 19: Vending machine

Coffee vending machine

Page 20: Vending machine

Cigarette vending machine

Page 21: Vending machine

Toys vending machine

Page 22: Vending machine

Cold drinks vending machine

Page 23: Vending machine

Snack vending machine

Page 24: Vending machine

Designing coffee vending machine

Page 25: Vending machine
Page 26: Vending machine

Present state Input Next state Output

QA QB N D DA DB C0 0 0 0 0 0 0

0 0 0 1 1 0 0

0 0 1 0 0 1 0

0 0 1 1 X X 0

0 1 0 0 0 1 0

0 1 0 1 1 1 0

0 1 1 0 1 0 0

0 1 1 1 X X 0

1 0 0 0 1 0 0

1 0 0 1 1 1 0

1 0 1 0 1 1 0

1 0 1 1 X X 0

1 1 0 0 1 1 1

1 1 0 1 1 1 1

1 1 1 0 1 1 1

1 1 1 1 X X 1

Page 27: Vending machine

DA 00 01 11 10

00 1 1

01 1 1 1 1

11 X X X X

10 1 1 1

C 00 01 11 10

00 1

01 1

11 1

10 1

DB 00 01 11 10

00 1 1

01 1 1 1

11 X X X X

10 1 1 1

QA QB QA AB

QA QB

ND

ND

ND

Page 28: Vending machine

Flip-flop Inputs Equations and System Output Equation and it’s conversion to NAND Gates:

• DA = QA + D + NQB = (QA + D + NQB)” = (QA’D’(NQB)’)’

• DB = NQB’ + NQA + DQA + N’QB = (NQB’ + NQA + DQA + N’QB)” = ((NQB’)’(NQA)’(DQA)’(N’QB)’)’

• C’ = (QAQB)’ = ((QAQB)’)” = (QA’QB’)’

Page 29: Vending machine

Logic circuit diagram using NAND gates and two Flip Flops