Decay caps and resistors - is it always better to use a larger cap?

Started by midwayfair, July 21, 2013, 05:17:18 PM

Previous topic - Next topic

midwayfair

I've seen several places where Mark Hammer recommends using a larger cap to prevent ripple. Is this basically always true? Is there a functional difference in any circumstances between, say, 47uF + 10K and 4.7uF + 100K? (assuming that there is no concern about the physical size of the cap.)

EDIT: Talking about envelopes here. Just in case it wasn't obvious.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

tca

Probably the differences is only on the thermal noise generated. A quick read of this this entry of the wikipedia shows that thermal noise is greater for smaller values of the capacitor, goes as 1/sqrt(C), and increases with resistance as sqrt(R). It seems that a big cap is better, but for bigger caps you have inductance, which is usually solved by adding a small cap in parallel which will increase noise...

There is certainly more to it.
"The future is here, it's just not evenly distributed yet." -- William Gibson

drolo

Probably it depends on the application.

If you take the envelope detector of the Doctor Q (that Mark has talked about more than he may be able to remember :-) ) you have tipically a 100 ohm resistor before the decay cap. That resistor also sets the attack. If you raise the value too much, you will end up not having enough signal to drive what is coming behind it. While tinkering, I found that around 1k is the maximum usable value (in that circuit at least). In this case your only way to increase decay is playing with the cap value.

Mark Hammer

Averaging caps  have to charge up and discharge.  Their value will determine both of those functions, but so will the value of any associated resistors.

So, if I have a 470R "attack" resistor, and a 4u7 averaging cap, that cap will take a little longer to charge up, because of the 470R, but will discharge faster than a 10uf or 22uf in the same location.  If I aid it with a resistor in parallel, then it discharges even faster.

I can imagine contexts where one wants the cap to charge up quickly, but discharge slowly, and vice versa.  If the cap is buffered in some manner (often by a FET or Bifet op-amp) then it doesn't require that much capacitance for whatever current is stored there to stick around for a while.  The textbook example is a S&H unit where you'll often see caps less than 1uf in use, yet the voltage is held for a while longer than you'd think, simply because there is no path of even modest resistance for the cap to drain off.

In a great many of our sorts of builds, however, there is rarely any buffering, so the amount of time a voltage hangs around, or the rate at which it drains off, is generally determined primarily by the value/size of the cap and whatever parallel resistance it might have to help out.

If bigger better?  It will depend on the function of the sidechain.  In the case of swept filters, envelope ripple is not audible if the decay (drain-off of the averaging cap) is veryfast or very slow, and more evident if the drain-off is medium speed.  It will also be more evident if the rectifier is half-wave rather than full-wave.

Since, as noted earlier, the cap value also partly determines how quickly it charges up fully,  one may wish to use a larger OR smaller-value cap so that different chaoices in current-limiting "attack" resistances can be taken advantage of.

Does all of that rambling make sense?

midwayfair

Thanks for the replies, guys. Now that I'm on a desktop I can try to explain what I'm asking a little better.

Quote from: Mark Hammer on July 22, 2013, 09:45:16 AM
Does all of that rambling make sense?

It does, and it's helpful but you (and drolo) focused on the attack resistor, which is R1 ...

D1>---R1--------[variable resistance element]
              |  |
              C  R2
              |_|
               G

But I'm specifically wondering about C and R2, which set the time constant of the decay. If C = 4.7uF and R2 = 100K, is there a meaningful difference between that and C = 47uF and R2 = 10K? In both cases, the "calculation" is that the decay is 470ms, but will the bigger cap have less ripple even with the resistor in parallel? And does the inductance and noise that drolo and tca mentioned become an issue if we're not in the audio path?

Again, sorry that I was being unclear. Hopefully my ascii schematic will make sense.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

tca

^ The way I see it, C and R2 forms a high pass filter, if the ripple is on the left of the -3dB freq (2*pi*R2*C) the network attenuates it.

ah, the audio path... that is a very large concept, everything is on the audio pass, even the power source!

Everything is immersed in the bath of noise temperature and, btw don't forget cosmic background radiation :D
"The future is here, it's just not evenly distributed yet." -- William Gibson

midwayfair

My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

drolo

Quote from: tca on July 22, 2013, 11:13:35 AM

Everything is immersed in the bath of noise temperature and, btw don't forget cosmic background radiation :D

I see the weather is quite hot in Portugal at the moment as well ;-)

Mark Hammer

Quote from: midwayfair on July 22, 2013, 10:13:04 AM
Thanks for the replies, guys. Now that I'm on a desktop I can try to explain what I'm asking a little better.

