LM393 comparator issue

Discussion in 'General Electronics Chat' started by libbresse, Apr 25, 2009.

  1. libbresse

    Thread Starter Member

    Mar 6, 2009
    12
    0
    Simulating a circuit where LM393 comparator is in, everything works just fine until i get a negative input, then the comparator turns on ?

    Should I put a led on the input to get rid of the negative signals ?? :confused::confused::confused:

    http://www.pixbox.se/pic_show_id26529066.html
     
    Last edited: Apr 25, 2009
  2. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    Can you post a schematic of the current situation?

    Greetings,
    Bertus
     
  3. libbresse

    Thread Starter Member

    Mar 6, 2009
    12
    0
    Bertus : i put the scheme in my first post.
     
  4. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    You mean this?

    [​IMG]

    I don't understand the input signal. What is it?
     
  5. libbresse

    Thread Starter Member

    Mar 6, 2009
    12
    0
    Bill_Marsden: The trigger is a signal from a cam-sensor, I have watched the sensor signal from a oscilloscope and its a sinuswave, its when the negative part in the wave that gives the problem :(
     
  6. RmACK

    Active Member

    Nov 23, 2007
    54
    0
    Perhaps during the negative part, the input signal is going below ground?
    In this case it will be outside the supply rail range of the comparator and thus give an unexpected output?

    I'm not sure 100% what you want to do with the sine wave, you seem to divide it (R3 & R4) and filter it (R3 & C1). Regardless, perhaps you should consider giving it a dc offset, e.g. in theoretical terms, connect one end to a 6 volt source. There are a variety of ways to do this in practice.
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,173
    1,797
    Comparators and opamps all behave strangely with inputs which are outside the common mode range. Look in the datasheet for this parameter. It is actually a good thing that the simulation is doing the same thing as the real part.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Try adding a variable resistor between the + voltage and pin5, to raise the threashold. I'm trying to figure how to add a clamping diode, but don't see it at the moment.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The problem you are experiencing is common with older-design opamps and comparators; it's known as "phase inversion", but commonly referred to as "latchup" and "lockup" for the effect it has on servos being driven by opamps/comparators suffering from phase inversion.

    Clamp the noninverting (+) input of the comparator to ground using a diode (Schottky preferred, such as a 1N5817); anode to ground, cathode to the noninverting input.

    That way, when the input tries to go more negative than the Vf of the diode, the diode shunts current to ground and resistor R3 dissipates the input signal's power.
     
  10. libbresse

    Thread Starter Member

    Mar 6, 2009
    12
    0
    Well now I have tried both put a bias on the input + and a Schottky from input + to ground. They both work :D .

    I think I will go with the diode method SgtWookie mentioned. Seems to be less sensitive on the amplitude from the sine wave, and there will not be any current passing the sensor :rolleyes:

    Thank you a lot for your help !!! :cool::cool: This is a great forum :)
     
Loading...