View Full Version : Comparator using LM 339N

10-18-2008, 12:14 PM
We are building a line follower using LDRs. The output voltages form the LDRs are fed to LM 339N to perform a analog to digital conversion of the signal. But the output of LM 339N of the ON and OFF logics is coming very close to each other and shows a marked dependence on V(-). What next???

We use the +ve terminal of each OP AMP as reference and -ve terminal as input signal from LDR.

V(+) = 5V PIN : 3

When V(-) = 0 PIN : 12
ON: 0V OFF : 0V

When V(-) = 3.05
ON: 2.54 OFF: 3.05

When V(-) = .86
ON: .56 OFF: .86

10-18-2008, 12:51 PM
1) what are the voltage level of ldr output in ON and OFF position?
2) what voltage are you giving as reference?
3) first see the working of 339 without using ldr. just use three signals. 5v,0v, 3v. see how it works.

10-18-2008, 06:18 PM
If I remember correctly, LM339 has open collector outputs. Hence, you'll need to connect a pull-up resistor at its output. 10k should be just fine.
Or you could use LM324 which has everything in built.