Connect with us

MOSFET’s dynamic state current and Arduino I/O pins

Discussion in 'Microcontrollers, Programming and IoT' started by Smooth, May 4, 2019.

  1. Smooth

    Smooth

    5
    0
    Jan 2, 2017
    Oi!

    I am using an N-channel MOSFET (IRFZ24) to turn on a set of LEDs+other stuff (powered from 12V). Drain of the MOSFET is connected to the LEDs, source is grounded, and I use an Arduino’s digital pin to give either 5V or 0V to the Gate.

    My question is about amps and burning. From their data sheets, Arduino can only handle 40mA through I/O pins. Now, while the MOSFET would draw practically nothing while in a static state, the dynamic state bothers me. Looking at page 2 of the MOSFET’s data sheet, the rise time is 58ns, and since I need to charge the gate by ~10-20nC, the current = dC/dt ~ 10/58 ~ 0.2A, higher than 40mA, hence I am killing the I/O pin.

    Is my logic above correct? Am I gonna draw that much current? Would that fry my I/O pins? If no, why? If yes, what can I do to prevent that? Would throwing in a resistor to the Gate help (kinda like an RC circuit logic)? Am I being overly paranoid?

    I’d really appreciate any advice and enlightenment:) I am just a student seeking understanding; and I don’t want to burn **another** Arduino.

    Cheers,
    Savva
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    8,994
    1,785
    Nov 17, 2011
    The input capacitance of the MOSFET is 640 pF. While the gate drive current will not destroy the arduino unless operated repeatedly at a high rate or frequency, the usual method is a series resistor to limit the current:
    upload_2019-5-4_10-6-34.png
     
    Smooth likes this.
  3. Bluejets

    Bluejets

    3,288
    652
    Oct 5, 2014
    That would be an absolute maximum and even at that is also governed by other design features.

    It is possible to simply drive the gate of the mosfet via an everyday transistor which in turn is driven by the uC thus avoiding any problems you imagine.
     
  4. BobK

    BobK

    7,542
    1,612
    Jan 5, 2010
    In reality, the I/O pin is self limited by something like 100 Ohms output resistance, so the gate will never get anything like the 200mA you calculate. And it will survive that unless you are switching at at high frequency.

    Add another 220 Ohms and it will absolutely limit the current below the max, but I do not see the need for that. I have directly connected PIC pins to MOSFET gates all the time and have never experienced any problems.

    Bob
     
    Smooth and Bluejets like this.
  5. Smooth

    Smooth

    5
    0
    Jan 2, 2017
    @BobK @Bluejets and @Harald Kapp thank you very much for the inputs! I will put a series resistor for the sake of it, as a precaution. Indeed, I realized that I've been driving MOSFETs with an Arduino and never burnt anything; and then that thought popped up. Cheers!!
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-