I'm building a modular DIY "smart battery pack" (I call it Kyoti - explanation another time,)starting with the on/off switch and basic under and over voltage protection built in. I know there are commercial solutions but the point of the exercise is to learn analog electronics and use up as many components from my jelly bean junk box as possible before they expire.
With plenty of inspiration from the internet, most notably these excellent examples, I've arrived at this circuit and simulation.
It works reasonably well but I'm looking for some advice on how to make the following improvements.
My electronic engineering knowledge is not quite up to the task and hours of playing with different values in LTSpice made me realize what's needed here is expertise, not experimentation.
- How can I delay the startup slightly to ignore a "bump" to the button or a "glitch" (see one at 6s)? The button should be held for 100ms to be a valid ON condition.
- A fault condition should shut things down faster. At the moment it takes a second to shut down, same as a button press. I tried pulling the gate of M202 low directly but that didn't work.
- Over and under voltage protection may not be adequate. The user can hold in the button and force it on for 1 second at a time - long enough for a really high OV or UV condition to damage the battery. Is there a way to prevent start-up at all if there is a fault condition, to switch off no more than 100ms after start-up instead of the 1s now?