Another N channel enhancement mode MOSFET driven directly by a PIC12F629


+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2013
    Location
    Northern California
    Posts
    9

    Default Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    I have had success using the 12F629 at 5v to replace the 555 and now am looking at driving the
    load - 30 red LED's at 20mA for a total of 600mA - with a logic level power MOSFET - Fairchild
    FDD8778 in a TO252 package. The gate capacitance is nominally 700pF and nominal gate charge is 9.4nC.
    Running through the math the PIC should be able to switch the MOSFET in less than 10 microseconds. The
    equivalent capacitance of the LED's is ~600pF so this should not be a problem.

    I plan on turning the LED's on for 1 milli-second and off for 1 millisecond so effectively
    at a 500Hz rate and am wondering if there will be any issues directly driving the FET.
    Some have mentioned needing to have a pull down resistor and a series limiting resistor; looking
    at the I/O driver for the 12F629 it looks like it should be able to source/sink 25mA without
    an issue. The MOSFET is placed close to the PIC and I'n running wide traces to the drain.

    The question is will the PIC be able to directly drive the FET and have I missed anything with my
    calculations?
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    At least, you should have a pull down resistor of about 10K ohms so to give the FET gate some kind of state during startup or if by change in your code the pin is made an input.
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Feb 2013
    Location
    Northern California
    Posts
    9

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Quote Originally Posted by Dave View Post
    At least, you should have a pull down resistor of about 10K ohms so to give the FET gate some kind of state during startup or if by change in your code the pin is made an input.
    Thanks for the input; that makes sense to keep the gate low at startup. The system turns on from a cold start so it's good to
    set the state low with a pulldown.

  4. #4
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    157

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    I have been told (by an electronics engineer that I know) that, along with the 10K pull down resistor, you should have something in series with it. His explanation was that a MOSFET can occasionally 'run wild' and the gate essentially shorts to source and will draw amazing amounts of current.

    His suggestion was 1K to 5K or so, try it, if it works, great. Since then, I've used a 2.2K and have never had any problems.

    Just my 2 cents
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  5. #5
    Join Date
    Feb 2013
    Location
    Northern California
    Posts
    9

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Quote Originally Posted by andywpg View Post
    I have been told (by an electronics engineer that I know) that, along with the 10K pull down resistor, you should have something in series with it. His explanation was that a MOSFET can occasionally 'run wild' and the gate essentially shorts to source and will draw amazing amounts of current.

    His suggestion was 1K to 5K or so, try it, if it works, great. Since then, I've used a 2.2K and have never had any problems.

    Just my 2 cents
    The series resistor is between the I/O line from the PIC and the gate of the MOSFET? That makes
    sense but I'm thinking it shouldn't be too large because that would limit the charge current to the gate. A 220 ohm
    limits the current to 23mA which shouldn't be a problem for the PIC.

    Thanks for your comments.
    Attached Images Attached Images  

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Well actually, The resistor should be rather small, in the order of 10 to 100 ohms Steven. When switching the gate at high frequencies you need to overcome the gate to source capacitance issue. Even at low frequencies if you take a scope and look at the gate, you will notice a delay when switching it on when using a resistor. The larger the resistor the slower the turn on time as well as discharge time. In fact when switching the gate at frequencies of approx.15+ KHz. you should be using some kind of push/pull driving circuit. In the past I have used the IR2183 mosfet driver ic's on all of my PWM full bridge drivers. They will deliver up to 1 amp to the gate. There are others available. Microchip also makes single mosfet drivers.
    Last edited by Dave; - 10th April 2015 at 12:46.
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    157

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Quote Originally Posted by Dave View Post
    Well actually, The resistor should be rather small, in the order of 10 to 100 ohms Steven. When switching the gate at high frequencies you need to overcome the gate to source capacitance issue. Even at low frequencies if you take a scope and look at the gate, you will notice a delay when switching it on when using a resistor. The larger the resistor the slower the turn on time as well as discharge time. In fact when switching the gate at frequencies of approx.15+ KHz. you should be using some kind of push/pull driving circuit. In the past I have used the IR2183 mosfet driver ic's on all of my PWM full bridge drivers. They will deliver up to 1 amp to the gate. There are others available. Microchip also makes single mosfet drivers.
    Hmmmm - I guess the fact that I'm just switching relatively slow stuff is the reason I haven't run into trouble with 2.2K. My engineer friend was aware of what I was building, so that's probably why he suggested the fairly large values.

    And, of course there's always the possibility that I misunderstood him, and, in my ignorance, went with what I 'remembered'.

    Thanks for the information!
    Last edited by andywpg; - 11th April 2015 at 01:36.
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,128

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    There are cases where the larger gate resistor is necessary (although rare). If there is an EMC interference, large gate resistor makes the switching more rounded and no high frequency harmonics are generated.

    In general we need fast switching mosfets to make losses as low as possible and the efficiency as high as possible.

    So, yes, a low resistor in the order of 10-100 ohms max. is what you need. Or even better no resistor. Mosfets have insulated gate and no current flows through the gate (besides the spike to charge gate capacitance).

    Ioannis

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,578

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Quote Originally Posted by Ioannis View Post
    So, yes, a low resistor in the order of 10-100 ohms max. is what you need. Or even better no resistor. Mosfets have insulated gate and no current flows through the gate (besides the spike to charge gate capacitance).

    Ioannis
    Hi, Ioannis

    Without a series resistor, you could have some surprises ( the RMW well known "feature" ) ... try i.e. an IRFZ44 or IRL2203 - or some nF+ range gate capacitance device - ...

    tested ( and debugged ) !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,128

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Yes you are right. Thats is why I spoted the "spike to charge gate capacitance". You cannot leave it to luck and some claculations need to be done after the study of the datasheets.

    I had to be more careful to my statement and think that many are not engineers, but more like enthusiasts about electronics.

    Also this "great" feature, RMW, can bite experienced people too.

    Ioannis

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,578

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    in fact, it's quite simple : try not to drain more than the 20 ma max current ...
    so, a 220 to 270 Ohm resistor can be considered as the minimum value.

    that gives +/- 2/3 s min turn on/off time ...

    and if not fast enough, a mosfet driver has to be used ...

    Alain
    Last edited by Acetronics2; - 20th April 2015 at 09:53.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,128

    Default Re: Another N channel enhancement mode MOSFET driven directly by a PIC12F629

    Or a faster Mosfet with less capacitance or both. All depends.

    Ioannis

Similar Threads

  1. Nch mosfet direct driven with pic
    By longpole001 in forum General
    Replies: 8
    Last Post: - 30th November 2013, 23:24
  2. 24v driven MosFET
    By netstranger.nz in forum General
    Replies: 7
    Last Post: - 19th May 2012, 08:50
  3. Help needed - MOSFET driven by PWM
    By bcd in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd April 2008, 06:02
  4. Driving a mosfet directly?
    By passion1 in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 12th July 2007, 08:45
  5. I need Help to Connect P-Channel Mosfet
    By jetpr in forum Schematics
    Replies: 1
    Last Post: - 6th February 2006, 13:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts