P-channel high-side switch logic level but reverse logic?

Discussion in 'General Electronics Chat' started by Rmauser, Feb 12, 2013.

  1. Rmauser

    Thread Starter New Member

    Feb 12, 2013
    Hello all, looking for some guidance. I'm trying to high-side switch the following circuit - I currently have a 5V microprocessor that manages a DC 5V only circuit and when the microprocessor shuts down it cuts its own power supply via a small SPST relay (a high signal from microprocessor to NPN transistor keeps relay coil conducting). An external switch re-connects power to circuit to latch the relay when I need to repower the circuit.
    Space (primarily height) is a premium in my board design so I am trying to replace the relay with a MOSFET. I would prefer to use a high-side switch and I've been looking into using a logic level P-channel MOSFET. From what I understand though they conduct when pulled low and don't conduct when signaled high. This is the reverse of what I need - the microprocessor needs to keep its power supply up by sending high signal to the PMOS and then by going low I want the PMOS to not conduct so as to shut down the entire circuit (and the external switch then powers the circuit back up when needed again).
    So my question is how to reverse the PMOS logic such that it will conduct when signaled high by the microprocessor and not conduct when it goes low/loses the signal from microprocessor.
    I know it would probably be simpler to just use an N-channel as low-side but I don't know how comfortable I am with that in my circuit.
    Again, this is a strictly 5v only DC circuit. I've seen some examples using a logic level PMOS + transistor to high side switch a 12v circuit from 5v processor but I don't know how this works when the entire circuit/load is just 5V and also when I want the PMOS to conduct when pulled high by processor. Many thanks for any guidance!
  2. praondevou

    AAC Fanatic!

    Jul 9, 2011
    Like this:

    - Output of uC goes to gate of logic level n-channel MOSFET
    - the source of this MOSFET to ground, the drain to the gate of the p-channel MOSFET that provides power to the uC
    - a resistor of e.g. 10k from source to gate of the p-channel.

    That's it. Good practice is to put in gate resistors too.
  3. crutschow


    Mar 14, 2008
    You can also use an NPN BJT in place of the N-MOSFET to drive the P-MOSFET. (Don't forget a resistor in series with the NPN base input).