I've been trying to design a push-on, push-off power control circuit, and came up with this design:
simulate this circuit – Schematic created using CircuitLab
Theory of operation: Pressing the button causes the gate of M1 to go high, forcing the gate of M1 to remain high through R2, latching M1 on. Q1 is turned on through R4. This causes the left hand side of the button to go low. Pressing the button again causes the gate of M1 to go low, turning off M1 and Q1, causing the left hand side of the button to go high in preparation for turning on again.
This doesn't work in practice. What have I missed?