Ideal diode circuit is a bad rectifier. **Problem found** (It was me)

Started by brett, May 28, 2006, 11:11:51 PM

Previous topic - Next topic

brett

Hi.
I'm using the ideal diode circuit described here: http://www.uni-bonn.de/~uzs159/diode_tutorial/index.html.  It's just an op-amp with a diode in the feedback loop.
Seems like a very handy thing - in theory.  But in practice I have found it far from an ideal.  It seems that either reverse conduction by the diode or diode capacitance is enough to ruin the rectifying effect.
I've built it with 4 different diodes - 1N4004, 1N4148, 1N5819, and 1N60, representing a power diode, SS silicon diode, Schottky diode and a germanium diode, respectively.
Set up to rectify a 3Vp-p 1kHz sine wave input, the output with the 1N4004 and 1N4148 were similar - a minimal amount of rectification.  Only the "tip" of one side of the wave is lost.  With the 1N5819 the signal is better rectified (to about 0.8V on one side), but the output includes a major "horny" overshoot of about 1V before rectification back to about 0.5V kicks in.  The Ge diode was the best behaved of all, with smooth rectification at about 0.5V.
Looking at the diode datasheets, the 1N4004 and 1N4148 have small capacitance (about 15pF) and reverse current (25nA), while the 1N5819 has 110pF and Ir of 500nA.  I presume that initially the capacitance allows reverse current to flow, and once the capacitance is discharged, the reverse current allows a voltage to appear in the "wrong" direction.

Can anybody suggest a solution?  I'm already using an op-amp with lowish open-loop gain (a 741).  Are there available op-amps with really low open-loop gain?

Thanks for any help


   
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

R.G.

I can't tell you what's wrong with your setup, but I have used precision rectifiers before. They work as advertised.

One thing missing from Jim's schemos is the power supply. With his synth background, I think the circuits count on having a +/-15V power supply.

Most opamps won't precision rectify unless the input voltage and the rectifier output never come near the input common mode or differential mode limits for the chip and never try to go past the output limits either. These circuits are a true pain to get to work with single +9V supplies. Might be that's a problem. I know the 741 is picky about its input and the power supplies.

It's just a guess.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

brett

Hi.
Thanks RG. 
Quotenever try to go past the output limits either.
I'm doing the usual supply/2 biasing.  In this case, supply is at 0 and about 9V and the signal is at about 4.5V.  So I don't think this is the problem.
QuoteMost opamps won't precision rectify unless the input voltage and the rectifier output never come near the input common mode or differential mode limits for the chip
I'll have to brush up on what that means to me in this case.  The max input voltage is +/- 30V for a 741 and I'm sending in 3V.

I'm connecting the rectified output to a digital voltmeter (10M input resistance).  The -ve of the meter is connected to Vbias.  I wonder whether there's some capacitance in the meter that's messing with the rectification?  Maybe I should add a JFET buffer (source follower) between the rectifier and the meter.

thanks again



Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

lovekraft0

If you're looking for a full wave rectifier, scroll down a little further - it takes two diodes and two opamps, one for the ideal diode and one as a summer.

For something very similar, take a look at JC's  octave up box in this thread:
http://www.diystompboxes.com/smfforum/index.php?topic=36579.0
Patchell's version worked perfectly in simulation (CM6.0, with a split 9 volt supply, a pair of1N4148s and a 1458), and while I haven't put a scope on it, my breadboarded circuit with 1N4148s and a TL072 perform as expected. I haven't tried JC's variation, but I'm convinced it works just as well. HTH

George Giblet

"Ideal" diodes quickly fall to pieces as the frequency increases.  The main problem here is opamp slew rate.

On the diode that doesn't connect to the output, remove the series resistor.
Use a faster opamp like a TL072.
Using Schottky's help.

Futher small improvements are possible with trickery, like biasing the diode that doesn't go to the output.




TELEFUNKON

you`re applying the 1kHz capacitively coupled?
what happens when you put the "-ve" of the multimeter to ground instead of Vbias?

have you watched the waveform on a scope?

brett

Hi.
Quotehave you watched the waveform on a scope?
Yes.  That's how I know that they're so poor.
QuoteIf you're looking for a full wave rectifier, scroll down a little further - it takes two diodes and two opamps, one for the ideal diode and one as a summer.
I'm just using one diode and one op-amp as a half-wave rectifier.
Quote"Ideal" diodes quickly fall to pieces as the frequency increases.  The main problem here is opamp slew rate.
I'll try a TL071.
QuoteUsing Schottky's help.
The Schottky was the worst.  Probably because it has large capacitance and high reverse current (both about 10x regular diodes).

So I'll swap to a TL071 and take out the meter.  I'll report back in a week or so.
thanks for the advice.
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

Alex C

I don't kow anything about ideal diode circuits, but why are 100k resistors used exclusively in all of the circuits on that page?

brett

Hi.
I found my main problem - operator error in using my oscilloscope.  I had simply not chosen a DC measurement, and so the waveform appeared to be centred around 0.  How embarrassing is that??   :icon_redface:

On the other hand, the circuit shown DIDN'T QUITE give me half-wave rectification.  There was a small "hump" instead of the part that should be a flat line.  Suspecting that diode capacitance might be a factor here, I decided to up the feedback current by changing the 100k resistors to 1k.  Sure enough, the "bump" disappeared and the result is better - almost perfect rectification.

Thinking laterally, I wonder whether the "bump" might have some uses.  I haven't put any audio through it yet, but I suspect that the "bump" might give some octave-up character.  Just a wild guess...

Anyway, thanks for the help and I apologise for time-wasting.  I'll try to employ my brain before posting next time.
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

TELEFUNKON

maybe a resistor from the +inputs to Vbias helps (same value as the one looking into the -inputs) instead of direct "grounding".

R.G.

QuoteI found my main problem - operator error in using my oscilloscope.  I had simply not chosen a DC measurement, and so the waveform appeared to be centred around 0.  How embarrassing is that??
Oh, man. How silly. I've NEVER messed up using an o'scope.   :icon_biggrin:

Just as an example - how silly did I look calling in an older, wiser engineer to find out why my 20kHz switching power supply was only putting out 100mV of triangle wave??? Ugh. I'd almost forgotten that one. I had to wear a sack over my head for days after that one. Not as bad as our secretary wandering into the lab and asking "Hey, guys, what color is a capacitor?" but almost.

QuoteThinking laterally, I wonder whether the "bump" might have some uses.  I haven't put any audio through it yet, but I suspect that the "bump" might give some octave-up character.  Just a wild guess...
If you do ANYTHING to one polarity of the signal that you don't do to the other, you get some level of octave-up effect. The Fourier transform of any non-symmetrical wave has second harmonic in it to some degree. After that, it's only a matter of degree.

So the half-wave rectified signal has a nicely audible chunk of octave up. The bump is only a little more octave than the half wave rectified signal.

But it is more, as your intuition told you.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.