Hi.
....
There is a somewhat simpler approach, at least from a hardware perspective, when you have a general purpose (micro)computer available.
Imagine you have these hardware elements:
- An electronic switch to connect or disconnect power from all of the circuit except as noted here.
- A mechanical, momentary switch which, when depressed, forces the electronic switch to be on.
- A programmable system with an input by which to read the state of the mechanical switch and an output which can force the electronic switch on or off, but which, as reset is asserted, does not force the switch on or off. (An output that is tri-state by default upon power-up or reset is easiest.)
Then, use this algorithm: Upon power-up reset, wait until the mechanical switch appears to be depressed for a time longer than any normal bounce, then assert the output that holds the electronic switch on. Monitor the mechanical switch for non-depression, lasting longer than a normal bounce, before beginning the next step. Monitor the mechanical switch during normal operation, (via interrupt or polling), often enough to be able to notice subsequent depression. Once depression is observed lasting longer than a normal bounce, enter a pre-shutdown state where all or most indications of power being on are not displayed. In this state, wait for the mechanical switch to be non-depressed for longer than a normal bounce. Then negate the output holding the electronic switch on.
This may seem involved, but it requires somewhat less hardware than the article you cited.