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

Ashlyn Black ashlyn at ashlynblack.com
Fri Mar 22 03:26:34 CET 2024

(just in case the one with attachments doesn't survive the server)


Some distortion is okay, correct?

One version running off Eurorack tri-rail (+12V, -12V, +5V) by itself 
and another if you're doing a whole bunch of them (mentioned) and you're 
generating the bias voltages externally (smaller part count.)

1x op-amp (2 if you're buffering the output, nice for dual/quad op-amp 
6x 10k resistors (homogenize that BOM!)
1x NPN transistor

Select op-amp, transistor and resistors to taste. :3

- Ashlyn
(again, sorry if the first reply does make it through and this is a 

On 22/3/24 05:50, Rutger Vlek via Synth-diy wrote:
> 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? Usemarketplace at synth-diy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20240322/e2ea9e3f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6l6nBu0iXqolsLQ0.jpeg
Type: image/jpeg
Size: 29728 bytes
Desc: not available
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20240322/e2ea9e3f/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hf4UIgaM0fHlEMOS.jpeg
Type: image/jpeg
Size: 23821 bytes
Desc: not available
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20240322/e2ea9e3f/attachment-0001.jpeg>

More information about the Synth-diy mailing list