MOSFETs - Completely confused on base voltage needed.

crutschow

Joined Mar 14, 2008
38,528
The Vgs you want to use to fully turn on a MOSFET is shown in the data sheet where the ON resistance [Vgs(on)] is specified.
For example, the data sheet for the BSS123 MOSFET you referenced shows the Rds(on) characterized at both a Vgs of 4.5V and 10V. The 10V value, of course, gives a slightly lower ON resistance but it will operate reliably as a switch with a Vgs of 5V.

If you use a P-MOSFET the load goes to the drain not the source.
The source goes to the plus supply voltage.

Incidentally the common term is ON, not Open, for a transistor that's conducting. ;)
 

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
The Vgs you want to use to fully turn on a MOSFET is shown in the data sheet where the ON resistance [Vgs(on)] is specified.
For example, the data sheet for the BSS123 MOSFET you referenced shows the Rds(on) characterized at both a Vgs of 4.5V and 10V. The 10V value, of course, gives a slightly lower ON resistance but it will operate reliably as a switch with a Vgs of 5V.

If you use a P-MOSFET the load goes to the drain not the source.
The source goes to the plus supply voltage.

Incidentally the common term is ON, not Open, for a transistor that's conducting. ;)
Perfect, very clear basic answer that i've been searching for, for a while now. Thank you! Would you say there is a reason to use a N Channel over a P Channel other than the location of the load when being used as a simple switch? I wouldn't have an issue with wiring either up into my design, is there a 'better' one in terms of how they're made for a switch application?
 

Picbuster

Joined Dec 2, 2013
1,059
Good evening,

I've spent all day studying how MOSFETs work, in particular P-Channel Logic Level MOSFETs. I understand how these work even down to the internal construction and how the P-Channels use holes to flow the power from drain to source. What I just can't come to terms with it how to calculate what voltage I need to apply to the Base to toggle the MOSFET on and off. Like I have said, I have spent all day on MOSFETs and I'm really struggling and its starting to slowly eat away at me now, frustrated itsn't the best description for my emotions right now, it must be admitted.

I'm planning on powering the base through a MCU, at the moment i have it powering with 3v3 but i could change that to 5v if it means having a 5v output is more desirable. Lets take for example the NX3008PBKW P Channel MOSFET. Datasheet is here.

All that I know from here is that my circuitry needs to have a pull-up resistor on the base to make sure the base is not left floating while the MCU boots/is disconnected for some reason. I also know that the load is to be placed in between the source and ground and that the drain is connected to 5v.

This is now where I'm now lost. I'm not asking for someone to do this for me, I'm here to learn. I need to learn the process on how to calculate what is needed and why it is needed to be that value.

If you need to know the load current, its 65mA. The load is a simple PIR motion detection module, datasheet is here.

If there is any more information you require, please ask away. I'm very eager to learn this process but please bare with me as I've been studying it for the past 12 hours and i'm just struggling on this section now. I feel rather pathetic with taking this long but her, we all start somewhere...

Thanks, Sam.
Good evening,

I've spent all day studying how MOSFETs work, in particular P-Channel Logic Level MOSFETs. I understand how these work even down to the internal construction and how the P-Channels use holes to flow the power from drain to source. What I just can't come to terms with it how to calculate what voltage I need to apply to the Base to toggle the MOSFET on and off. Like I have said, I have spent all day on MOSFETs and I'm really struggling and its starting to slowly eat away at me now, frustrated itsn't the best description for my emotions right now, it must be admitted.

I'm planning on powering the base through a MCU, at the moment i have it powering with 3v3 but i could change that to 5v if it means having a 5v output is more desirable. Lets take for example the NX3008PBKW P Channel MOSFET. Datasheet is here.

All that I know from here is that my circuitry needs to have a pull-up resistor on the base to make sure the base is not left floating while the MCU boots/is disconnected for some reason. I also know that the load is to be placed in between the source and ground and that the drain is connected to 5v.

This is now where I'm now lost. I'm not asking for someone to do this for me, I'm here to learn. I need to learn the process on how to calculate what is needed and why it is needed to be that value.

If you need to know the load current, its 65mA. The load is a simple PIR motion detection module, datasheet is here.

If there is any more information you require, please ask away. I'm very eager to learn this process but please bare with me as I've been studying it for the past 12 hours and i'm just struggling on this section now. I feel rather pathetic with taking this long but her, we all start somewhere...

Thanks, Sam.
Attached a small schematic the Pchannel is closed with the 100K resistor when a high is applied to the gate of the nchannel the gate of the pchannel is forced low. This low will switch the pchannel on. Build one on and play around with it and see/measure what happens.

