Op-amp peak detector doesn't match the peak input - Page 1
Forum section: electronics / beginners

author: icecats
author_rank: Contributor
timestamp: April 18, 2024, 11:58:11 am
content: Hi,I am experimenting with an op-amp peak detector used to sample and hold the peak voltage from the output of a voltage divider circuit. This is part of my attempt to rebuild the AMP+ circuit inthis electric fence monitoring project.I have measured my input pulse using an oscilloscope to be a few microseconds with a peak at 0.7 volts.I have tried a couple different op-amps. I used theTLV9062(what my reference circuit uses), and found that the reported peak voltage ishigherthan the input voltage: the alleged peak is 1.5 volts. I also tried using anOPA2374and measured a peak of about 0.6 volts.The OPA2374 had an output that was much closer to what I would expect. What should I be looking for in the op-amp datasheets to distinguish between these op-amps and predict this output behavior?I have watched through this video on peak detector circuits but didn't get any hints as to what my issue might be.

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2024, 12:21:18 pm
content: Maybe test the circuit with an input from a battery (known voltage source).Just to confirm the issue still exists. That will rule out the possibility that there's actually more voltage on your input signal than you can see on the scope. Like maybe it's too short for the scope to see but not the opamp, or maybe the scope is loading the signal and you never see it with scope connected etc.. a battery is a known DC voltage, so you can rule out stuff higher voltages you cant see.

author: icecats
author_rank: Contributor
timestamp: April 18, 2024, 01:20:36 pm
content: Quote from: Psi on April 18, 2024, 12:21:18 pmGood suggestion! I put together a voltage divider to output 2v (so as to be well below the V+ supply) and connected it to the op-amp input. Indeed, the op-amp output reads 2v as expected.

author: icecats
author_rank: Contributor
timestamp: April 18, 2024, 04:12:26 pm
content: Comparing theTLV9062 datasheetto theOPA2374 datasheet, I don't see any significant differences. I assume input impedance could induce different effects on the circuit but both Differential and Common-mode capacitances are within 2 pF of each other which seems insignificant.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 18, 2024, 04:36:43 pm
content: The storage capacitor is quite some capacitive load to the op-amp and this can lead to quite some overload, especially with rather fast OP-amps. One may have to add a little resistance (e.g. 10s to maybe 100 ohm) in series to the storage capacitor to reduce overshoot / peaking in the response. Also a rather small (e.g. 100 pF range) capacitor can help.p.s.: A lack of proper decoupling also makes ringing often worse. It is a good idea to directly solder a decoupling capacitor to the adapter PCBs used with a breadboard.

author: MathWizard
author_rank: Super Contributor
timestamp: April 19, 2024, 12:25:55 am
content: Whats the output offset voltage of the op-amp ? I remember when I've done calculations for op-amps, and have the simulator do something different with real op-amps, and not know why.What's the circuit ?

author: icecats
author_rank: Contributor
timestamp: April 19, 2024, 11:15:24 am
content: Quote from: Kleinstein on April 18, 2024, 04:36:43 pmThanks for the reply. I've tried putting various resistors in series with the storage capacitor and the response certainly changes depending on the resistance. I then completely removed the storage capacitor to isolate out its effect on the circuit. I still have a pretty big disparity between the op-amp input and output.I am now thinking that my issue is related to scope loading on the circuit. My scope probes have a capacitance of ~20 pF vs. the op-amps which are 3-6 pF. I connected one probe to the input of the op-amp (blue, channel 1) and another (red, channel 2) to the output (with storage cap removed) and the attenuation is clear. Does this imply scope probe loading? My only confusion here is why the output is not also attenuated WHEN a probe is simultaneously connected to the circuit.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 19, 2024, 12:11:24 pm
content: One would normally not probe the sensitive pin at the storage capacitor. The output signal is from the buffer OP-amp. Here the proble capacitance and loading (10 M) would not have much effect.On the photo it looks like there is no GND connection to the µC board on the left. One also needs something to reset the peak value (e.g. a bleader resistos or a reset circuit).

author: xvr
author_rank: Frequent Contributor
timestamp: April 19, 2024, 02:06:19 pm
content: Quote from: icecats on April 19, 2024, 11:15:24 amUse 1:10 probe