Electrical – Simpler way to enable/disable voltage regulator using DC jack shunt as a switch

dctransistorsvoltage-regulator

I am wanting to know if there is a simpler way to enable/disable a switching voltage regulator I'm using. The voltage regulator's datasheet says to pull the EN pin to GND to turn it off, and let it float to turn it on.

The DC jack is being used as the on/off switch in this product. The middle pin is the shunt, and is normally contacting the sleeve/GND when the charger isn't plugged in. When the charger is plugged into the jack, the shunt disconnects from the sleeve, and the NPN transistor base is pulled high through a resistor and turns on, turning off the voltage regulator.

When the charger is unplugged, the shunt pin connects back to GND, pulling the NPN's base to GND and turning the voltage regulator on.

I feel like I've overlooked something and there is a more simple way? Thank you for your help.

The product, charger, and jack are center pin positive.

VCC is a 12V battery.

Schematic:

enter image description here

Best Answer

Simpler than what you have? Without changing the regulator? No. A NPN plus resistor is as simple as you can get. The other option would be a voltage comparator, and a diode as a reverse protection and isolating node when the charger is connected. Which your battery may not like.