need help with a window comparator circuit plz plz

Thread Starter

arq

Joined Nov 2, 2008
16
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.
 
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.
 

steveb

Joined Jul 3, 2008
2,436
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:
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
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

rowens914

Joined Dec 7, 2008
1
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
 
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.
Ah I didn't check the datasheet of LM393 sink capabilities... But still it would turn it on ^^



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.
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
 

Audioguru

Joined Dec 20, 2007
11,248
A few ideas...

1. there should be a series resistor going to the base of the transistor, Say, around 1K.
No. The 4.7k resistor limits the base current.

The pull up resistor, R5 can be between 10K and 33K, depending on the beta (gain) of the transitor.
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.

2, the diode should be across the transistor, Q1. It is there to protect the transistor from reverse EMF (flyback current).
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.
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
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:

Audioguru

Joined Dec 20, 2007
11,248
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.
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.

2, the diode should be across the transistor, Q1. It is there to protect the transistor from reverse EMF (flyback 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.
 
Top