0
\$\begingroup\$

The goal of the circuit below is to use a PMOS to turn an NMOS on and off which will blink the LED. A microcontroller is providing the square signal. Both MOSFETs are logic level and when I use them individually with the LED the behavior is what I expect. However in the circuit below when I send 5V to the gate of the PMOS the LED will just remain ON, but I expect it to turn off. Is it incorrect to wire the drain of a PMOS to the gate of an NMOS?

enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ YOu need a drain resistor on the gate of M1. \$\endgroup\$
    – Trevor_G
    Mar 17, 2017 at 19:23
  • 1
    \$\begingroup\$ A 5V square wave from microcontroller can toggle the gate of a logic level MOSFET, if you connect it directly to M1. Why do you need the P-channel MOSFET? Is it there only for the [admirable] purpose of learning ins and outs of different kinds of MOSFETS? \$\endgroup\$ Mar 17, 2017 at 20:28
  • \$\begingroup\$ It was for the case that I have multiple LEDs and I want to control them with a single arduino pin. I know that MOSFETs are voltage controlled switches, but turning the NMOS on and off at a high speed would draw some current from the microcontroller(not sure exactly how much). I was afraid that this current(accumulated for multiple NMOSs) would be too much for a single arduino pin so I thought a high side PMOS switch attached to a separate 5v supply doing the controlling would be safer. \$\endgroup\$
    – tinker102
    Mar 17, 2017 at 20:44

1 Answer 1

1
\$\begingroup\$

You need a drain resistor on the gate of M1. And by drain, I mean from the gate to ground.

The gate has a capacitance that needs to be drained off or the channel will remain open. Select a resistor size that will drain that in the order of magnitude of time that is reasonable for your application.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Thank you, that did solve the issue. I'm just curious, when I was using the NMOS only with LED and had the microcontroller connected to the gate, I didn't add a drain resistor and the LED was switching fine. Is it proper to still have a drain resistor in that configuration? \$\endgroup\$
    – tinker102
    Mar 17, 2017 at 20:23
  • 1
    \$\begingroup\$ @tinker102 It was fine before because the micro has a push-pull output so no bleed resistor was required. IN this version you basically have only push. \$\endgroup\$
    – Trevor_G
    Mar 17, 2017 at 20:45

Your Answer

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

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