# [sdiy] Simple circuit challenge: |a-b|

Rutger Vlek rutgervlek at gmail.com
Mon Apr 1 12:32:41 CEST 2024

```Thanks everyone for the suggestions!

I agree with Roman, the Graetz bridge solution is very elegant, thanks for
sharing Osamu! Will keep you posted on progress with this circuit. If the
prototype works as expected, I'll share the details here on the list.

Rutger

Op do 28 mrt 2024 om 03:43 schreef houshu at muj.biglobe.ne.jp <
houshu at muj.biglobe.ne.jp>:

> Hello Rutger and List,
>
>
> Here is my solution.
>
>
> |a-b| = Max(a,b) - min(a,b).
>
>
> If output offset is acceptable, we can omit D5, D6, and R7.
>
> Impedance of inputs should be low. When one of inputs is open, output is a
> little distorted.
>
>
> Sam HOSHUYAMA
>
> Kawasaki, Japan.
>
>
>
> ------ Original Message ------
> 差出人: "Rutger Vlek via Synth-diy" <synth-diy at synth-diy.org>
> To: "SDIY List" <Synth-diy at synth-diy.org>
> 送信済み: 金曜日, 2024/3/22 04:50
> 件名: [sdiy] Simple circuit challenge: |a-b|
>
> Dear list,
>
> while hobbying on an experimental design, I'm looking for a simple analog
> circuit to give me the absolute value of the difference between two signals
> (mathematically written as |a-b|).
>
> I already have a working circuit, but it's rather big for my needs. It
> uses an inverting opamp to invert signal A, followed by a bog-standard full
> wave precision rectifier circuit where -A and B are summed together and
> being rectified. The total is 3 opamps, 2 diodes and 9 resistors. As I need
> to repeat the circuit many times in the final application, I'm wondering:
> is there anything simpler that can do this?
>
> Requirements:
> - working across full audio range
> - distortion as consequence of diode drops is no problem (might even be
> beneficial!)
>
> Many thanks for any suggestions!
>
> Regards,
>
> Rutger
> ------------------------------
> ________________________________________________________
> This is the Synth-diy mailing list
> Submit email to: Synth-diy at synth-diy.org
> View archive at: https://synth-diy.org/pipermail/synth-diy/
> Check your settings at: https://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20240401/0b032bf7/attachment.htm>
```