# Delay introduced by parallel R/C components

I have an envelope follower circuit which uses a LT1013 op-amp to multiply an audio signal to a logic level (~4.7V). Then the signal is filtered to create an output of the original signal’s envelope.

In the attached schematic, there is a 1k resistor in parallel with a 10uF cap. which is used as an envelope follower.

However, the envelope is delayed by approximately 0.3 seconds. My first reaction was that the cap. and resistor was introducing an RC delay. But, their wiring is not the way an RC circuit is wired and hence an RC delay calculator is useless.

Does a parallel RC circuit introduce a signal delay? And how does one calculate the delay?

• C1 and R5 introduce a delay, their RC=0.1 sec. Commented May 31, 2019 at 12:40
• there is a 1k resistor in parallel with a 10uF cap - No, there isn't. No 1k. No 10uF. Commented May 31, 2019 at 12:54
• Oops, this is an older schematic. The actual values are 1k/10uF. NOT 50k/33uF Commented May 31, 2019 at 13:55
• The audio signal is delayed/low pass filtered by R5 and C1. RC=0.1uF•1Meg=0.1 sec. If the input is delayed, then by defenition the output is delayed as well. Why not plot the audio signal, the positive input terminal of LT1013 and ADC_Out? Commented May 31, 2019 at 14:46
• C3 will also add some delay, though perhaps quite small. It depends on the output impedance of U1-1. Likely most of the delay comes from C1+R5. Commented May 31, 2019 at 15:01

Does a parallel RC circuit introduce a signal delay?

Short answer Yes. but this is NOT the major cause of the delay you are seeing in your circuit.

For an envelope detector there is always a slope on the trailing edge due to the RC discharge curve. Typically this can be made short enough to not be a concern.
On the leading edge of an envelope detector, there can be a delay, but this is mainly due to the current limit in charging the selected capacitor. If an opamp is supplying this current then there may be an actively imposed current limit. In the case of the LT1013 this is about 30mA, and causes considerable ripple in the envelope detector output.

The circuit below demonstrates the problem you have ….significant delay on the trailing edge of the envelope. However this delay HAS NOTHING TO DO WITH THE RC OUTPUT FILTER.

simulate this circuit – Schematic created using CircuitLab

The output waveform for your circuit is likely like this:

Notice here that the delay slope is not related to the RC values (R3C2) used in the filter. You appear to have played with values from 1K/10u to 50k/33u, and I'd suggest they made little difference. The delay in the output falling is about 100ms in the circuit I used, and the slope of the output actually depends more on the input leakage current than almost anything else.

Examining the leading edge of the signal burst the waveform shows this:

Most important here is to notice that the input signal is rectified by the LT1012 input and this results in the opamp input being offset by the charge stored in C1.

Examining the trailing edge of the signal burst the waveform shows this:

Notice that when the signal burst ends, there is still a charge on C1 and this holds the output high (it's signal amplitude dependent) and causing a huge delay in the output falling. C1 discharge is mainly due to the input leakage current of the LT1013, and not as one might think due to the 1M Ohm resistor.

Can the delay problem be fixed?

Short answer, NO. The design is flawed and there will always be charge stored in C1.

Can the delay be reduced to a more acceptable level?

Yes. It seems that the premise of making R1 so high (1M Ohm) was to achieve a high input impedance without realizing the inherent problems with the design.

By reducing R1 to a more reasonable value, such as 20k Ohms, the delay caused by the charge on C1 can be reduced.

Here is the waveform with R1 reduced to 20k Ohms:

This is a more useable result but is still NOT an accurate envelope detector. See my other answer for a more reasonable approach.

Examining the trailing edge of the waveform we see this:

The discharge slope for C1 is now quicker than the output filter, so the envelope is defined by the output filter. The discharge of C1 is still a problem of course and should be eliminated for accurate results.

It's worth noting here that the LT 1013 input SHOULD NOT be exposed to a negative signal in a single supply configuration such as this. The datasheet for the LT1013 shows the following:

The OP interprets the second highlighted statement to mean it's OK to feed a +/-5V signal into the opamp. It is not good practice to what was meant as a safety characteristic in a design such as this. The fact that current is limited is good, and when defending against pulses or transients well worthwhile. In this case however it is the direct cause of the charge on C1. This misreading of the datasheet is the direct cause of the delay problem the OP has.

• Thank you, I can understand this much better. The 1M value was chosen to be used with the line level output of an Arduino shield MP3 player. So how do I choose a lower value that works? What parameters should I look for on the MP3 player? Commented Jun 2, 2019 at 20:11

Presumably your input signal level is in the 1V+ range peak to get 5V out, so the diffusion isolation junctions in the op-amp front end are conducting on negative half cycles (there's a nominal 400$$\\Omega\$$ resistor in series), which will shift the average input signal upwards (with a long time constant on decay due to R5*C1) and may cause some other weird behavior.

You could try paralleling R5 with a Schottky diode, but I think a better solution is a rectifier circuit designed for proper single-supply operation, followed by a low-pass filter.

• If I were to parallel R5 with a Schottky diode, the anode would be connecting to ground and the cathode would be connected to AUDIO_IN, correct? Commented Jun 2, 2019 at 20:16

This is a poor solution to a peak and decay envelope detector. R3C3 determine the slow decay time.

Look up a precision rectifier design that uses negative feedback after the diode and add a small cap for a hold time constant. Driving a large cap with an Op Amp also reduces phase margin which is current limited.

My seat-of-the-pants analysis is that there's a fairly low impedance path from the opamp, through the diode, into C3. So I expect the attack time to follow the envelope pretty closely. But when the output falls below C3's voltage, the diode reverses and that just leaves C3 and R3 at the output. They may be in parallel from the standpoint of output and ground, but as far as C3 can see, it's in series (C3 discharges through R3). That's your RC delay.

Your circuit is indeed a poor implementation of a peak detector and is not an implementation of an envelope detector at all.

1. As already pointed out you CANNOT drive the input pin or your opamp negative, and if you do you may actually cause inversion in the IC and corrupt the output.

2. If you try to rectify the output without enclosing the diode in the opamp feedback loop, the amplitude of the signal is distorted.

3. The envelop of an input signal (and I assume here that you have many frequencies mixed in amplitude and phase, such as a voice recording) can be very asymmetric in the short term, so using a half wave rectifier will not give the right result. Even as a peak detector in the short term the results will be wrong.

4. Trying to create a peak or envelope detector with a single rail supply is very challenging. You have made no attempt to provide symmetrical low distortion signal paths.

Trying to do full wave rectification of an audio signal is a challenge, and is normally done with opamps with +/- supplies, and diodes within the opamp feedback loop (ideal diodes). Here is a good introductory application note that may help you understand this architecture.

A typical dual supply precision rectifier enclosing the diodes in the feedback loop should be a starting point for your understanding:

If you are using a single supply of 3-5V it is quite difficult to design viable circuits. The Vf of the diodes (even in a feedback loop) reduces the available signal amplitude.

One way I've found to tackle this problem is to use rail-rail opamps biased to act as rectifiers. This is tricky to set up but works quite well.

Below is such a circuit where I've used TLC2272 simply because they are available in the circuit package provided, and so can run under the simulator.

simulate this circuit – Schematic created using CircuitLab

I've set this up so you can run the simulator, and produced separate positive and negative rectifiers. By biasing the opamp to the ground rail, you can produce only a positive going signal that goes from 0 - 5V. This is influenced by how good the rail-rail operation is, and in the circuit above you get clipping beyond about 4.8V.

I created a simple 3 freq 3 phase input signal (the Blue signal). You could take the positive or negative signal and integrate or filter to make a peak detector.

Perhaps easier to see is the output with a single sine wave input shown below.

With the circuit shown above and the other information you should be able to decide what you are building and produce a reasonable result.

Update: The datasheet for the LT1013 shows the input current for negative voltages:

This clearly shows the conduction of the input CB junction. This is only a portion of the curve obviously, and conduction will continue distorting the internal current sources. It is only with a +/- supply (such as +/-15) that you can get away with a large common mode negative signal, and it still does NOT exceed the supply.

Given your requirements, I'd suggest the architecture I proposed, and adding a peak detector may suit your application:

simulate this circuit

The attack and decay times for the above peak detector can be individually addressed by R25 and R26, and of course C4. Be aware that R25 does introduce a time delay on the leading edge. In most application this would be set at zero Ohms for fast leading edges and slow trailing edge.

The wavform as shown is:

• . The application analyzes an audio channel and outputs a 0-3.5V signal to a microprocessor to indirectly move the mouth of an animatronic. I need to detect 3 levels of the envelope and the servo delays render concerns of asymmetry and distortion moot. The LT1013 will accept up to -5V on an input. The image shows the input audio (indeed, it is voice) and the output of the supplied circuit. I want to make clear that I find your input valuable. Thank you. cdn.instructables.com/F1M/AFX8/HX7P0I9T/… Commented Jun 1, 2019 at 14:49
• @djsfantasi You are incorrect about the ability to support a negative signal in your configuration. In the data sheet, the LT1013 will only support a common mode signal as large as the negative supply. In your case you have no negative supply, so the CB junction of the input device conducts at just -0.6V and will influence the internal CC sources. Commented Jun 1, 2019 at 15:26
• Thanks, Jack. Where can I find this info on the datasheet? I see the following. In a single sided supply voltage, the negative supply is 0V. The data sheet states that the minimum input voltage is -5V below the negative rail. What am I misinterpreting? I based the design on that parameter, confirmed it with an LTSpice simulation and have had it running (not continuously!) for ten years? digikey.com/en/datasheets/linear-technologyanalog-devices/… Commented Jun 1, 2019 at 15:46
• I updated the answer. The fact that you have a design working for any given length of times unfortunately tells you nothing about whether the design is good or not. There are lots of product out there that are less than good designs ….but they are still out there. Commented Jun 1, 2019 at 17:05
• Look at pages 1, 9 & 22 of the datasheet. All document that an LT1013 will handle an input voltage of -5V below the negative supply which is ground or 0V. Commented Jun 1, 2019 at 17:07