Author Topic: P Channel Mosfet not switching at higher voltage.  (Read 5406 times)

0 Members and 1 Guest are viewing this topic.

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
P Channel Mosfet not switching at higher voltage.
« on: September 11, 2020, 03:54:19 pm »
I happened across some P channel mosfets, and I was trying to get them to work, but no matter what I do, I can't get it to shut off voltage to the load.

I have attached schematics of both ways I have attempted to get this working.  I don't see any activity on the LED until I bring the input voltage (Where it says +12V) down to around 5 volts.  I can't get it to drop to where the LED seems like it might be completely off until around 3.3 volts, which is the lowest my power supply will go.

Here is the datasheet for the mosfet:  https://www.vishay.com/docs/91076/sihf9530.pdf

What am I doing wrong?

To clarify what I am attempting, I want the LED to be off until a high signal is applied to the gate.  Ultimately I want to control the mosfet with a microcontroller at 5 volts.
« Last Edit: September 11, 2020, 03:56:13 pm by PoDuck »
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #1 on: September 11, 2020, 04:35:23 pm »
You have two basic problems.

First, if you "want the LED to be off until a high signal is applied to the gate", you need to use an NFET, not a PFET. Your PFET's turn on when the gate goes negative relative to the source. This is why the spec sheet's Product Summary gives a value for its on resistance (RDSon) when the gate-to-source voltage (Vgs) is at -10V (note the negative polarity, meaning the gate is at a lower voltage than the source).

The traditional way to turn off a switching FET is to bring its gate to the same voltage as its source. In your case, with the PFET's source connected to +12V, that would mean the gate would be at +12 too. Then, when you want the PFET to start conducting, you bring its gate to a lower voltage. How much lower? The spec sheet uses -10V in their product summary, which is a pretty strong clue! That would mean the gate would be pulled down to at least +12 - 10 =) 2V above ground in your circuit. And since the spec sheet also says the gate is good for +/-20V, you'd be just fine pulling it all the way down to ground which the gate would perceive as -12V relative to the source.

However, all of this means the LED would be off until a LOW signal is applied to the gate - the opposite of what you've stated as your goal. Helpfully, an NFET's gate polarity is just the opposite: It turns off when its gate is positive relative to its source. Hence why you really want an NFET to achieve the polarity you seek.

Your second problem, however, is an issue regardless of which type of FET you use. You say you "want to control the mosfet with a microcontroller at 5 volts", but you're running the FET from a 12V rail. To turn the FET fully on, or fully off, you need to swing its gate as far as possible (to ground, or to its source voltage). This means you need 1) a FET that specifically has a logic-level gate threshold voltage, or 2) a gate driver transistor to isolate your MCU's pin from the +12V that the gate resistor will expose it to, or 3) to drive the LED from the 5V rail used by your MCU.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #2 on: September 11, 2020, 05:22:35 pm »
Your schematic is a mix of both N-Channel and P-Channel.
For one, you want to use a P-Channel MOSFET but show a N-Channel.

Here are both configurations:

 

  For the N-Channel case, you need a logic level MOSFET for the 'high' logic level to turn it 'on'.

  For the P-Channel case, you need the logic to switch between 'low' and 'high impedance' which depends on the pull-up resistor to turn 'off' the MOSFET.  The input needs to go to 12V to turn 'off' the MOSFET.  (i.e. Slow turn 'off')
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #3 on: September 11, 2020, 06:05:10 pm »
It appears I posted the same picture twice.  I attached a second picture here, where I am using an NPN to change the gate voltage.

I am using a pfet because ultimately I want to control lights in a car, where the lights will be grounded to the chassis remotely from the circuit, which means I need a high side switch.  I tried nmos transistors for this in a high side switch configuration, but the circuit could not be powered without sending power down the line while the capacitor charged up, which is a bad thing for my purposes.

Anyway, it appears that what I am doing should still work, at least with the transistor.  The problem is, it is not working.  No matter if the gate is pulled to ground or to 12 volts, some voltage still gets through to turn on the LED.  This happens even when I control that directly.  Why would that happen?
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #4 on: September 11, 2020, 06:07:28 pm »
MarkF, I didn't notice that.  I guess I used the wrong symbol.  I'll fix that in my schematic, but the problem still remains.

Anyway, I'm going to fiddle with it after a bit and see what else I can learn about what is going on.

Thanks.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #5 on: September 11, 2020, 06:20:07 pm »
From your schematic, it appears that your source and drain are reversed.

The source needs to connect to 12V and the drain to the LED.

 
« Last Edit: September 11, 2020, 06:34:29 pm by MarkF »
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9507
  • Country: gb
