Short Protection?

Discussion in 'The Projects Forum' started by rbroberts, Aug 28, 2013.

  1. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    Ugh. Sorry for the short not-very helpful title, but the "Bug when creating a NEW THREAD" is biting and 20-characters is not much....

    I'm using a MOSFET to power a resistive load with a PWM input on the MOSFET gate. The application is a heater strip for my camera/telescope. My nice commercial unit had no short-circuit protection and is now a source for parts :mad:

    The PWM part is easy. I can even use a comparator to decide when the load is shorted by looking at the voltage drop across the MOSFET. What I don't understand is how to use this to turn it off. All the short-circuit protection schematics I find don't use PWM on the MOSFET gate which creates this "funny" situation; when the gate is off, there's no short detected.

    Attached is the schematic I have so far. R9 is the load resistance. Small resistances will cause the comparator output to go high, but even normal resistances (> 10Ω or so) will have the comparator go high when the MOSFET is off.
     
  2. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    Oops, after spending hours (literally) fighting the forum to get this posted before learning of the title limit, I forgot to readd my circuit diagram. Here it is....
     
  3. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    Let's check the basics. The way that circuit is designed, the comparator (U2A) only goes low when the voltage on the heater is above 90.09% of Vcc. I guess the mosfet can not use up less than 1.5 volts from drain to source when it is on. True? If the mosfet is really good at conducting the required current, the comparator is going to flop every time the mosfet goes on. Are we communicating?
     
  4. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    Yes, the comparator is high when the MOSFET is off and goes low every time it flips on. But if the load resistance is low, say 1Ω, the comparator is always on. In this state, I'm drawing too much current.

    The exact voltage drops are, of course, when I choose the realy components. I've picked values that more-or-less match what I have and what CircuitLab has available. Except that comparator is modeled as an ideal comparator.

    What I'm getting at is that I can't figure out how to only pay attention to the comparator when the MOSFET is on. I don't care that it goes high when the MOSFET is off, but I do care that it goes high when the MOSFET is on.
     
  5. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    I think I am seeing that U2A is reporting a shorted mosfet when nothing is wrong, by changing to a "low" output state. You are watching for a shorted mosfet or a shorted heater? Apparently a shorted mosfet is the thing you are watching for.

    This can be accomplished by adjusting R10 to a lower resistance.
    When the temperature of the mosfet goes up, the resistance of it goes up. Therefore, you want to set the voltage detection when the transistor is as cold as it ever will be during operation. This is a well known method and is limited by how close to Vcc the comparator will measure properly.

    Bingo. The LT1079 is not a comparator and the input voltage range is wrong for this circuit. Shall we start with that for a goal?
     
  6. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    The LT1079 is an op amp and it's doing what I want, namely setting the PWM width and frequency.

    What I really want to look for is a shorted heater. Think of R9 as my proxy for the heater.

    I'm using the natural resistance of the MOSFET instead of a sense resistor.

    Imagine getting rid of the PWM part and having a simple switch. We turn on the switch, current flows through the MOSFET. If the current through the MOSFET is low (because the heater is good), the voltage drop across it is low and no short is detected. If the heater shorts, then the current through the MOSFET is high and the voltage drop across it is also high and a the short is detected.

    Now we add in the PWM. The problem here is that the U2A now reports a short condition when the MOSFET is off.

    The problem isn't really detecting the short, it's determining when a short is spuriously detected which happens every time the PWM turns off the MOSFET.

    I'm attaching the CircuitLab file, hoping that helps. To see what's happening, run the simulation with R9 at 10Ω then again at 1Ω. At 10Ω, U2A goes low when the MOSFET is on correctly asserting that there is no short. But it goes high when the MOSFET is off. At 1Ω, U2A stays high, asserting that the heater is shorted (close enough for me, it's way over current at that point).
     
  7. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    I should have paid a little more attention to the LT1079 specs. Replace it with an LM324 or any op amp that will do 15V single supply.
     
  8. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    Okay, new file attached, this time it's an LT1014 for the op amp. It's supposed to be a drop-in replacement for the LM324 and does 15V single supply.
     
  9. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    Q1 looks upside down to me.

    On edit ... removed incorrect graphic.


    Sorry about the upside down comment.
     
    Last edited: Aug 28, 2013
  10. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
  11. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    It may be stolen, but the symbol is still an n-channel.

    Funny, the load works on the low side when I used the n-Channel mosfet. -- this line was sadly in error ..... I used a p-channel as well.
     
    Last edited: Aug 28, 2013
  12. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Can't draw right now...
    Put a current sensing resistor in the high side - maybe 0.22 ohms.
    Add a 1k (or so) series resistance to the mosfet gate to allow it to be pulled high. Connect a pnp transistor: emitter to V+, base through a base resistor to the junction of the mosfet and 0.22 ohm resistor, and collector to the junction of the mosfet gate and new 1k resistor.

    With 0.22 ohm sense resistor and 1.5 amps, the transistor shouldn't turn on, at about 3 amps it should, turning off the mosfet. A capacitor could slow things down if needed.

    EDIT: It is a P-Channel Mosfet, correct ??
     
    Last edited: Aug 28, 2013
  13. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    I'm pretty tired right now. I'm going to have to leave it to tubeguy for a while.
     
    Last edited: Aug 28, 2013
  14. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    CircuitLab picks that symbol (little arrow goes out away from gate) for p-channel enhanced MOSFET. I flipped the whole thing upside down to match the connections from that website, and it works when running the spice model.

    But I'm a physicist, not an EE, so I just do what the model tells me. I'm pretty sure I want a p-channel MOSFET for the load on the low side.
     
  15. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    It is a p-channel MOSFET.

    I have to digest this and try it, but I think I get the idea, thanks!
     
  16. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Found a minute, pardon the MOSFET :)

    PWM PMOS Current Limit 1.PNG
     
    Last edited: Aug 28, 2013
    rbroberts likes this.
  17. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    The original drawing, at the link, shows an IRF 9540.
    Yes, you turned it upside down.

    Why did you not put in a coil as the original drawing showed.
     
    tubeguy likes this.
  18. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    I'm not driving a motor, my load is purely resistive. Do I need a coil for that?
     
  19. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    Ah, that's very helpful. I've mocked it up in both CircuitLab and CircuitMaker; the latter doesn't like for simulation :(, but CircuitLab works fine.

    The only bad part is that the power has to get dissipated somewhere; I guess I can do 4 1W 1Ω resistors in parallel instead of the single 0.22Ω and still fit it in a project box.

    Thank you very much!
     
  20. rbroberts

    Thread Starter New Member

    Aug 26, 2013
    16
    1
    Please bear with me. I really don't know what you're trying to tell me. a p-channel MOSFET has the arrow coming away from the gate, toward the source, right? That's what I have. And the IRF9540 is a p-channel MOSFET, so... I'm lost on what you're trying to tell me....
     
Loading...