# P-Channel MOSFET Tutorial with only Positive Voltages

### From the mailbag (or chat… bag?)

On every page of my blog, you might notice a chat window. If I’m not busy, we can chat in real-time. If not, the messages come to me by email. Here’s one I got from Matt the other day:

Let’s talk a bit about how (and why) you would use a P-Channel MOSFET. Matt, and he’s not the only one, is probably asking this question based on the “myth” that P-Channel MOSFETs require “negative voltage” supplies.

Keep reading for a how to use only positive voltage in this p-channel MOSFET tutorial.

## What’s different?

MOSFET Symbols from Wikipedia

The actual construction of the two types of MOSFETs differ. There are plenty contraction explanations out there on the layers. Instead, let’s focus on how you use them in a circuit.

## VGS Threshold

The first thing we need to know about using MOSFETs is one of their critical properties: VGSth. Which stands for Voltage Threshold from Gate to Source. As the voltage difference between those two pins changes, so will the resistance from the DRAIN to SOURCE pins. This threshold is how a MOSFET turns ON and OFF.

How that resistance changes, depends on if it is an N-Channel or P-Channel MOSFET.

### P-Channel MOSFET Tutorial and Explanation

Look at the VGSth for a P-Channel MOSFET. You might notice that VGSth is a negative value. We can use the data sheet from an IRF5305 as an example.

Its VGSth is specified as a range: -2.0V to -4.0V. So, how could you possibly use this MOSFET with an Arduino, LaunchPad, Raspberry Pi or any other microcontroller? Do you really have to generate negative voltages?

This spec is where the myth of the “negative voltage” comes in: Since the data sheet says negative, clearly, you need negative voltage to work. And data sheets, never lie (except when they do…).

Let’s literally read what the specification is saying. “Voltage from Gate to Source of negative four volts.” Using different words, you might read it as “GATE voltage value minus the SOURCE voltage value.”

Look at the voltages in this “high-side switch” configuration:

The GATE is now at 5 volts. The SOURCE is also at 5 volts. That means the Vgs is 5V – 5V = 0V. So the Vgs, in this case, is 0 volts. This voltage means the MOSFET is turned off, or an open.

Now, this is the same circuit, but the GATE is connected to ground instead of 5 volts.

Let’s look at the SOURCE and GATE again. The SOURCE is still at 5 volts. However, now the GATE is at ground which means it is 0V. If you take the GATE voltage minus the SOURCE, you get 0V – 5V = -5V. This will turn the MOSFET on.

See what just happened there? We got a “negative” voltage using only positive voltage supplies…

## Why use N-Channel over P-Channel

We would need to dedicate a tutorial on when to use an n-channel and p-channel MOSFET. An excellent use for P-Channel is in a circuit where your load’s voltage is the same as your logic’s voltage levels. For example, if you’re trying to turn on a 5-volt relay with an Arduino. The current necessary for the relay coil is too high for an I/O pin, but the coil needs 5V to work. In this case, use a P-Channel MOSFET to turn the relay on from the Arduino’s I/O pin.

If your load voltage is higher, like 12 or 24V, then you might want to use an N-Channel MOSFET in a “low side” configuration.

## Conclusion

Using a P-Channel with positive voltages is easy when connected to the circuit correctly. We just have to get over the myth that they work with “negative voltages.”

Question: What’s the most creative MOSFET circuit have you seen? You can leave a comment by clicking here.

Long comments, URLs, and code tend to get flagged for spam moderation. No need to resubmit.

ALL comments submitted with fake or throw-away services are deleted, regardless of content.

Don't be a dweeb.

## 87 thoughts on “P-Channel MOSFET Tutorial with only Positive Voltages”

1. Gil Shultz says:

What is commonly missed is where the reference point is. That is the point where you base all your measurements. The polarity of a MOSFET is referenced from the source. That is where you would connect the ground of your volt meter. Doing it that way the datasheet is correct regardless if P or N channel. Simply think as the black wire or ground is your reference point. It always works for me.

2. Gui says:

Thanks a lot for this detailed explanation ; would you have any idea of how it works at the level of the electrons flow? this is because we always see the drawing of the P-Channel where they say that some negative charges are needed at the gate to push the electrons away and cut the flow. I still can not figure it out in a CMOS when the same direction current can both apply negative charges on the P and positive ones to the N. I’m sure that my question is silly but forgive me I’m just a biologist with some interest in electronics…

• You’re confusing voltage polarity with electron charge. Electron charge is always negative. In a semiconductor, there are charge carriers in a channel. The voltage (electric field) changes channel, enabling the carriers more mobility. In a P-Channel, a negatively biased electric field is necessary for the channel to become active. That “negative” has nothing to do with an electron charge. Nor does the voltage have to be “negative.” The voltage at the gate just has to be less than the voltage at the source, thus creating a “negative voltage” when looking from Gate to Source.

3. Mike says:

While performing a diode test with a multimeter (red probe on Source pin and black probe on Drain pin) on an stand-alone (not in-circuit) NMOS, I get a 0.5V reading which is expected. However, when the NMOS is placed in-circuit (soldered onto PCB) where the Source pin is connected to ground plane, I get 0.135V. Circuit is not live. Is the 0.135V to be expected or should it read 0.5V?

I’m wondering if the 0.135V reading is valid due to the Source pin being connected to ground plane or if it is a botched soldering job.

4. Carl Bash says:

