I want to use the following external-interlock schema to control a relay when the interlock terminal is opened or shorted.
The micro-controller does many other things but I restricted the pin-outs to focus on the relay part.
The K1 relay is a non-latching normally open relay. The 5V supply supplies voltage to external interlock control and to the micro-controller as well as to the relay coil. R7 and R8 are there to limit the LED current. R11 and C5 is to prevent bouncing. D1 input detects the interlock ON/OFF state, D2 output goes ON and activates the relay so the 12V power supply turns off. Once the interlock terminals shorted the relay will close contacts and the 12V supply will be ON.
My problem is that I want to make use of another switch (or push button ect) call it SW_New which is coupled to the micro-controller so that the relay acts like a latch. When someone opens the interlock the relay will activate but it will not close again when the interlock is shorted; instead it will require SW_New to be pushed again. I’m a bit confused how I could implement it. What sort of logic or switch/button would be work for such aim?
edit for an answer: