Counting Circuit to 1, 5, 10, 20

Discussion in 'The Projects Forum' started by Toshibi, Aug 21, 2009.

  1. Toshibi

    Thread Starter New Member

    Aug 21, 2009
    3
    0
    I'm working on a side project for an employer and I don't really have much experience in electronics. I'm not a complete idiot but I'm a total newbie. Anyhow, What I'm looking at is the need to build a circuit that will either count up or down to 1, 5, 10, or 20 and close a switch momentarily for each count (about a quarter of a second for each). I have most of the basics worked out except the counting and switching bit (if this were a computer program I would have it knocked out before I put down my can of Mt. Dew!).

    See, the problem is, it's semi-specialized hardware but it's not amazingly complex stuff but due to the specialization they are charging an arm and a leg for what is probably 10 to 20 dollars worth of components! I figure I could build it myself and save the company some cash.
     
  2. DickCappels

    Moderator

    Aug 21, 2008
    2,653
    632
    A microcontroller would be an easy way to do it.

    Beyond that, the easiest circuit might be to take a pair of CD4017B decoded decade counters (or 74HC4017, 74HCT4017, etc.) and cascade them so one counts units and the other counts tens.

    Then, it would be a fairly simple matter to use some NAND gates to provide outputs when the right combination of 10's and units come up, then OR all of those outputs. (As an example, when the "2" output on the tens counter is high AND the "0" output on the units counter is high, that's your 20.)

    The output of the OR gate could trigger a monostable, such as an LMC555 to make the one second pulse and to reset the two counters. Or, you can make a monostable out of a gate, but leave that for later.
     
  3. Toshibi

    Thread Starter New Member

    Aug 21, 2009
    3
    0
    Thanks for the reply. My research had taken me to the 4000 IC's but trying to figure it all out left me a little confused.

    I'm taking a look now at the Arduino board. It seems to have what I need and would return all of the hard stuff back to coding which is my forte. I think I'll pick one up and give that a whirl.
     
  4. jj_alukkas

    Well-Known Member

    Jan 8, 2009
    751
    5
    Since you like programming, pick a microcontroller thats way lot easier
     
  5. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    Arduino is a good choice.
     
  6. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    What controls count and up/dn. ,maybe a push-button?
     
  7. Toshibi

    Thread Starter New Member

    Aug 21, 2009
    3
    0
    It would be 3 push buttons. $1, $5, and $20. On each of the button pushes it would open and close the circuit to the coin collector circuitry on the machines once for each dollar. So, if I hit $5 it would close the connection 5 times and maybe tick up the count on the rotary counter that amount for book keeping purposes. This all has to do with the way that North Carolina has allowed the reintroduction of video poker.
     
  8. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    Here is an outline of what I think you wish. IC2 is clocked D register to remember which switch was pushed. Any sw will set FF[flip-flop] IC3 & load IC2 after short delay of a few μs if all counters are reset via IC8 A&B. FF hi starts oscillator. Oscillator period 1/2 sec is the output & clock for divide by 10 counters. When any one of the selected counts is reached , the output of IC1-B, resets the FF & counters. Small error, output of IC8-C should be moved to FF out. IC8-A is lockout to prevent a new operation before current one is completed.
     
  9. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    Here are some pin numbers to go with outline. Questions-just ask.
     
  10. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    Just for info, there have been standard modules about for around 30 years for doing just that type of 'pulse multiplication', they are typically programmable for the multiplication or division factors (by dip switches) and are specifically for 'adjusting' pulse counts from coin acceptor mechanisms.

    They are typically used in (eg.) older arcade machines to adapt a board with a single-value coin pulse input to work from a coin mech that takes several different value coins - each coin pulse from the coin mech generates 'X' credits on the machine, depending on the user setup for that coin type.
     
Loading...