SWITCH THAT HAS TO BE FLIPPED A NUMBER OF TIMES BEFORE IT WORKS???

Discussion in 'The Projects Forum' started by dirtydeeds, Jan 4, 2015.

  1. dirtydeeds

    Thread Starter New Member

    Jan 4, 2015
    6
    0
    Hi. Im looking for switch (or circuit) that has to be turned on/off a certain number of times before it works. I was thinking of a circuit that counts how many times a switch is turned on/off and when it reaches a certain number starts functioning. I looked for "counter switch" but all that came up had to do with time. Im not looking for it to be dependent on time, just how many times a switch is flipped or circuit is completed. Thanks for any help in advance.
     
  2. #12

    Expert

    Nov 30, 2010
    16,307
    6,816
    Simple enough in digital design, but I'm good at analog design. State the number of non-operating clicks and you will probably get a good answer.
     
  3. crutschow

    Expert

    Mar 14, 2008
    13,022
    3,236
    A series of flip-flops or a digital counter would do what you want.
     
  4. dirtydeeds

    Thread Starter New Member

    Jan 4, 2015
    6
    0
    Yea Im not really looking for anything computerized like arduino or anything like that. I was hoping for at least 200 clicks on/off if its possible. Thanks.
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    As per #12 it is simple using TTL or CMOS logic I.C. Google ripple counter etc.
    I dont think you will get a descrete switch to do it.
    200 operations would get a little tedious, no?
    Max.
     
  6. #12

    Expert

    Nov 30, 2010
    16,307
    6,816
    I don't know...I think I removed a circuit breaker that won't connect until you click it about a hundred times. :D

    Hey, it's almost midnight here. I'm getting a bit silly.
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    A solution based on an 8-bit counter should be doable. An 8-pin PIC is probably a good route to go.

    What do you want to have happen after the 200 clicks is reached? For the switch to be operational from that point on? Even after the device is powered down and back up? Or should it always start out needing 200 activations before becoming functional each time the circuit is activated?

    Out of curiosity, what is the reason for needing this kind of behavior?
     
  8. dirtydeeds

    Thread Starter New Member

    Jan 4, 2015
    6
    0
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,553
    2,375
    That is a totalizer, RedLion sell a variety among others, you would probably want a version that has a settable output value to automatically reset whan total is reached.
    The version you show does not appear to have an output?
    Max.
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    But what do you want to happen AFTER that number is reached and the circuit is completed? If that takes 200 pushes, what should happen the 201st time, the 202nd time, and so on?
     
  11. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    Have you been diagnosed with OCD? ;)
     
    shortbus and cmartinez like this.
  12. dirtydeeds

    Thread Starter New Member

    Jan 4, 2015
    6
    0
    Haha no LDC3. Ok, after the circuit is completed (0n the 201st time) I want an alarm to sound. There will be no 202nd time. The button gets pushed (or switch gets flipped) 200 times. On the 201st time a circuit is completed and an alarm sounds Thanks.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    Okay, we're getting there.

    What happens after that? Is the alarm going to keep sounding forever? Once the alarm is silenced should it take another 200 pushes to sound it again, or should it sound upon the next push? What if the circuit is powered down after 150 pushes? Should it start up with only 50 to go, or with the full 200?
     
  14. dirtydeeds

    Thread Starter New Member

    Jan 4, 2015
    6
    0
    Yes the alarm will just keep going forever until it is switched off. When switched back on the alarm will sound after another 200 flips of the switch that controls it. If the circuit is powered down after 150 I don't want it to remember where it left off. I want it to go 200 flips/pushes of button and then a circuit is completed that sounds alarm
     
  15. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    Okay, so I think this is probably a sufficiently complete spec to work with. If not, that will probably become clear at some point and can be addressed at that point.

    You basically want a countdown timer that uses a power-on reset to establish an initial counter value and then each time the button is pushed it decrements the counter. Once the counter expires it latches that information which activates the alarm. The latch also uses a power-on reset to clear it. Sound about right?

    A few more questions to start focusing the discussion on a preferred strategy:

    What kind of push button are you using? Is it bouncy? Do you know what I mean by "bouncy"?

    Are you interested/willing to use a microcontroller-based approach (I'm thinking of a small, cheap 8-pin PIC or something similar)? That would entail some investment in both time and money if you are not already set up to work with an appropriate MCU, but that would probably give you the best solution in the end. If this is a one-off design and there isn't a problem with space and such, then a discrete counter is probably a better alternative.

    What kind of power do you have for the circuit? Where does it come from? Is it clean? What is the general environment in which this thing will be working? What's the temperature going to be like? Are there a lot of heavy loads being switched on and off nearby? Is it automotive or something similar? Trying to get a feel for the noise situation with these questions.
     
  16. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,574
    2,542
    You circuit is not that complicated... a series of flip-flops should do the trick... unforutunately it's quite late down here and my pillow is solemnly summoning my head... I'll get back to you tomorrow with an idea or two, if not the complete circuit... sweet dreams to all...
     
  17. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Would 64 or 128 or 256 pushes work as well as exactly 200?
     
  18. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    it is probably a bad breaker.
     
  19. sirch2

    Well-Known Member

    Jan 21, 2013
    1,008
    351
    200 is fairly easy with an 8 bit counter and a few And gates. 200 == 11001000 in binary so And the 8th, 7th 4th bits.
     
  20. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    A power of two requires no gates...
     
    cmartinez likes this.
Loading...