Re: P Channel Mosfet not switching at higher voltage.
« Reply #6 on: September 11, 2020, 06:21:37 pm »
The circuit, as you show should work as shown (aside from the mosfet symbol being wrong as already mentioned - [EDIT: and that you haven't got the Source and Drain connections reversed as MarkF says]). I suspect finger trouble - most likely accidental connection of the 10k pullup resistor to the 5V rail rather than the 12V one.

Just a note if you are planning to use this configuration in an automotive situation. The Absolute Maximum Vgs of the IRF9530 (and most other mosfets) is +/- 20V. This will be very easily exceeded by transients on the 12V supply. You will need to add a protective Zener between the +12V and mosfet gate and add a series current limiting resistor between the gate and the collector of the 2N3904.

Edit: Noise.
« Last Edit: September 11, 2020, 07:13:36 pm by Gyro »
Best Regards, Chris
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #7 on: September 11, 2020, 06:40:11 pm »
The circuit, as you show should work as shown (aside from the mosfet symbol being wrong as already mentioned - [EDIT: and that you haven't got the Source and Drain connections reversed as MarkF says]). I suspect finger trouble - most likely accidental connection of the 10k pullup resistor to the 5V rail rather than the 12V one.

The drain and source are definitely reversed for the P-Channel MOSFET.
The IRF9530 is a P-Channel.  Not the N-Channel symbol he shows.
 
The following users thanked this post: PoDuck

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9507
  • Country: gb
Re: P Channel Mosfet not switching at higher voltage.
« Reply #8 on: September 11, 2020, 06:50:05 pm »
Maybe, it depends whether he actually wired the package pins as shown. I'm just surprised that it would work at all that way - at best the LED state would be the opposite of what is expected for the logic output.


Edit: Noise.
« Last Edit: September 11, 2020, 07:13:58 pm by Gyro »
Best Regards, Chris
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #9 on: September 11, 2020, 06:50:58 pm »
Just a note if you are planning to use this configuration in an automotive situation. The Absolute Maximum Vgs of the IRF9530 (and most other mosfets) is +/- 20V. This will be very easily exceeded by transients on the 12V supply. You will need to add a protective Zener between the +12V and mosfet gate and add a series current limiting resistor between the gate and the collector of the 2N3904.
This is 100% true but I didn't mention it in my original response because I didn't want to add further complexity to his situation until he gets the basic circuit working.

I've fried driver transistors due to the inrush current charging/discharging the gate capacitance of power MOSFET's. Even WITH a gate resistor. And depending upon how that transistor fails, it can take out the MOSFET if the latter is then held in its "linear" range. The value of the gate resistor on a power MOSFET is not just some rule-of-thumb value, it needs careful consideration including actual scope analysis of what the gate voltage and drain current are actually doing with the intended load. There are all sorts of tradeoffs to be made in terms of turnon/turnoff speed, heat dissipation, specs on the driver transistor(s), etc.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #10 on: September 11, 2020, 07:10:32 pm »
Maybe, it depends whether he actually wired the package pins as shown. I'm just surprised that it would work at all that way - at best the LED state would be the opposite of what is expected for the logic output.

He says the LED stays 'on' all the time.
(i.e.  The body diode always conducts when the source and drain voltage is reversed.)
 
The following users thanked this post: Gyro, IDEngineer

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11653
  • Country: my
  • reassessing directives...
Re: P Channel Mosfet not switching at higher voltage.
« Reply #11 on: September 11, 2020, 07:57:00 pm »
basic 101 ;D

get that one right first so my magic ball stop spinning eratically.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #12 on: September 11, 2020, 08:04:26 pm »
He says the LED stays 'on' all the time. (i.e.  The body diode always conducts when the source and drain voltage is reversed.)
Bingo. He needs to insure his basic wiring is correct first. Nothing will work at all until he starts there. THEN we can start worrying about input polarity, high vs. low side, etc.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #13 on: September 11, 2020, 08:48:56 pm »
Okay everyone, for some reason I got the drain and source mixed up.  That fixed the problem.  Thanks.
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #14 on: September 11, 2020, 09:07:33 pm »
Excellent.

Now, go back and read everyone's comments. You've gotten some good advice in this thread. Just because it appears to work with an LED doesn't mean you're done. For example, the LED draws current in the milliamps but if you intend to drive headlights there will be a lot more current flowing. If you don't insure that you're turning that FET on hard, into its minimum RDSon area, you have a strong likelihood of burning up the FET. This is why at least two of us mentioned that you either need a logic-level gate FET or a gate driver FET, because your 5V MCU cannot itself drive 12V and if you use a pullup to 12V you'll likely kill the MCU itself.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11653
  • Country: my
  • reassessing directives...
Re: P Channel Mosfet not switching at higher voltage.
« Reply #15 on: September 11, 2020, 09:23:38 pm »
he already got it at a silver plate from MarkF..
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #16 on: September 11, 2020, 10:05:09 pm »
Just because it appears to work with an LED doesn't mean you're done. For example, the LED draws current in the milliamps but if you intend to drive headlights there will be a lot more current flowing.

That is correct.  I will be driving as much as a 1 amp bulb with this.  The FET should handle it, but I did intend on going through a driver transistor.  The one I had easily at hand was a pn2222a, so I popped one in there, and something similar happens.  The LED stays lit until I lower the voltage to around 8 volts.  When that didn't work, I pulled out a KSC2073, and it seems to work fine.  I always used the pn2222a with 5 volts, and it always worked.  Never tried 12 volts with it.  Apparently it doesn't like my application.

Anyway, what should I be looking for on a spec sheet to know what transistor will work given a logic level gate voltage and a 12V collector voltage?  I am pretty sure the KSC2073 is more transistor than I need, as I shouldn't be pulling much current keeping the FET driven.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #17 on: September 11, 2020, 10:50:21 pm »
The max emitter-base voltage for the pn2222a is 6V.

If you drove the base voltage to 8V and higher, the pn2222a is probably dead.

If you tie the base to GND, the LED should be 'off'.
At 5V on the base, the LED should be 'on'.  You may need to adjust the values of the two 10K resistors to get the correct voltage on the MOSFET gate.
« Last Edit: September 11, 2020, 11:00:45 pm by MarkF »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11653
  • Country: my
  • reassessing directives...
Re: P Channel Mosfet not switching at higher voltage.
« Reply #18 on: September 11, 2020, 11:23:25 pm »
The max emitter-base voltage for the pn2222a is 6V.
i think that means reversed biased. minimum of Vbe is -6V.. imo its advisable to increase base resistance to like 1Kohm so even if driven from 12V, the 12mA Ib (0.3V Vbe drop in common emitter setup) will not exceed the maximum Ibe which is not shown in the maximum rating table...
« Last Edit: September 11, 2020, 11:30:30 pm by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #19 on: September 12, 2020, 12:17:26 am »
At 5V on the base, the LED should be 'on'.  You may need to adjust the values of the two 10K resistors to get the correct voltage on the MOSFET gate.
I would put a resistor in series with the gate and remove the "lower" 10K resistor (e.g. make its value zero). That way the gate would swing the entire Gnd-Vdd voltage range, insuring the FET is either fully off or fully on. Then tune those resistor values for desired turnon/turnoff behavior. The series gate resistor will protect the driver transistor from outrush current as the gate capacitance is discharged.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11653
  • Country: my
  • reassessing directives...
Re: P Channel Mosfet not switching at higher voltage.
« Reply #20 on: September 12, 2020, 03:45:40 am »
At 5V on the base, the LED should be 'on'.  You may need to adjust the values of the two 10K resistors to get the correct voltage on the MOSFET gate.
I would put a resistor in series with the gate and remove the "lower" 10K resistor (e.g. make its value zero). That way the gate would swing the entire Gnd-Vdd voltage range, insuring the FET is either fully off or fully on. Then tune those resistor values for desired turnon/turnoff behavior. The series gate resistor will protect the driver transistor from outrush current as the gate capacitance is discharged.
no need tuning, just look at the mosfet datasheet at what Vgs it will maxed out and use voltage divider formula to figure out reistance value. if you put 0 ohm, be aware some mosfet Vgs cant swing as large as its Vds, some of them maxed to half Vds, you miss that, you burn a mosfet.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #21 on: September 12, 2020, 08:11:08 am »
At 5V on the base, the LED should be 'on'.  You may need to adjust the values of the two 10K resistors to get the correct voltage on the MOSFET gate.
I would put a resistor in series with the gate and remove the "lower" 10K resistor (e.g. make its value zero). That way the gate would swing the entire Gnd-Vdd voltage range, insuring the FET is either fully off or fully on. Then tune those resistor values for desired turnon/turnoff behavior. The series gate resistor will protect the driver transistor from outrush current as the gate capacitance is discharged.


Edit:  Schematic updated
« Last Edit: September 12, 2020, 09:17:24 pm by MarkF »
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #22 on: September 12, 2020, 01:09:00 pm »
R2 does not have to be as high as 10K. For small FET's with low gate capacitance 10R can work fine. But having that "lower" resistor creates a voltage divider that prevents the gate voltage from ever reaching zero (and in this circuit you'll already suffer the drop across the NPN). If turnon vs. turnoff speeds are an issue you can always use one, or two, cheap small signal diodes to control each individually.
« Last Edit: September 12, 2020, 01:10:55 pm by IDEngineer »
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #23 on: September 12, 2020, 02:03:44 pm »
R2 does not have to be as high as 10K. For small FET's with low gate capacitance 10R can work fine. But having that "lower" resistor creates a voltage divider that prevents the gate voltage from ever reaching zero (and in this circuit you'll already suffer the drop across the NPN). If turnon vs. turnoff speeds are an issue you can always use one, or two, cheap small signal diodes to control each individually.

For a P-Channel MOSFET, it does NOT matter if the gate voltage reaches zero.
But the difference between 12V and the gate voltage. 
The MOSFET will be fully 'on' long before the gate voltage reaches zero.
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: P Channel Mosfet not switching at higher voltage.
« Reply #24 on: September 12, 2020, 02:22:35 pm »
Within gate voltage specs, the more negative you can pull the gate the lower the RDSon. There is no reason not to pull the gate as far negative as possible. YMMV.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf