I am making a device controlled by an ESP 8266 and am wanting to save power by having it power down when not in use. The desired behavior is for a momentary button press or vibration sensor activation to cause the device to turn on and stay on until it is done being used for a period of time. The ESP 8266 can sense when the device is not in use and can reset a software or hardware timer as necessary to begin the timeout process once the device stops being used. After the timeout is complete, I would like the device to power off with as little current draw as possible.
Some of the options seem to be a circuit like this: https://www.youtube.com/watch?v=L55QrKQQZJk
That would be great but to be honest, if I could find an COTS solution, it would be much better. The best thing I found was this breakout board on Adafruit: https://www.adafruit.com/product/3435. It would take care of the powering on with the button and vibration sensor and be able to power off on command as well. The main issues I would run into is the fact that the device would power on every two hours without needing to and timeout after being on for two hours as well. Even though my software timeout will probably be around 10 minutes, if the device is used for two hours straight, I don't want it to shut off mid-operation. Are there any COTS solutions here better than what I found? Or could I easily modify the TPL5110 to do what I am wanting to do?