A Relay setup to run a sequence of device states

Thread Starter

Tutor88

Joined Feb 8, 2023
110
I have a query about how to switch on and off 3 devices using relays or similar and where one of the device states is quiescent or temporarily not in use.

The table below shows the sequence of events I'm trying to arrange electronically.

Sequence table.jpeg

Is it possible to run this series of states in sequence going round and round, perhaps with a timed duration between each step using a series of relays (and a timer circuit)? It’s twisting my head up in knots a bit trying to figure out how to do it and perhaps one needs two sets of three relays and a way to link them together.

I’m also aware of these Wi-Fi-based modules, as in the pic, that can remotely route one of several inputs to an output, e.g. for home IOT-type events but I don’t think that quite does it for this scenario.

4way controller.jpeg

I would be interested to hear anyone’s ideas.

Justin
 

Attachments

AnalogKid

Joined Aug 1, 2013
10,786
99 people are going to recommend doing this task with a microcontroller (uC) such as PIC, Arduino, etc. Is that your goal, or do you want to build a logic sequencer from scratch?

Separate from that -

What signals / power sources / loads / whatever are the relays switching? Devices / Circuits / Voltages / Currents / impedances - ?

Do the Operating and Charging conditions share a common Ground?

Do all three sets of signals share a common ground?

ak
 

Thread Starter

Tutor88

Joined Feb 8, 2023
110
Hi am,

Yes I’m sure it could be done with suitable processing power from an Arduino etc but I’m thinking less complex or sophisticated and using ‘simple’ electromechanical relays and some logic sequence. I see it more as a challenge in arranging some relays to provide the sequence in the table.

If it were to be built then I would suggest the following parameters: resistive loads of 10A max DC for operating and charging and with a common Earth. The operating load could be a battery operated heavy duty lamp and the charging phase the recharging of the battery, again using a dc system for convenience.

All three devices can also share a common Earth.

So what you have called a logic sequencer seems more fitting.
I know how to do it for just two states using a single relay with a timer (4060 chip) output and the relay can just toggle between the two states when triggered, but moving to three states seems to be a different ball game.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,786
You could use a bunch of gates to decode the various system states out of the 4060 outputs, but there probably is a better way.

Minimum and maximum allowed times at each step? I assume the times for Operating, Charging, and the Shutoff period are identical. If not, that is a thing.

Is the Shut Off state just the absense of the other two states?

Also, are there any consequences if some of the states overlap, such as one relay closing a fraction of a second before another one opens? If so, then there needs to be some dead-band time inserted into the sequence.

A common part for something like this is the CD4017. It is a 10-step Johnson counter. It has 10 outputs that it steps through, and only one is on at any given time. It is a fan favorite for stepping through things. If the time at each step is over a few seconds, then a 4060 acting as the timebase will give better performance than a 555.

ak
 
Last edited:

Thread Starter

Tutor88

Joined Feb 8, 2023
110
You could use a bunch of gates to decode the various system states out of the 4060 outputs, but there probably is a better way.

Minimum and maximum allowed times at each step? I assume the times for Operating, Charging, and the Shutoff period are identical. If not, that is a thing.

Is the Shut Off state just the absense of the other two states?

Also, are there any consequences if some of the states overlap, such as one relay closing a fraction of a second before another one opens? If so, then there needs to be some dead-band time inserted into the sequence.

A common part for something like this is the CD4017. It is a 10-step Johnson counter. It has 10 outputs that it steps through, and only one is on at any given time. It is a fan favorite for stepping through things. If the time at each step is over a few seconds, then a 4060 acting as the timebase will give better performance than a 555.

ak
Yes each step would be identical and in the 10-60min range.

Yes shut off is ‘testing’ so not operating or being charged.

Overlap would not work I imagine so a minimum ‘dead band’ as you call it of say 50ms.

The CD4017 sounds promising and I’m familiar with using the 4060 to create time intervals of up to 60min.

Would you be able to ‘pencil sketch’ a typical layout and then I can draw it up in EasyEDA as a circuit?

I can see how a 4017 can cycle round each of the three states but presumably there will need to be three 4017s, one for each device, and then some way to start them off in the right states and synchronise them?

Thanks.
 
Last edited:

Thread Starter

Tutor88

Joined Feb 8, 2023
110
Siemens Logo! can do the work. You can buy the device with a display, and program it with no software
That would replace the logic side I presume but what about the relays?

Also, it is relatively expensive compared to designing and building my own simple PCB. Overkill in fact.
 
Last edited:

Thread Starter

Tutor88

Joined Feb 8, 2023
110
So here is the start of a circuit based on the 4060 for the timer (with three possible times for a given oscillator frequency) and the 4017 counting 0, 1 & 2 and cycling round. So what I think is needed next is a way to be able to set the states of the three devices at the start (a sort of manual override) and then the relays. I'm sure I'm missing something but it's a start.

Circuit start.png
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,786
With a single 4017, you can decode the necessary outputs with six diodes, two per output. Still some decoding, but way less than for a binary counter. Six diodes, three driver transistors, AND . . .

A way to blank all outputs for 100 ms at every transition. Conceptually, three gates in a quad AND gate, one per output. Each clock edge into the 4017 is differentiated into one input of each gate, briefly disabling all three outputs.

I am traveling for the next few days, so no schematics.

ak
 

BobTPH

Joined Jun 5, 2013
8,104
Yes I’m sure it could be done with suitable processing power from an Arduino etc but I’m thinking less complex or sophisticated and using ‘simple’ electromechanical relays and some logic sequence.
Suitable processing power? ANY microcontroller has a thousand times the processing power needed.

And, as far as the circuit goes, nothing will come close to the simplicity of a microcontroller, especially after you added the requirement of dead time.
 

Thread Starter

Tutor88

Joined Feb 8, 2023
110
With a single 4017, you can decode the necessary outputs with six diodes, two per output. Still some decoding, but way less than for a binary counter. Six diodes, three driver transistors, AND . . .

A way to blank all outputs for 100 ms at every transition. Conceptually, three gates in a quad AND gate, one per output. Each clock edge into the 4017 is differentiated into one input of each gate, briefly disabling all three outputs.

I am traveling for the next few days, so no schematics.

ak
Ok thanks. I will wait till your return to develop the schematic.
 

Thread Starter

Tutor88

Joined Feb 8, 2023
110
What you have not told us is how the three states are selected in the device. A single relay has only two states.
That is the basis of my post - how to achieve the rotation of states shown in the table in post 1 using relays that are either one way or another.

I’m sure a microprocessor can do it more easily but I want to build something that I can more easily see the stages and processes of. It will make a better teaching tool as well using more ‘down to earth’ components.
 

Thread Starter

Tutor88

Joined Feb 8, 2023
110
Suitable processing power? ANY microcontroller has a thousand times the processing power needed.

And, as far as the circuit goes, nothing will come close to the simplicity of a microcontroller, especially after you added the requirement of dead time.
Well there you have it - I don’t need a thousand times the processing power, just a suitable 1x the required power. :)
 

BobTPH

Joined Jun 5, 2013
8,104
n
That is the basis of my post - how to achieve the rotation of states shown in the table in post 1 using relays that are either one way or another.
No, you misunderstand my question.

Each state of the device requires some set of connections. You have not told us what those are, and we cannot determine that from what you have said. You question was about how to sequence it. My question is: sequence what?

A valid answer might be:

1. Running: Connect 12V to the red wire only.
2. Charging: Connect 12V to the blue wire only.
3. Idle: No power connected.

This would require two relays per device.
 
Top