<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>The transistor provides the rectification and the output is taken
from its collector.</p>
<p>For an input range of ±5V and output range of +5V, it works (more
or less.) Yes it's _far_ from perfect and there are some caveats
however the design challenge was for simplicity, not fidelity. :P</p>
<p>Ramshackle fix (+10V output): <a class="moz-txt-link-freetext" href="https://tinyurl.com/26dfwymf">https://tinyurl.com/26dfwymf</a><br>
</p>
<p><img src="cid:part1.nIBDErVA.SlGLhG3p@ashlynblack.com" alt=""></p>
<p><br>
</p>
<p>Pursuant to your circuit description:
<a class="moz-txt-link-freetext" href="https://tinyurl.com/2xweb2sh">https://tinyurl.com/2xweb2sh</a></p>
<p><img src="cid:part2.x6veHesW.HbZY62lH@ashlynblack.com" alt=""></p>
<p>- Ashlyn :3<br>
</p>
<div class="moz-cite-prefix">On 23/3/24 07:39, brianw wrote:<br>
</div>
<blockquote type="cite"
cite="mid:05415E68-DEEF-4BF7-A839-8E2F75889C02@audiobanshee.com">
<pre class="moz-quote-pre" wrap="">I might be missing something, but it seems like you'd need two op-amps in parallel, with diodes to combine them.
|a-b| is either (a-b) or (b-a) depending upon which input is greater.
I assume this means you'll need two op-amps. One op-amp has a into the + input and b into the - input, while the other op-amp has a into the - input and b into the + input. These two op-amp outputs will represent (a-b) and (b-a), respectively. From those, a couple of diodes can combine them, and the larger will drive the next stage. You'll probably want a third op-amp to buffer after the diodes.
i.e. When a is greater than b, a-b will be positive, and it will pass through a diode to the final stage where it represents |a-b| correctly. However, when a is less than b, b-a will be positive, and the other op-amp will pass through the other diode to the final stage, where b-a is the same as |a-b|
Full wave rectifiers work on center-tapped transformer outputs, because you start with two waves, both the normal and inverted polarity, feeding the rectifier bridge such that there is always a positive cycle. Without the center tap, you end up with only the positive half cycle of the sine wave, and near-zero volts for the other half of the cycle. A bridge rectifier does not generate the opposite polarity via diodes alone - you need a transformer that feeds both polarities to the two bridge inputs.
By the way, what does the 2N3904 do in the suggested circuit provided? Is it merely an emitter-follower buffer?
Running the simulation, I see that with A=5V and B=-5V, the output is the full +10V (correct absolute value of the difference). However, when A=-5V and B=5V, the output is capped at +5V (incorrect, because it's only half the absolute difference).
After the simulation, I realized that I assumed only positive inputs before the difference, and only the difference would be positive or negative. My suggested circuit will still work for bipolar inputs, with the caveat that the output can be twice as large due to the difference.
Brian
On 22/3/24 05:50, Rutger Vlek via Synth-diy wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
________________________________________________________
This is the Synth-diy mailing list
Submit email to: <a class="moz-txt-link-abbreviated" href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a>
View archive at: <a class="moz-txt-link-freetext" href="https://synth-diy.org/pipermail/synth-diy/">https://synth-diy.org/pipermail/synth-diy/</a>
Check your settings at: <a class="moz-txt-link-freetext" href="https://synth-diy.org/mailman/listinfo/synth-diy">https://synth-diy.org/mailman/listinfo/synth-diy</a>
Selling or trading? Use <a class="moz-txt-link-abbreviated" href="mailto:marketplace@synth-diy.org">marketplace@synth-diy.org</a>
</pre>
</blockquote>
</body>
</html>