Working with comparator LM393

Discussion in 'General Electronics Chat' started by oookey, May 31, 2011.

  1. oookey

    Thread Starter Member

    May 24, 2010
    62
    0
    Hi Everybody, :D

    i tried to use a LM393 comparator with Vcc=15V to turn on a mosfet IRF540, it seems impossible. Please ref to attached for schematic.

    should i adopt Vcc=24V for the comparator, in order the output voltage high enough for the mosfet? Is there any suggestion? :confused:

    thanks.
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    LM393 has open collector, so you need a resistor between V+ and ouput, 1k should be ok.
    15V is enough for the mosfet to be safely on.
     
  3. oookey

    Thread Starter Member

    May 24, 2010
    62
    0
    Thanks Kubeek,

    Please refer the attached schematic, am i interpreted correctly.

    :confused:
     
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Yes this looks correct.
     
    oookey likes this.
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    1k may be too low for some LM393s. Output sink current is spec'ed at 6mA max. I would probably use 2.7k.
     
  6. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,007
    1,530
    If you want you mosfet to live, it would be wise to add either a mosfet driver(my preference) or a transistor between the output of the LM393 and the mosfet gate. The gate of the mosfet is in reality and capacitor. Without a driver/transistor it will not charge up very fast, keeping the mosfet in the resistive phase for a longer amount of time.

    This resistive phase is what causes the mosfet to heat up and fail. A Google search of 'Low side mosfet drivers' will give you many hits of suitable components.
     
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    It really depends on the peak current (determined by load impedance) and the switching frequency. A driver is overkill in some cases.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
  9. oookey

    Thread Starter Member

    May 24, 2010
    62
    0
    If i modify the circuit to constant current, retains the R=1kΩ, the curent flow will still far below 6mA. Please refer to attach for schematic.
     
  10. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I'm not sure why you mentioned constant current.
    When the comparator output transistor turns on, you want it to go to ≈0 volts. The current through the 1k resistor will be 15V/1k=15mA (you don't need the 10k). That 15 ma has to be sunk by the comparator output. It's output sink current is only guaranteed to be 6mA max. That's why I recommended 2.7k. 15V/6mA=2.5k. 2.7k is the next highest standard 5% value.
     
    oookey likes this.
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    [​IMG]

    You are assuming with a 15v supply the MOSFET gate will be at 13.6v.
    I don't know why you are subtracting 13.6v from the 15v supply? Perhaps you have R3 set to some rather high value?

    When the LM393 output tries to sink current via R1, it will be 15v/1k Ohms = 15mA; however since the LM393's output has a maximum guaranteed sink current of 6mA, it will have a high saturation voltage - around 9 volts! The LM393 won't be able to turn off the MOSFET.

    You need to define what you are attempting to do more effectively.

    It appears that you want to use a comparator to control the gate of a MOSFET to create a linear constant current circuit. However, comparators are designed to switch ON or OFF very quickly. If you are attempting to make a linear current regulator using a MOSFET as a current sink, you should use an opamp to control the MOSFET gate.
     
  12. oookey

    Thread Starter Member

    May 24, 2010
    62
    0
    Quote: It appears that you want to use a comparator to control the gate of a MOSFET to create a linear constant current circuit. However, comparators are designed to switch ON or OFF very quickly. If you are attempting to make a linear current regulator using a MOSFET as a current sink, you should use an opamp to control the MOSFET gate.


    Yah i'm using the LM393 to obtain constant current to my load, the MOSFET is as a switch to my load, the switching off of the MOSFET can be achieved by output sink of the LM393.
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    As I mentioned above, you would be better off to use a single-supply opamp whos' inputs and outputs include ground. As it is, you seem to be trying to use a comparator as a sort of PWM function, but it's going to keep your MOSFET in the linear region due to the Miller charge, and the relatively high output impedance of the LM393.
     
  14. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Not to mention the fact that including a comparator in a negative feedback loop is a guarantee of unwanted oscillations.
     
  15. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,007
    1,530
    @ Ron H and SgtWookie- This is the reason I suggested a mosfet driver in post #6. The 6mA of the LM393 will take a while to charge the gate capacitance.
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Yeah, but now he's talking about using the 393 as the op amp in a feedback current source.
    I ran a simulation with the 393 driving an IRF540. I was on my desktop at the time, so I don't have the results right now. More on that later.
     
    Last edited: Jun 2, 2011
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Just as an example of LM393 driving a MOSFET, here is a simulation of an IRF540 driving a 3 Amp load at 10kHz and 90% duty cycle. One of the MOSFETs is driven by a 15V pulse with 20nS rise and fall times. The other one is driven by an LM393 with a 2.7k pullup to +15V.
    Change the LM393 to an LM311 with a 1k pullup, and the IRF540 Pdiss drops to less than 500mW in the same scenario.
    I don't claim that this is a good solution for all situations. My point is that fast drivers are not needed for all applications. In this case, with a modest load and a modest switching frequency, such as you might use to control the speed of a small motor, a fast driver may be overkill.
     
Loading...