Hello, I'm experimenting with a peak detector circuit for an impedance measuring device. The device generates a 10kHz sine wave it sends it through an unknown impedance and then measures de difference in peak voltage (of the sine) and then uses the impedance as one of the gain resistors of an inverting op amp to calculate the unknown impedance.
To correct for gain error and linearity, etc... I measure both the peak voltage in the in the input of the unknown impedance and the output of the amplifier.
It works pretty good, but there is a slight issue with the peak detectors.
I use peak detectors because the sine wave is symmetrical and it's a simple way to capture the sine to be read from a micro controller.
Here is a schematic of the peak detector I'm using.
The problem I'm having is that there is a difference of around 65mV between the peak of the sine wave and the voltage captured in the PD, as shown in these images.
The capture is right after a reset of the peak detector, meaning the Mosfet is just opening again.
The yellow plot is the voltage right at R11, the input of the peak detector. The blue plot is the output of IC4G$3 (the test point PD_OR)
The components shown in the schematic are the ones I used, OPA4197 is somewhat a precision amplifier with high impedance inputs and BAS716 diodes are low leakage diodes.
Do you have any idea why I'm getting this difference?
Thank you!