Failure to circuit simple Op-Amp

Discussion in 'General Electronics Chat' started by levydee, Jan 12, 2017.

  1. levydee

    Thread Starter New Member

    Oct 18, 2016
    14
    1
    Good evening,

    I am having issues getting a simple op-amp circuit to run. I am using a LM339 quad op-amp IC with out success. The simple circuit is pictured.

    I am using a 9v Battery to power the circuit. I have pin 12 to ground, pin 3 to Vcc, pin 4 to ground and pin 5 high. Should this not output a high signal to pin 2 and power my LED?

    Please help!

    Thank you. IMAG0656.jpg
     
  2. WBahn

    Moderator

    Mar 31, 2012
    24,562
    7,700
    First off, the LM339 is not an op-amp, it is a comparator.

    Second, it has open collector outputs.

    Third, it is only spec'ed as being able to sink 6 mA (though typical is 16 mA).

    Do yourself a favor and go look up the data sheet and study it.

    Also, the best way to communicate information about a circuit is via a schematic.
     
    Last edited: Jan 12, 2017
  3. levydee

    Thread Starter New Member

    Oct 18, 2016
    14
    1
    Its a comparator that uses 4 open loop configured op-amps.

    The open collector output comment is all I needed. Thank you.
     
  4. Dodgydave

    AAC Fanatic!

    Jun 22, 2012
    8,287
    1,449
    Notice the Output has an "Open Collector" so it will not give a positive output, you have to to "pull it up" with the load...

    339.gif
     
  5. levydee

    Thread Starter New Member

    Oct 18, 2016
    14
    1
    Thank you!
     
  6. levydee

    Thread Starter New Member

    Oct 18, 2016
    14
    1
    Does the 16ma current output sink mean that my collector load can only run 16ma to ground through the open collector output without damaging the IC?
     
  7. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,760
    2,119
    16 mA is the typical current; the guaranteed minimum is 6mA
    upload_2017-1-12_18-50-32.png
    upload_2017-1-12_18-50-55.png

    Whether this will damage the chip depends.
    upload_2017-1-12_18-49-23.png
    upload_2017-1-12_18-49-51.png
     
  8. levydee

    Thread Starter New Member

    Oct 18, 2016
    14
    1
    Thank you for all of the good information so far. As suggested earlier, I have drawn up the simple schematic. I am still not having any luck at all to get this damned LED to light up. Any suggestions? IMAG0657.jpg
     
  9. WBahn

    Moderator

    Mar 31, 2012
    24,562
    7,700
    Not surprising. To get it to light up the output has to be LO. Fine. But that means that the non-inverting input (pin 5) has to be lower than the inverting input (pin 4). Since the inverting input is tied to the negative rail, that means that the non-inverting input must be lower than the negative rail. But in your circuit, the non-inverting input must always be somewhere between the negative rail and the positive rail.

    Try using another voltage divider to provide the signal to the inverting input that is somewhere around midway between the two rails -- this is easily accomplished by just using two equal-value resistors.
     
  10. Dodgydave

    AAC Fanatic!

    Jun 22, 2012
    8,287
    1,449
    Like these.....


    ComparatorCdS.GIF
     
  11. levydee

    Thread Starter New Member

    Oct 18, 2016
    14
    1
    Thank you for all of your input so far. I have got it working, but I am confused and would like to understand why the output must be LO. The output is an open collector to an NPN transistor. 1) Is Vbe grounded to pin 12? and 2) how does a LO output activate the base of the NPN?

    Thank you
     
  12. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,760
    2,119
    The comparator output can only sink current.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    24,562
    7,700
    The output is an NPN transistor (or an NFET for CMOS versions) and it can only pull the output pin LO. To make this happen, the internal signal driving the base/gate of the transistor is taken HI; but this is an internal signal that you don't have access to. The output that you see is the collector/drain of the output transistor.
     
  14. Tonyr1084

    Distinguished Member

    Sep 24, 2015
    3,468
    947
    An Op-Amp that provides both power and ground has an output that is tied internally to the supply rails (positive and negative). An "Open Collector" output is not tied to positive. It can only be "OPEN" or "GROUND" (or whatever the negative rail is).

    Not sure what you're trying to accomplish so I may be wrong here, but your inputs to the op amp are (if both resistors are the same value) 4.5 volts on the non-inverting input (the positive) and zero volts on the inverting (negative) input. When positive is more positive than negative then the output will be OPEN. Since it does not provide power it can't be HIGH. Only if pin 4 were tied to the positive rail would the LED come on the way you have the circuit drawn. The reason why is because the negative input (9V) would be more positive than the positive input (4.5V) When negative is greater than positive the output will pull to ground, and your LED would light.

    The circuits that have been provided shows a fixed voltage on the negative input. R1 and R2 show a fixed resistor and a photo resistor. Therefore the voltage on the positive changes when the photo resistor value changes with light level. You have a comparator that looks to see which input is higher. When positive is more positive than negative then the output goes open, thus turning the LED off.
     
Loading...