Switching relays in sequence

Discussion in 'General Electronics Chat' started by Prestyman, Jan 8, 2009.

  1. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
    I'm looking for a way to switch four relays one at a time with the push of a single button. So the first time I push the button, relay one closes. Second push, relay two etc. After the fourth relay it should go back to number one.

    I am currently doing it with a Basic stamp, but would like a a non-microcontroller option.

    Any ideas?

    Many Thanks.
    Clinton W. Gray
    Vancouver Magician
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Use a decade counter chip. Connect relay1 on Q0, relay2 on Q1, relay3 on Q2 and relay4 on Q3. Finally, connect Q4 to the reset pin.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Mik3's referring to a 4017 type Johnson counter. Only one output at a time is high.

    The 4017 does not source enough current to control a relay. You will also need either Darlington transistors, or (easier) an interface IC like a ULN2003 or ULN2004 Darlington array.
     
  4. italo

    New Member

    Nov 20, 2005
    205
    1
    i DON'T THINK A 4017 can do that it has 10 states unless is reset it . And he say push one button to the next to the next. So you need 4 states like a 7495 shift register plus the current interface for the relays my choice is an pnp current source for each to eliminate bounce.
     
  5. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    You can do it with a decade counter easily. Thanks Sgt for the additional information.
     
  6. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
    Perfect mik3!
    I never thought of connecting Q4 to the reset... brilliant!

    SgtWookie, thanks for the advice.

    Best,
    Clinton

    Off to the electronic store I go...
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It's easy if you connect the 5th output (Q4) to the reset input.

    A 7495 will limit our OP to TTL logic levels, and handling presetting/resetting the shift register. That's unnecessarily complex.

    The OP will require a debounce circuit for his switch, though. Otherwise, the Johnson counter may advance to an unpredictable state due to the contact bounce.

    This could be solved with an RC time constant.
     
  8. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
    Oh, oh. getting complicated for my little brain. What about triggering the 4017? I understand the output, but not the input.
     
  9. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
    [​IMG]

    Would this work?
     
  10. Alberto

    Active Member

    Nov 7, 2008
    169
    36
    why using a transitor for clocking ? you can do directly with the push button and a good debouncing .

    Attached picture is an idea.
     
  11. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
    Thanks for your help, but I can't see the image clearly. What are the values?
     
  12. Alberto

    Active Member

    Nov 7, 2008
    169
    36
    Sorry, I didn't realize it was such a terrible picture!(done with copy screen)

    use: 1K resistor in series and 10K from clock in to ground with a 200 nF capacitor in parallel.

    If when pressing the push button you get problem with the sequence, then increese the value of the capacitor.
    Higher the value higher is the debouncing capacity but you also increases the delay time needed between two sequential pressing. So best value is found with trial.


    Alberto
     
    Last edited: Jan 9, 2009
  13. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Debounce is easy...

    [​IMG]
     
  14. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
    Why do some debounce circuits suggest a Schmitt trigger and others do not? is it needed in my case?

    BTW, I'm the only one who's going to be pushing the button, and the delay between pushes is going to be minutes. It's for a magic routine that I'm building for my show.
     
  15. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Schmitt trigger is for more safety for false triggering. For your application I don't think you need it.
     
  16. Prestyman

    Thread Starter Member

    Nov 14, 2008
    29
    0
Loading...