I am trying to use the p channel power mosfet IRF9540 to switch between transformer and battery inputs. The transformer voltage of 9 V is applied to the gate. The same transformer line pass by a diode and the diode output is applied to the drain, that is the drain voltage is 8.2 V. If the source is not connected to anything then its voltage measurement is 7.7V. If the source is connected to a 6V battery, the Mosfet will overcharge the battery. In both cases the Mosfet is conducting. What I dont understand is that in either case VGS>0 which means that the mosfet should be in a cutoff mode. This area is new to me, and it is appreciated if there is a simple explanation. Thank you.
Esmat