All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > General Electronics Chat

Notices

General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 08-15-2007, 12:24 AM
jayrare jayrare is offline
New Member
 
Join Date: Aug 2007
Posts: 7
Default How do comparators work?

Sorry if this is the wrong forum, I'm really bad at judging that.

I've just started to get into electronics and am already confused. How do comparators work (in layman terms)? Doesn't it just compare whether pin 2 or 3 (I have LM393) is getting more electricity, and then turn on pin 1 is pin 2 is more? Thats how I understood it, but when I tried connecting two different ohm resistors (which should create differences, right?) nothing interesting happened to the LED I had in the circuit.
If it was already on (which happens if the negative end is the side connected, which I also don't understand why thats the only way it works) it stays on, and if it was off (positive side) it stays off.
The ONLY way I can get the comparator seem to be able to have any affect is if I connect a wire from pin 2 to negative power, which turns the LED off, which I also don't understand.

Can someone please help me understand what I'm doing wrong? I've tried every wire combo I can think of.
Reply With Quote
  #2  
Old 08-15-2007, 12:33 AM
hgmjr's Avatar
hgmjr hgmjr is offline
Super Moderator
 
Join Date: Jan 2005
Location: Tennessee, USA (GMT-6)
Posts: 9,030
Blog Entries: 11
Default

Here is an example of a Comparator experiment located in the AAC Tutorial section that you can try.

You might want to sketch your circuit hookup and post it here. Then the members can comment on hook-up problems you may be experiencing.

hgmjr
Reply With Quote
  #3  
Old 08-15-2007, 08:11 AM
lightingman's Avatar
lightingman lightingman is offline
Senior Member
 
Join Date: Apr 2007
Location: Tonyrefail. Rhondda, South Wales.
Posts: 353
Default

So far you have spoken of linear comparators..... There are also digital comparators such as the CD4063 and the 7485.....These will accept two 4 bit binary numbers, and compare them giving a result of hiher, lower or equal to. Thay can be cascaded to any number of bit's.....Daniel.
Reply With Quote
  #4  
Old 08-15-2007, 08:25 AM
Dave Dave is offline
Senior Member
 
Join Date: Nov 2003
Posts: 6,961
Blog Entries: 17
Default

This is probably better suited in the General Electronics Chat.

Dave
Reply With Quote
  #5  
Old 08-15-2007, 05:28 PM
techroomt techroomt is offline
Senior Member
 
Join Date: May 2004
Location: pennsylvania
Posts: 198
Default

the lm393 package actually holds 2 comparators inside (a & b). first of all, this type of comparator will use bi-polar supplies (e.g. +10vdc and -10vdc). then the two inputs, + (pin 3) and - (pin 2), are constantly compared. whichever input has the more positive voltage applied (the farthest right on a number line), the output will swing to within a volt of that polarity Vcc. say 6vdc is applied to pin 3 and 5vdc is applied to pin 2, the output (pin 1) will swing to +Vcc minus 1 volt or +9vdc. if 7v were applied to pin 2, the output would swing to -9vdc. since the comparator has only 2 output states, + or - Vcc (minus 1volt), it is often called an analog to digital converter.
Reply With Quote
The Following User Says Thank You to techroomt For This Useful Post:
gte (05-31-2010)
  #6  
Old 08-15-2007, 06:46 PM
GonzoEngineer GonzoEngineer is offline
Banned
 
Join Date: Jul 2007
Location: Massachusetts
Posts: 46
Default

And don't forget the most important part.....most comparartors have an open collector output......don't forget the pullup

It would really help if you post a schematic.
Reply With Quote
  #7  
Old 08-16-2007, 01:54 AM
jayrare jayrare is offline
New Member
 
Join Date: Aug 2007
Posts: 7
Default

Okay, at the risk of sounding like a complete idiot, I really didn't understand what anyone said. I -tried- drawing a schematic, but I'm not really sure how its done, so I had to guess. Also, since I don't get comparators, I decided not even to try and use the symbol.

I've tried many different combinations of connecting the different pieces to either negative or power, and many different values for resistors 2 and 3. After several dead LEDs and two smoking comparators, I've decided against trying anymore combos until I know the correct way.
Attached Images
File Type: jpg comparator.jpg (6.1 KB, 86 views)
Reply With Quote
  #8  
Old 08-16-2007, 10:29 AM
hgmjr's Avatar
hgmjr hgmjr is offline
Super Moderator
 
Join Date: Jan 2005
Location: Tennessee, USA (GMT-6)
Posts: 9,030
Blog Entries: 11
Default

You have the basic conections correct.

Try taking a resistor of the same value as R2 and connect it between pin 2 and ground. This will give you a reference voltage of half the power source or 4.5 volts. Then change the voltage you apply to pin 3 first to 9V then to ground and see that the LED lights up when pin 3 is at ground and it does not light when pin 3 is tied to the power supply.

If you have a potentiometer, you can use it to vary the voltage at pin 3 and see what happens as you vary the voltage up and down.

You can next swap the inputs so that pin 3 is tied to the 4.5V reference voltage and the potentiometer is tied to pin 2. You will see that the behavior of the LED will be reversed. That is, when you adjust the voltage at pin 2 below 4.5 volts the LED will be off and when you adjust the voltage at pin 2 above 4.5V the LED will turn on.

hgmjr

Last edited by hgmjr; 08-16-2007 at 10:34 AM.
Reply With Quote
  #9  
Old 08-19-2007, 03:34 PM
jayrare jayrare is offline
New Member
 
Join Date: Aug 2007
Posts: 7
Default

I must be doing something wrong. I switched R2 to ground, and the voltage at it was 0 so how do I get the "reference voltage"?
Reply With Quote
  #10  
Old 08-19-2007, 03:56 PM
hgmjr's Avatar
hgmjr hgmjr is offline
Super Moderator
 
Join Date: Jan 2005
Location: Tennessee, USA (GMT-6)
Posts: 9,030
Blog Entries: 11
Default

Quote:
Originally Posted by jayrare View Post
I must be doing something wrong. I switched R2 to ground, and the voltage at it was 0 so how do I get the "reference voltage"?
I probably did not explain it that good.

What I meant for you to try was to keep the resistor R2 in its original connection state while taking a third resistor whose value was the same as R2 and connect one end of the resistor to the input that is presently connected to R2 and the other end of the resistor to ground. That will form a voltage divider that will provide the reference voltage of about 4.5 volts. The 4.5V is the reference voltage to which I was referring.

hgmjr
__________________
"No human being should be allowed to have this much fun."
hgmjr

May we never lose compassion for those who need our help and encouragement.
Reply With Quote
The Following User Says Thank You to hgmjr For This Useful Post:
gte (05-31-2010)
Reply   Post New Thread

Tags
,


Related Site Pages
Section Title
Worksheet Digital logic signals
Worksheet Kirchhoff's Laws
Worksheet Voltage divider circuits
Worksheet Series DC circuits
Textbook 555 MONOSTABLE MULTIVIBRATOR : 555 Timer Circuits
Textbook Basic gate function : Digital Integrated Circuits
Textbook Precision voltage follower : Analog Integrated Circuits
Textbook Voltage comparator : Analog Integrated Circuits
Textbook Special-purpose diodes : Diodes And Rectifiers
Textbook Simple parallel circuits : Series And Parallel Circuits


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bootstraped totempole .. will this work? Dyslexicbloke General Electronics Chat 14 06-07-2011 05:45 PM
Can this work? Rickvn General Electronics Chat 9 04-05-2011 11:26 PM
Limiting Amperage flow allowing Voltage to take over and do the potential work tf4624 Off-Topic 21 03-28-2011 06:29 PM
Comparator's output vks_foe General Electronics Chat 8 02-15-2009 12:01 PM
why my pic not work? Parinda Embedded Systems and Microcontrollers 0 06-02-2008 09:03 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:42 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.