# Circuit that offsets input voltage to exactly 0 V

I am looking for a (op amp) circuit to offset $$\f(x)= \log(x)\$$ always to zero. More comprehensible is the explanation on the x-y plot below.

Basically, it is possible to offset the voltage with an extra negative input of the same voltage on the summing node of the inverting op amp. But the speciality is, this should happen automatically and precisely. It is possible the $$\\log\$$ curve will drift with the temperature $$\\pm \Delta y\$$ and cause an offset of let's say 10 mV, what would be too much.

• So you want to input log(x) and have it output zero? Just ground the output. There you go, zero all day long, no drift. Or do you want to offset it from some point on the curve so the whole thing is shifted down? Commented Jun 19 at 18:01
• GodJihyo Yes, it should be shifted down Commented Jun 19 at 18:11
• How do you distinguish between drift and signal? Commented Jun 19 at 18:23
• Based only on the information available at this time: 1. How "precisely"? 2. A large coupling capacitor followed by a resistor to GND - ? 3. If you are adjusting a signal such that it always is at GND, why not just connect whatever it is driving to GND? Commented Jun 19 at 18:35
• Why are you trying to do this? Commented Jun 19 at 18:41

The problem you have is that in order to offset the output of the function to what it will be when it reaches a reasonably stable state you have to know what the voltage at that point will be.

For example, in your plot the the input starts at 0 V for an input resistance of 0Ω, and increases logarithmically to eventually reach something like 8 V when the resistance is 100kΩ. Now you want that 8 V to be offset down to 0 V. Simple enough, sum it with - 8 V. But what about at the start where the input voltage is 0 V? You would want that to be offset to -8 V, but you would need to know that the value at 100kΩ is going to be 8 V before you've gotten there.

An auto offset cancellation is going to try to cancel whatever the voltage at the input is so the output will be 0 V all the time. If you want to shift the whole plot down precisely and automatically you'd need some way of determining the exact offset voltage you need at the start. That could be a bit difficult.

• GodJihyo MOSFET Yes guys, you are right. My question doesn't make any sense and actually doesn't have any solution. Indeed, to shift the random offset I have to know it. My aim was to make a logarithmic response from 0V when the resistance reaches approx 20 kOhm and below. So what I need to do is to y-offset log curve in 20kOhm region in and then just add a half wave rectifier. Commented Jun 19 at 19:00

Logarithmic Amplifier: $$\ V_{log} = k \log(V_{in}) \$$

Differential Amplifier: $$\ V_{out} = V_{log} - V_{ref} \$$

Integrator (Automatic Adjustment): $$\ V_{ref} \text{ adjusted by feedback to keep } V_{out} = 0 \$$

Detailed Circuit Schematic

Log Amp:

$$\ \begin{array}{ccccccc} & +V_{cc} & \\ & | & \\ & | & \\ & .-. & \\ & | | & \\ & | | R1 & \\ & | | & \\ & '-' & \\ & | & \\ & +---|> \text{ (Log Amp)} --> V_{log} & \\ & | & \\ & .-. & \\ & | | & \\ & | | R2 & \\ & | | & \\ & '-' & \\ & | & \\ & GND & \\ \end{array} \$$

Differential Amp:

$$\ \begin{array}{ccccccc} & V_{ref} \text{ (stable)} ----| & \\ & | & \\ & ( ) & \\ & [OPA] \text{ (Differential Amp)} & \\ & | & \\ & V_{log} --| & \\ & | & \\ & [OPA] \text{ (Integrator)} & \\ & | & \\ & GND & \\ \end{array} \$$

Steps to Implement:

1. Logarithmic Amplifier:

• Connect $$\V_{in}\$$ to the logarithmic amplifier.
• Obtain $$\V_{log}\$$ at the output of the log amp.
2. Differential Amplifier:

• Connect $$\V_{log}\$$ to the inverting input of the op-amp.
• Connect the stable $$\V_{ref}\$$ to the non-inverting input of the op-amp.
• The output of this stage will be $$\V_{out} = V_{log} - V_{ref}\$$.
3. Integrator:

• Use the output $$\V_{out}\$$ to adjust $$\V_{ref}\$$ through an integrator to ensure $$\V_{out} = 0\$$.

By using precise components and ensuring a stable reference voltage, the circuit will automatically and precisely offset the logarithmic function to zero, compensating for any drift due to temperature variations.