Pchannel use si2369 (sot23)
Nchannel Pmv37en ( sot23)

Picbuster
 

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
Following all of the discussion had here (thank you for all that have commented so far) i'm now strongly sided towards the N-Channel method with 5v to the load then on the Drain, Source is GND and the Gate will be a 0v=Low 5v=High MCU pin. The load current will be 65mA in the form of the PIR Motion sensor and will be turned on and off with the use of setting the output high or low on the MCU. The particular MOSFET i'm looking at is http://uk.farnell.com/nxp/bss138bk/mosfet-n-ch-60v-0-36a-sot23/dp/2053833.

Datasheet: http://www.farnell.com/datasheets/1455134.pdf

Do you guys have any opinions you may wish to add to my selection of MOSFET here? Too expensive for what it is? Too highly specced? Too much resistance on the MOSFET at 5v(1OHM @ 5v VGS)? NXP branding quality?
 

crutschow

Joined Mar 14, 2008
38,528
Following all of the discussion had here (thank you for all that have commented so far) i'm now strongly sided towards the N-Channel method with 5v to the load then on the Drain, Source is GND and the Gate will be a 0v=Low 5v=High MCU pin. The load current will be 65mA in the form of the PIR Motion sensor and will be turned on and off with the use of setting the output high or low on the MCU. The particular MOSFET i'm looking at is http://uk.farnell.com/nxp/bss138bk/mosfet-n-ch-60v-0-36a-sot23/dp/2053833.

Datasheet: http://www.farnell.com/datasheets/1455134.pdf

Do you guys have any opinions you may wish to add to my selection of MOSFET here? Too expensive for what it is? Too highly specced? Too much resistance on the MOSFET at 5v(1OHM @ 5v VGS)? NXP branding quality?
That MOSFET shows a maximum ON resistance of 2.2Ω at a Vgs of 4.5V so is will drop only 0.14V when ON and carrying 65mA.
With that low current you can use just about any MOSFET with a logic-level rated rated ON resistance, so you can likely use the cheapest you can find.
Don't know what you mean by "Too highly specced?".

Whether to use a N-MOSFET or a P-MOSFET is mainly determined by whether you want a high-side or low-side switch.
Generally N-MOSFETs are slightly cheaper for a given ON resistance.
 

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
Awesome, thank you guys! I'm so grateful for the time you have spent explaining things to me.

It's reasonable for your application.

Are you able to solder SMT components?
I am indeed, been soldering 0603 caps, resistors and MCU's for a while now :)

Yes.

Yes. But the FET would be dissipating 4A x 5V = 20W, so would get VERY hot! That's why FETs specified as having a low Rds(on) are normally chosen and are driven with Vgs as big as possible.
That is cool, I know all about the temperatures and the fact you need heat sinks at certain points. Not 100% sure on the method but last time i researched, it seems pretty explanatory. I was just wondering if that number was what the MOSFET can handle if there is enough heat dissipation present.

That MOSFET shows a maximum ON resistance of 2.2Ω at a Vgs of 4.5V so is will drop only 0.14V when ON and carrying 65mA.
With that low current you can use just about any MOSFET with a logic-level rated rated ON resistance, so you can likely use the cheapest you can find.
Don't know what you mean by "Too highly specced?".

Whether to use a N-MOSFET or a P-MOSFET is mainly determined by whether you want a high-side or low-side switch.
Generally N-MOSFETs are slightly cheaper for a given ON resistance.
By "Too highly specced" i meant, am i paying over the odds for what i need it for in this application.
 

eetech00

Joined Jun 8, 2013
4,705
Aren't you going to need to switch the input to the PIR from low to high?

If so, you 'll need to use an NMOS to switch a PMOS. I think post 43 suggested that but I cant see their schematic.

The MCU would switch the NMOS, the NMOS would switch the PMOS, the PMOS would switch the input to the PIR. The mosfets shown in the attached graphic are logic level mosfets.
 

Attachments

Last edited:

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
Aren't you going to need to switch the input to the PIR from low to high?

If so, you 'll need to use an NMOS to switch a PMOS. I think post 43 suggested that but I cant see their schematic.

The MCU would switch the NMOS, the NMOS would switch the PMOS, the PMOS would switch the input to the PIR. The mosfets shown in the attached graphic are logic level mosfets.
I too can't see the schematic which i assumed he meant that he attached. However, i'll be completely honest and risk sounding like a complete idiot, why would i need both? As far as i understood, the voltage i had was enough to turn on and off the N-Channel MOSFET without any issues on the voltages being supplied to the PIR Sensor and therefor i assumed that i could just switch the one MOSFET straight from the MCU Digital HIGH and LOW with a pullup resistor on the MCU pin to the drain to keep it from floating when the MCU is booting/resetting/reprogramming.
 

