Lm319 comparator help

Discussion in 'Homework Help' started by MABDALLA, Jan 21, 2014.

  1. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    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
     
  2. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
  3. MrChips

    Moderator

    Oct 2, 2009
    12,437
    3,360
    You can operate the LM119/319 on single supply +5V and GND.

    Note that this has open collector output.
     
    MABDALLA likes this.
  4. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    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
     
  5. crutschow

    Expert

    Mar 14, 2008
    13,001
    3,229
    I'm confused also. Post a circuit diagram so we can understand what you have.
     
  6. RichardO

    Well-Known Member

    May 4, 2013
    1,233
    383
    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.
     
  7. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    762
    Comparators and opamps: they are not the same.
     
  8. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    @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.
     
  9. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    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[​IMG]
     
  10. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Pin 4 should come from the wiper of a pot whose outside terminals are wired between +12V and gnd.
     
  11. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    yea i actually made this correction

    [​IMG]
     
  12. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    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
     
  13. assuc

    Member

    Mar 23, 2012
    77
    1
    change the resistance connected in series to 330 ohm or 560 ohm
     
  14. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    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.
     
    Last edited: Jan 24, 2014
    MABDALLA likes this.
  15. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    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
     
  16. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    figured it all out..thanks to everyone who pointed out the open collector…
     
  17. MrChips

    Moderator

    Oct 2, 2009
    12,437
    3,360
    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: Jan 25, 2014
    MABDALLA likes this.
  18. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    Yes, you wired them wrong.
     
  19. MABDALLA

    Thread Starter New Member

    Jan 21, 2014
    25
    0
    yea i figured that out guys thanks…very strange though the pots still work
     
  20. WBahn

    Moderator

    Mar 31, 2012
    17,734
    4,789
    You just think they work. Throw them away. If you don't, you will probably regret it sooner or later.
     
Loading...