Sorry for the newbie question, but what exactly does the resistor on the gate do? I’m connecting the gate to an arduino so guess I’d need that resistor in between the gate and the arduino, but I’m not sure what it does. Thanks in advance!

• The gate of a MOSFET is a capacitor. Depending on the size of the FET, that capacitor can be large enouogh to cause damage to an I/O pin. So the transistor limits the current. Anything between 100 to 1000 ohms works fine.

5. Peter Duxbury says:

In the whole of my learning about MOSFETS, I could not see just how the gate of a p-channel MOSFET could possible be a negative voltage value – to turn-on the MOSFET. For almost a week of searching ‘other’ sites for more information, I stumbled upon your great explanation! Your Tutorial really highlights an issue that would cause deep frustration in many electronic Hobbyists. So thankful that I stumbled upon your Tutorial. Greetings from Australia.

6. Seano says:

“Using different words, you might read it as: subtract the GATE voltage value from the SOURCE voltage value.”

I think you mean the reverse. In your second example, your statement shows 5-0 which is +5. You want gate, 0, minus source, 5. So -5. Subtract gate off source.

Other q. Using arduino i/o, 5v high. Source is 12v. I imagine the Vgs is either -12 or -7 hence, always on? (P chan config). Guessing I need a transistor before the gate, to send 12v to the mosfet, thus inverting how I drive it (with a low)?

• I’ve finally realized a way to re-word it just using “Minus”instead of subtract.

I need a transistor before the gate

It’s called a “driver.” This post has an example where I drove a PNP transistor with a NPN driver. Also, just a minor point, you never “send” voltage, you can only “apply” it.

• Seano says:

True about apply. Same with a Low, it is not a send, rather, a sink.

Great edit on the wording change. MUCH clearer now. 🙂

I bought a whack of N Chan boards for my arduino, was going to use on the truck’s headlight LED rings and other. Problem is, I cannot get to the neg, ergo, ground, to make it a Low side N chan circuit to work with those mini boards. The ground and source are also bridged on those. I May unsolder the mosfet, try a high side with that N using 12v.

Cheers

7. Hi, Very nice addohms video as usual. I have a logic level n-channel mosfet(FQP30N06L) and switchin on-off by appliying 0 and 3.3v Vgs from a gpio pin. Drain side I have a load operates at +5V. After the pc turns off, PC pulls up +5V all GPIO pins(Vgs). As a result after pc turns off, it turns on the load again. How can I prevent the gate voltage if more than 5V at the logic level mosfet? Best.﻿

• I don’t understand your question. You may need to use a P-Channel FET as a high-side switch. Or you may need to add a pull-down resistor to the N-Channel’s gate.

• ognlvnt says:

Thanks for the reply. Let me explain again. We simply control a load by using a gpio pin on the gate side of mosfet. From the industrial pc software, it gives 3.3 and 0 volts for high and low to the gate. But when we shut down the industrial pc, it pulls up all gpio pin to 5V(we dont know why) I would like to prevent the load to turn on if the gate voltage is higher than 3.3volts(it can be 4.5V also according to vgs threshold). Hope this is clear. Best.

• If your driving signal tends to float high, I would suggest replacing the circuit with a p-channel high-side transistor. On the N-Channel, you could also try using an NPN to invert the driving voltage.

In this circuit when the input to the NPN base is high, it will turn on, which puts 0 volts on the gate of the MOSFET. When the NPN’s base is low, it will turn-off, putting 5 volts on the gate of the FET.

• ognlvnt says:

To be honest I dont think the diagram above should work high logic signal at the gate since it floats between 3.3V and 5V. It is ok to control with 3.3V and 0V but not ok with 5V. We dont want to current flow to the load(5V, 2A) at 5Vgs on mosfet(FQP30N06L). As you said (also in my opinion) a P-channel transistor might be placed. According to diagram we get 5V high from the plc after shut down which activate npn either way. Also you can think the load is the 1k resistor at the right hand side. Briefly we need a transistor doesnt turn on above 3.3v at the gate. Many thanks.

8. Thanks a lot for this article. One point has me confused. Early on, you mention:

“Let’s literally read what the specification is saying. ‘Voltage from Gate to Source of negative four volts.’ Using different words, you might read it as: subtract the GATE voltage value from the SOURCE voltage value.”

But subtracting gate voltage from source voltage is Vs – Vg stated mathematically, and it is the opposite of what you do in your examples.

Funny enough, the way you stated it verbally makes more sense than Vg – Vs. When I think “from point A to point B”, I tend to think B – A, not A – B. For example, if A is 3V and B is 5V, to get from A to B, I need to add 2V, so Vab = 2. I’m just so extremely confused with notation because this isn’t the first place where I’ve read about MOSFETs and saw that Vgs = Vg – Vs. It just makes no sense to my mathematical mind why it seems to be reversed.

Can you help illuminate?

• I’ve given up trying to explain it in words. I’ve changed it 3 times in 3 years and people still say it is confusing. So far everyone’s “clarification” confuses someone else. I think it comes down to how you process math in your mind. So, Vgs = Vg – Vs.

9. Terence Pinto says:

I don’t have the project with me any more. It was a gift for a friend who was going away, but I do have all the parts and one of the FETs mounted on an SMD to DIL PCB. I will make up the circuit again on a breadboard and play around with it. If I come up with something, I’ll post it here.

When I did the original project I had limited time so as long as the theory was solid (based, actually, on your explanation, thanks) and the completed project worked for a few hours without any heating I was happy.