Enabling/Disabling 24V using sensor and relays

It is about enabling or disabling a 24V input to a device by using some number of sensors and relay(s).

I am thinking to use three relays in order to achieve my requirements stated below;

Occurrence of the states are in the desired order.

State#1:

I need 24V is interrupted when

Sensor1 HIGH

Sensor2 LOW

State#2:

I need 24V is enabled when

Sensor1 HIGH

Sensor2 HIGH

and tricky part,

State#3:

I need 24V is stay enabled after

Sensor1 LOW

Sensor2 HIGH

or

Sensor1 LOW

Sensor2 LOW

up until the State#1 is satisfied again.

So far, I have thought using 2 standard SPDT-NC relays in order to achieve an AND gate logic and using a latching relay as third one to satisfy State#3.

This is just straight forward thinking of mine and before spending money on those, I like to here your opinions.

I am not much into electrical engineering but more embedded software and digital electronics. Any input highly appreciated.

EDIT:

• Normally, the device is fed/energized under 24V. The states are only for enabling and disabling the 24V rail now and then.
• If I elaborate State#3 a bit more; If the Sensor2 goes LOW before Sensor1, it shouldn't interrupt the 24V. Only when Sensor1 is HIGH, the feed will be interrupted.

EDIT:

A bit more about my project: Sensor#1 is just photoelectric sensor and it gives HIGH signal when a box passes by in front of it on the conveyor belt. And the Sensor#2 comes from somewhere else as HIGH or LOW signal. Ultimate goal to start or stop the conveyor belt by enabling or disabling 24V rail as per the sensors as I explained above.

• This looks like finite state machine. Draw a transition table, then realise it. Jul 7 '20 at 10:34
• Or draw a timing diagram. See something-like-a-flip-flop for examples. It will clarify your thoughts greatly and is better than many words. Jul 7 '20 at 10:36
• Simplify the State#3 option. It looks like you don't care about the condition of Sensor2 so it can be omitted. Jul 7 '20 at 10:47
• Is all that just "enable 24 V if sensor 1 is low or if sensor 2 is high?"
– jonk
Jul 7 '20 at 11:04

I think your requirements can be tabulated as shown in Table 1.

Table 1.

State     S1  S2  OUT
=====     ==  ==  =============
1     Hi  Lo  OFF
2     Hi  Hi  ON
3(a)  Lo  Hi  ON (latched until State #1)
3(b)  Lo  Lo  ON (latched until State #1)


Since 3(a) and 3(b) give the same result when S2 is either way we can simplify to Table 2.

Table 2. (x = don't care.)

State     S1  S2  OUT
=====     ==  ==  =============
1     Hi  Lo  OFF
2     Hi  Hi  ON
3     Lo  x   ON (latched until State #1)


simulate this circuit – Schematic created using CircuitLab

Figure 1. This seems to satisfy the requirements of your question.

Note that contact RLY2b has been left in for clarity but it may be omitted as contact RLY2a will provide the same function.

• thank you for the nice looking drawing. Would you please verify my understanding in two things? First, is RLY1c-NC-pin for feeding 24V to the device as default? If so, it will work well. And the second, I assume, RLY3 is single pole singe contact relay. And it functions as resuming 24V in State#2? Jul 7 '20 at 12:15
• I don't think I have understood your original question properly. By "sustained" I think you mean latched. Can you clarify (in your question - not in the comments) what exactly State#3 is doing. I'll look at it in a few hours time. Jul 7 '20 at 12:38
• @Sener: This might be a whole lot easier if you told us what the sensors are and what you're controlling. Your description of operation is not clear. Jul 7 '20 at 17:04
• Ah, sorry for that. I was thinking if I explain in an abstract way it would be more clearer. I can't imagine how relevant would be to know the sensors. They just give an HIGH output when they tripped. I edit my post again for some further details. Jul 7 '20 at 18:53
• Have a look at how the logic tables shrink a load of text into a few unambiguous lines of logic. Jul 7 '20 at 20:51

Here's the relay logic schematic which completely satisfies the three conditions.