pulse counter

Discussion in 'The Projects Forum' started by Brian Krupicka, Oct 14, 2016.

  1. Brian Krupicka

    Thread Starter New Member

    Nov 1, 2014
    15
    0
    I am looking for a simple pulse counter circuit.

    A single monetary push button switch would act as the input.

    When eight pulses are received an output would go high (or low).



    Brian Krupicka

    trains@dbcomserv.com
     
  2. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    Need more information. What happens with the 9th input? Does the output stay high or go low? After 8 counts, does the counter freeze until it is manually reset? If I push the button 53 times, is there only 1 output pulse, or 6 (8, 16, 24, 32, 40, 48)?

    What is the power source voltage? What does the output drive?

    Depending on the answers, this might take only one chip - CD4017.

    ak
     
  3. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    Any decade or binary counter would work. The switch will need debouncing.
     
  4. Brian Krupicka

    Thread Starter New Member

    Nov 1, 2014
    15
    0
    After 8 counts the circuit needs to reset to "0".
    The output would revert back to the rest state low (or high), depending on the IC being utilized.
    The voltage would be either 5V or 12VDC.
    The output will drive a small current reed relay coil.
     
  5. crutschow

    Expert

    Mar 14, 2008
    13,011
    3,233
    So you mean the output will go momentarily high at the 8th count and then reset?
    If so then how long should it remain high?

    How much current does the relay coil take at what voltage?
     
  6. Brian Krupicka

    Thread Starter New Member

    Nov 1, 2014
    15
    0
    It should remain high for .25 seconds.
    The relay draws 2ma of current.
     
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    Relay off
    Push button 7 times, relay stays off
    Push button 8th time, relay turns on for 0.25 s, turns off
    Keep pushing button forever, relay stays off forever
    Only way to reset the circuit is to remove and reapply power

    correct?

    ak
     
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    First pass based on thin specs. It might be possible to drive the relay directly from the 4017, depending on the actual current and dropout voltage.

    R1-C1 - power on reset
    R2-C2 - pushbutton debounce
    R3-C3 - relay ON time
    C4 - chip decoupling

    ak
    Button-8count-1-c.gif
     
  9. crutschow

    Expert

    Mar 14, 2008
    13,011
    3,233
    The OP stated that he wanted the circuit to reset at the 8th pulse (post #4).
    AK, connecting C1 to the drain of Q1 instead of VCC should do that at the end of the relay pulse (perhaps with the addition of a diode across R1 to conduct the reverse current when Q1 turns on).
    That should also provide a power-on reset through the relay coil.

    Edit: I have a concern that C2 will tend to weld the contacts of SW1.
    Perhaps there should be a small resistor added in series with pin 2 of SW1.

    Edit 2:
    Below is an LTspice simulation of AK's circuit with the changes I suggested to generate a reset at the end of the relay pulse.
    It generates a .25s relay pulse (as determined by the R1C1 time-constant) after every 8 push-button actuations.

    upload_2016-10-15_0-29-6.png
     
    Last edited: Oct 15, 2016
    absf likes this.
Loading...