Counting Signals Before Turning On a Load

Discussion in 'The Projects Forum' started by Ayuir, Sep 23, 2014.

  1. Ayuir

    Thread Starter New Member

    Sep 22, 2014
    2
    0
    Hi all, here's what I'm trying to accomplish...any help is appreciated.
    I'd like to count a number of events (perhaps a number of people entering a room) and then turn on a lamp after a pre-determined number of events. I'm not overly concerned with how the event is triggered (PIR, IR LED, momentary 'on' switch, etc). After the pre-determined number of events the lamp (the load) is switched on and latched to remain on. The circuit should be able to be manually reset. Ideally the number of events can be set manually (perhaps with DIP switches). I'm looking at a low voltage circuit (portable battery levels of voltage and current, i.e. <6V).

    Any thoughts? Thanks in advance.
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Arduino

    As we speak, I am working on an Arduino-based controller that will turn on our runway lights (private airport) after five clicks on the aircraft's transmitter within five or so seconds. The lights will turn off automatically after fifteen minutes, or can be turned off by the pilot prematurely with eight clicks...

    My circuit requires one input (Carrier Operated squelch output from aircraft-band receiver) and one output (SSR that can switch 20A at 120V). Bit of overkill for an Arduino, but they are cheap, and I have one...
     
    Last edited: Sep 23, 2014
  3. wayneh

    Expert

    Sep 9, 2010
    12,156
    3,063
    Another approach would use a 4017 counter. Each event would advance the counter. The count 0-10 that triggers the output can be selected. Latching the output should be simple enough.

    You'll want your circuit to run on 5-12V DC, whatever is handy, and to operate a mechanical or solid state relay rated to handle your load.

    I guess the point is, you don't have to use a computer if that is too big a hurdle.
     
  4. Ayuir

    Thread Starter New Member

    Sep 22, 2014
    2
    0
    Thank you both.

    I'd thought of the Arduino route and the programming is relatively trivial.
    I'll take a look at the 4017. How would you 'pre-set' the count such that it could be changed from event to event? i.e. reset the counter to zero and set it so the circuit latches the load on/high at, say, 7 events. Later, reset it and change the required number of events to five and go again...

    So to recap. I'd like to set the required count to a number and reset the counter to zero. At each even, increment the counter until it reaches the required count. At that time set the load high and latch it there. Later, annually reset the counter back to zero and select another required count and repeat. Ideally without writing code (to keep the cost of the circuit to an absolute minimum). Off to look up the 4017.
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,156
    3,063
    You direct the output of the desired count value to the reset pin. For instance you could have a rotary selector switch on the reset pin that allows choosing which number causes the reset.
     
  6. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,176
    397
    As wayneh suggested in post # 5, but connect selected position to " clock enable" instead. At reset all outputs, except " 0" are low, enabling count; when count reaches selected output , high, CE inhibits clock so output stays fixed untill reset goes high with a push button ??
     
    wayneh likes this.
Loading...