Weird issues with LM311

Thread Starter

Roessleralec

Joined Jul 16, 2019
28
So for a project I needed just a simple comparator circuit to turn on a fan when the temperature was above a certain value. I thought no problem, I'll just use a simple LM311 circuit. Well when I connected it, I would only get 1.6v on the output no matter what i did with the inverting or non-inverting inputs. I thought this was weird so I build another circuit using it just as a buffer powered by 5v and 2.5v at the non-inverting input. These values are within the specs and it still did the same thing with the 1.6v. Thinking my chip may be bad, I tried two other LM311 chips and it did the same thing. Any idea what could be going on here?

Thanks for your time
 

SamR

Joined Mar 19, 2019
5,031
If you are unlucky like me, you bought them from China and the whole batch of 10 is bad. It happens and now when I receive devices from China I test them before putting them into storage. YMMV
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
28
This is probably what happened because I bought them from Tayda electronics. I pushed this aside because I have bought a bunch of other things from them before and have worked great. Oh well, I guess it was a bad batch
 

SamR

Joined Mar 19, 2019
5,031
My goto has been the myriad of vendors @ AliExpress. Excellent prices and very good service but long delivery time and shipping damages. I have gotten 2-3 lots of bad devices out of hundreds I've ordered. It's just for me and not a customer so I can accept the problem as the price of saving a few pennies here and there.
 

Ylli

Joined Nov 13, 2015
1,086
You are aware that the output of this device is a transistor with uncommitted emitter and collector, right? If you ground the output emitter (pin 1) then pin 7 becomes an open collector output and will require a pullup resistor.
 

eetech00

Joined Jun 8, 2013
3,859
So for a project I needed just a simple comparator circuit to turn on a fan when the temperature was above a certain value. I thought no problem, I'll just use a simple LM311 circuit. Well when I connected it, I would only get 1.6v on the output no matter what i did with the inverting or non-inverting inputs. I thought this was weird so I build another circuit using it just as a buffer powered by 5v and 2.5v at the non-inverting input. These values are within the specs and it still did the same thing with the 1.6v. Thinking my chip may be bad, I tried two other LM311 chips and it did the same thing. Any idea what could be going on here?

Thanks for your time
Hi

The LM311 has an uncommitted collector and emitter at the output.
These need to be pulled up or down as required by the application circuit to operate correctly.

eT
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
28
I built the simplest circuit I could think of, just a buffer and yes I did try it with a pull up resistor. The problem didn’t go away
 

atferrari

Joined Jan 6, 2004
4,764
Your "buffer" makes no sense.

Read the datasheet keeping in mind it's a comparator.

The standard topology requires 6 pins connected somehow.

Force yourself to number the pins in the schematic.

Learn to keep opamps separate from comparators in your mind.
 

bertus

Joined Apr 5, 2008
22,270
Hello,

You will also need to connect pin 4 to ground or a negative voltage.

LM311_pins.png

Here are also some example circuits:

LM311_example_circuits.png

Bertus
 

crutschow

Joined Mar 14, 2008
34,285
It worked when I grounded the 4th pin. Thank y’all for the help
If it's still connected as the buffer you show in your schematic, that's an unstable circuit and can oscillate, since the LM311 is not compensated as an op amp.
For that circuit you need an op amp such as the LM324 or LM358.
 
Top