Awhile ago, I posted an example of a Power toggle circuit using a handful of components that I use all the time to allow a momentary switch to control Power On/Off function.
https://circuitsalad.com/2014/04/12/simple-momentary-switch-latching-circuit/
The circuit works well but can require a series diode with the output to prevent stored charge or magnetic energy from re-energizing the lating function such that it won’t turn off. The diode drop may be undesirable, so I modified the the circuit as show below.
The addition of R7 and C8 eliminates this problem in every circuit I have tried and is sure-fire in reliability. Normally, C8 can be omitted, but I added for one application with very strong RF fields near by. As before, the circuit draws no current when off and can toggle within a second or so.
Of course you might ask why not just use a toggle switch? Well of course you can but you can get momentary switches cheaper, they can be much smaller and generally I find switch bats ( toggle levers) to be un- aesthetic and sometimes cumbersome. So now I usually do something like this.
“…why not just use a toggle switch?” For my application, another reason for NOT using a physical toggle switch is if you need a simple on/off switch on the inside of a completely sealed, water-tight enclosure. A carefully placed reed switch (SW2 in this circuit) and a magnet to toggle it should accomplish the task. Thanks for sharing.