In this circuit the voltage at the output is the absolute value of the input voltage times the gain. The gain depends on R2 and R1 according the following formulas. The circuit is shown in figure 1.
Formula
Absolute value amplifier:
G = R2 / R1
and
Vout = Vin x (V2 / V1)
Where:
G is the gain
Vout is the output voltage in volts (V)
Vin is the input voltage in volts (V)
R1 and R2 are the resistances in ohm (Ω)
Note: a) Vout must be lower than the power supply voltage.
b) R3 is chosen according the application. Typical values are R3 = R1.