1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Coffee Machine Desgin help PLEASE

  1. Apr 10, 2008 #1
    Coffee Machine Desgin help PLEASE!!

    Hey Everyone, Not sure if this is where I can post this topic. I have a project in class to design a 10cent coffee machine. We just have to create the truth table, write the SOP form. Draw the circuit on @ltera and program the CPLD. I am having trouble creating the truth table, I know the inputs are N1(Nickel 1), N2(Nickel 2), D(Dime), Q(Quarter). The coffee machine has to give back the correct change so I know the outputs are C(coffee), N(Nickel), D1(Dime1), D2(Dime2), Q(Quarter). This is the start of my truth table.
    N1__N2__D___Q __________C___N__D1__D2__Q

    Since I only have 4 inputs there should only be 16 possible combinations right? I get confused when you get the truth table and reduce the boolean sum of products for all five outputs. I am not sure if my equation is correct and I think I made a mistake on my truth table. Can anyone help me on the correct truth table to the design on this machine? Thanks guys
  2. jcsd
  3. Apr 10, 2008 #2


    User Avatar
    Gold Member

    Where exactly are you having trouble?

    Do you know what the next line is?
  4. Apr 10, 2008 #3
    yeah the whole truth table I got is

    N1__N2__D___Q __________C___N__D1__D2__Q

    I wanted to be sure that this was the correct truth table for the design of a 10cent coffee machine that accepts 2 nickels, a dime, a quarter or any combination of those 4. AND also gives change for any amount over 10cents. I am having trouble writing the SOP forum of each output. I got the SOP for each output and then I used altera to test the circuit and it dosent go with this truth table. So I think I messed up somewhere on the table or writing the SOP forums of each output. Can anyone verify this is the correct table for my design? and the SOP forum for each output?
  5. Apr 10, 2008 #4
    Entered by truthtable:
    C = N1' N2' D' Q + N1' N2' D Q' + N1' N2' D Q + N1' N2 D' Q + N1' N2 D Q' + N1' N2 D Q + N1 N2' D' Q + N1 N2' D Q' + N1 N2' D Q + N1 N2 D' Q' + N1 N2 D' Q + N1 N2 D Q' + N1 N2 D Q;
    N = N1' N2' D' Q + N1' N2 D' Q' + N1' N2 D Q' + N1' N2 D Q + N1 N2' D' Q' + N1 N2' D Q' + N1 N2' D Q;
    D1 = N1' N2' D' Q + N1' N2 D' Q + N1 N2' D' Q + N1 N2 D Q' + N1 N2 D Q;
    D2 = N1' N2 D' Q + N1 N2' D' Q;
    Q1 = N1' N2' D Q + N1' N2 D Q + N1 N2' D Q + N1 N2 D' Q + N1 N2 D Q;

    C = N1 N2' D' Q + N1' N2 D' Q + N1' N2' D' Q + N1 N2 + D ;
    N = N1 N2' Q' + N1' N2 Q' + N1' N2' D' Q + N1 N2' D + N1' N2 D ;
    D1 = N1 N2' D' Q + N1' N2 D' Q + N1' N2' D' Q + N1 N2 D ;
    D2 = N1 N2' D' Q + N1' N2 D' Q;
    Q1 = N1 N2 Q + D Q;

    Minimized Product of Sums:
    C = (N1+D+Q)(N2+D+Q);
    N = (N1'+N2')(N1+N2+Q)(N1+N2+D')(N1+N2'+D+Q')(N1'+N2+D+Q');
    D1 = (N1+D')(N2+D')(N1+D+Q)(N2+D+Q)(N1'+N2'+D);
    D2 = (Q)(N1+D')(N2+D')(N1'+N2')(N1+N2+D);
    Q1 = (Q)(N1+N2+D)(N1+N2'+D+Q')(N1'+N2+D+Q');

    C = D' Q (N2' (N1' + N1) + N1' N2) + N1 N2 + D;
    N = N1' N2' D' Q + (N1 N2' + N1' N2) (Q' + D);
    D1 = D' Q (N2' (N1' + N1) + N1' N2) + N1 N2 D;
    D2 = D' Q (N1 N2' + N1' N2);
    Q1 = Q (N1 N2 + D);

    Can anyone see what I am doing wrong? or if this equation works for the design I am trying to create? I don't have the equipment at home to test this circuit. Thanks any help is appreciated
    Last edited: Apr 10, 2008
  6. Apr 11, 2008 #5


    User Avatar
    Gold Member

    Yikes. Way over my head...
  7. Apr 12, 2008 #6


    User Avatar
    Science Advisor
    Gold Member

    Couldn't you eliminate the inputs where there is a quarter and some other coin. i.e. why complicate it with more than 25cents?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook