# Understanding an absolute-difference circuit

#### Menyman

Joined Jan 31, 2021
6

#### PRASS

Joined Feb 22, 2018
31
Having some trouble understanding the case where V2>V1.
how does this work?
Hello Menyman,

You may want to look up comparators & also a LM358 ic.
You may find some of what you are looking for there.

#### Menyman

Joined Jan 31, 2021
6
Hi PRASS,
Don't think there's any relevance here to comparators..

Here's what i'm thinking:
For V1>V2: diode is off, the second opamp acts as a standard differential amplifier.
For V2>V1: Not sure my analysis is correct (would be happy to hear your inputs)-
The first opamp acts as a diff amplifier, the second as a buffer –
that way the top resistor R2 is in a close loop all the way from the first opamp’s output, to its negative input.

Any chance I'm right?

#### Boatman47

Joined Jan 22, 2021
11
As a novice, I am still trying to figure out the intended function of the circuit. Are the input voltages DC or AC for comparison? Using a value of 1k for R1 and 2k for R2 I ran this in Multisim and the measured values bear no resemblance to the ones presumed.

#### PRASS

Joined Feb 22, 2018
31
Hi Menyman,

Yes very much so.
It's like a self oscillating circuit that uses it's own reverb as its gain to produce a linear digital signal from a analogue signal.

Awesome for making frequencies out of Hz readings. . . .

#### crutschow

Joined Mar 14, 2008
34,392
Any chance I'm right?
Sort of.
Did you not understand the explanation given in the article about the circuit operation?

#### Menyman

Joined Jan 31, 2021
6
The explanation for the discussed case is:
" For the case where V2 >V1 , diode D1 conducts, producing the composite amplifier system made up of both IC1A and IC1B , where VOUT =(R2 /R1 )(V2 −V1 ) "

So no, did not understand much from it

#### Menyman

Joined Jan 31, 2021
6
Sort of.
Did you not understand the explanation given in the article about the circuit operation?
The explanation for the discussed case is:
"For the case where V2 >V1, diode D1 conducts, producing the composite amplifier system made up of both IC1A and IC1B, where VOUT =(R2/R1)(V2−V1 )"

So no, did not understand much from it

#### ericgibbs

Joined Jan 29, 2010
18,835
hi Menyman,
I have arbitrarily
chosen all resistor values as 5k.

If you want to see the other Test point waveforms, ask.
E

#### PRASS

Joined Feb 22, 2018
31
Hi ericgibbs,

VO should be coming out as a Linear Digital signal.

It's probably becuase your using 2 LT1078's which is only a duel op amp & not a quad. The LM2902 is a quad op amp.
Perhaps try a LT1079 which is an quad op amp.

This means you have applied a 9V+ at pin 8 & ground at pin 4 on both yours whereas a LM2902 has 5V+ at pin 4 & ground at pin 11. You have agian powered the 2nd LT1078 in your diagram which would completely defeat the purpose of using it as a comparitor (absolute-difference circuit) & just turns it into a second op amp not a coposite amp.

This is the LM2902 from the artical. _____________________________________________ This is a LT1078A

#### Attachments

• 132.7 KB Views: 0
• 438.3 KB Views: 0

#### ericgibbs

Joined Jan 29, 2010
18,835
@PRASS
Could you explain how you decided the circuit works in that way in post #10.?

What is the definition of: Absolute Difference Amp?

E

#### Sensacell

Joined Jun 19, 2012
3,442

#### PRASS

Joined Feb 22, 2018
31
@PRASS
Could you explain how you decided the circuit works in that way in post #10.?
What is the definition of: Absolute Difference Amp?
Hi Eric,

I didn't decide anything it's what a absolute-difference circuits is designed to do, a device that compares two voltages or currents and outputs a digital signal indicating which is larger !!!
Since you were using a Sine wave it should also be linear.
Artical from the same publisher years before hand.

?????????????

#### ericgibbs

Joined Jan 29, 2010
18,835
and outputs a digital signal indicating which is larger !!!
hi,
It does NOT work in that way.
E

#### PRASS

Joined Feb 22, 2018
31
There is nothing "digital" going on here? It's an entirely analog signal processing block.
Do you not see the diode ?

#### ericgibbs

Joined Jan 29, 2010
18,835
The diode is used as rectifier.
You obviously do not understand the circuit.

#### PRASS

Joined Feb 22, 2018
31

#### crutschow

Joined Mar 14, 2008
34,392
That's strictly an analog circuit, nothing digital about it.
Do you not see the diode ?
Yes.
A diode can be used in an analog circuit (and is used in many of them) without making it digital.
Do you really think that any circuit with a diode is digital?

Last edited:

#### Boatman47

Joined Jan 22, 2021
11
hi Menyman,
I have arbitrarily
chosen all resistor values as 5k.

If you want to see the other Test point waveforms, ask.
E
View attachment 229234
Thank you. This tells all. Much appreciated.

#### Menyman

Joined Jan 31, 2021
6
hi Menyman,
I have arbitrarily
chosen all resistor values as 5k.

If you want to see the other Test point waveforms, ask.
E
Thanks for the simulation, we can see clearly that the output of the circuit indeed matches its purpose.
However I'm still a little struggling to understand how does the circuit operate when V2>V1.
If the left amplifier acts in that case a differential amplifier, how does the loop close?

Is the right amplifier acts as a buffer in that case (with R2 in its feedback)?
If so, won't R1 (which is connected to V2) changes the operation of this amplifier?