[sci.electronics] Design of vending machine.

hpyeo@IASTATE.EDU (Sandy Yeo HP) (03/22/91)

  
 Hiya.. Anyone one out there know how to use digital design to design a
vending 
machine?? I am going crazy trying to get this project done. Can anyone
out there
help me out??
 This machine's specification are:
  1. It has 3 kinda pop.
  2. It accepts nickle, dime, and quater. price for pop is 55 cents.
  3. It will gives changes after a button is pushed.
     (if there is any change left)
  4. If runs outta change, there will be a red light indicated no more
change
     left. And buyers has to insert the actual cost. And if certain pop
runs out,      there will be a red light, too.
  Well... that's the stuff I can think of to design it. But I have no
idea how to
 inplement it. If anyone can help me to get started.. I will be very
glad about 
 it.


                                                   Sandy

 

bender@oobleck.Eng.Sun.COM (I want to be eating rich soup in another town) (03/22/91)

In article <1991Mar21.193048@IASTATE.EDU> hpyeo@IASTATE.EDU (Sandy Yeo HP) writes:
-> Hiya.. Anyone one out there know how to use digital design to design a
->vending 
->machine?? I am going crazy trying to get this project done. Can anyone
->out there
->help me out??
-> This machine's specification are:
->  1. It has 3 kinda pop.
->  2. It accepts nickle, dime, and quater. price for pop is 55 cents.
->  3. It will gives changes after a button is pushed.
->     (if there is any change left)
->  4. If runs outta change, there will be a red light indicated no more
->change
->     left. And buyers has to insert the actual cost. And if certain pop
->runs out,      there will be a red light, too.
->  Well... that's the stuff I can think of to design it. But I have no
->idea how to
-> inplement it. If anyone can help me to get started.. I will be very
->glad about it.

If I were you, I'd use a microcontroller like the something from
the 8051-family or 6809-family.  I don't see what you'll gain doing
it in discrete logic other than perhaps seriously reconsidering your
desire to be a EE...

mike
--
Won't look like rain,           Won't look like snow,            | DOD #000007
Won't look like fog,            That's all we know!              | AMA #511250
We just can't tell you anymore, We've never made oobleck before! | MSC #298726

rainer@boulder.Colorado.EDU (Rainer Malzbender) (03/22/91)

>If I were you, I'd use a microcontroller like the something from
>the 8051-family or 6809-family.  I don't see what you'll gain doing
>it in discrete logic other than perhaps seriously reconsidering your
>desire to be a EE...

Gee, not another "do my homework for me" type of question, is it?
If it is, it's not a good assignment, since the problem is solved
in its entirety in the second edition of Horowitz and Hill using
PLDs, I believe. Maybe not exactly as stated, but close enough to
get started. Yeah, I'd probably use a micro too, but it may be
overkill for this one - I think it was a single PAL solution.
--
Rainer Malzbender, PhD  "It's not the bullet that kills you, it's the hole."
Dept. of Physics (303)492-6829                             -Laurie Anderson
U. of Colorado, Boulder         rainer@boulder.colorado.edu 128.138.240.246

leland@cbnewse.att.com (leland.m.kornhaus) (03/22/91)

In article <1991Mar21.193048@IASTATE.EDU> hpyeo@IASTATE.EDU (Sandy Yeo HP) writes:
>  
> Hiya.. Anyone one out there know how to use digital design to design a
>vending 
>machine?? I am going crazy trying to get this project done. Can anyone
>out there
>help me out??
> This machine's specification are:
>  1. It has 3 kinda pop.
>  2. It accepts nickle, dime, and quater. price for pop is 55 cents.
>  3. It will gives changes after a button is pushed.
>     (if there is any change left)
>  4. If runs outta change, there will be a red light indicated no more
>change
>     left. And buyers has to insert the actual cost. And if certain pop
>runs out,      there will be a red light, too.
>  Well... that's the stuff I can think of to design it. But I have no
>idea how to
> inplement it. If anyone can help me to get started.. I will be very
>glad about 
> it.
>
>
>                                                   Sandy
>
> 
I would never design a vending machine that will only allow a fixed price such
as 55 cents.  The design may be obsolete before making it to market.  Is this a
"real world" application or an assignment?

