Capacitor on gate of MOSFET

Discussion in 'General Electronics Chat' started by johndeaton, Aug 19, 2016.

  1. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    Hi All,

    I'm using a MOSFET for a low side switch to turn on LEDs. One of my colleagues told me that I needed a capacitor between the gate and ground. I don't understand why. I asked, but I got the "that's the way it's done" type answer. Can someone explain it please?

    Thanks,
    John

    Capture.JPG
     
  2. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,672
    899
    It simply slows the turn on while the capacitor is charged through R15 and slows the turn off via R9 (1 ms time constant), unless the drive also sinks current, which is likely.

    No law against doing it in this case, but why do you want to heat your mosfet, despite how little that heating is?

    John
     
    johndeaton likes this.
  3. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    That makes sense. Makes me wonder why he suggested that I use it in this case. Good point about the consequence of heating up the FET. I'll dig in to this a little more. Thanks for your reply.

    John
     
  4. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,301
    879
    I don't see the point of having C14 there, either. If you wanted to slow down the ON/OFF switching of Q2 (for whatever obscure reason), all you would have to do is increase the value of R15 and let the MOSFET's own Miller Effect capacitance do the job for you.

    BTW, be aware that directly paralleling LEDs, with out some means of ensuring current sharing (e.g., ballast resistors), can lead to uneven brightness among the LEDs unless they are pretty closely matched for forward voltage at the intended ON current.
     
    johndeaton and cmartinez like this.
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,767
    1,102
    Btw, the LEDs should have current-limiting series resistors. It is inadvisable to connect the LEDs directly in parallel unless you can be sure they have evenly matched forward voltage values.

    Edit: OBW beat me to it!
     
    johndeaton and OBW0549 like this.
  6. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    One of the worst reasons in the world to do something is "that's the way it's done". :rolleyes:
    That certainly appears to be the case here because I can see no other reason to do it.
     
    wayneh, johndeaton and cmartinez like this.
  7. ElectronicMotor

    Member

    May 1, 2016
    53
    6
    I've kind of jumped in at the end, but u want to charge that gate-source capacitor as fast as u can man
     
    johndeaton likes this.
  8. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    Is the capacitor there, because the LED ENABLE is intended to be PWM and the cap would serve to average out the pulse voltage?
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    Not likely.
    If you want to PWM the LED brightness then you would apply the PWM digital signal directly to the MOSFET gate so that the MOSFET is operating in the high efficiency switch-mode.
     
    johndeaton likes this.
  10. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,506
    Yes, by all means do remove C14, it serves no practical purpose. Also, the value of R9 seems a bit high to me, you need to bring it down to let the mosfet turn off a bit faster. But it also depends on what voltage you're applying at the gate. Is it a logic level gate mosfet, or an ordinary 10-20V mosfet?
    I'd use 10k for R9 if the former, and 47k if the latter.
     
    johndeaton and OBW0549 like this.
  11. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,672
    899
    Also, persistence of vision (POV) will average out the intensity so you will not perceive flicker, assuming the PWM frequency is high enough, which rarely is a problem. Most people don't see the flicker of 60 Hz fluorescence bulbs.
    John
     
    johndeaton likes this.
  12. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,506
    I do, sometimes... and it gives me a headache when that happens... ugghhh :confused:
     
  13. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    It is a logic level mosfet. What is the reason for the different values?
     
  14. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,672
    899
    Without the capacitor there, it will be hard to tell without an oscilloscope the difference in turn-off time. Use what you have for R9.

    John
     
  15. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,506
    The difference between an ordinary nfet and a mosfet is that the former works by applying a current that flows through the base, while the latter works by applying a voltage to its gate.

    That is, you need current in order to get the nfet started, and to keep it going. In the case of the mosfet, once you apply a voltage to its gate, it stays that way until you remove it. You could say that the nfet's base behaves like a resistor, while the mosfet's gate behaves like a capacitor.

    In simple words: the mosfet's gate is like a capacitor that needs to be charged to a certain potential for it to work. After that, you could disconnect the gate from the circuit, but the gate would stay charged and the mosfet would be active until the gate is discharged again, which in theory, could take forever. That's why you need a resistor between the gate and ground (in the case of an n-mosfet), so that the gate will discharge once the voltage is removed.

    That resistor could have almost any value, really. But if it's too high, then the gate will take much longer to discharge and therefore the mosfet will stay on for too long when you try to turn it off (unless you're using a push-pull circuit to switch it, but that's another story). But if the resistor is too low, then your voltage source will need to maintain more current through that resistor than needed to keep it on.

    So if you're switching a logic-level gate type of nFet (5V), and you were to use a 10k resistor between the gate and ground, then you'd need to source 5V/10,000Ω = 0.0005A (half a milliamp) to keept it going, which is easy for most MCU's outputs, for instance. But if you were to apply 12V (like most nFets require) to that same configuration, your source would be delivering 1.2 mA instead just to keep it on. And in the long run that would be a strain to some circuits, especially if they're running on batteries. Also 12V*0.0012A = 0.014W. Personally, I think 14 mW is a waste of power on that sort of application. That's why I'd recommend 47K when switching the gate with 12V.

    For practical purposes a balance between stay-on current and switch-off time has to be reached.

    Also, unless you're doing mid to high frequency PWM to switch the nFet, so as to control the LED's brightness, you don't really need R15. If you're only switching the LEDs on and off over long periods of time (say more than 0.1 sec) then you can do away with that 100Ω resistor.
    R15 is there to minimize ringing at the gate due to large variations of current when it's switched at higher frequencies.

    Just visualise the nFet's gate as if it were a capacitor (and in a way, it is), and things will become much clearer in your mind.
     
    Last edited: Aug 20, 2016
    johndeaton likes this.
  16. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,506
    Yes, R9 at 1M is fine if he's not planning to use PWM. I wonder, what would the Fet's switch-off time be with that value of R9?
     
  17. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,672
    899
    You can get a feeling for that time by calculating the RC time constant using the gate capacitance, the turn off resistor (1M) and the driver's effective sink resistance (unknown) in parallel with that 1M resistor. In this application, I just assumed it didn't matter.

    John
     
    cmartinez likes this.
  18. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,554
    2,506
    True, the original diagram doesn't clarify if it's a push-pull or an open collector type of driver.
     
  19. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3

    This was an great explanation! Really makes a lot of sense.

    I am using a 15kHz PWM from a MCU to dim the LEDs. Is 100 ohms a good value for this application?

    Edit: It is a push-pull output if that makes a difference.
     
  20. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,301
    879
    WHAT??? What is this "nfet" thing of which you speak? Is this some new type of semiconductor device I've never heard of or encountered?

    As far as I know, the term "NFET" is nothing more than shorthand slang for "N-channel MOSFET", which takes longer to type. NFETs are MOSFETs. There is absolutely no difference between the two; they are simply two terms for the same thing. NFETs don't have bases, and they aren't current-driven, because they are MOSFETs.

    "Logic-level" MOSFETs are nothing more than MOSFETs with a gate turn-on threshold voltage sufficiently low as to make them easily driven by logic-level signals such as from a microcontroller output pin. There is no other inherent difference between logic-level MOSFETs and other MOSFETs, nor is there anything special about them other than their low gate turn-on threshold.

    As for that 1 megohm resistor under discussion, the ONLY reason it is included is to provide a means for preventing the MOSFET's gate from floating high during the brief period between power-up and the time at which the driving microcontroller has put its output pin into output mode and loaded a value into the associated output register-- in other words, it's there to prevent circuit faults on startup, and has no function once the system has been initialized. It has no other purpose, and it has nothing to do with PWM vs. non-PWM, it has nothing to do with MOSFET turn-on or turn-off time, and its value is completely unimportant given its mission. The reason such resistors are usually of very high value, in the hundreds of kΩ or higher, is simply that there is no need for them to be any lower, for to make them lower would merely waste drive current for no good reason.

    Perhaps someone with more experience than I will correct me; but I do believe that is the way it is.
     
    tom_s, wayneh and cmartinez like this.
Loading...