Alright, basically, I've built the following precision rectifier circuit but I can't discern the problem at all.
I've attached the schematic, input signal and output signal. Of course, the output should be a typical half wave rectifier but I just can't work out why the output is like that, I must be missing something obvious.
(I've taken this oppurtunity to draw my first schematic onto a computer to try and get the hang of it .) If I've missed anything, please let me know.
The circuit as drawn has a mono-polar supply (ie 0 and 9v).
To work correctly with a sinewave which is symetrical about 0v I suggest that it needs a bi-polar supply. (ie +9v and -9v).
I have since realised that due to the op-amp being single-power supply, I need Vcc+/2 at the non-inverting input. I've built that so 4.5V now enters the non-inverting input, but now I get the attached output waveform.
The circuit as drawn has a mono-polar supply (ie 0 and 9v).
To work correctly with a sinewave which is symetrical about 0v I suggest that it needs a bi-polar supply. (ie +9v and -9v).
Okay, I cobbled together a dual 9V supply and nicked a dual supply op-amp from a previous project and it appears to have done the trick.
I'm now just trying to get rid of that offset of 0.22v. I think it's to do with that my +ve rail is 9.24v wheras -ve rail is at 9.02v. Coupling caps on the input and output have no effect.
Blue and yellow lines are the original input wave range and the red line in the middle being 0v.
Okay, I cobbled together a dual 9V supply and nicked a dual supply op-amp from a previous project and it appears to have done the trick.
I'm now just trying to get rid of that offset of 0.22v. I think it's to do with that my +ve rail is 9.24v wheras -ve rail is at 9.02v. Coupling caps on the input and output have no effect.
Blue and yellow lines are the original input wave range and the red line in the middle being 0v.
The load or scope should be connected to the output and to 0V, not to a negative voltage.
The bottom of the trace should be at 0V and the top should be the -4V inverted to +4V. Yours has the bottom too low at about -1.3V and the top is too low at +3V.
Any opamp can be used, even a single supply LM324 in tha latest circuit.
The gain is 1 so the output will have an offset voltage the same low amount as the opamp, 6mV max. I don't see an offset voltage of 0.22V.
I think the trace is in the wrong position because your 'scope is not DC-coupled but is actually an AC-coupled sound-card 'scope??
Okay, I cobbled together a dual 9V supply and nicked a dual supply op-amp from a previous project and it appears to have done the trick.
I'm now just trying to get rid of that offset of 0.22v. I think it's to do with that my +ve rail is 9.24v wheras -ve rail is at 9.02v. Coupling caps on the input and output have no effect.
Blue and yellow lines are the original input wave range and the red line in the middle being 0v.
I agree with audioguru that the signal looks like it is AC coupled.
The only other problem you have with that circuit is that the output impedance depends a lot on whether the output is +ve or 0 V. When the output is +ve, the op-amp feedback makes the output impedance effectively zero. However, when the output is 0V, the output impedance is 10 kΩ. If there is capacitance on the output it will not be pulled down effectively by the output when it is at 0 V.