Multi input peak detector? - Page 1
Forum section: electronics / projects

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 18, 2023, 02:51:26 pm
content: I'm looking for a precise multi input peak detector schematics with analog components, to track the highest of the two or three input voltages. A time constant decay will allow to return to zero after the inpout removed. Range is +/-5V. What are your thougths?

author: David Hess
author_rank: Super Contributor
timestamp: June 18, 2023, 04:35:36 pm
content: Does it need to keep track of positive peaks separately from negative peaks?Most peak detectors can drive the same holding capacitor to process multiple sources.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 18, 2023, 04:48:25 pm
content: Just positive peaks. A schematics would be nice.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 18, 2023, 04:58:51 pm
content: The required speed also matters. The option to use a simple time constant to get back suggests that the hold time is not that critical.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 18, 2023, 05:01:36 pm
content: 100Hz is fine. Thermal stability, like 500ppm/C is more important.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 18, 2023, 07:17:11 pm
content: For relatively slow processes the classic 2 OP-amp circuit (1 input) should be OK. 1 OP amp per input and 1 comon as a buffer for the storage capacitor. The capacitor buffer should be well faster than the others and with it's bias could provide some reset (e.g. fixed rate down or up depending on the sign of the bias current). Precision for this OP-amp is not important as it would be inside the loops.The OP-amps for the input more or less set the accuracy.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 18, 2023, 08:09:30 pm
content: Given how slow 100Hz is, one could even use a single op amp to do the job, so long as it can recover quickly enough from saturation (at 100Hz I suspect most op amps that can tolerate saturation have a quick recovery, heading for 100KHz things get a lot trickier in that regard).

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 18, 2023, 11:02:55 pm
content: Quote from: dobsonr741 on June 18, 2023, 02:51:26 pmAny precision rectifier can become a peak detector with an added cap, plus some means to manage discharge time constant.https://en.wikipedia.org/wiki/Precision_rectifier100Hz is 'easy', as any opamp can slew that, and 500ppm is also easy, as the opamp compensates for the diode effects.track the highest of the two or three input voltagesDo you need to know which channel has the highest voltage ?

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 18, 2023, 11:54:52 pm
content: How does it look?

author: Kleinstein
author_rank: Super Contributor
timestamp: June 19, 2023, 05:18:36 am
content: The circuit looks OK.One may get away without R2 and R3 if the storage capacitor is relatively small (e.g. 100 pF range). One could at least combine them to a single resistor..A small capacitor helps to get a fast reaction. The capacitor should be a low DA type like PP, PS or C0G.Another part that may be a bit tricky are the diodes to the capacitor. Here it is about a balance between speed and leakage. With not too high demands on the hold time the 1N4148 may still work OK.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 19, 2023, 08:25:38 pm
content: Given the low bandwidth required (100Hz), C1 should be much higher than 100pF here given the topology. R1, R2, R3, R4 = 10k and C1 = 100nF would about work.The "issue" is with R5. I suppose you put it to get your automatic decay, but unless you put a very large value here (which will give you a very long decay time), it will have a very sizeable impact on both the accuracy and stability of the output. If at all possible in your application, I would replace it with a NMOS controlled by some reset signal to reset the peak detector instead of letting it decay.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 19, 2023, 08:43:00 pm
content: There should be no need to make R2 , R3 larger than some 50-100 Ohm, enough so that the OP-amps don't see too much capacitive load. With a large R2,R3 and C1 the OP-amp may get stability problems and one may need a resistor (e.g. 10 ohm range) in series to C1.How small C1 can be made is mainly a quest of the leakage from the diodes and OP-amp bias.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 20, 2023, 01:46:40 am
content: Quote from: Kleinstein on June 19, 2023, 08:43:00 pmYes, it's pretty much down to the choosen opamp and the value of C1. You may not even need R2 and R3 at all with an appropriate opamp.Quote from: Kleinstein on June 19, 2023, 08:43:00 pmWith a large C1 and very small R2/R3, yes, but I'm not sure I see your stability problems with large R2, R3 and C1. Care to elaborate?Quote from: Kleinstein on June 19, 2023, 08:43:00 pmSure, as a quick reminder though, even a very small leakage current can lead to an unacceptable voltage drop across the cap.At a constant current i,dU = i/C.dTAs an example, with a 100pF cap, a 1nA leakage current (sounds pretty low, right?) will drop 100mV across the cap after only 10ms.Does that sound good? Maybe. Maybe not. I would guess the OP would expect something a bit better than this, especially considering the low bandwidth.To get things in perspective, a typical 1N4148 leaks ~25nA @-20V.And, of course, there's still this R5 issue which is likely to draw even more than a few nA.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 20, 2023, 07:44:45 am
content: The R2 + C1 combination is still in the feedback loop as a low pass filter and adds phase shift. With a large R2 this would be close to 90 deg. phase shift added and most OP-amps tend to oscillate than.A resistor in series to C1 would reduce the phase shift at high frequencies.