opamp based comparators do not run together - Page 1
Forum section: electronics / beginners

author: cdc3oo
author_rank: Contributor
timestamp: February 28, 2021, 02:44:14 pm
content: Hi !I have to admit I'm a real n00b. My issue is with two OPAs set as comparators with two reference voltages. References are on non-inverting inputs and the others a fed with a 5Vpp triangle signal. When testing each comparator separately, I mean not feeding the other, they work as expected: I get the full swing output with each. When both get the triangle input signal, it looks like they no longer compare anything. One is stuck at V+ rail while the other output is at V-. Rails are +12/-12, OPAs are 5532, Spice simulation is OK, Vrefs too...The schematics and the simulation:What I get when both OPAs get the signal (CH3=comp.A, CH4=comp.B):How they do running indivdually:I did something wrong and fail to guess what ...

author: Albert Luna
author_rank: Newbie
timestamp: February 28, 2021, 05:05:53 pm
content: What do you want to achieve in the end? a PWM? or just a triangle wave?

author: mvs
author_rank: Frequent Contributor
timestamp: February 28, 2021, 05:20:25 pm
content: 5532 has a pair of antiparallel diodes between IN+ and IN- and should not be used as comparator.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 28, 2021, 05:27:50 pm
content: https://www.ti.com/lit/ds/symlink/ne5532a.pdfBecause of the 2 transistors between of the inputs (connected as antiparallel protection diodes), this opamp can not work properly as a comparator when the voltage between In+ and In- is higher than 0.6V.As a side note in case you need a stairway signal, this is a nice way to get that:

author: magic
author_rank: Super Contributor
timestamp: February 28, 2021, 06:46:17 pm
content: NE5532 works perfectly fine as a comparator and it isn't even getting destroyed by this circuit, because R4~R6 limit the current flowing through protection diodes from the IN- sideBut what happens is that you now have a diode in the lower opamp which pulls refB up towards TRIANGLE and as a result, refA increases above TRIANGLE. Ditto with refA being clamped not too high above TRIANGLE by the upper opamp and hence refB being lower than expected. Add those diodes to the sim and you will see.358, 4558, 741, any of the old junk would be fine, but 5532 and most fancy audio opamps not.

author: fourfathom
author_rank: Super Contributor
timestamp: February 28, 2021, 06:56:39 pm
content: If you insist on using those NE5532 opamps, insert a large resistor between each of the ref divider taps and the opamp (-) inputs (that's two resistors total), say about 100K. The opamp inputs have a (typical) 0.2uA input bias current so this will shift the ref voltages by about 20mV, which probably won't matter in your case. The opamp input diode clamp current will still affect the ref voltages, but not by much. Reduce the values of your ref divider resistors if this is a problem.

author: cdc3oo
author_rank: Contributor
timestamp: February 28, 2021, 07:11:34 pm
content: Quote from: Albert Luna on February 28, 2021, 05:05:53 pmA triangle for Y sweep and a +180mV/-180mV stairwayQuote from: magic on February 28, 2021, 06:46:17 pmOk, I believe I got it and now understand how I fried one of them when messing with the breadboard ...Thank you all for the advices.Very much appreciated