Switching relays in sequence

Thread Starter

Prestyman

Joined Nov 14, 2008
29
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
 

mik3

Joined Feb 4, 2008
4,843
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.
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

italo

Joined Nov 20, 2005
205
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.
 

Thread Starter

Prestyman

Joined Nov 14, 2008
29
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...
 

SgtWookie

Joined Jul 17, 2007
22,230
i DON'T THINK A 4017 can do that it has 10 states unless is reset it.
It's easy if you connect the 5th output (Q4) to the reset input.

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.
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.
 

Thread Starter

Prestyman

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

Alberto

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

Attached picture is an idea.
 

Alberto

Joined Nov 7, 2008
169
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:

Thread Starter

Prestyman

Joined Nov 14, 2008
29
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.
 

mik3

Joined Feb 4, 2008
4,843
Schmitt trigger is for more safety for false triggering. For your application I don't think you need it.
 
Top