Money (change) Counter

Discussion in 'The Projects Forum' started by Nitrag, Apr 29, 2009.

  1. Nitrag

    Thread Starter New Member

    Sep 16, 2007
    8
    0
    This is just one piece of a vending machine project. The circuit below is supposed to add up the change you put in, given 00 (no change), 01 (5cents), 10 (10cents), 11 (25cents). It's suppose to Total (Drink Enable) at 75 cents.

    I've checked the wiring 10+ times, I've checked the exitation 10+ times, I've checked the boolean algebra 10+ times.
    Either the exitation (boolean algebra) is wrong or I'm not seeing something in multisim?
    The flip-flops are (D_FF) and the Mux is (MUX_16TO1).

    Attached is all my work.

    Situation: When I turn it on, set A and B to 1 (for 25 cents), it goes: 0101, 1111 (0>25>75). If I select just (10 cents), it goes: 0010 and holds. If I select 01 (5 cents) it goes: 0001,1001,1010,0010 and repeats.

    ...something isn't right
     
    Last edited: May 4, 2009
  2. PRS

    Well-Known Member

    Aug 24, 2008
    989
    35
    Nice project! I wish I could help right now, but I've forgotten too much. I just received a Digital Design book in the mail and if something clicks I'll get back with you. Good luck!
     
  3. Nitrag

    Thread Starter New Member

    Sep 16, 2007
    8
    0
    bump, looked over everything again. Does anyone recommend a circuit simulator other than MultiSim or Circuit Maker SE?
     
  4. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    Can you give a brief description of what you are doing on the digital schematic? I understand the overall theme for the project but if you could explain the schematic a little that might help.

    There are some connections, like on the clock + line, that do not have the dot at the junction. There are multiple ones around the circuit, are these points connected as you hope they are?
     
  5. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    OK, I just say the truth tables and state machine information below the schematic.
     
  6. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    What is the ~G symbol on the MUX_16to1? How does it work?

    Is there anything that would stop the vending machine from thinking you are constantly inserting coins, i.e. how does the clock work?

    It might also be easier to look at if you separated the components on the schematic page.
     
  7. Nitrag

    Thread Starter New Member

    Sep 16, 2007
    8
    0
    The clock is setup with a function generator to generate a 5v pulse at 10Hz.

    The ~G is the enable for the Mux. It is active low. That is why it is connected go ground.

    You shouldn't need the dots to be perfect in MultiSim. As long as the lines are connected you'll be fine afaik.

    In the exitation table, you match up each column of "Next" with the C (condition). This produces your Mux Inputs. The four Mux inputs for each row correspond to the 1st, 2nd, 3rd, and 4th multiplexer inputs.

    '= not
    copyright=nor
     
  8. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    I think if you look at present state 0101, the mux inputs that you show are incorrect. You show ab, ab, a+b, and b'. The first two next state numbers are definitely not the same, actually opposite. I think you should try ab, (ab)', a+b, and b'. See if that gets you to your next state correctly.
     
  9. Nitrag

    Thread Starter New Member

    Sep 16, 2007
    8
    0
    I redid the circuit in MultiSim, same result. There has to be something that MultiSim is doing that I'm not expecting.

    As for 0101, I tried it but it didn't work. I've kept the original because if you work the Kmap my answer is better.

    Anyone ever do a circuit this complicated in MultiSim before that can give me a heads up on anything?
     
  10. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    AB

    a b out
    0 0 0
    0 1 0
    1 0 0
    1 1 1

    (AB)'

    a b out
    0 0 1
    0 1 1
    1 0 1
    1 1 0

    A'B'

    a b out
    0 0 1
    0 1 0
    1 0 0
    1 1 0
     
  11. Nitrag

    Thread Starter New Member

    Sep 16, 2007
    8
    0
    well, project is due, stayathome, thanks for your help. the mystery remains unsolved.
     
  12. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    sorry i could not be of more help to you.
     
Loading...