pic and mosfet interface

Discussion in 'Embedded Systems and Microcontrollers' started by h.d, Dec 6, 2007.

  1. h.d

    Thread Starter Active Member

    Oct 22, 2007
    150
    0
    hi all
    i want to control dc-motor by pic using pwm
    the pwm signal will trigger the mosfet gate
    the mosfet which i will use the Vgsth=()2Vmin.-4Vmax.)
    my question is :can i connect the mosfet gate directly to the pic output without using mosfet driver?
    i attached the mosfet data sheet and the circuit diagram.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Your drawing shows an external element between the FET gate and the output of the PIC. What is it?

    You can't drive the FET directly, as the gate needs to rise to 10 volts to fully turn on the FET. Also, what is the purpose of the zener diode in parallel with the motor?
     
  3. h.d

    Thread Starter Active Member

    Oct 22, 2007
    150
    0
    am dont care with the zener diod,thats to safe motor from high voltage
    the element between pic and mosfet is mosfet driver
    if u see the datasheet i put it
    it shows that the thresholding voltage for mosfet gate is 4Vmax
    u mean that i should give the fet 10v for full work?
    the pic output is 5v so i have to amplify it to 10v?
     
  4. eeboy

    Active Member

    Sep 27, 2007
    90
    1
    I think I disagree. According to the data sheet you should be fine driving this directly with a GPIO (Vgs=5V). See the graphs on page 4.

    Give it a try... it's not going to hurt anything.
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    I, in turn, have to disagree. The IRFP450 isn't in anything like saturation until the gate is 10 volts above the source. That voltage threshold is just enough for the FET to begin conduction. See the curves for conduction at Vgs = 5 volts as opposed to 10.

    The zener is unnecessary. If it ever conducts, it will turn into a cloud of smoke instantly. Use a surge arrestor that will become more resistive at current above a safe level.
     
  6. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Shouldn't the N-channel MOSFET be between the motor and ground? Doesn't one need a P-channel when the MOSFET is between the motor and Positive?
     
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    You can buy logic level MOSFETs (Google) that can be driven directly by the output of a PIC.
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I took a look at the datasheet for the IRFP450 and the typical Vgsth is 2V min to 4V max.

    The drawing of the circuit shows the MOSFET drawn as a P-channel so there is some confusion on what is actually being used (P-Ch or N-Ch).

    I would think that if the MOSFET is an N-Ch then is should be switchable directly from the output of the PIC but only if the MOSFET has its source terminal connected to ground and the motor connected between the drain and the positive power rail as described by thingmaker3.

    hgmjr
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    And if it's a logic level MOSFET.
    A logic level P-channel will also work, if the source is to +5V and the load is between the drain and GND.
     
  10. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Both are good points, RonH.

    To my thinking, the IRFP450 with its typical Vgsth of between 2V and 4V would fall into the category of a logic-level MOSFET.

    hgmjr
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I looked at Fairchild's IRFP450 datasheet, and at ST's IRFP450 datasheet. See the I-V curves of both of them below. Perhaps the Fairchild curves are typical and the ST curves are worst case, but they are drastically different. The Fairchild shows current limiting of 6 amps, while the ST limits at 1 amp or less. I don't think we know how much current our OP's motor draws, but it is obviously important.
    When a MOSFET's Rds(on) is spec'ed at 10V, and the threshold voltage is as high as 4V, I would never try to use it with 5V of gate drive. The Rds(on) of logic level MOSFETs is specified at (are you ready for this?) logic levels. For example, Fairchild has parts spec'ed down to 1.8V.
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    It would appear from the two datasheets that a PIC would not be able to reliably drive the an IRFP450 directly.

    Perhaps what is called for is the addition of an NPN transistor that would serve as a buffer and level-shifter if the IRFP450 is already on-hand. Otherwise it would be advisable to select another n-channel MOSFET that is better suited to being directly connected to the PIC.

    hgmjr
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I wonder what the load current is. The IRFP450 would only be suitable for small motors of less than an amp or so stall current.
     
  14. h.d

    Thread Starter Active Member

    Oct 22, 2007
    150
    0
    ok first, yhanks for all replayes.
    2nd: i understand that 5v which the output of pic is wont give the wanted current
    the motor is(180V,6A)
    so i should give the FET voltage between 5V and less than 6V ?
    so should amplify the pic output?
    and i change the sch. to N-channel mosfet.
     
  15. h.d

    Thread Starter Active Member

    Oct 22, 2007
    150
    0
    ok , but in datasheet the Id=14A
    and the motor current is 6A
    why the IRF450 not suitable?
     
  16. h.d

    Thread Starter Active Member

    Oct 22, 2007
    150
    0
    can you explain for me ?
     
  17. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I have attached a quick sketch of what I had in mind.

    Since you are using a motor that requires 180V then it may be a good idea to replace the NPN transistor with an opto-isolator to isolate the high-voltage motor interface from the low voltage PIC circuitry.

    hgmjr
     
  18. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I said that because the maximum Rds(on) for irfp450 is 400 milliohms, which means its maximum power dissipation is about 14 watts, requiring a sizeable heat sink.
     
  19. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I wonder if the 6A rating is the stall current. If that is true, then the normal running current maybe much less. Sizing the heatsink may be able to take this into account. Of course a conservative design would be sure to consider that the motor may be stalled on occasion and so the heatsink should be sized accordingly.

    hgmjr
     
  20. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I ran some sims on an irfp450 driving a 10 Henry inductor in series with 30 ohms, and a 180V supply. What I found was that during the off transition, the power spikes to about one kilowatt for a very short period of time. I have no idea how long that spike can be before it becomes destructive, but the duration of it was directly proportional to how long it took for the gate capacitance to discharge, which is, of course, a function of how hard you drive the gate. If the OP can handle the inversion that comes with a common emitter driver, it will improve the turn off time by at least an order of magnitude.
    Turn on time didn't seem to be a problem, even though it is slower, because the inductance of the load reduces the drain current slew rate so low that there is basically no power spike.
    Obviously, this is just a simulation, so the results could be wrong. In addition, if you use a MOSFET with lower Rds(on), the gate capacitance will be higher, which will exacerbate the turn-off time problem (if it is a problem), necessitating a higher current driver.
    I should add that any engineer with high-power MOSFET experience already knows all this. If any of it is incorrect, please straighten me out.
     
Loading...