Hi all,
I have a requirement for a gadget to have power applied and removed at the press of a tactile push button, also the button should be usable as a GP input while the application is running.
The circuit should kill the local 5v circuitry and some external 12v circuitry.
I can do this easily with a latching relay but that's physically too large, a bit clunky, and can be susceptible to vibration. The relay has one advantage though in that no power is used at all when in standby, however I'd rather a solid state solution so I have come up with this circuit.

My theory of operation is as follows.
Push on - gate driven near GND and FET turns on. Power applied to Reg and AVR, AVR drives OP low thus holding the FET on.
Use as IP - Enable internal PUP resistor PB1 work as per normal input while the application is running.
Push off - AVR tri-states OP, 100k pulls gate up, FET turns off, system dies.
The only problem I can see is that the AVR has 12v applied to it's IP when the power is off, however that's through 100k so I would think it is safe?
Will it work? Is it Close? Any better ideas?
EDIT: Schematic updated.
______
Rob