Mechanical relay replacement for mosfet bias
Option 2: Replace the analog circuit with a microcontroller







simulate this circuit &ndash; Schematic created using CircuitLab

Without external input, pull-down R1 firmly applies ground to Vgate through Q2.

(Existing)R2 is large-ish since FET gate does not need large current.

R3 is current protection for the LED inside the opto. A 380ohm resistor with a 1.2V drop across the LED yields about 10mA.

When uC_PowerEnable becomes high, Q2's gate is biased at DCIN, allowing Vgate to rise.

The recommended capacitor across the ATTiny power supply pins can be up-sized to ensure the Tiny is the last thing that turns off. Without signal from the uC, R1 resumes its original role of 'permanently' grounding Vgate. In this setup, the uC can shut down Vout for any reason(s) and can be reprogrammed, instead of redesigned and/or resoldered.

SetPin(uC_PowerEnable, VinPlus15Good &amp;&amp; VinMinus15Good); //Shut down if either input rail fails