## How to connect correctly using IC LM311 voltage comparator

FYP Starter Pack, ICs, Voltage Regulator, Resistor, Capacitor......

### How to connect correctly using IC LM311 voltage comparator

Salam and Hello everyone,

I have problem in getting the right output from LM311 (voltage comparator). Supposely I want to compare 2 diffrent voltage. To clarify my problem below is my connection :

Pin1 : connect to ground
Pin2: V+ connect to +5V.
Pin3: V- Connect to infrared sensor that had already gone through the voltage divider.The voltage will be vary from +0.6V to +10V
Pin4: connect to GND
Pin 5 : Short together with Pin6.
Pin6: Short together with Pin5.
Pin7: Output Pin Connect to 10kOhms through +5V (since someone said to me that it is open collector, so need to connect to resistor 10kOhm and then +5V).
Pin8: Connect to +5V.

I need TTL output go high (+5V ) and low (0V) with the variation value of V-(pin3). But the IC seems to fail to produce the output as I needed. Can U all share your opinion on how to solve this matter. Already spent more than 10 hours to solve this problem but unfortunately still failed.

regards,
Ariff
Attachments
post to cytron.png (8.81 KiB) Viewed 4090 times
arrave_electro

Posts: 4
Joined: Tue Apr 02, 2013 10:49 pm

### Re: How to connect correctly using IC LM311 voltage comparat

arrave_electro WROTE:I need TTL output go high (+5V ) and low (0V) with the variation value of V-(pin3). But the IC seems to fail to produce the output as I needed. Can U all share your opinion on how to solve this matter. Already spent more than 10 hours to solve this problem but unfortunately still failed.

What ouputs are you getting when the input is 0.6V and 10V, and when they are varying?

the IC seems to fail to produce the output as I needed
carries very little information and make people guess what you mean by that....

Allen
The next war will determine NOT who is right BUT what is left.

ABSF

Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

### Re: How to connect correctly using IC LM311 voltage comparat

Dear Allen,

The output of IC LM311 always go high eventhough the input fed to Pin3 vary from 0.6V to 10V.

What I need is :
Suppose when V+ > V-, the output of IC LM311 will goes high (+5V).
While when V- > V+ , the output of IC LM311 will goes low (0V).

So is my connection is correct?
arrave_electro

Posts: 4
Joined: Tue Apr 02, 2013 10:49 pm

### Re: How to connect correctly using IC LM311 voltage comparat

I simulated in proteus and it works. But you're not going to get 0V when V- > V+ due to high input offset voltage.

But if the circuit doesnt work in the real hardware. You might use voltage divider to reduce the input voltage by half so that 0.6-10V becomes 0.3 to 5V. The reference at V+ have to be changed to 2.5V and see if it works.

Allen
The next war will determine NOT who is right BUT what is left.

ABSF

Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

### Re: How to connect correctly using IC LM311 voltage comparat

Dear Allen,

Will try your recommendation. If anything i will post it again.
Thx
arrave_electro

Posts: 4
Joined: Tue Apr 02, 2013 10:49 pm

### Re: How to connect correctly using IC LM311 voltage comparat

Dear Allen,

Your method is working. Thank you
arrave_electro

Posts: 4
Joined: Tue Apr 02, 2013 10:49 pm

### Re: How to connect correctly using IC LM311 voltage comparat

Posts: 8
Joined: Thu Oct 31, 2013 2:32 pm