I am trying to design a circuit with 2 different contours:
Controlling contour: a STM microcontroller powered by a 3V battery.
Power contour - a variable voltage power supply (1.23V - 20V, up to 5A) powered by a AC-DC laptop converter.
The microcontroller should be able to close and open the power circuit. It should be relatively fast (up to dozens/a few hundred milliseconds) and should not drain the battery too fast.
I assume I have to use a combination of an optocoupler (which has a low power consumption) with a transistor: I came up with a simple design which, however, would not work, due to the variable voltage in the power contour.
What would be a better design for such a power key?