P Channel MOSFET as a Load Switch

datasheetmosfetmosfet-drivertransistors

I want to use a MOSFET as a switch driven by my micro controller unit.
Schematic

The idea of the schematic is to enable on/off power ability to a load ("R_LOAD") of 150Ohm. The MCU_PIN is set HIGH which flows current to GND through an NPN transistor. This pulls the gate of the P_Channel MOSFET LOW, which connects the source to drain providing power to the load.

I have assembled this circuit as shown with an STM32L151 to control the MCU_Pin, NPN Transistor, and a P_Channel MOSFET. The circuit is powered by a 3.3v power supply capable of 150mA continuous.

However the circuit crashes the MCU on the moment MCU_PIN is set High. I believe the problem arises from this circuit because bi-passing the two transistors and making a connection from +3.3V directly to the R_Load does not crash the MCU, and there is no short from MCU_PIN to any other line.

  • Did I choose parts that are not well suited for this use case?
  • What about the circuit is causing the MCU to crash?

Best Answer

There is no current limiting of the 2N3904 collector current other than transistor hFE, which might result in >100mA briefly, however if you have a ceramic bypass capacitor near the transistors of at least 100nF (better 1uF) and reasonable layout that should not cause the MCU to reset.

Of course if your 150 ohm load is actually something with capacitance, such as a module with internal supply bypassing, that would easily explain the problem as that MOSFET is quite capable of conducting more than 10A.