Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 3rd June 2008, 04:29 AM   (permalink)
Smile Comparator circuit

I cannot make this circuit work. Please help. I took the circuit idea from a comparator WEB tutorial (that probably I did not undestood). The LED must turn on when I connect +5V to point A. Should it?

Thanks a lot.
Attached Images
File Type: gif comparator1.GIF (6.9 KB, 49 views)
prprog is offline  
Old 3rd June 2008, 06:58 AM   (permalink)
Default

Should work. Check your wiring, or perhaps your LED is backwards.
Mikebits is offline  
Old 3rd June 2008, 01:46 PM   (permalink)
Default Comparator circuit

Thanks but I believed the LED is correctly oriented as it is. Anyway I change its orientation an it remain on all the time (even without any reference voltage).??? Any ideas??

Thanks.
prprog is offline  
Old 3rd June 2008, 01:58 PM   (permalink)
Default

Quote:
Originally Posted by prprog View Post
Thanks but I believed the LED is correctly oriented as it is. Anyway I change its orientation an it remain on all the time (even without any reference voltage).??? Any ideas??

Thanks.
Hi,
I assume you have pin 2 as the output.

Which pin are you usin as the reference voltage.?

You say the LED, glows which ever way round its connected.?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 3rd June 2008, 02:06 PM   (permalink)
Default

hi,
This drawing shows the states of the LM339.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 12:25 PM.
ericgibbs is online now  
Old 3rd June 2008, 03:48 PM   (permalink)
Default

Quote:
Originally Posted by prprog View Post
Thanks but I believed the LED is correctly oriented as it is. Anyway I change its orientation an it remain on all the time (even without any reference voltage).??? Any ideas??

Thanks.
That's impossible, if the LED cathode was connected to +5 your LED will never light. You've wired up something wrong.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 3rd June 2008, 04:16 PM   (permalink)
Default Comparator

Blueroomelectronics thanks for the reply.
Can you check the circuit diagram and tell me the correct connection of the LED? I try by connecting it the other way and it stay led all the time (even without the reference voltage or input voltage). I have seem many circuits on the web for comparator and the LED is always connected backwards???? This really confused me.

ericgibbs -> thanks eric . Pin 5 is the reference voltage (2.5 V) . Pin 4 is the input voltage, 5 volts in this case. Pin 2 is the output. So in this scenario the led must turn on when Pin 4 received the 5 volts.

Thanks
prprog is offline  
Old 3rd June 2008, 05:28 PM   (permalink)
Default

Quote:
Originally Posted by prprog View Post
ericgibbs -> thanks eric . Pin 5 is the reference voltage (2.5 V) . Pin 4 is the input voltage, 5 volts in this case. Pin 2 is the output. So in this scenario the led must turn on when Pin 4 received the 5 volts.
Thanks
hi,
When pin 4 goes higher than +2.5V the output will go low and the LED will light.

Try connecting pin 4 to about +3V, rather than directly to +5V, some comparator input/outputs will misoperate at voltages close to their supply voltage.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 3rd June 2008, 06:15 PM   (permalink)
Default

I just looked at the data sheet. I think you need a pull up on the output pin 2. In other words, put a 10K res from pin 2 to +5V.

Last edited by Mikebits; 3rd June 2008 at 06:20 PM.
Mikebits is offline  
Old 3rd June 2008, 06:34 PM   (permalink)
Default

Forget what I just said, I realize I was wrong. oops.
Mikebits is offline  
Old 3rd June 2008, 06:45 PM   (permalink)
Default Comparator

Mikebits - thanks.
I will try that when I get home. The pull up will be from pin 2 to 5v and the LED will be tied to pin 2 and ground. Correct ? (This is very different to the circuits I have seem on the web and also on a very old radio shack F.Mims book I have.)
Thanks again.
prprog is offline  
Old 3rd June 2008, 06:47 PM   (permalink)
Default Comparator

Mikebits .So I should not try this. Any suggestion? Should I try ericgibbs suggestion on the 3v instead of 5v.?

Thanks to all.
prprog is offline  
Old 3rd June 2008, 07:04 PM   (permalink)
Default

Quote:
Originally Posted by prprog View Post
Mikebits - thanks.
I will try that when I get home. The pull up will be from pin 2 to 5v and the LED will be tied to pin 2 and ground. Correct ? (This is very different to the circuits I have seem on the web and also on a very old radio shack F.Mims book I have.)
Thanks again.
hi,
If you connect the LED that way, it will work the other way around, that is the LED will go OFF when the Vin > +2.5V.

Try a lower voltage than +5V on pin4.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 3rd June 2008, 11:02 PM   (permalink)
Default

Is it possible that the circuit is breaking into an oscillation when the voltage is removed from pin 4. When the 5v jumper is pulled away, the pin 4 is left floating into a Wide band high gain circuit. Maybe a cap on pin 4 to ground would help??? What do ya think?

Last edited by Mikebits; 3rd June 2008 at 11:03 PM.
Mikebits is offline  
Old 4th June 2008, 12:18 AM   (permalink)
Default

Why not kick off the LM339? Use an LM358 instead. Works reliably.
Boncuk is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Help with comparator circuit rb salyer Electronic Projects Design/Ideas/Reviews 1 6th April 2008 01:32 PM
Comparator circuit ThermalRunaway General Electronics Chat 3 11th September 2007 07:13 PM
Comparator Circuit bigG General Electronics Chat 4 22nd March 2007 10:52 PM
Comparator circuit George L. General Electronics Chat 3 21st June 2005 06:51 AM
comparator circuit question dano General Electronics Chat 10 17th April 2004 11:17 PM



All times are GMT. The time now is 09:44 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker