Electrical – Switching between two power supplies with a P channel Mosfet, Is VGS or VDS a problem

mosfetpmospowerpower supplyusb

So I am using the following circuit to switch between VIN 0-30v and USBVIN 5v.

I thought I found the ideal solution until I realised the FET in the schematic only has a max VGS of 8V. But I don't fully understand how the max ratings work in a situation like this because when VIN is supplied both the Source and the Gate will be the same voltage.

Also the Vds is only 20v as above the Fet isn't being used in a normal application so I'm not sure if this will cause a problem?

So my question is will the circuit be ok along with the FDN340P or do I need to swap it out with a FET with a max VGS and VDS of at least 30v?

enter image description here

Best Answer

Your circuit is OK.

To understand this, it is best to examine 4 cases: (assume USB ~ 5V, and VIN 0..30 V).

0) VIN low and USB low: everything off, no problem. 1) VIN low, and USB high: The FET will be on with G=0, and S=D=USBVCC. Everything OK, as long as D3 is greater than a 5 V zener 2) VIN high and USB low: This will put VIN (30 V - diode = 29.3 V) on the gate; FET will be off, and D (USBVCC) = 0 is OK; S will be VIN-D3 = 29.3 V. So VGS will be ~0 and OK. No problems. 3) VIN high and USB high: Similar to #2 --FET still off (VGS=0).

There are some potential 'corner' cases -- when VIN is rising and USB is high. You should check that there is no back feeding from VIN to the USB. Your arrangement of D2 & D3 ensures that VGS will remain zero (i.e. FET off), so all is OK. Another case is VIN ~ 4 V and USB high -- in this case, the FET G will be 4-0.7 = 3.3 V, and the FET will be barely on, although power should flow from USB. You should ensure that wen VIN is 'off', it really is off.