I have a signal provided by an Attiny (in this case I am using an Arduino to simulate the signal). It's digital out, so HIGH and LOW. I pass this through a NOR Gate to invert the signal.

When I simulate this circuit, the Drain of the MOSFET is always +18v. It completely ignores the signal at the Gate. I expected the Drain to switch between +18v and 0v, but it remains at +18v. Now, if I disconnect the gate (delete the conection and leave it without connecting), the MOSFET will remain switched off.

How come my digital signal at the Gate is not switching the MOSFET on and OFF? I've looked at many sample circuits and I can't seem to see where I'm going wrong with it. The signal from the NOR gate outputs at +5v so it should be enough.

NOTE: The reason I am using this configuration with a P-Channel MOSFET is that I will be filtering the output square wave to sine, so the Load needs to be after the MOSFET.

enter image description here

  • 3
    \$\begingroup\$ Output of 4001 doesn’t allow the Q2 gate go to 18V during Q2 off. The 4001 is holding the Q2 gate at 4001 Vcc. Remove Nor and use NPN Bjt instead. \$\endgroup\$ Commented Nov 20, 2023 at 0:44
  • \$\begingroup\$ What is the 4001 powered by? \$\endgroup\$ Commented Nov 20, 2023 at 2:37

1 Answer 1


You have the NOR gate outputting 5V which, as Michal Podmanický said, is not high enough to turn off the transistor. Enhancement mode FETs need to have zero (or near-zero) voltage relative to the source to turn off; the +5V relative to ground that you are applying when the NOR gate's output is high is -13V relative to the source, so it is very much still on (Vth for the IRF5305 is -3V or so).

Note also that you cannot power the 4001 off of 18V and drive the input with 5V; the Vih (input high signal voltage) threshold for 15V supply is minimum 11V, so that just shifts the problem from the PFET's gate to the NOR gate's input.

Fortunately the fix is easy: replace R5 with a 2N3904 or similar NPN transistor, and drive the base with the Arduino through, say, a 10k resistor. The PFET will be conducting when the Arduino's output is high, rather than the other way around as it looks like you were trying to do with the NOR gate, but that should be a simple change to your code.


simulate this circuit – Schematic created using CircuitLab

  • 1
    \$\begingroup\$ For completeness: The "top end" of FET/BJT Q1 will be raised all the way to the power rail voltage. So it has to be a part with high enough breakdown voltage. Likewise, the PFET pass transistor must be able to endure the same voltage as gate-source voltage. There are some parts, that can't do 18 V, and more that can't do e.g. 24 V. \$\endgroup\$
    – tobalt
    Commented Nov 20, 2023 at 6:20
  • 1
    \$\begingroup\$ Replacing R5 with a transistor did the trick, and your reasoning was crystal clear. Thank you so much. \$\endgroup\$
    – kissumisha
    Commented Nov 20, 2023 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.