P-channel MOSFET switch

I want to use a MOSFET as a switch driven by my microcomputer.


The original circuit using N-channel MOSFET is on the left side. Honestly, I do not understand the choice of the IRLZ44. The circuit is designed for Arduino, which has 5V logic. Which means that for GPIO=True=5V, MOSFET opens and lets the current into the load.

However I have two problems:

  • I am using Raspberry Pi, which has 3.3V logic. According to available information 3.3V is not enough to fully open MOSFET.
  • I want my load to be connected to the ground (I had to do some voltage measurements).

I know enough electronics to assume that using P-channel MOSFET, as shown on the right side, might solve both of my problems at one stroke. For GPIO=False=0V MOSFET will be fully open, while GPIO=True=3.3V puts -1.7V on the MOSFET gate and practically close it down. If that does not suffice, I could also put GPIO into the listening mode and therefore pull the MOSFET gate to 5V.

Could you please tell me if the idea will work? And what IRLZ44-equivalent P-channel MOSFET should I use?

You likely want to use the Nchannel circuit as it is easier to drive. Then it depends on how much current your load is taking. It looks like the IRLZ44 (the L indicates logic level drive) at 3V GS will pass up to 10A. A google search for “power mosfet 3.3V drive” turns up this article

which has a number of suggestions. It will also depend on what kind of a load you are driving, an inductive load such as a motor has more issues than a straight resistive load (LEDS or a heating element) for instance along with how much current is being switched and how fast it needs to switch. Note the suggestion in the first article referenced above that you need a current limiting resistor in series with the gate (which is highly capacitive) to limit the output current from the micro processor to a safe value. Also note the suggestion of a large (1M) resistor from gate to source to insure the FET is off if the output pin is floating at power on.

Peter

If your mosfet is 5v and you want to drive it from 3.3v gpio, you’ll have to use a transistor like 2n2222 or bc 547 to drive the mosfet. The logic is inverted but you can handle that code side.
To put the load to the source you’ll have to use a P channel mosfet instead of a N channel mosfet
In the schematic below it’s a working example to drive a 10V mosfet from 3.3v esp8266 GPIO.
It should work in 5 v to.