Relay switching circuit

Thread Starter

Mellisa_K

Joined Apr 2, 2017
391
First post from an electronics novice who's keen to learn.

I want your help please designing a circuit that controls 3 electromechanical relays. When switched on, the circuit applies power for a fixed time period to each relay coil in turn.

The pair of contacts on the "output" side of each relay are normally in the open state which is the state when no signal is applied to the relay coil. The relay output contacts close when an electrical signal is applied to the relay coil and remain closed for the duration of the signal. The relay contacts return to the normally open (NO) state upon cessation of the input signal.

Upon activation, the proposed switching circuit energises relay 1, switching it to the "on" position (contacts closed) for a predetermined and fixed time period, say 5 minutes. In this on position the relay contacts are closed. When the designated time of 5 minutes expires, the circuit de-energises Relay 1, returning it to the "off" / NO position. The proposed switching circuit then powers the coil of Relay 2 switching the contacts on it's armiture to the closed position for 5 minutes. When the 5 minute time period expires, Relay 2 is depowered to the NO state and Relay 3 is switched on for 5 minutes. At the completion of this 5 minute period, Relay 3 is switched off, completing one full switching cycle.

Once a full switching cycle is completed, the proposed circuit immediately starts another full switching cycle beginning, as before, by applying power to the coil of Relay 1 then to Relay 2 then to Relay 3. Cycling continues in this way until the switching circuit is turned off and all relays return to the NO state.

The switching circuit needs to be scalable to accommodate future expansion of the number of relays.

The switching circuit also needs to allow modification in the future to incorporate a way of manually varying the time interval over which power is applied to the relays.

I have soldering skills and all the tools I need but no theoretical knowledge of electronics. I want to learn about electronics from this and future projects. So I would favour a transparent design that allows me to "look into" the circuit and understand how it works over a possibly more opaque "black box" approach.

Thanks for reading this commrades. I look forward to hearing from you.
 

#12

Joined Nov 30, 2010
18,224
First guess: CD4040B, a pair of them, followed by as many small n-channel mosfets as you have relays.
Design the clock to run at 73.24 milliseconds. The first chip divides by 4096 to produce 5 minutes per output event.
The second chip counts output events to provide 12 consecutive outputs.
I am not the only person who can have an idea here. Wait to see if anybody can come up with a better idea.
 

Attachments

AnalogKid

Joined Aug 1, 2013
10,986
1. Are the three relays always on for the same time period? That is, if you change the on time to 7 minutes, is it 7 minutes for all three? Hint: a yes answer makes the circuit much easier.

2. What are the relays? Manufacturer/part number? Specifically, what are the relay coil operating voltage and current?

3. What power is available for the control circuit?

4. Any restrictions on size, weight, cost? Operating outside or in some other rugged environment?

A 555 astable oscillator driving a CD4017 counter is the most simple way to do this. The 4017 has 10 outputs, so that would be the max number of relays. The 4017 cannot drive relays directly, but a ULN200x/280x transistor array gets you 7 or 8 relays drivers with little effort.

ak
 

#12

Joined Nov 30, 2010
18,224
A 555 astable oscillator driving a CD4017 counter is the most simple way to do this.
It's difficult to get 5 minutes out of a 555 chip. Have you run the math on that?
Have you checked the OP on that. If she says, "10 minutes", the 555 circuit is a sure fail.

I couldn't find an output table for the CD4040. Does it output one at a time?
 

AnalogKid

Joined Aug 1, 2013
10,986
I know, and I always recommend a CD4060 for those kinds of periods, but I thought I'd get it in before the other 99,000 responses.

ak
 

AnalogKid

Joined Aug 1, 2013
10,986
So, the ***RIGHT*** way uses something other than a 555 for the clock oscillator. The problem is that the timing capacitor is so large that it becomes a source of timing error. First, large electrolytic capacitors are not very accurate. Second, the charging current is so low that the capacitor's own leakage current becomes another error term, one that varies with room temperature and from part to part. The CD4060 is an oscillator followed by a 14 bit counter/divider. For the same 5 minute cycle time, the timing capacitor is over 16,000 times smaller. Now you can use a stable ceramic cap that behaves.

But to be clear, a 555 (particularly a CMOS 555) can do this job if the relay on time does not have to be precise. If you have some already, it certainly is good enough to use to develop the rest of the circuit while you wait for the CD4060 to arrive.

Or, if you like to type a lot and spend money, you can use a PIC, AVR, Arduino, etc.

ak
 

#12

Joined Nov 30, 2010
18,224
We could also go to a CD4020 or CD4060 to get a 14 stage counter for a divide by 16,384 and speed the clock up to make a larger range of adjustment possible.
Oh. You just said that.:oops:

The math says a 555 can not do 5 minutes because capacitor leakage, but capacitors are usually better than the guaranteed worst case so, "lucky" might work at 5 minutes but (opinion) it sure won't work at 10 minutes.
 

MrChips

Joined Oct 2, 2009
30,707
Simple. Use an LMC555 or TLC555 as a variable oscillator using a variable resistor.

Feed this into a counter chip such as CD4020, CD4040, CD4060 to pick off a time interval that gets longer in powers of 2.

Next, feed this into a Johnson counter CD4017. This will give you expansion capability for up to 10 relays. You take one of the outputs and connect it to the RESET input of the CD4017 to select how many relays you wish.

