Lm311n ?

Thread Starter

Mazaag

Joined Oct 23, 2004
255
Hey Guys

Does anyone know if the LM311N is sort of an "inverted" comparator? As far I know, when the voltage at the + terminal is larger than the - termainl, the output should goto +ve rail , however, when I tried with the LM311N, it was inverted (ie, gave me -ve rail)

furthermore, it wasn't exactly 0v or 5v (i'm using 5v battery, +ve side conencted to V+ , and negative side to V-, not to the GROUND pin,) the "low" state was giving me 0.8 v, and the high state was giving me around 3.4 v.. is there a reason for this offset?
 

beenthere

Joined Apr 20, 2004
15,808
If you are using the conventional op amp input pin assignments, this could be confusing. An LM311 inputs are reversed, so the + input is 2 and the - input is 3. The 311 has an open collector output, so it really needs a pull-up resistor on pin 7.
 

Thread Starter

Mazaag

Joined Oct 23, 2004
255
The LM311 has an open collector and and open emitter. How do you have this connected?

I basically connected the +ve end of the battery to the V+ directly (nothing in between) , and the -ve end of the battery to the V- directly too....

I really don't know what you guys mean by open collector / emitter, and why do we need a resistor and where do I connect it ?

thanks guy


P.S: When I say V+ and V- , I do'nt mean the Non-inverting and Inverting inputs

and I do have a data sheet
 

Distort10n

Joined Dec 25, 2006
429
So you have the battery's anode and cathode connected to the Vcc and Vee respectively.

Comparator's come in two general types as defined by their output stage: push-pull or open collector. A push-pull has a PNP/NPN combination in the output stage; however an open collector only has an NPN and will require a pull-up resistor from the comparator's output to Vcc.

An open-collector is simply a bipolar transistor with no connection to Vcc. Think of a transistor as a switch. Without a resistor connected to the collector it will not work, so that is the purpose of the pull-up resistor.

The LM311 is the only comparator that I have seen that has an open collector and open emitter. So you can configure it in such a way where V+ is higher than V- (the inputs) the output could be HIGH or LOW, but not at the same time.

If you want the output to be HIGH when the voltage on V+ is higher than V-, then connect the emitter to ground (pin 1) and connect a 1k resistor from pin 7 to Vcc.

The BAL/STROBE pins can be left open.
 

mtmn102

Joined Jul 16, 2011
2
I'm sorry,I'm confused. Which pin is the emitter?


"If you want the output to be HIGH when the voltage on V+ is higher than V-, then connect the emitter to ground (pin 1) and connect a 1k resistor from pin 7 to Vcc."



I'm also having problems with the balance pins. Is there supposed to be Vcc at both of the balance pins? I'm trying to add positive feedback to the balance pins and I can't get it to work...
 

SgtWookie

Joined Jul 17, 2007
22,201
I'm sorry,I'm confused. Which pin is the emitter?

"If you want the output to be HIGH when the voltage on V+ is higher than V-, then connect the emitter to ground (pin 1) and connect a 1k resistor from pin 7 to Vcc."
As it says in the quote you copied, the emitter connection is on pin 1.

I'm also having problems with the balance pins. Is there supposed to be Vcc at both of the balance pins? I'm trying to add positive feedback to the balance pins and I can't get it to work...
Have a look at National Semiconductor's datasheet for the LM111/211/311:
http://www.national.com/ds/LM/LM311.pdf
Go to page 11. On that page, two methods of positive feedback are shown; the upper schematic "Figure 1: Improved Positive Feedback" is the schematic you should refer to.

Directly above pins 6 and 5, the 5k pot and the 3k resistor provide the balance adjustment and source current, respectively. C3 helps to reduce the resistor noise. To the right, the 33k, 82 Ohm and 4.7k resistor provide the feedback from the output of the comparator. Paragraph 7 explains the circuit.
 

mtmn102

Joined Jul 16, 2011
2
As it says in the quote you copied, the emitter connection is on pin 1.
I'm still confused because when I read
"...then connect the emitter to ground (pin 1)... "
with the understanding that pin one is ground from the data sheet, I get that it is telling me to connect two pins together, one being the emitter and the other is the ground. the ground is given as pin 1 but the emitter I am at a loss to find because it is not listed on the data sheet, nor is it specified in the instructions...


Have a look at National Semiconductor's datasheet for the LM111/211/311:
http://www.national.com/ds/LM/LM311.pdf
Go to page 11. On that page, two methods of positive feedback are shown; the upper schematic "Figure 1: Improved Positive Feedback" is the schematic you should refer to.

Directly above pins 6 and 5, the 5k pot and the 3k resistor provide the balance adjustment and source current, respectively. C3 helps to reduce the resistor noise. To the right, the 33k, 82 Ohm and 4.7k resistor provide the feedback from the output of the comparator. Paragraph 7 explains the circuit.
That is exactly what I was copying and I could not get it to work. I am using a 5V supply instead of a 15V supply, but other than that I copied it directly. when it didn't work I was checking the voltages at different points trying to troubleshoot the circuit and the only thing I found that was different than I expected was Vcc @ both balance pins....

I drew the circuit in Paint but couldn't upload it because it was about 10 times as big as this site's upload limit.... I will try to upload it to a picture hosting website and then post a link...
 

SgtWookie

Joined Jul 17, 2007
22,201
Look at the schematic on page 18.
You will see that in the lower right corner, pin 1 is labeled GND, and is on the emitter of the output transistor. The other pins are also documented on that page.

What they're trying to tell you is to connect pin 1, which is the emitter and GND pin, to the circuit ground. If it is a single supply circuit, then you would connect GND and -V together.

re: page 11 schematic...
The circuit supplies only a very small amount of hysteresis; perhaps a few millivolts. It's just enough to keep two signals that are very close in level from causing the output to oscillate.

If you need more hysteresis than that, as in a Schmitt trigger, you'll need a different technique.
 
Top