Lm319 comparator help

Thread Starter

MABDALLA

Joined Jan 21, 2014
25
I AM A ELECTRICAL ENGINEER STUDENT first year. I am hobbyist as well a fairly new one and am messing around with this LM319N to control some leds and need help trying figure out how to wire this comparator correctly. Im guess vcc goes to 5v supply and vee to ground?? not really sure on vee..or is it to negative supply??

ofcourse gnd to gnd and postive i got hooked up to a 100k pot and negative to two 10k resistors as a voltage divder…..i get the concept of a comparator just not getting what i want out of it …this is a dual comparator i got both sides wired the same except for the negative the resistor ratings are different…and on both outputs i got leds hooked up to them…i want one to come on before the other as i turn the 100k pot….i know a schematic would be more helpful but im new to drawing one out with eaglecad …i guess my main question is the VEE goes to negative supply or gnd? and if negative supply how can i get a negative supply?

**confused**
http://www.ti.com/lit/ds/symlink/lm119.pdf <<compartor datasheet
 

Thread Starter

MABDALLA

Joined Jan 21, 2014
25
i had vcc hooked up to 9v battery and and gnd to gnd…postive to 100k pot and negative to voltage divider which got it to about 3v….this is a dual comparator so i did same for both comparators except switched out the resisitors on the negative side of the volatage divder to equal less than 3v at about 2v on the other side..and on both outputs are LEDs…but for some reason when i turn the 100k pot both leds turn on at same time….it doesnt make since..one should turn on before the other accordng to the voltage divider the output will turn only when postive is more than negative? but they switch on at the exact time…when i turn the 100k pot connected to the postive

excuse me since i am very new at this…could this be due to the open collector output..im doing more readings on op amps and trying to get ahead before we actually get to this at school but im really in over my head

im confused
 

RichardO

Joined May 4, 2013
2,270
Note that this has open collector output.
Also note that the inputs do _not_ operate close to either ground or the power supply. For instance, when running from a 5 volt power supply, the inputs must remain between 1 and 3 volts.

This is a fairly high speed part which makes power supply bypassing important. Even with good high frequency practices the circuit may oscillate. You may need a small amount of positive feedback, creating a bit of hysteresis, to kill the oscillations.
 

atferrari

Joined Jan 6, 2004
4,771
excuse me since i am very new at this…could this be due to the open collector output..im doing more readings on op amps and trying to get ahead before we actually get to this at school but im really in over my head

im confused
Comparators and opamps: they are not the same.
 

t06afre

Joined May 11, 2009
5,934
@MABDALLA You are more than welcome to ask question in this forum. However i will strongly recommend that you also learn to use a circuit simulator. That will help you a lot in your schoolwork and hobbyist work. I do not use it my self. But many in this forum use the free version of LT-spice http://www.linear.com/designtools/software/ If you can present a circuit digram and some simulation results. It will be much more easy to give you precise help.
 

Thread Starter

MABDALLA

Joined Jan 21, 2014
25
SORRY GUYS…im pretty new at this…so i drew up a diagram of my circuit with the help of eaglecad….let me know what you guys seem wrong..when i got it hooked up like this the led does not turn on at all…im using an atx desktop powersupply for the the 12v and those reisistors are 10k..with a 100k pot
 

Thread Starter

MABDALLA

Joined Jan 21, 2014
25
still when i turn the trimpot…the led does not come on…my voltage divider is set at 6v on pin 5…so when i get above 6volts turning the trimpot the led should come on..but i get nothing
 

assuc

Joined Mar 23, 2012
77
still when i turn the trimpot…the led does not come on…my voltage divider is set at 6v on pin 5…so when i get above 6volts turning the trimpot the led should come on..but i get nothing
change the resistance connected in series to 330 ohm or 560 ohm
 

JoeJester

Joined Apr 26, 2005
4,390
still when i turn the trimpot…the led does not come on…my voltage divider is set at 6v on pin 5…so when i get above 6volts turning the trimpot the led should come on..but i get nothing
You have the output wired incorrectly for an open collector comparator. The anode of the LED should be connected to +V, and the resistor you choose might be too large, depending on the +V value.
 

Attachments

Last edited:

Thread Starter

MABDALLA

Joined Jan 21, 2014
25
You have the output wired incorrectly for an open collector comparator. The anode of the LED should be connected to +V, and the resistor you choose might be too large, depending on the +V value.
THANKS…did some research from what you told me and learned more about open collectors….had another issue…i put a 100k pot instead of the varibale resistor and it almost lit up …and started smoking….strange..i had 12v hooked up to the wiper and one side to ground and other to my postive input…did i wire this wrong?.or im thinking the pot was faulty..but i had three pots start smoking..chinease cheap kind..maybe there not good qaulity…its just strange
 

MrChips

Joined Oct 2, 2009
30,823
THANKS…did some research from what you told me and learned more about open collectors….had another issue…i put a 100k pot instead of the varibale resistor and it almost lit up …and started smoking….strange..i had 12v hooked up to the wiper and one side to ground and other to my postive input…did i wire this wrong?.or im thinking the pot was faulty..but i had three pots start smoking..chinease cheap kind..maybe there not good qaulity…its just strange
The pot is not faulty. You wired the pot incorrectly. When you connected the wiper to +12V and one end to GND you will smoke the pot sooner or later.

Those pots are now bad (at least that end of the pot).

Stop smoking pot, it's a bad habit.:D
 
Last edited:
Top