need help with a window comparator circuit plz plz

Discussion in 'The Projects Forum' started by arq, Jun 6, 2009.

  1. arq

    Thread Starter Member

    Nov 2, 2008
    16
    0
    I am posting a circuit diagram of a window comparator circuit driving a relay based on light sensing. LM393N IC i have used. LDR is used as a light sensor. Lower reference is set as 2.58v and upper reference is set as 4.35 volts. As the essential condition for window comparator saturation that Vin should be low than Vlow and Vin should be high than Vupper. The resistive combination of LDR and 10K variable resistor is fed at input. Although i have checked voltage at every pin of IC LM393. Correct voltages are obtained at multimeter . but circuit is not driving relay. I have connected external pull up resistor as well but circuit is not working well.
     
  2. arq

    Thread Starter Member

    Nov 2, 2008
    16
    0
    Sorry here is circuit diagram
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You say it is not working well. What exactly is it doing or not doing?


    hgmjr
     
  4. franzschluter

    Active Member

    Jun 1, 2009
    95
    0
    Hmmm. Try removing the diode or check its polarity. If the polarity of diode is wrong direction it will never turn on... Other probably cause of mistake is checking voltage pin1 to ground. If it is suppose to turn on you must measure voltage there.
     
  5. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    How much current is required to turn the relay on? Your base current is limited to about 2.5 mA and the transistor beta is perhaps 100. If your relay requires more than 250 mA you need to reduce the value of the 4.7K pull up resistor.

    Also, you mention you checked voltages with a multimeter. Can you check with an O-scope. Sometimes you can have oscillations and not know it.
     
    Last edited: Jun 6, 2009
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    R5 is pretty large; it would only allow around 2mA current in the transistor's base.
    Try reducing it to 2.2k.
     
  7. franzschluter

    Active Member

    Jun 1, 2009
    95
    0
    It still should work.... I have a similar circuit with 33k as R5. And my Q1 is pulling a 12V DC motor.... Except mines is pull-down transistor and not pull-up. It is true that R5 is a little big. Nevertheless it should turn on..

    Go ahead and try 100 ohms. To brutally turn it on.. According to maximum absolute ratings.. The base may receive up to 200mA. Try giving it 120mA. If it still don't turn on.. Then it's your diode that's revers or you have a burned transistor that's not working properly. Check pin arrangement.. If you did misplaced it 1 time and applied power to the circuit.. Then change the transistor with a new one.. It's already probably burned.

    http://www.diodes.com/datasheets/FMMT489.pdf
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, if R5 was 100 Ohms, you'd risk frying the LM393's outputs; they can only sink so much current. A 2.2k resistor would allow about 5.5mA; still well within the LM393's sink capabilities.

    You previously mentioned removing the diode for testing; our OP shouldn't try operating the circuit without that diode. That could wipe out the transistor when it turned off due to the reverse EMF spike.
     
  9. rowens914

    New Member

    Dec 7, 2008
    1
    0
    A few ideas...

    1. there should be a series resistor going to the base of the transistor, Say, around 1K. The pull up resistor, R5 can be between 10K and 33K, depending on the beta (gain) of the transitor.

    2, the diode should be across the transistor, Q1. It is there to protect the transistor from reverse EMF (flyback current).

    3. Try shorting across the emitter to collector of the transistor and see if that activates the relay. It won't hurt the transistor, even if it's turned on.

    4. Personally, I prefer power MOSFETs for this type of application rather than bipolar transistors. The are easier to turn on and have a lower on resistance that keeps them from getting very hot.

    All the best,
    Ron
     
  10. franzschluter

    Active Member

    Jun 1, 2009
    95
    0
    Ah I didn't check the datasheet of LM393 sink capabilities... But still it would turn it on ^^



    It's a bit well dunno.. I did a lot of school project setups before even without proetection diodes... It just simply works even without the diode. It's just for testing.. It would be extremely unlikely to go broken in 1 test.. For permanent usage it should really have a diode though.. Specially if its a motor! But for relays... Well it should have for professional designs but if you just simply want to do a quick test.. Its hard to debate about it :D


    Anyway 1 trick you could try is McGuyver style.. Put some nasty saliva on your finger... Then tap your wet finger between base and collector.. This should be enough to switch the transistor on ^^. It's a handy trick. But please only use this trick for small voltages! lolz

    Regards
    Franz
     
  11. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    No. The 4.7k resistor limits the base current.

    No. The transistor is used as a saturated switch. Beta is used when there is plenty of collector to emitter voltage. The datasheet for all transistors recommends a base current that is 1/10th the collector current when the transistor is a saturated switch.

    No.
    It is the inductance of the coil that creates the high voltage that you want the diode to clamp. The diode must be in parallel with the coil.
     
  12. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Opamps getting warm? The sinking one will beat out the sourcing one. Diode the outputs of your amps, sink your base drive, and reverse your window polarity, or use the other logic contacts on your relay.
     
    Last edited: Jun 7, 2009
  13. asimraufawan

    Member

    Jul 4, 2008
    29
    0
    replace the diode ,use IN4148 also reverse the direction.
     
  14. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    No and no.
    R5 is a 4.7k resistor in series with the base that limits the base current to only 2.4mA. You do not need an additional resistor.
    Beta is used for a linear amplifier transistor that has plenty of collector to emitter voltage. Every transistor's datasheet lists a max saturation voltage loss when its base current is 1/10th the collector current.

    No.
    The diode arrests the high voltage that the inductance tries to produce when its current is stopped. The diode must be across the coil.
     
Loading...