Author Topic: opamp based comparators do not run together  (Read 726 times)

0 Members and 1 Guest are viewing this topic.

Offline cdc3ooTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
opamp based comparators do not run together
« on: February 28, 2021, 02:44:14 pm »
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:

1183624-01183628-1


What I get when both OPAs get the signal (CH3=comp.A, CH4=comp.B):

1183632-2


How they do running indivdually:

1183636-31183640-4


I did something wrong and fail to guess what ...
« Last Edit: February 28, 2021, 04:28:42 pm by cdc3oo »
awful newbie
 

Offline Albert Luna

  • Newbie
  • Posts: 7
  • Country: do
Re: opamp based comparators do not run together
« Reply #1 on: February 28, 2021, 05:05:53 pm »
What do you want to achieve in the end? a PWM? or just a triangle wave?
 

Offline mvs

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: de
Re: opamp based comparators do not run together
« Reply #2 on: February 28, 2021, 05:20:25 pm »
5532 has a pair of antiparallel diodes between IN+ and IN- and should not be used as comparator.
« Last Edit: February 28, 2021, 05:25:52 pm by mvs »
 
The following users thanked this post: cdc3oo

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6334
  • Country: ro
Re: opamp based comparators do not run together
« Reply #3 on: February 28, 2021, 05:27:50 pm »
https://www.ti.com/lit/ds/symlink/ne5532a.pdf

Because 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:

 
The following users thanked this post: cdc3oo

Offline magic

  • Super Contributor
  • ***
  • Posts: 6821
  • Country: pl
Re: opamp based comparators do not run together
« Reply #4 on: February 28, 2021, 06:46:17 pm »
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- side ;D

But 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.
 
The following users thanked this post: cdc3oo

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1891
  • Country: us
Re: opamp based comparators do not run together
« Reply #5 on: February 28, 2021, 06:56:39 pm »
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.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: cdc3oo

Offline cdc3ooTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: opamp based comparators do not run together
« Reply #6 on: February 28, 2021, 07:11:34 pm »
What do you want to achieve in the end? a PWM? or just a triangle wave?

A triangle for Y sweep and a +180mV/-180mV stairway


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- side ;D

But 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.

Ok, 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  :-+
awful newbie
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf