# Absolute value circuit around a non-zero value

I have searched for a few hours on the internet and in some circuit design books, but have been thusfar unable to find a circuit that produces absolute value around a number other than zero. Does anyone here know of such a circuit? An example IO would be: At Vin = 10, Vo = 10 At Vin = 9, Vo = 11 At Vin = 11, Vo = 11

I'm hoping to accomplish this with a single absolute value circuit, rather than subtracting 10 beforehand, taking the absolute value, and adding 10 or offsetting the result.

Thanks for any help

• Can you just take the normal absolute value circuit and offset its power supply? – Hearth Jul 31 '18 at 12:30
• @Jake - Every component you add will introduce error. – Bort Jul 31 '18 at 12:37
• What’s the real application? – PDuarte Jul 31 '18 at 12:49

In general you can just take an absolute value circuit and substitute a 10V reference for whatever it uses for a zero reference (which may be a power supply or something else). You will have to take care that there is enough power supply headroom, of course.

Here is a modification of a standard circuit:

to do what you want with, an LTspice simulation:

The blue trace is the input, the green is the output. Where the output goes flat at the beginning and end, it is saturating near the positive rail (+20V in this case).

This particular circuit does need a negative supply, however the +10V reference input is high impedance so you may be able to use a voltage divider etc.

Does anyone here know of such a circuit?

The circuit below can do what you want: -

You can set input voltage $e_2$ to be at 10 volts and A3 (an instumentation amplifier) can have its reference pin set to 10 volts (not shown in the circuit above).

$Z_L$ can be a resistor and it could equal R. The instrumentation amplifier can have gain set to unity by not fitting the gain resistor hence the equation becomes: -

$$e_O = |e_1 - e_2|+ e_2$$

• @Jake I've altered my answer - I didn't originally see that part. However, you will still need a 10 volt reference voltage. – Andy aka Jul 31 '18 at 12:40