BTW, did you measure the o'scope noise by tying the probe gnd to the probe tip?
This is the reading with the probe tip grounded:
Not meant to be a final circuit, just to illustrate that the circuit acts as a precision rectifier. As mentioned, with that ridiculous gain the frequency response is horrible.
I was trying to get Nick to understand a little better about how to get a single-ended [non-bipolar] amp ckt to work as a general amplifier.
Nick, both your ckt and the one in reply #11, need a pullup R connected to the "+" input terminal (of the same value as the pulldown), in order to get the op Amps into the linear operating region.
I'll add the extra cap tomorrow, I'm always keen to learn new things.
The LM358 is not rail-to-rail output, the output range goes from close to 0V to around 3.5V when operating from a 5V supply.
It seemed to clip if the music was much louder, but I guess that since that isn't a rail-to-rail op-amp, you would expect that after about 3.6V.