I've built a general-purpose power control circuit using a D1 Mini, an optoisolator, and a transistor for the main power management components. It's a simple yet effective design that's perfect for projects where minimal hardware is valued and Auto-OFF will help save battery life.
Its cost-effective, simple and has ZERO current draw when turned off. I've specifically chosen components that are both inexpensive and readily available, making this design more accessible. Almost every existing design I found had current leakage, draining the batteries in just a few days. I've had battery connected to this design for months without any decrease in capacity.
This circuit features three buttons (more can be added), each capable of turning the device on with a simple press, functioning as a normal button input, and can turn the circuit off with a long press.
Here's the link to the short video:
I'd love to hear your thoughts, suggestions, or any similar experiences you've had. This video is more of an overview rather than a detailed tutorial. If you'd like to see a more detailed video, let me know.