Here a circuit :

Peak detector

Here is a scope view of what I get before the diode (in blue : input, in yellow : output of the Op Amp):

Scope Output

The opamp saturates almost everytime. There is just a small time where the signal is non-zero due to the presence of the capacity (when I get it off, everything is okay at the output of the opamp (always before diode) ; when I put a resistance before the capacity, everything is okay also). But I can't explain more. Someone to help me?

The circuit performs well in any case, it is just a wonder of comprehension.

  • \$\begingroup\$ The other trace's colour seems like orange to me? \$\endgroup\$ – abdullah kahraman May 15 '12 at 3:05

You have a correctly connected positive peak detector that seems to be functioning correctly.

When you put in a sine wave with a period much less than the peak decay time constant of the output, the output will be above what the opamp is trying to drive it to most of the time. During that time the opamp is trying to drive the output low, but it can't because of the diode. It therefore saturates to the lowest output it can produce. During this part of the cycle, the output will decay a little towards ground.

As a result of the output decay while the input is low, when the input reaches its peak the output will be a little less than what it should be, so the opamp output goes up and current flows thru the diode. At this point the output tracks the input. When the input goes down again the output stays up, the opamp output slams low, and the cycle repeats.

It would be instructive to look at Vs also. At the resolution of the traces you show, it probably will look flat and just a little below the levels of the peaks of the yellow trace. If you AC couple it and expand the voltage scale, you should see it go up sharply by a small step each cycle, then a linear ramp down between the steps. Even at the lowest gain setting when you have the shortest output time constant, that time constant is 200 ms. Your signal has period of less than 1 ms, so there will only be a small decay between the peaks of the input cycle. This is exactly what we are seeing the opamp do.

| improve this answer | |

Olin's answer captures everything -- just wanted to add some plots.

Also, don't forget that you are getting amplification from the non-inverting amplifier configuration here -- currently a gain of (R20+R21+R22)/(R21+R22) = 12, according to your original schematic. If your input is truly a ~5Vpp sine wave, and your op-amp appears to be powered from +/-15V, your peak detector is quickly going to saturate at the upper rail and you won't be seeing the intended behavior.

I've drawn your active peak detector circuit but set the gain to 1, and added an explicit load resistance for discharge (although the capacitor also discharges through the feedback path as well):

precision active peak detector

And here's what the voltages look like:

voltage plots

Looks a lot like your oscilloscope capture! You can see how V(prediode) is stuck to the negative output rail most of the time, but occasionally pumps a bit of charge through the diode to top off the capacitor. If you open the circuit, open it in the editor, and press F5, you'll see this plot and will be able to mouse over or zoom in to the V(out) line, and see the discharge that Olin mentioned (looking at Vs -- small step up, then slow discharge down, then repeat). The simulator also lets us plot the current into the diode, which may be instructive here:

current plot

| improve this answer | |

I see your schematic has a non-inverting "Positive Peak detector". Yet your scope shows an inverting negative peak detector.

Please re-check your connections. for + - and diode Anode/Cathode. They appear to be reversed. It works well, just inverted.

Oh and since the inverting gain is adjustable from x1 to x10 the input signal should be small. I see a sine input = 2Vpp which is causing the abnormal pulse output. YOu are over-driving the input.

| improve this answer | |
  • 2
    \$\begingroup\$ Tony, you've been here for a while now. You should know by now that "sig"s (signatures) are not allowed. \$\endgroup\$ – stevenvh May 14 '12 at 11:50
  • 5
    \$\begingroup\$ No, this is wrong. The scope is showing exactly what you'd expect from a positive peak detector. \$\endgroup\$ – Olin Lathrop May 14 '12 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.