robf@mcs213j.cs.umr.edu (Rob Fugina) (03/23/91)

In article <1991Mar22.084217.20716@colorado.edu> rainer@boulder.Colorado.EDU (Rainer Malzbender) writes:
>get started. Yeah, I'd probably use a micro too, but it may be
>overkill for this one - I think it was a single PAL solution.

If it IS an EE student asking the question, a PAL is not the way to do it...
I'm an EE student also and just a month ago I had a very similar problem to
do for my lab.  We were supposed to use state machines and combinational 
logic.  My design worked great and it only used 7 ic's.  The trick is 
simplifying the problem to use the simplest state machine...then do everything
else in combinational logic...

Rob  robf@cs.umr.edu

rainer@boulder.Colorado.EDU (Rainer Malzbender) (03/23/91)

In article <2460@umriscc.isc.umr.edu> robf@mcs213j.cs.umr.edu (Rob Fugina) writes:
>In article <1991Mar22.084217.20716@colorado.edu> rainer@boulder.Colorado.EDU (Rainer Malzbender) writes:
>>get started. Yeah, I'd probably use a micro too, but it may be
>>overkill for this one - I think it was a single PAL solution.
>
>If it IS an EE student asking the question, a PAL is not the way to do it...
>I'm an EE student also and just a month ago I had a very similar problem to
>do for my lab.  We were supposed to use state machines and combinational 
>logic.  My design worked great and it only used 7 ic's.  The trick is 
>simplifying the problem to use the simplest state machine...then do everything
>else in combinational logic...
>
>Rob  robf@cs.umr.edu


Umm, I don't understand your point ... a registered PAL *IS* a state machine,
complete with combinational logic. Seems to me a one IC solution is better
than 7. Programmable logic is *ideal* for implementing state machines.

--
Rainer Malzbender, PhD  "It's not the bullet that kills you, it's the hole."
Dept. of Physics (303)492-6829                             -Laurie Anderson
U. of Colorado, Boulder         rainer@boulder.colorado.edu 128.138.240.246

robf@mcs213j.cs.umr.edu (Rob Fugina) (03/23/91)

In article <1991Mar22.192022.3538@colorado.edu> rainer@boulder.Colorado.EDU (Rainer Malzbender) writes:
>Umm, I don't understand your point ... a registered PAL *IS* a state machine,
>complete with combinational logic. Seems to me a one IC solution is better
>than 7. Programmable logic is *ideal* for implementing state machines.

My point is that the point of the assignment is probably to make it with
state machines and combinational logic.  If that's what a PAL is, then I
submit...but *I* don't know anything about PALs (please tell me where I
could learn) and my opinion is that it would be easier for this person to
just use the 7 different ICs...  so where do I get info on PALs???

Rob  robf@cs.umr.edu

rainer@boulder.Colorado.EDU (Rainer Malzbender) (03/23/91)

In article <2463@umriscc.isc.umr.edu> robf@mcs213j.cs.umr.edu (Rob Fugina) writes:
>
>My point is that the point of the assignment is probably to make it with
>state machines and combinational logic.  If that's what a PAL is, then I
>submit...but *I* don't know anything about PALs (please tell me where I
>could learn) and my opinion is that it would be easier for this person to
>just use the 7 different ICs...  so where do I get info on PALs???

Well, I just tried mailing a long-winded explanation of PALs, but it bounced.
Picture a bunch of and gates, or gates, and flip flops in a bag, and wire
them up any way you want to. That's a rough idea of what something like
a 16R8 registered PAL is, and that's the very bottom of the food chain as
far as PLDs (programmable logic devices) go. By all means, check out the
second edition of "The Art of Electronics" by Horowitz and Hill, an issue
of Byte on programmable hardware a few years ba, and maybe an AMD/MMI
data book ("Pal Device Data Book"). If you've never used them, you'll
be pleasantly surprised; I was. The best deal is you can write a high
level program to burn these babies. A single 20-pin chip can act as a state
machine with 256 states (although chances are you won't be able to decode
all of them with only the on-chip logic).
--
Rainer Malzbender, PhD  "It's not the bullet that kills you, it's the hole."
Dept. of Physics (303)492-6829                             -Laurie Anderson
U. of Colorado, Boulder         rainer@boulder.colorado.edu 128.138.240.246