Quote from: Mark Hammer on July 22, 2013, 09:45:16 AM
Does all of that rambling make sense?

It does, and it's helpful but you (and drolo) focused on the attack resistor, which is R1 ...

D1>---R1--------[variable resistance element]
              |  |
              C  R2
              |_|
               G

But I'm specifically wondering about C and R2, which set the time constant of the decay. If C = 4.7uF and R2 = 100K, is there a meaningful difference between that and C = 47uF and R2 = 10K? In both cases, the "calculation" is that the decay is 470ms, but will the bigger cap have less ripple even with the resistor in parallel? And does the inductance and noise that drolo and tca mentioned become an issue if we're not in the audio path?

Again, sorry that I was being unclear. Hopefully my ascii schematic will make sense.

Well, consider that R/R2 also form a voltage divider.  So, while in a perfect world any combination of cap and R2 values that yields the same mathematical product ought to be equivalent, when the value of R2 is examined in light of R1, there will be a range of R2 values below which you may as well not even HAVE a rectifier.  So the range os usable cap values will be partly determined by the ratio of R1 to (R1+R2).

Does that help a little more?

midwayfair

Quote from: Mark Hammer on July 22, 2013, 11:29:45 AM

Does that help a little more?

Yes.

Er ... what happens if we remove/jumper R1? As I have been wont to do ... I know there's basically a lower limit on how quickly the cap can charge (never less than one half-cycle from the input signal), but I've gotten away with having no attack resistor on multiple occasions. Is this bad or just "bad"? << This question in particular I wasn't sure how to look up. It seems to be de riguer to include a small attack resistor, but in breadboarding I usually can't hear any difference between, say, 100R and 0R.

Meaning I use this:



(from Wikipedia)
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

Mark Hammer

Well my dumb guess is that it will depend on the application.  The timing of things will necessarily be different for a compressor or limiter than it will be for other side-chain-controlled circuit categories like filters or gates.  Sometimes you want the sidechain to be hyper-reactive, and sometimes you don't.  In some contexts nobody is interested in anything less than immediate response, and only interested in the decay/recovery time, where in other instances the entire transition is of interest.  One of the Bass Balls clones I built has a much smaller value "attack" resistor than the stock 100R, and it sounds like it only has downward sweep, since the up portion of the sweep is so quick.

Over time, I've found that the manner in which that series resistance can yield so little return has eroded my interest in it.  If I had the patience and diligence to implement buffer stages, it would be possible to use varying sries resistors to achieve meaningfully slow attack time.  In the absence of those buffer stages, though, the potential range of achievable cap charge-up times that don't compromise how much current you have to drive whatever it is you're driving with the sidechain...can be very limited.  Will one actually notice the difference between 3msec and 20msec?  The resistance paralleled with the averaging cap can deliver a far more useful and broad range of "feels", with no loss of drive/push and the dreaded "undersignalitis".

So, if you'll pardon the terrible pun, I just take the path of most resistance.   :icon_rolleyes:

But back to your question.  The choice of that resistance to ground will depend on what you have next in line.  Take the Nurse Quacky, f'rinstance.  The averaging cap is followed by a 25k trimpot, acting as voltage divider.  It makes little sense to have a 10k resistance to ground in parallel with the averaging cap without any sort of buffering between that cap and the trimmer.  If a medium-value cap and 1M pot ins eries with a 47k resistor can deliver a useful range of decays, great.  But I think your hunch that aiming for a given decay time using a 47uf cap and small-value resistance makes little sense when the next thing in line is a 25k trimmer.

So, no, bigger cap values are not always better.  Longer decay is certainly helpful in reducing the obnoxious ripple of simple rectifier circuits, yes.  But the strategy used to achieve that helpful decay time has to be placed in context.

midwayfair

My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

PRR

> what happens if we remove/jumper R1?

There's *always* an "R1".

The signal comes from a source. This source is never infinite power. We can model this, more or less, as some source impedance, often resistor-like.

> a lower limit on how quickly the cap can charge

For abrupt (instantr-rise) waveforms, it is all about how fast the source (with R1) can charge-up C.

> in breadboarding I usually can't hear any difference between, say, 100R and 0R.

You are probably coming off an opamp. When faced with charging-up a cap NOW, the typical opamp hits its current limit. Say 40mA and a 4V swing. That's about-like 4V/40mA or 100 ohms. So yeah, another 100 in series is a small effect.

Also the diode has resistance. 30 ohms at 1mA, 1 ohm at 30mA, 300 ohms at 0.1mA. This job is 10+mA spikes and <0.1mA averages, so you are constantly transitioning through the ~~100 ohm range you mention.

