|
Subtraction OP-AMP that outputs absolute value. ORANGE minus GREEN will give you BLUE. U1 and U2 input into U3 for a difference at 1 Gain. U4 and U5 work to output the absolute value (RED) of U3 output (BLUE).
Adjust the wiper arms of V1 and V2 to generate two voltage inputs into U3. If V1 > V2, then U3 output is positive. If V1 < V2, then U3 output is negative.
If output of U3 is negative, U4 will invert the signal to positive... however, the reverse bias diode on the output will prevent the input into U5. Also, the feedback diode on U4 will cause a zero gain. Instead, the negative U3 output will bypass U4 through the 20K resistor (Rb) to the inverting input to U5. U5 will then invert the negative input with 1 gain resulting in a positive output.
If the output of U3 is positive, U4 will invert the signal to negative with a gain of 1 (feedback diode is now reverse biased but output diode is forward biased). The positive output of U3 will also go through the bypass resistor (Rb) and combine with U4 output at the input of U5. However, the input resistor coming from U4 is half the value of Rb... therefore the input is 1/2 gain of the negative output of U4. U5 will then invert the 1/2 gain negative input with a 2 gain output, once again resulting in a positive signal.
|