# unsigned op amp output?

edit: OK, I am making it simpler. Currently, the input varies from -1 to +1V, and the output is (obviously) -1 to +1V. I want the output to vary from 0 to +1V. Not just shifted up with a dc bias and gain halved. The negative half cycle should be folded up to the positive side... similar to what happens in full wave bridge rectifier. But that is floating, like my previous wrong circuit shows. I want the output (0-1V) to not be floating but ground referenced.

example:

input    output
0        0
0.5      0.5
1        1
-0.5     +0.5    (sorry about previous typo in this line)
-1       1       (sorry about previous typo in this line)


hopefully this will explain

original post

Signal varies from 8 to 10V. I need the absolute value with 9V reference. i.e. 8V signal should give me 10V output, as well as 10V signal should give me 10V output. Is there a better way to do it?

i.e. any sway from 9V gives me the magnitude, disregarding whether it is up or down.

[edit: this circuit will not work. I need the output to be ground based.]

PS: I may have to put in a 1k feedback resistor, but ignoring it for the moment.

I want to actually build a 2 quadrant power supply, and having difficulty regulating the sink current. The rest is working fine.

• Regarding your edit, shouldn't 10 --> 1 and 8 --> 1 instead of --> 10? Otherwise you have a major discontinuity in the transfer function. – Transistor May 6 '18 at 20:55
• Your circuit doesn't look very plausible. U1 output = sig. If you put a resistive load on the bridge you'll get something like what you say you want but it won't be ground-based and the 2 diode drops means that you won't see much output until the deviation exceeds 1.2V or so. – Spehro Pefhany May 6 '18 at 21:40
• You're right, I do need something ground based... so actually, my circuit above will not work. So how do I do it? Do I need 2 op amps with 1 diode each (for each half of the cycle, negative cycle inverted with one op amp)? The diode drop is not a problem as input varies from 8-10V. – Indraneel May 6 '18 at 22:01
• You haven't responded to my comment on the output. We're still unsure what you are trying to achieve. – Transistor May 6 '18 at 22:17
• Here is another question that is extremely related. And here are some others, 1, 2, tons of others – Harry Svensson May 6 '18 at 22:53

Figure 1. LT1078 Absolute Value Circuit (Full-Wave Rectifier).

For negative inputs, the first section operates as a closed-loop inverter (A=-1) and the second stage is simply a buffer for the positive output. When the input signal is positive, the first opamp output remains saturated near ground and the diode becomes high-impedance, allowing the signal to pass directly to the buffer stage non inverted. The composite effect is a full-wave rectified waveform at the output of the buffer.

It seems as though this will satisfy the basic requirement of your question.

simulate this circuit – Schematic created using CircuitLab

Figure 2. 9 V DC offset removal.

Your original question suggested that there is a 9 V bias on the input signal that needs to be removed. The 'adder' circuit of Figure 2 will accomplish that by adding -9 V to the input signal. This circuit is inverting but that won't matter to a full-wave rectifier that follows.

• Thanks. That is perfect! No need to remove the 9V bias, I added it there as the op amps are working from single ended supply. – Indraneel May 6 '18 at 23:45