Need help with P-MOS high-side switch - Page 1
Forum section: electronics / beginners

author: ttodorov
author_rank: Regular Contributor
timestamp: September 14, 2022, 04:31:45 am
content: Hi everyone,I am using a P-channel MOSFET as a high-side switch to power a string of LEDs from a +12V rail via a MCU. The gate of the power MOSFET is driven by a N-channel MOSFET, which buffers the MCU pin. Please see the attached screenshot of the schematic, as well as the picture of my test implementation of the circuit.When I tested out the circuit I noticed a problem. When the gate of the low-power N-MOS is driven HIGH, I see the expected 12V OUT on the drain of the P-MOS. However, when the MCU pin is LOW, I still see about +4V on the drain of the power MOSFET...Why?When I measured the resistance between the GND pad and the drain pad of the N-MOS (mistakenly marked with "C" on the test circuit), I got something in the range of 69 Mohm, so I am really not expecting any leakage between the drain and source of the small mosfet - at least not enough to provide 4V through the power mosfet...Can someone spot my error or offer a suggestion how to fix this?

author: ledtester
author_rank: Super Contributor
timestamp: September 14, 2022, 05:08:31 am
content: Did you have any load connected to VDDF when you performed the test?

author: ttodorov
author_rank: Regular Contributor
timestamp: September 14, 2022, 05:22:29 am
content: Quote from: ledtester on September 14, 2022, 05:08:31 amNope, just my multimeter.

author: jwet
author_rank: Frequent Contributor
timestamp: September 14, 2022, 05:42:40 am
content: A few problems that I can see. Your PMOS is a very low threshold device that has a threshold of .7v. The 100 ohm load on your NMOS driver is too low- try something like 4.7K. The FET will turn on with the on resistance of the NMOS, this R is just to pull up on the PMOS and doesn't need to be so stiff. The other issue related to above is that the Max VGS for the FET is +-12v. I don't know how well regulated your 12v is but this is an abs max and you shouldn't be close to it. Add a 10v zener or some limiter to keep from driving the gate to ground. If you put too much gate voltage on FET, it will punch through the oxide and short out. You probably don't need a low threshold PMOS here. Get something with a 20v gate rating and a threshold of 3 or 4 volts. This FET is never turned off for the two reasons above.

author: ttodorov
author_rank: Regular Contributor
timestamp: September 14, 2022, 06:10:06 am
content: Thanks for the answer - some of it I understood, some of it is clear as mud.Quote from: jwet on September 14, 2022, 05:42:40 amMy bad - I am not actually using IRF7404, but IRF7416. KiCad did not have my part and I was too lazy to use a generic one and assign all of the attributes, so I went with IRF7404 on the schematic, which has the same footprint. The actual one I am using is 20V gate-to-source voltage, so it is fine in my application. In addition, the threshold is min 1v. max 2.4V - is that good enough, or do I need something with Vgsth in the range of 4V and up?Thanks!

author: jwet
author_rank: Frequent Contributor
timestamp: September 14, 2022, 06:19:50 am
content: No problem with that FET- that solves the Vgs max problem- back off on the 100 ohm pullup to something reasonable and you'll probably be good- 4.7K to 10K.

author: jwet
author_rank: Frequent Contributor
timestamp: September 14, 2022, 06:23:28 am
content: You also want to put some kind of reasonable load maybe a few mA (10K?). A DVM has such a high impedance (10M usually) that any leakage will turn it on. If you have 4 volts into a 10M load, you're only leaking a few uA- probably working. Pull the output down with real load.

author: ttodorov
author_rank: Regular Contributor
timestamp: September 14, 2022, 06:39:14 am
content: The 100 ohm resistor is my boneheaded mistake. For whatever reason I was thinking that some current needs to flow through the N-MOS, so the resistor was to limit said current to the safe 120mA for the 2N7002.When you consider that the N-MOS is there only to isolate the MCU pin and not power anything, 10k resistor makes perfect senseAnyway, I replaced that resistor with a 10k on my test circuit and added another 10k as load and I finally get the expected measurements. Never even considered that my multimeter is sensitive enough to measure leakage currents and potentialThank you for helping me solve this!

author: jwet
author_rank: Frequent Contributor
timestamp: September 14, 2022, 07:11:20 am
content: say thanks in the forum- I get bit of a kick out of seeing how many thanks I've received.

author: IDEngineer
author_rank: Super Contributor
timestamp: September 14, 2022, 03:54:39 pm
content: Footnote: I recommend putting R230 on theupstreamside of R229. What you've presently created there is a voltage divider, which means the gate of the 2N7002 does not swing the full dynamic range of the input signal. It "may not matter" in many cases but it's a common habit.Think of the pulldown as a substitute for the MCU input signal (in case it tri-states or is unconfigured at powerup). Your value of 1K indicates you're not relying on it to discharge the gate; presumably you're expecting the sink current of the MCU pin to do that just as you're expecting its source current to charge the gate. Thus R230 is insurance, in which case don't let it create a divider... put it back at the MCU pin, the thing it's insuring.If you're using a MOSFET as a switch, you want to turn it on and off as hard as possible. A voltage divider works against that goal.