Then take the outputs of the CD4017 and drive ULN2003 darlington transistor drivers to drive the relays. You will need two ULN2003 since each has only seven drivers.
 

#12

Joined Nov 30, 2010
18,224
Yebbut...that's 3 chips for the clock and count functions and we already have a way to do it in 2 chips.
At least we are all in the CD40xx series for answers.:)

Is there a reason why adjusting the clock on a CD chip is problematic?
 

Thread Starter

Mellisa_K

Joined Apr 2, 2017
391
1. Are the three relays always on for the same time period? That is, if you change the on time to 7 minutes, is it 7 minutes for all three? Hint: a yes answer makes the circuit much easier.
-- yes same time period for each relay. Phew!

2. What are the relays? Manufacturer/part number? Specifically, what are the relay coil operating voltage and current?
-- relays yet to be sourced and I have no operating values in mind - other than fit for purpose. I was assuming the circuit design wld drive the specs of the relays not the other way round?

3. What power is available for the control circuit?
-- do u mean the proposed switching circuit as opposed to the relay contacts circuit? The power available for both of them is 230v mains suitably stepped down and rectified for each circuit.

Eg The "output" circuit will supply 12v AC to a selenoid valve connected in series with each relay. This is predetermined by the specs of the selenoid valves.

The voltage and current required to supply the relay coils would I suppose be determined by the relay specs determined in 2 above?

4. Any restrictions on size, weight, cost? Operating outside or in some other rugged environment
-- No restrictions.
-- operating outside but with all weather protection

A 555 astable oscillator driving a CD4017 counter is the most simple way to do this. The 4017 has 10 outputs, so that would be the max number of relays. The 4017 cannot drive relays directly, but a ULN200x/280x transistor array gets you 7 or 8 relays drivers with little effort.
-- 7 to ten outputs would suffice
-- I can't comment on yr technical suggestions but they sound cool

Moderator edit: added quote tags
 

#12

Joined Nov 30, 2010
18,224
I was assuming the circuit design would drive the specs of the relays not the other way round?
No. The relays are the "power monsters" in this circuit. The usual method is to design backwards from the output to the input.
In this case, we all chose chips that can handle more than 12 volts. Good guess!:)
 

AnalogKid

Joined Aug 1, 2013
10,986
The math says a 555 can not do 5 minutes because capacitor leakage,
True, but the simple answer is change the timing resistor to compensate for the leakage current. The standard equation no longer applies, but so what?

Also, back to post #2, a pair for 4040's will not work. The 4040 is a binary counter, so the second one cannot drive three relays sequentially without further decoding.

Hmmm.. TI used to make semi-smart power MOSFET arrays. If one of those had a 3-to-8 decoder built in, we'd be down to only two chips that included the relay drivers .

ak
 

#12

Joined Nov 30, 2010
18,224
Who's counting chips?
Just the old engineering habit of finding the simplest or most economical method.
You can do it with zero chips.
I guess we need to ask the T.S. if she came to an electronics site to learn about motors and cams.
The 4040 is a binary counter, so the second one cannot drive three relays sequentially without further decoding.
The 4017 is a, "one at a time" output. Maybe that one?
 

Thread Starter

Mellisa_K

Joined Apr 2, 2017
391
I was assuming the circuit design would drive the specs of the relays not the other way round?
No. The relays are the "power monsters" in this circuit.
Yeah but .. the two circuits are isolated from each other. The relay coils can be one voltage as outputted from the proposed switching circuit and the relay output contacts open and close a circuit of another voltage yes? (All the chips and other components comprising our circuit design are on the coil side of the relay and don't talk to the contact side of the relay ?)

The usual method is to design backwards from the output to the input.
In this case, we all chose chips that can handle more than 12 volts. Good guess!:)
Moderator edit: added quote tags
 

AnalogKid

Joined Aug 1, 2013
10,986
The amount of power being switched by the relay contacts directly affects the amount of power the relay coil needs to operate. Switching 12 V at 1000 A vs 12 V at 1 A require two very different relays. So, what is the load the relays are driving? You've said it is 12 Vac? Current? Since this is not in an office environment, do the relays need to be sealed or at least enclosed, or can they be open frame?

If the current required by the solenoid valves is low enough, a PhotoMOS device might handle it. Depending on who you ask, this is either a high power opto coupler or a low power solid state relay.

How many of these circuits will you need to build?

ak
 

Thread Starter

Mellisa_K

Joined Apr 2, 2017
391
I was assuming the circuit design would drive the specs of the relays not the other way round?
No. The relays are the "power monsters" in this circuit. The usual method is to design backwards from the output to the input.
In this case, we all chose chips that can handle more than 12 volts. Good guess!:)
-- this diagram of a relay I found on the interwebs informed my last reply to you. The main idea being the coil driving circuit and the relay contacts output circuit are isolated from each other. images.png
 

#12

Joined Nov 30, 2010
18,224
@Mellisa_K Yeah but .. the two circuits are isolated from each other.
You asked if we design the logic section and then the logic section dictates which relays to use. It doesn't. The logic section has to be able to drive the relays but we don't just make some logic and give up when we find out the relays need to be much larger.
The fact that the output side of the relays might do all sorts of stuff with all sorts of voltages and currents means we need to know which relays in order to design the logic section, not, "We design the logic and it tells us what relays we can use."
 
Last edited:
Top