http://www.analog.com/UploadedFiles/Data_Sheets/AD843.pdf
On the above datasheet, page 11th, there is a peak detector circuits. I
will adapt it but I didn't figure out why they put two diodes like this
and I don't know how the 1k ohm work between the two op-amps either.
Could you explain it to me, thanks a lot.
When the input voltage is positive, the right diode
conducts, and the pair of opamps act, together to produce a
follower (100% feedback to the first opamp) that drives the
storage capacitor to follow the input voltage as it heads
up. The resistor in series with the capacitor keeps the
capacitor from causing enough phase shift to destabilize the
pair of opamps in a feedback loop. The 1 k feedback
resistor has no current passing through it, except the bias
current of the first opamp, so it acts essentially like a
wire during this phase.
When the signal is negative, the left diode conducts,
keeping the first opamp from saturating its output all the
way against the negative rail so that it will recover
quickly when the signal goes positive, again. During that
time, the right diode isolates the first opamp form the
voltage that has been stored across the capacitor.
The 1 k resistor conducts current from the second opamp
output back to the first. This current is wasted, but keeps
from having to disconnect the the feedback path between peaks.