Multiple signals controlling relay

  • Thread starter Thread starter solvejskovlund
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around controlling a relay using multiple signals, specifically focusing on a scenario where a microcontroller (MC) sends forced OFF and release signals, alongside a manual ON/OFF switch. The complexity arises from the need for the relay to remember its state through power outages and the specific conditions under which it should respond to the various signals.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant outlines a control scheme involving a forced OFF signal, a release signal, and a manual switch, emphasizing the need for the relay to remember its state during power outages.
  • Another participant suggests using an N-channel MOSFET to drive the relay and inquires about the possibility of programming the MC to remember the "force off" state in EEPROM.
  • A different participant proposes the use of a latching relay to maintain the "force off" state through power outages.
  • Concerns are raised regarding the safety implications of the design, highlighting the need for reliable non-volatile memory and fail-safe mechanisms.
  • One participant mentions the possibility of sensing voltage directly from a sensor instead of relying on the MC, which could simplify the circuit and eliminate the need for state memory after power outages.
  • Another participant expresses uncertainty about the logic required for the interaction between the MC signals and the manual switch, seeking clarification on the definitions of "release" and "force OFF."

Areas of Agreement / Disagreement

Participants express various viewpoints on the best approach to control the relay, with no consensus reached on a single solution. There are competing ideas regarding the use of different components (e.g., MOSFETs, latching relays) and methods (e.g., voltage sensing vs. MC signals).

Contextual Notes

Participants note the complexity of ensuring safety and reliability in the design, particularly in relation to power outages and the interaction of different control signals. There are unresolved questions about the logic required for the manual switch and its relationship with the MC signals.

solvejskovlund
Messages
73
Reaction score
2
I'm need to control a relay in three ways:
1: Forced OFF signal. This is a signal triggered from a MC that I have no access to change. It is a 1 wire output that is normally floating, and pulled to ground for exactly 1 minute when the MC has detected that the relay should turn off. Important thing here is that the relay does not come back to ON when the MC stops pulling the signal low (would have been a lot easier if the MC kept the wire pulled to ground as long as the forced OFF situation was valid.)

2: Release forced OFF signal. This is a 1 wire output from the MC that is normally floating, and pulled to ground for 1 minute when the MC decides it is ok to turn the relay on

3: manual ON/OFF signal by push button or an on / off switch. When this switch is pressed / switched OFF, the relay should go OFF. When this button is pressed / switched to ON, the relay should turn ON if the last signal from the MC was 2 (release). The button should be ignored if the last signal from the MC was 1 (force OFF). If manual switch is in ON position when signal 2 (release) is sent from MC, the device should NOT switch ON. Only the manual ON signal should turn the relay ON.

And to make this even more complicated, this device has to remember "force off" through a power outage. (It will no receive new signals during power outage.)

So, this control unit basically has 4 states:
"Force OFF" (triggered by 1. Must be remembered through power outage)
"ok to turn on" (triggered by 2 or OFF by manual switch)
"ON" (triggered by manual switch)

Does such a device exist? If so, what would be the proper search terms to find it?

I'm thinking one way to approach this could be to connect devices in series like this:
power positive -> relay coil -> manual ON/OFF switch -> device that decodes MC signal -> GND
With such a connection scheme, the device could be simplified to have signal 1 to turn ON, signal 2 to turn OFF. The manual switch in this case would have to be like those used on power tools that ensures that the tool does not restart after power outage.

Any better options?
 
Engineering news on Phys.org
Use an N-chan MOSFET to drive the relay, controlled by the MC, with pull down on gate.
Can you program the MC to remember the "force off" in eeprom?

Or must this be a separate electronic logic block, with a battery backed up CMOS RS flip flop?
 
solvejskovlund said:
And to make this even more complicated, this device has to remember "force off" through a power outage.
That suggests using a latching relay.
 
  • Like
Likes   Reactions: Averagesupernova and DaveE
This sounds like a safety critical application. If so, I like the latching relay idea.

You need one non-volatile memory bit that can be set quickly and reliably as the power dies. Proving that your uP, POR, watchdog, etc. can do this and have it be guaranteed in synch with the relay HW, then power up in the correct state will be a tough sell to a safety inspector. There's a lot of stuff between an eeprom and the actual relay that can go wrong. It's also a lot harder for some EE down the road to screw it up by changing parts, wires or PCB layouts than to make a mistake typing new code.

Our design rule with for similar equipment was that there should be nothing the SW can do to make it dangerous. Like physically impossible. In a case like this the uP probably has to be involved, but it should be done carefully in a fail-safe manner; simple minimal functionality.
 
  • Like
Likes   Reactions: Averagesupernova and berkeman
Sorry for the late reply - I lost my phone - only way of internet access.I don't have any access to make changes to the MC behavior. Hence everything has to be a separate logic block.I'm also thinking of dropping the MC signal. The MC makes its decision based on voltage from a sensor. It would probably be easier for me to just sense the voltage from that sensor. That would also eliminate the need for remembering state after power outage - just sense the voltage again.

The trigger (force off) signal seems to come when sensor voltage is 2.54v, and the release signal comes at 2.76v. In the event of power outage it just needs to startup in the OFF state. This approach simplifies the circuit into a voltage sensing relay trigger. I just need to be able to fine tune the triggers to match the MC trigger levels.
 
solvejskovlund said:
Any better options?
I am not quite sure of the logic for the case "When this button is pressed / switched to ON, the relay should turn ON if the last signal from the MC was 2 (release). The button should be ignored if the last signal from the MC was 1 (force OFF)". Please clarify the words release and force OFF. I thought condition 2 was ON.
 
Suggested circuit:-
relay (2).webp
 
As I mentioned, I am not too sure of the logic required for the MC ON setting and the manual ON setting, but can al;ster this as required.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
660
Replies
37
Views
7K
  • · Replies 31 ·
2
Replies
31
Views
5K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 26 ·
Replies
26
Views
7K