# Circuit that adds offset if input voltage is negative and subtracts offset if input is positive

I'm trying to build a circuit that will have an input DC signal. I know there is a stead DC offset in the signal, and want to subtract it. I do not know if the input signal is positive or negative. If it is positive, I need to subtract the DC offset, and if the input is negative then I need to add the AD offset. Is there any circuit or way to do this? The only way I can think of is using a switch that would go between a summing op-amp or differential op-amp that needs to manually be switched after someone manually checks if the input is positive or negative.

• I think this is chopper. Look in some high precision sigma delta ADCs. – Marko Buršič Apr 19 '16 at 16:38
• You have a "DC signal" and some "DC noise". How do you tell them apart? – Dave Tweed Apr 19 '16 at 16:39
• @DaveTweed we know the DC noise experimentally. We then are multiplying the main signal to work with, but want to remove the noise first. The noise is constant and does not vary between measurements. – TheStrangeQuark Apr 19 '16 at 16:41
• Where is this 'DC noise' coming from, and how large is it? What do you mean by 'AD offset'? – Bruce Abbott Apr 19 '16 at 16:42
• @TheStrangeQuark No one but you will call a DC offset "noise". Calling it noise will lead to all sorts of confusion about what you want to do. – pipe Apr 19 '16 at 17:24

Any dc offset (that's the word) that you want to remove can be simply done with a high pass RC filter: -

If your actual signal has a dc value that you want to pass through the circuit then you could use an instrumentation amplifier because it has a pin that your can use to set-up a DC offset that counters the DC offset you want to remove: -

You pretty much drive it like an op-amp but pin 5 (reference) can be set-up with an offset voltage that biases your real signal in one direction or the other.

If the offset is always the same magnitude and it's polarity is dependent on the polarity of the input then you can use the same idea to invert or not invert that offset depending on the polarity of the input. Use of a precision rectifier would help in determining the polarity of the signal and this can be used to switch either the positive offset or the negative offset to pin 5 of the instrumentaion amplifer. Analogue switches are probably a good choice for the selection of the offset source.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Bipolar DC offset remover.

This circuit might do what you want.

• OA1 is configured as an inverting summing amplifier. The output will be -1 times the sum of the inputs on R1 and R2.
• OA2 is a comparitor. If the '-' input goes positive the output will switch to the negative rail. If the '-' goes negative the output will switch to the positive rail.
• R3 gives you the ability to adjust the amount of correction.

NOTES

• OA2 may not get as close to one rail as the other. This will affect the amount of correction on each side. To fix that you may need to add a resistor and pair of back to back zeners to clamp the voltage symmetrically before it gets to R3.
• Using an op-amp for OA2 as a comparator it may latch up and cause a slight delay at high frequencies. The concept should be enough for you to work out a better solution if required.
• Vout will be inverted. If you need it the right way up then add a second inverting stage after Vout.