I'm using the following circuit for a half wave rectifier. I have the following values: R1 and R2 = 1K, Vin: 400mv peak to peak, 60 Hz (it's a sine plus noise) D1 and D2: 1N4007 Op amp: LM 741. Positive supply for op-amp is 5V and ground for negative voltage.
The circuit works as expected with these values (it preserves the positive parts of the input). However, when I add a capacitor or an RC circuit as the load to the Vout node, the output goes to zero, rather than detecting the peaks. I have no idea why this is happening. I know that it's not a good idea to have the op-amp negative supply connected to ground, but trying it with -12v didn't make any difference. Any comment on how I can detect the peaks is highly appreciated!