Electronic – Need Help on DC Jack and MOSFET Functionality Circuit

dcmosfetpower

I'm trying to build a specific DC Jack that is supplying 24V power. The main feature of it is there is no voltage in the VCC pin in the jack until a barrel is connected to it. So the VCC pin only gets 24V when the shunt pin in the jack is disconnected from the ground pin.

My initial idea is to use a P-channel MOSFET and came with this idea in the schematic below. But I realized this circuit will do the opposite of what I want. It will supply 24V when no barrel is connected and stops supplying 24V when a barrel is connected. I can't seem to think of a circuit to make the DC jack behave in the way I want it to. Maybe you guys know a way or suggestions?

enter image description here

EDITS:

Here is a new schematic based on the suggestion of using a N-MOSFET to inverse the signal:

enter image description here

Added the voltage divider back. Vgs2 (Vgs for the N-MOSFEt) can only handle 20V so the a voltage divider is added back.

enter image description here

Best Answer

You can invert the signal with another FET.

Drive a N channel FET with the contacts. When grounded, N FET is off, and does not turn the P FET on. When contact is released, N FET can get gate voltage and turns on, pulling P FET gate low to turn on the connector voltage.