Op amp output help

Discussion in 'General Electronics Chat' started by German Kuacher, Jul 31, 2015.

  1. German Kuacher

    Thread Starter New Member

    Jul 31, 2015
    5
    0
    I have a very similar circuit like the one in the image. The output is connected to a relay. And Vcc=24v
    It the circuit works great. Except from 1 problem. The output from the op-amp is 24v on high and 12v on low. The high one is fine but the low one should be 0 volts not 12v. Why this happens? as from were I know the op-amp should output a negative voltage(0v) not the ground one(12v)
    [​IMG]
     
  2. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    You are right. That circuit should be on or off. Something is broken in the chip.
    Do you have a protective diode on the relay coil? Perhaps the inductive reaction kicked the output stage of the op-amp to death.
     
  3. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,534
    1,251
    What is the zener diode value, and what is the range of the DC input?

    ak
     
  4. German Kuacher

    Thread Starter New Member

    Jul 31, 2015
    5
    0
    The diode has a value of 5v. And my input can be from 0v to 24v. The actual input from de diode is 4.46v.
    I used a NPN transistor before the relay and a diode to prevent any demage to the op-amp.

    I will try using a new op-amp, just to see if the result changes.
     
  5. German Kuacher

    Thread Starter New Member

    Jul 31, 2015
    5
    0
    I used a new one. The output is the same.
     
  6. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    I used lm393 and the result was much better..
    Simulating with 741, when the output should be low, I got 1.5 Volt instead of 0 Volt.
    If AG is here, he would have bad comments on 741.

    lm393 comparator.PNG

    Allen
     
    #12 likes this.
  7. German Kuacher

    Thread Starter New Member

    Jul 31, 2015
    5
    0
    Ok. Great y will try this one.

    Which simulator did you use?
     
  8. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    I use proteus 7.8 most of the time and sometimes LTSpive IV.

    Allen
     
  9. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    The 741 is about the worst possible opamp you could select to use in this circuit.
     
  10. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    Are you afraid he's going to exceed its gain bandwidth product by twiddling the potentiometer too fast?

    It's a really horrid old amplifier, but I see no problem with using it for a manually controlled comparator.
     
    Alec_t and AnalogKid like this.
  11. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No, the problem is that when low, the output pin of the 741 will only pull to ~2V above Vss, which in this circuit is grounded (0V).
    If used to turn on an NPN relay driver, this leaves the NPN always on unless you go to lengths to offset the offset...

    Ravi's circuit is typical of the crap that newbies post on the Internet. The Zener is not biased properly. There is no hysteresis. The circuit is not useful as drawn.

    In building a comparator like this, I would start with a real comparator chip; not use a 40year old opamp. Even a LM358 would work better, because it is capable of pulling very close to Vss.

    Assuming that the OP insists on using the 741, here is what it would take to make the circuit work:

    101.gif

    Notes: I properly biased the Zener (changed R1). I added hysteresis to prevent chatter (R4). I got rid of the output offset (see V(out) Green trace) by adding the voltage divider R2 R3, which are adequate to deliver ~5mA to the base of the NPN, meaning that the resistance of the 12Vdc relay coil L1 should be >=240Ω.
     
    absf likes this.
  12. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    Definitely an improvement to have a schematic.
    The other side of the coin is that a beginner will get a lot of education before arriving at your circuit.
    It depends on what the goal is today.
    "It won't go below 12 volts" seems to say the first problem is a broken part or a mis-wire.
    When the chip won't go below 2 volts, that is when the drive circuit to the transistor gets important.
    If only this were in the Homework Forum, we could have messed with this guy for 2 days.:D
     
    absf likes this.
  13. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,534
    1,251
    So would I, but he's not us, and that's the point.

    1. Fortunately for me, I was born a fully experienced analog designer who never makes misteaks and had nothing more to learn.
    2. The LM741 is 47 years old, not 40.
    3. The 702, 709, and 101 were necessary steps in the evolution of solid state electronics, but the 741 was the first opamp in the modern sense. Learning what it can do, and cannot do, is an essential step and almost a rite of passage in learning about analog components.
    And, It.changed.the.world.

    ak
     
    absf and #12 like this.
  14. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    I was (un)lucky enough to be in the game when "real" engineers were designing with the LM741. Fifteen percent of the chips had to be replaced before the products would work. :mad:

    What am I complaining about? :rolleyes: Correcting the real engineers kept me employed and literally forced my education to progress.

    Today, noobs still try to make them (LM741's) work. Would I deny them the experience of learning the limitations that are still real (in a much lesser degree) today? Pick any random op-amp and there are good odds that it will have one or more of the limitations of a 741. Miserable slew rate, input offset voltage, input bias current, output current limitations, common mode input range limitations, power supply maximums...Every circuit is a row of limitations, compromises, and optimizations. What impedance range do I need to be in? How much current does a zener need? Why won't the output go to zero? What do you mean, the output inverts when you exceed the common mode input range? Learning how to make less than optimal parts work is very educational. Slamming the answer on the table is expedient, but it isn't nearly as educational as working through the errors until the circuit works.

    [end rant]
     
  15. JohnInTX

    Moderator

    Jun 26, 2012
    2,345
    1,025
    Luxury!
    When I was young, it was the uA301 or nothing.. The 'real engineers' would look at our oscillating sensor amps and send us to bed without supper!
    Had to pull your chain - You make a great point.
     
    #12 likes this.
  16. German Kuacher

    Thread Starter New Member

    Jul 31, 2015
    5
    0
    I'm not a moderator but this is out of context. Any way thanks a lot for the help.
     
  17. Veracohr

    Well-Known Member

    Jan 3, 2011
    550
    75
    You said you have a very similar circuit, not the same circuit. What are the differences?
     
  18. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    We tend to wander off occasionally. As long as you're answered, it seems OK.

    @JohnInTX
    The 301 was, "the other chip" in that factory. I remember each one had a frequency limiting capacitor attached. When the production line got the caps mixed up, I got some education about what, "slew rate" means. :D

    The 301 designs were one engineer, whom I can still name, and the 741 design was from the other engineer. He thought he had, "won" because the 741 chips cost less...until he found out 15% of them would not work in his design. :rolleyes:

    More than 40 years later, and I'm still teaching people about the mistakes that were made in 1973.
    Memory Lane.:p
     
  19. JohnInTX

    Moderator

    Jun 26, 2012
    2,345
    1,025
    Yeah, that was the freq. compensation cap which had to be tuned to the expected bandwidth of the system.. of course if that got pushed due to transients or (in my case not knowing WTF I was doing).. hello rails! We were building a machine that shot a laser into an oscillating mirror then through inhibition zones on a petri dish in an attempt to speed up assays for screening new antibiotics. It counted when the zone was clear and not when diffused. A stepper-driven table moved the dish through the scan and a lot of TTL added it all up. Eventually, we settled on some monolithic amp (as we called them in those days) over my wishes to use a Burr-Brown hybrid epoxy brick that worked good enough to get me out of the lab before the bars closed....
    Thanks for the memories - I think..
     
    #12 likes this.
  20. JohnInTX

    Moderator

    Jun 26, 2012
    2,345
    1,025
    There's context?
    • :D
     
Loading...