PWM MOSFET Driver Current Leak

Discussion in 'General Electronics Chat' started by John5788, Jul 9, 2009.

  1. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    I put together this schematic for a motor controller:

    [​IMG]

    and I am running into a problem when trying to drive a high powered 30A motor.

    When i attempt to drive small fans, the schematic works just fine, but I run into a problem where my PIC18 is held in reset.

    I am assuming it is because the 5V PWM line is drawing too much current from the PIC18. I think Q1 is somehow leaking current from the base and emitter which is causing the PIC18 to be held in reset.

    When I disconnect the wire going to the base of Q1, the motor runs at 100%, the MOSFETs are fully on and my PIC18 runs. However, when I connect the wire again, the PIC18 is held in reset and does not run anymore.
     
  2. steinar96

    Active Member

    Apr 18, 2009
    239
    4
    You could propably limit the current out of the microchip with a resistor between it and Q1. But then the current might not be enough but that could be fixed with a darlington pair in order to get enough amplification.
     
  3. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    I did try putting resistors in, but it took a 15000 ohm resistor for the PIC18 to start running. 10000 ohm resistor didn't work.

    But the signal with the 15000 ohm resistor becomes so weak that it does not switch the MOSFETs properly.
     
  4. millwood

    Guest

    a few comments:

    1) there is no place for q3.
    2) q2 is a pnp.
    3) you need to limit the current going through Q2 when Q1 is conducting.

    try this one.

    if you are running at high speed, I would reduce the 1k resistor from the gates to ground to maybe 220-330ohm.
     
  5. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    what do you consider high speed?

    I am switching at 150Hz, is that considered low speed switching?
     
  6. millwood

    Guest

    that's a very low speed.
     
  7. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    millwood,

    on that revision you made, which side do I connect the emitter on the PNP? do i connect the emitter to the 12V power line?
     
  8. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    simplify is your friend.

    why not just a single npn darlington and single resistor, then tie the gates of the fets between resistor and collector of darlington...??? this also allows the motors to run 100% if the pic fails or the npn dies, etc, assuming these fans are for cooling.

    it basically flips the pic drive signal over so you need to drive pic at 90% PWM to get 10% fet drive, etc.

    or, swap out all the discretes for a fet driver IC.
     
  9. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    I think i tried the darlington transistor as my very first mosfet driver, and the BJTs couldn't hold up and eventually smoked themselves to death.

    i've also tried using discrete ICs, lowside mosfet drivers, and those devices literally exploded each time I tried using them.
     
  10. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    hmmm, what fet's were you using??
     
  11. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    im using the ST P80NF55 mosfets.
     
  12. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    those look good.

    230nC at the gates w/ 2 in parallel, shouldnt be a big deal to charge and discharge @ 150Hz

    what PWM % are you driving at?

    and hmmm. scratching my head as to why your darlington driver burned up. did you have it wired correctly and properly current limited?
     
  13. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    i was driving it at 50%, but obviously i am going to need to be able to adjust the PWM based on some sort of signal to my PIC.

    i'll try the darlington driver again with some better documentation on what happens. I am going to be using the KSP44 NPN transistors, that is what I have laying around right now. what resistors you recommend I use for the BJT gates?
     
  14. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    You had the PNP transistor upside-down. The NPN transistor was correct. The two transistors are supposed to be complementary emitter-followers.

    The input must have a resistor in series with the base to limit its current.
    Each Mosfet needs a low vaue resistor in series with the gate to prevent VHF or UHF oscillation.

    I couldn't get rid of the Chicken-Pox dots all over your schematic but I cropped it a little.
     
  15. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    audioguru,

    yes thanks that was the intended circuit. I drew the schematic in pspice and my version has the PNP upside down with the emitter at the bottom, so I had to wire it up funny.

    but the way you drew is how I have my board set up right now, minus the 22ohm resistors on the gates of the mosfets.

    and like I said before, my MCU won't run with this configuration. I'm not sure what is the problem, but it seems to be held in reset mode or a safe mode for some reason. when the input to Q1 is connected and the motor is running 100%.

    when I disconnect Q1, the motor still runs 100% and the PIC's program begins to execute. I have an LED connected to the PIC and I have the LEDs blink a certain pattern so I know that the program is being executed or not.
     
  16. millwood

    Guest

    1) you don't need that 1k resistor going from the gate to ground in a totem pole set-up.
    2) make sure that you have that 1k resistor to the npn's base. or you run the risk of overloading the mcu - which sounds like is what you have.
     
  17. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    ok, i had a lengthy writeup, but used my delete key. totem pole + npn between fet's and pic seems way too much here.

    a simple darlington npn with two resistors should suffice here. one resistor as load for npn (+V to npn collector) and the other on its base to pic. perhaps 1k on base and 100 on the collector. connect fet gates to npn collector. this flips the pic signal over.

    with a hfe of 100 (low for a darlington) the base shouldnt be more than about 1.2mA. with a hfe of 1000 base current should be around 0.12mA.

    if you want little to no pic output current then use small fet to drive the big motor fet's, etc. but depending on pic output stage you might need pull-up or pull-down resistors on the small fet gate.

    if the pic is always in reset mode then perhaps we need to know what the output stage of the pic really is, etc.

    and just a note, i see many pages about fet's that say the fet gates draw no current. well when there is no charge on them they will induce a current at they are charged, the gates are like small capacitors. as example, if the gate is 200nC and you need the fet to saturate in 200nsec then you need 1A of current for 200nsec, etc. when you get down to low power devices and higher switching frequencies this will affect how you drive power fet's with larger gate charges, etc.

    what pic controller are you using?
     
    Last edited: Jul 13, 2009
  18. millwood

    Guest

    the totem pole ones will do 20ma. the open collector types considerably less.

    the issue with mcu driving (low side) mosfets is that they don't have enough voltage to fully turn on the mosfets, unless logic level types are used.

    gate capacitance-induced current is pretty much a non-issue for the kind of frequencies we use / need to use.

    yeah, the complexity here is not in sync with the simple task.
     
  19. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    a Microchip PIC18F1220/1320 can source/sink 25mA on its IO pins. so with 12v you can place a 500 ohm resistor (lowest you can go with 12v, etc) in series with a 1n4148 from +12v to the IO pin, and connect the fet gates between resistor and diode. when the IO pin totems low there is current being sinked and the fet gates should see about 0.7V. when the IO totems high current into the IO should stop and the fet gates should see 12v.
     
  20. millwood

    Guest

    I would put a resistor on this side of the diode to make sure that io pin isn't shot.

    yes, something like that will work - and it works in some gate's output stages too.

    you just need to make sure that you can live with the charge-up time set by the 500ohm resistor and the gate capacitance - again, not a problem for low frequency stuff we do.
     
Loading...