Note though that many opamps "go crazy" facing directly into a capacitor. Like you have a hard time pouring beer with a 20 pound weight on your arm: your aiming and pooring corrections are slowed-up by the heavy mass, you over-correct, back and forth. This may not matter to the limiter, or it may be a cause of mystery glitches only on sudden transients.

In other cases.... a tube limiter may have 5K of source and another 2K in a hollow diode, before any "R1". I've seen them with 47K right off the bat. Low impedance tube circuits are costly. The monster Fairchild 660 uses a two 6V6 amp (like a DeLuxe) and transformer just to charge C with ~~150 ohm effective "R1".

The "optimum" values of C, thus attack/release ratio and R1 and R2, are sometimes limited by R2. In the classic vacuum-tube gain control, you'd think R2 could be "infinite. Ah, but minor grid leakage means values of R2 over 1Meg can be drifty. And in the better form of gain control, there's two tubes, 500K max. In the Fairchild 660 there's actually six tubes parallel! This should lead to 160K; Narma assumed some tube selection so R2 is not _that_ low, but still needed that 2*6V6 sidechain to get a high attack/release ratio. (Yes, today a TL071 would allow R2>10Meg.)
  • SUPPORTER

bluebunny

Quote from: PRR on July 22, 2013, 08:48:33 PM
Note though that many opamps "go crazy" facing directly into a capacitor. Like you have a hard time pouring beer with a 20 pound weight on your arm: your aiming and pooring corrections are slowed-up by the heavy mass, you over-correct, back and forth. This may not matter to the limiter, or it may be a cause of mystery glitches only on sudden transients.

(Going slightly OT here...)  Paul, have you ever considered shooting short YouTube movies of your wonderful illustrations?  They are a work of art in words as they stand - and very memorable and useful - but a feature-length collection would be wonderful!   :icon_biggrin:
  • SUPPORTER
Ohm's Law - much like Coles Law, but with less cabbage...

midwayfair

I'm bumping this thread because I've had a hell of a time trying to find a calculation for the mS attack time.

D1>---R1--------[variable resistance element]
              |  |
              C  R2
              |_|
               G

If R1 = 100K and R2 = 100K and C = 1uF (I snagged these values from a simple compressor circuit I saw), I know the DECAY is 100mS, but how do I estimate the attack time in mS? I thought it was just a low-pass filter, but a calculator puts that at 1Hz, which I know can't be right because it does SOMETHING. This is hardly the largest attack resistor I've seen, but something tells me that R1 = 100K is too large to be particularly useful even in a compressor.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

samhay

Quote from: midwayfair on March 06, 2014, 01:13:37 AM
I'm bumping this thread because I've had a hell of a time trying to find a calculation for the mS attack time.

D1>---R1--------[variable resistance element]
              |  |
              C  R2
              |_|
               G

If R1 = 100K and R2 = 100K and C = 1uF (I snagged these values from a simple compressor circuit I saw), I know the DECAY is 100mS, but how do I estimate the attack time in mS? I thought it was just a low-pass filter, but a calculator puts that at 1Hz, which I know can't be right because it does SOMETHING. This is hardly the largest attack resistor I've seen, but something tells me that R1 = 100K is too large to be particularly useful even in a compressor.

I think it might be time to consider looking into a circuit simulator...


I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

merlinb

Quote from: midwayfair on March 06, 2014, 01:13:37 AM
I'm bumping this thread because I've had a hell of a time trying to find a calculation for the mS attack time.
The attack time constant is C times the two resistors in parallel, assuming the source is beefy enough to drive the circuit without suffering any current limiting.

digi2t

Sorry... had to chirp in here, with some comic relief... at my own expense... naturally.

For the last 10 minutes I've been reading through this thread, wondering, "Where the damn hell is Jon going with this?". "Where the hell is anybody going with this?". "What the....."




I then realized... I misread the word "Decay", as "Deacy".




OK. As soon as you yahoo's stop laughing at me, you may carry on.  :icon_mrgreen:
  • SUPPORTER
Dead End FX
http://www.deadendfx.com/

Asian Icemen rise again...
http://www.soundclick.com/bands/default.cfm?bandID=903467

"My ears don't distinguish good from great.  It's a blessing, really." EBK

Mark Hammer

S'okay.
While standing in the loo last night, evacuating fluids, I glanced over at the box of bandages in front of me on the shelf, and was surprised to see that these had a "guilt vent".  What the?  Are people supposed to feel bad that they cut themselves?  Then I realized that it actually said "quiltvent".

merlinb

Quote from: Mark Hammer on March 06, 2014, 10:12:23 AM
Then I realized that it actually said "quiltvent".

Lol, reminds me of the film "Let's go to prison" where the jury finds the defendant "quilty".