Timer circuit with three triggers for three durations.

Discussion in 'General Electronics Chat' started by ipanos, Dec 17, 2016.

  1. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    Hi everyone,

    I am trying to built a timer circuit which will have 3 momentary push buttons that each will trigger a timer with 3 different preset durations in the range of 0-4 seconds. Once triggered the timer's output should go high until the timer runs out and any further triggering while the timer is running should be ignored. Then it should return in the idle state, waiting for the next trigger. 555 with RC network accuracy is sufficient (no need to use crystals).

    Closest I could get by googling is the following:
    http://home.cogeco.ca/~rpaisley4/LM555PowerOffDelay2.GIF

    This seams to be exactly what I need, just missing the multiple triggers. Any thoughts on whether they could be implemented, preferably by using 3 sets of RC networks rather than 3 timers?

    Thank you in advance,
    Pete
     
  2. Reloadron

    Well-Known Member

    Jan 15, 2015
    1,377
    431
    It sounds like you want a "One Shot" where a trigger has the output swing high for a preset duration. A Google of 555 One Shot Non Retriggerable should bring up some results. Now, did you want the output of for example the first to trigger the next and then the next? Then you would be looking at two stage and three stage timers. Maybe you want a single trigger to trigger three One Shot timers for three durations?

    Ron
     
  3. crutschow

    Expert

    Mar 14, 2008
    14,791
    3,799
    It could be done with one timer but the circuitry to select the appropriate RC would likely be nearly as complex as three separate timers.
    Off-hand I come up with 3 flip-flops (1 package) and one analog switch package so, at a minimum, the number of IC packages will be the same.
    I think likely the easiest is just to go with three 555 (or two 556) timers.
     
  4. dannyf

    Well-Known Member

    Sep 13, 2015
    2,196
    421
    fairly easy with a mcu.

    otherwise, use the output to disable all inputs, once the timer is armed.
     
  5. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    Thanks all of you guys for the fast response.

    Ron, I am not trying to make a sequential timer.
    This is about an one shot timer, but with three trigger buttons, each button producing a different preset timer duration.

    Crutschow, if I go the 3 timer way, are you avoiding the 558 for some reason? My question is based on your proposition for 3x555s or 2x556s.

    Now, although I have some understanding on electronics, I don't claim too much experience in circuit design. So, in an attempt to adapt the pre-mentioned circuit (this one), I came up with this one:

    000.png
    [​IMG]

    The idea is that that S1 uses an RC network with 3xR1, S2 takes out 1xR1 so 2xR1 remain and similarly S3 leaves just 1xR1 in the RC network.
    Could someone comment on whether something like this could work, or what a stupid idea of mine this is?

    Thanks again,
    Pete
     
  6. crutschow

    Expert

    Mar 14, 2008
    14,791
    3,799
    I'm not familiar with the 558, but it should work, which would seem to be a reasonably simple solution with probably the least number of parts.
    They do work somewhat differently than the 555.
    I could work.
    Possible problems are that the SCR has over a 1.5V drop when on and the SCRs must have sufficient current going through them to keep them on after being triggered which can be several mA or more.
     
  7. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    So I am looking for a super sensitive SCR? Or maybe there is a better way to selectively cancel out resistors in a circuit?
     
  8. crutschow

    Expert

    Mar 14, 2008
    14,791
    3,799
    I don't know that you can find one with a low enough holding current.
    But you could use the SCRs to control the control gate on a CMOS analog switch such as a 4066. That way the SCR load resistor value can be selected to maintain it's holding current.

    Note that you could likely use one transistor to power both the circuit and the load instead of using two, unless the load current is too large for the switch capacity.
     
    Last edited: Dec 18, 2016
  9. dannyf

    Well-Known Member

    Sep 13, 2015
    2,196
    421
    you probably want to build it fore sure.

    two quick comments:

    1) can the SCRs be turned off?
    2) S2/S3 are active at all times, meaning that they can change timer duration even if the timer is armed. that may or may not be the desired behavior.

    you have 20-30 parts there, right? a 8pdip mcu can handle all of them. so you may want to think a little bit more if that's a better route.
     
  10. crutschow

    Expert

    Mar 14, 2008
    14,791
    3,799
    The top transistor turns the power off at the end of the cycle.
    Why do you say that? :confused:
     
  11. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    To Dannyf,

    1) can the SCRs be turned off?
    Yes, crutschow was faster than me on that one. The whole this resets at the end of the cycle.

    2) S2/S3 are active at all times
    It is very possible that I am missing something, but why are they active at all times?

    3) a 8pdip mcu can handle all of them
    I believe so. But I've never programed one and I am scared of them :p :oops: ... My knowledge does not go that far I am afraid.
     
  12. dannyf

    Well-Known Member

    Sep 13, 2015
    2,196
    421
    not sure what that means.

    let's say that the timer is armed for the longest duration. now if you press S2/S3, the corresponding SCR shorts one of the resistors and shortening the timing.

    they are fairly easy to overcome, especially with arduino kits.

    12f675_tmrx3.PNG

    here is a simple implementation. GP0/1/2 are attached two three switches, active low. each generating a delay on the output pin (GP5) of 10ms/20ms/30ms. Once the timer is armed, it doesn't read from the input - the simulation has a few cases of that, like around 200ms and 400ms.

    the whole thing has three lines of code in it. it needs nothing aside from 3 switches.
     
  13. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    WOW, if that is not motivation to go into mcus then I don't know what is. Too bad I don't know how to write those three lines of code or how to stuff them in an mcu :oops: . I guess I will be needing some sort of hardware for that. I don't mind the studying part (I would gladly do it), just don't know where to start...
     
  14. dannyf

    Well-Known Member

    Sep 13, 2015
    2,196
    421
    the particular code here is quite simple:

    Code (Text):
    1.  
    2.         //switch logic: if a switch is pressed,
    3.         //1. turn on the output,
    4.         //2. wait a specific period of time (no reading the keys), and
    5.         //3. then turn off the output
    6.         if (SW_PRESSED(SW1)) {OUT_ON(); delay_ms(SW1_DLY); OUT_OFF();}
    7.         if (SW_PRESSED(SW2)) {OUT_ON(); delay_ms(SW2_DLY); OUT_OFF();}
    8.         if (SW_PRESSED(SW3)) {OUT_ON(); delay_ms(SW3_DLY); OUT_OFF();}
    9.  
    it constantly monitors three switches, SW1/2/3. If any one of those switches is pressed, SW_PRESSED(SWn) becomes true, and it turns on the output through OUT_ON(). Waste some time specific to that switch, and then turn off the output through OUT_OFF().

    Arduino is a good starting point. they are easy to get started, inexpensive, flexible, and have a large user / code base to lean on.
     
  15. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    care to point me to the right hardware I would need to start with?
     
  16. dannyf

    Well-Known Member

    Sep 13, 2015
    2,196
    421
    it depends on what you want to do.

    for general work, Uno is pretty good: all it takes is an uno board + a computer;
    for mixed signal, Leonardo would be my choice.
    for small jobs like this, try nano, mini, or mini pro.

    while at it, grab a usbasp and some attiny25/45/85 for small jobs like this.
     
  17. crutschow

    Expert

    Mar 14, 2008
    14,791
    3,799
    Read my post #10.
     
  18. ipanos

    Thread Starter Active Member

    May 7, 2010
    32
    0
    So, lets assume that S1, S2 and S3 have to only have an effect while the timer is NOT running (i.e while the output is high, no button can affect the cycle). Is there a part in the circuit that is already high only when the output is low, so I can power the three switches from it, or shall another transistor be added for this purpose?
     
  19. eetech00

    Active Member

    Jun 8, 2013
    761
    141
    You could do it with a single 555 and a 4066 or 4016.
     
  20. crutschow

    Expert

    Mar 14, 2008
    14,791
    3,799
    I don't understand your question. :confused:
    Your original circuit powers the circuit when one of the buttons is pressed, which should be fine.
    Do you see a problem with that?
     
Loading...