Electronic – Full wave rectification by opamp

current measurementoperational-amplifierprecision-rectifiershuntsingle-supply-op-amp

I am trying to read a current waveform from a shunt resistor series with the power line.

Using a full bridge rectifier, I got the following waveform:

The waveform was sampled every 2 millisecond using an Arduino. Upon fourier analysis, I found that it contained a 100 Hz signal.

Since the supply frequency is 50hz in my region and being rectified the waveform is 100 Hz.

But I want to use opamps as a precision rectifier to get smaller voltages than the diode drop. I am using the below configuration. I tested the configuration by setting the input as positive and negative DV voltage from a battery and the negative DC was given as positive DC by the opamp.

simulate this circuit – Schematic created using CircuitLab

This is the current waveform obtained I got from the opamp:

The zero point of the waveform keeps changing periodically.

Is this a problem with the opamp configuration, or is there a better way to do full wave rectification using a single supply opamp?

EDIT:
I meant to use 10 kiloohm resistors, not 10 ohm.
240-24 volt step down transformer signal divided between 10kiloohms and 1 ohms resistor
UPDATE:
The opamp configuration was working perfectly fine. The original signal contained the zero point oscillation.The full bridge rectifier's output was not showing this output because it was not strong enough to overcome the diode voltage drop. After increasing the voltage i was able to see the same signal from the full bridge rectifier as well. Phew!!!! Finding out ground truth is very important.

Your circuit (with proper resistor values) should work just fine. Try the below simulation.

simulate this circuit – Schematic created using CircuitLab

The way it works, for those who are questioning it, is that the lower amplifier OA2 maintains the non-inverting input of OA1 at 0V when the input goes negative, which means that you're getting Vout = -Vin (it's an inverting amplifier and R1/R2 are in play).

When the input is positive the positive input is at the input potential and the output drives then inverting input to the same potential, so the gain is +1.

Here's a simulation of the output with a 300mV peak input at 50Hz. It won't work very well at higher frequencies because the amplifier OA2 is driven into saturation and will have sluggish recovery, but for mains frequency it's more than okay (and it operates from a single supply with a dirt-cheap op-amp).

As an extra bonus, since it's powered from a single supply there is no need to protect the ADC input from possible negative transients.