eetech00

Joined Jun 8, 2013
4,705
Well...to use the mosfet as a switch properly, the load should be connected at the drain side of the mosfet. If you use a single nmos for your application, then the drain would be connected thru a resistor to +v and the load (PIR) would be connected at the junction of the resistor and drain. That would cause the PIR input to be high(+V) when the mosfet is off (no signal from MCU).
If you look at the graphic in #49, the MCU output "SIG" is normally low, so "PG" is high and inverted by the pmos to make "OUT" low.
So when the MCU output transitions from low to high, the input to the PIR will transition from low to high. The resistor labeled "PIR"
represents the current load presented by the PIR.
Isn't that what you needed?
 
Last edited:

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
If you look at the graphic in #49, the MCU output "SIG" is normally low, so "PG" is high and inverted by the pmos to make "OUT" low.
So when the MCU output transitions from low to high, the input to the PIR will transition from low to high. The resistor labeled "PIR"
represents the current load presented by the PIR.
Isn't that what you needed?
I'm confused to why can't just use a single N-Channel and connect gate to my MCU pin, then change its output depending on the state of the pir circuit needed. I'm sorry if i'm being a little dumb and not quite understanding what your trying to get across to me.
 

eetech00

Joined Jun 8, 2013
4,705
I'm confused to why can't just use a single N-Channel and connect gate to my MCU pin, then change its output depending on the state of the pir circuit needed. I'm sorry if i'm being a little dumb and not quite understanding what your trying to get across to me.
You mean program the MCU output to be normally high?
Doesn't the PIR require an input signal that transitions from low to high to turn it on?
 

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
You mean program the MCU output to be normally high?
Doesn't the PIR require an input signal that transitions from low to high to turn it on?
I was thinking that i could program the MCU pin to be High or Low to feed either 5v or 0v to the gate of the N-Channel MOSFET which would then turn the MOSFET on and off, therefor turning the PIR Sensor on or off.
 

eetech00

Joined Jun 8, 2013
4,705
I was thinking that i could program the MCU pin to be High or Low to feed either 5v or 0v to the gate of the N-Channel MOSFET which would then turn the MOSFET on and off, therefor turning the PIR Sensor on or off.
Ok... I understand.
As long as you account for the mosfet output behavior during MCU reboot.
 

Thread Starter

Sam Matthews

Joined Jan 16, 2016
178
Ok... I understand.
As long as you account for the mosfet output behavior during MCU reboot.
I would address this via a pullup/pulldown resistor to the 5v line or to the gnd line. I haven't chosen if i want the MOSFET on or off which the MCU reboots. But do you think my idea is correct?
 

N5KS

Joined Apr 17, 2016
11
Sam,
From your original post, I totally understood what you were trying to accomplish. I decided to go through the process myself, documenting how I solved the problem you are facing. Here is my way of solving the problem:

1. I like to switch ground to a load by using a N Channel MOSFET, primarily because it is easier to meet the Vgs with the 0V and 5V from a typical MCU, and switch the ground for any voltages up to the maximum Vds.

2. I am familiar with the every popular 2N7000/2N7002, and it fits well with your application of switching 5V to a circuit that will draw 65mA. Checking Mouser from prices, a 2N7002 runs 13 cents in single unit quantities vs 19 cents for the BSS138 that you are looking at.

3. I made an assumption that the PIR device will be off by default. This requires the NMOS device to be off by default i.e. the gate is a voltage level 0. To meet this requirement, I used a 4.7k resistor to ground on the gate of the MOSFET.

4. I built the circuit in LTSpice IV, to verify the power dissapation to expect. I had calculated around 10mW, and LTSpice shows a little over 9mW, with spikes at turn on and turn off time. The spikes reach about 85mW and last about 700uS. Well within the power dissipation rating of the 2N7002.

As a followup to why I prefer to use ground switching with the N channel MOSFET vs positive voltage switching with a P channel MOSFET. Lets say you are trying to switch 36V to a circuit. The 36V is tied to the source of a P channel MOSFET. If the gate is also at 36V, the device is off. Lets say the Vgs threshold is -1V and the maximum Vgs is -20V, you would have to put a minimum of 16V, and a maximum of 35V on the gate to turn it on. Of course, the 16V level is better than 35V in this case. If you switch the ground with a N channel MOSFET, then you can use the 0V and 5V levels of a MCU to control your load.
 

Attachments

Top