
The circuit inFig 1 can detect the peak of either positive or negative inputs, yet it operates from a single supply. The circuit uses two unity-gain amplifiers to monitor the input signal, one an inverting amplifier and the other a noninverting amplifier. A typical application is driving a VU meter.
The design takes advantage of a characteristic of the LMC662, IC1. Although the op amps data sheet warns against pulling inputs below ground, the op amp can withstand negative inputs if you limit the input current. In this circuit, R1 limits input current to a very small amount. The op amp does nothing uncivilized, such as latching up or slamming against both rails, in this mode. It just waits patiently with its output at ground potential until the input signal goes positive and then starts following the input again. If you wish to substitute another op amp, check its performance first.
The outputs of the two amplifiers go through a "diode-OR" connection to C1. Resistor R2 bleeds off the voltage on C1, determining the decay time of the output. The series path through R1 and R4 bleeds some current from C1 but to negligible effect.
Q1 and Q2 ensure that current starving does not degrade the slew rate of the circuit. The transistors "turbocharge" the output of the op amps. Instead of the 20 to 30 mA available from the typical op amps, the 2N3904s can supply a peak current of 200 to 300 mA.
The 22-pF capacitors on the output of the op amps are necessary for stability because CMOS op amps do not like to drive capacitive loads. Locate capacitor C2 near IC1 because it bypasses the supply lead. C3 provides the peak currents that Q1 and Q2 use to charge capacitor C1. (DI #1415)