LM311 Not working as expected

MrChips

Joined Oct 2, 2009
34,826
I suggest he try your first circuit on post #13 first.
For safety, it would not hurt to put 1kΩ resistors in series at pin-2 and pin-3.

 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
I suggest he try your first circuit on post #13 first.
For safety, it would not hurt to put 1kΩ resistors in series at pin-2 and pin-3.

Doesn't work- Why add the 1kΩ resistors? And what did you use to edit my ckt diag?lm311-test3.png
 

MrChips

Joined Oct 2, 2009
34,826
Something is definitely wrong. Don't give up. We can solve this.

Post a photograph of your setup.
Where did you purchase your LM311?

Give me some time and I will breadboard your setup tomorrow.
 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
I forgot to mention that I found ~250mV on Pin1 when the comparator switches ON which is the Emitter/drain for the chip and it is tied to the gnd rail so what the heck is V doing there? I untied Pins 1&4 from each other and tied each directly to the gnd rail and now when comparator ON only 170mV on Pin1 and Pin4 0V (0V even before I untied them). Comparator ON sinking pullup V on Pin7 to Pin1, comparator OFF no sink and Pin7 pullup V passed through the LED resistive load to gnd lighting the LED. Only the LED is staying lit. I was doing better than this before I gave it another try...
 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
I have parts going back over 40 years, but I suspect I bought these from China since they make and sell them cheaper than buying the same parts through a US broker. Yes I know they counterfeit a ton of devices. My Hong Kong buddy told me years ago about a tongue in cheek article in the HK Times announcing the Chinese had learned how to counterfeit chicken eggs.

Voltmeter lead on Pin1, xstor hiding behind LED, the cap across 5V and Gnd rails probably not needed, but with 3 phase High Voltage distribution feeder less than 100' away and all the electronics on my desk and in the house it's an electronically noisy environment.

IMG_0357.JPG
 

MrChips

Joined Oct 2, 2009
34,826
I don't see any problems with your layout in the photo.

However, something is still not right.
You should not be reading anything over 1mV on pin-1 if pin-1 is connected to GND.

What is the reading on your DMM when you short the meter leads?
 

sghioto

Joined Dec 31, 2017
8,634
SamR,
I see a contradiction. In post #45 you said that pin7 is always sinking and the LED is always on. Looking at the photo of the board in post #51 using the transistor the LED is on. If pin7 is always sinking then the LED should be OFF.
As connected in the photo the voltage on pin7 should be around 0 volts with the LED OFF and .7 volts with the LED ON.
SG
 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
0.00 It's a cheap small Chinese AstroAI that I usually use. So I broke out the Fluke 27 and it reads 0.342V on Piin2. Ground looping somehow?

I also went through my 10 311 chips and there were 2 obviously bad ones. Not switching and pulling ~50 mA no matter what the Pin2 input was and PS buzzing switching. So I trashed them.

Now the Fluke reads 0.329 so Its drifting ~10mV. Probably thermal drift. And switched ON the ckt pulls 42mA and OFF 1mA. Out of curiosity I tapped on the breadboard and current now 44mA and ~420mV on Pin2. So it's stable.
 

sghioto

Joined Dec 31, 2017
8,634
Out of curiosity I tapped on the breadboard and current now 44mA and ~420mV on Pin2. So it's stable.
That does not make any sense.
In order for the LED to be on the voltage on pin2 has to be above 2.5 volts, the reference voltage on pin3.
I still can't figure how the circuit is drawing 44 ma with the LED on. Should be less then 10ma with a 5 volt supply.
SG
 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
SamR,
I see a contradiction. In post #45 you said that pin7 is always sinking and the LED is always on. Looking at the photo of the board in post #51 using the transistor the LED is on. If pin7 is always sinking then the LED should be OFF.
As connected in the photo the voltage on pin7 should be around 0 volts with the LED OFF and .7 volts with the LED ON.
SG
I tend to get confused with ON/OFF on this ckt. I am measuring 0.634V at Pin7 w/ 3V on Pin2 and 0.565V at Pin7 w/ 2V on Pin2 and the LED won't turn off. The PS shows 1mA when Pin2 ≥ 2.5V and 46mA when < 2.5V. So I *ASSUME?* the LM311 is switching ON, but it's not sinking the voltage? There is also some mV on Pin1 the GND or Emitter Out (as TI labels it). 0V on Pin1 w/ 3V on Pin2 and 0.31V at Pin1 w/ 2V on Pin2. So when Pin7 V sinks, V appears on Pin1, but it is tied to the GND rail and shouldn't show 0V? 0V is what the GND rail measures and that tiny jumper has 0.1Ω (LOL 1st time I EVER measured a jumpers resistance). I think what is confusing me is calling Pin7 Output when it's actually an Input to sink V on Pin7 to GND.
 

MrChips

Joined Oct 2, 2009
34,826
If you want to understand the behavior of the LM311, omit the LED for now. It is only needed as a visual indication. This is causing you confusion.

Pin-7 is an output pin. The direction of the output current is confusing you.
We will explain this later if you are still curious. For now, let us try to get the LM311 working as it should.

Connect a 1kΩ resistor from pin-7 to Vcc (+5V).
Measure the voltage at pin-7 with respect to GND.
The voltage reading should be less than 0.2V or greater than 4.8V.

btw, I wired the LM311 on a breadboard powered at 5V and I am having no problem getting it to work properly.
 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
1kΩ on Pin7 to Vcc, pulled the xstor

Pin7 0.779V w/ 2V@ Pin2, 0.047A on PS

Pin7 0.762V w/ 3V@ Pin2, 0.003A on PS
W/O the chip it's 5V so the 311 is sinking

Something is drawing current when Input Signal V crosses Reference V threshold making me think the 311 is switching, but not showing it on Pin7

Maybe I should get some new chips from Arrow...

These are stamped TI Logo 18WCHO8M LM311P, but could be fakes
 

Thread Starter

SamR

Joined Mar 19, 2019
5,491
Getting real LM311 from a reputable source is a good idea.

I still don't see how you can be reading >0V on pin-1.
Ordered 3 from Arrow, will be here tomorrow. Always a minimum of 3, 1 to use, 1 to burn and 1 to give away...

Baffles me no way there should be V on gnd...

About the only thing I haven't changed is the breadboard so will see what happens w/ new chips tomorrow.
 
Top