power filtering: evrybody omits the resistor from the RC filter -- is that OK?

Started by j-pee, March 16, 2025, 07:09:30 PM

Previous topic - Next topic

Rob Strand

On the whole the OP's questions and misunderstandings have been answered.

As with most things if you think about it there's more to it than meets the eye.

If you have heap of ripple, say in the extreme where the input is a rectified but unfiltered waveform (ie. no pre-diode filter cap) the diode + cap will peak detect.   The ripple will now be set by post diode filter cap.    Because the diode is peak detecting the output voltage will be high.    The ripple perhaps a bit more.  The resistor cannot peak detect, since the output voltage of the filter is the average DC level the the output will be 0.64 times the peak.   So even with very small (no resistor) the output voltage will be less than the diode case.  Also we would expect the output ripple to be quite high for resistor.

Now go the other way suppose we have a tiny amount of input ripple, say < 100mV.   The diode won't turn off, the diode essentially passes the output current all the time and the output cap doesn't act much as a reservoir.  In that case the output waveform with the diode would be expected to track the input.  So it doesn't actually filter any/much ripple.    The resistor will still act as a filter and reduce the ripple, almost by the same reduction factor regardless of the size of the input ripple.

So there's only a small range of ripple voltage where we can make comparisons.   For large ripple the diode wins and for small ripple the resistor wins and with very small ripple the diode does very little.

EDIT:
So it seems this is the case.

For the example circuit I gave earlier.  Very roughly:   if the input ripple is less than about 1.45Vpp the resistor produces less ripple and when the input ripple is more than 1.45Vpp the diode produces less ripple.

(The conclusion (rule of thumb) I gave earlier that the diode is half as good is only true when the input ripple is about 1Vpp.   I probably came to this conclusion because the I considered input ripples of 0.5Vpp to 1.0Vpp.)
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

R.G.

Quote from: ElectricDruid on March 18, 2025, 08:28:11 PM
Quote from: R.G. on March 18, 2025, 08:08:33 PMReplacing the polarity protection diode with a resistor in hopes of getting more filtering is nearly as useless

I thought I understood this, but I don't understand this sentence. The diode doesn't provide any effective resistance, so doesn't make a good filter with the capacitor - we agree about that. After all, that's not it's job or why it's there. But *replacing* it with a resistor will absolutely get you more filtering, won't it? Bigger R or bigger C or both is better filtering.
Ok, you'll lose the *polarity protection* that the diode gave you, but that's a separate thing, and the reason why you really need *both* the diode *and* the resistor.

RG? Is that not right?

The key word there is "nearly". As noted before, a resistor drops the voltage at the same time it filters. There is an inherent limit on how much you can drop voltage into a pedal circuit before it starts to affect the circuit, for better or worse. The amount of filtering available is limited by the need to make the resistor "low" to avoid voltage drop and "high" to get better filtering. It's a double bind. Sure, every milli-ohm of resistance lowers the corner frequency of an R-C high pass filter; but should we string many feet of wire in series to the filter capacitor just because the milliohms add up?

A test of reason should apply: will a small resistor added to the bulk filter cap in the pedal get you to a frequency cutoff you need? Will adding a 10 ohm resistor help? A 100 ohm? Is that a tolerable voltage loss?

I personally don't like inserting a diode drop for just this reason. I developed a couple of polarity protection circuits that protect against reversal and have voltage drops under about 10-50mV for just this reason. I only accept a Schottky protection diode under duress.  :)

This whole thread is based on some faulty premises. These are that (1) protection diodes have anything to do with filtering, and (2) that replacing the >protection diode< with a resistor can get you any usable filtering. It would be far better to take a systems view and ask what and why are you filtering?

Is your DC power into the pedal so humm-y and noisy that you have to design your pedals to fix that? Wouldn't it be better to use a quieter power supply? Those exist - I know one of them intimately - and are not expensive.

If you're stuck with a noisy DC supply, some modern LDO regulators could give you, say, 8Vdc while suppressing hum by 46-50db. Maybe better than messing with swapping resistors and diodes.

I sympathize with the OP, it's fascinating to just swap a couple of parts in isolation and think that you've done an improvement. But if that was really possible, the original circuit designer, if they were good, would already have done it.










R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

j-pee

Quote from: R.G. on March 18, 2025, 08:08:33 PM... the OP thinks that the diode and cap are there to filter.

With respect, I don't :)

The OP keeps seeing vero board layouts with "9V -> diode -> 100uF cap to ground" blocks...
and he thinks that the layout creators did that because they thought a diode would be suffice (in the place of the resistor)

The OP, of course, might be wrong about that (too)


Take this example:
V 1.1 versus V 2
https://tagboardeffects.blogspot.com/2023/01/t-rex-mudhoney-v11.html



But PRR's argument about PSUs being silent these days is absolutely convincing! I'll adapt that approach! :)
(I'm really not a big pedal builder, nevertheless)

~

R.G.

Quote from: j-pee on March 19, 2025, 05:00:09 PMWith respect, I don't :)
No problem. I should have read more closely.

QuoteThe OP keeps seeing vero board layouts with "9V -> diode -> 100uF cap to ground" blocks...
and he thinks that the layout creators did that because they thought a diode would be suffice (in the place of the resistor)

With respect, I think that may be mistaken. We usually can't know what was in the layout creators' heads when they put in a diode. I believe that they put in that diode for reverse polarity protection, or just because they saw it a lot on other layouts/pedals and didn't think about it much.

On the technical side, a diode is near worthless for filtering, and a resistor will have a tough time being both large enough to place the low frequency cutoff above line frequency to filter hum and simultaneously small enough not to steal too much voltage from the DC supply voltage. They are opposed requirements.

It is only my personal opinion, which may be wrong, that there should be neither a diode nor a resistor in that position. Instead, using a quieter DC power supply would be superior to both.

QuoteBut PRR's argument about PSUs being silent these days is absolutely convincing! I'll adapt that approach!

And he's right about that. I agree completely with you adopting quiet DC power supplies. If I were in your position, I would also remove the and insert a wire where it was. If polarity protection is needed/wanted, I would use either a bipolar or MOSFET polarity protector, circuits for which are at geofex.com.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

j-pee

Thank you very much for your kind advice :)

If I had a diary, I'd record it today that from now on a quiet supply is a must, and PSU noise filtering is obsolete -- according to R.G. and PRR :)

This is totally liberating.

- - -
PS:

I do know that PSU noise filtering (PF? -- well, why give an alias to an obsolete notion? :)) was a thing for some time in history, and we can still easily find traces or even examples of this practice.
The reason for this filtering was to not lose quietness when taking to PSU instead of batteries. But that was long ago. Still, when I first bought a soldering iron and started reading this culture's forums, in 2019 (I'm not young at all, I mean, I am, just like any of us, but :)), I could read about this. I even kind of remember one major pedal manufacturer being referred to as they have their usual 100 Ω resistor or 90 Ω (?) at the +9v entry point.

Either way, it is over :)

Thank you for enlightening why it is wise to omit it completely (i.e. that resistor).


Phoenix

Another thing worth noting, is that not all designs are very sensitive to power supply ripple. Op amps generally have excellent PSRR (power supply ripple rejection), and so long as the biasing arrangement is something sensible that doesn't couple unfiltered voltages into an input (i.e. "noiseless biasing"), the pedal should be fairly quiet even with a "noisy" power supply.
Discrete designs however typically have very poor PSRR, so filtering is generally much more important here.

So that is to say, even with all else being equal (level and frequency of ripple from power supply, filter cutoff point, voltage drop across filter/reverse polarity protection, levels of gain, etc), not all designs will benefit equally from filtering. A transistor based fuzz will benefit greatly, while an op amp circuit of the same gain level may barely benefit at all.

j-pee


PS 2:

As a good-bye to this old practice,
here are just two random instances where layout designers talk about a "filter cap":

"Polarity protection diode and power filter cap has been added "
https://dirtboxlayouts.blogspot.com/2021/10/dod-210-fet-preamp.html

"22uF filter cap"
https://tagboardeffects.blogspot.com/2017/09/18v-colorsound-power-boost.html

Once again, the conclusion has already been reached:

A PSU that we use for our pedals is supposed to be silent.

amptramp

You may have a power supply that is silent but you can still need a filter capacitor local to the circuitry to add stability and provide a path for changing currents.  There is always some inductance in the wiring from the power supply to the stompbox and capacitance on the pedal side may be needed for stability.

antonis

What Ron said..

Power supplies might be as quite as a mouse but this stands for their output, which doesn't always coincide with circuit's input.. :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

aion

Quote from: j-pee on May 18, 2025, 08:17:09 AMI do know that PSU noise filtering (PF? -- well, why give an alias to an obsolete notion? :)) was a thing for some time in history, and we can still easily find traces or even examples of this practice.
The reason for this filtering was to not lose quietness when taking to PSU instead of batteries. But that was long ago. Still, when I first bought a soldering iron and started reading this culture's forums, in 2019 (I'm not young at all, I mean, I am, just like any of us, but :)), I could read about this. I even kind of remember one major pedal manufacturer being referred to as they have their usual 100 Ω resistor or 90 Ω (?) at the +9v entry point.

Either way, it is over :)

Thank you for enlightening why it is wise to omit it completely (i.e. that resistor).
This is a very bad conclusion to draw from everything that has been said so far, and I feel a duty to people coming across this thread in the future to so they don't get led down the wrong path by this.

When designing pedals for your own use, in predictable environments, yes, you can get away with very little filtering if you are in control of the external power situation (not only the quality of the AC/DC supply, but also proper AC mains, or at least "conditioned" mains like with a Furman rack unit). That has been much of the context so far, so it's reasonable to conclude for yourself that you should just make sure to use good-quality power.

But if you're designing for others, whether in a hobby or professional capacity, filtering has become far more important in the last several decades, not less, as we've moved away from battery power.

At issue is that external power supply innovation has gone in both directions: they've gotten significantly better as manufacturers find creative ways of improving their performance, and also significantly worse worse as manufacturers find creative ways of saving money. R.G. has designed what is probably the best switch-mode PSU available for analog pedals (the 1 Spot), but there are plenty of much cheaper alternatives that claim the same performance on the box, and I imagine he would have some very pointed criticisms of those claims.

When you design circuits that will be used by others, you have to design against a worst-case scenario. Maybe the pedal runs great off a PP2+ with an isolated supply—but someday a customer will try to power it with a switch-mode adapter that came with their Wi-Fi router in 2010 and then daisy-chain it to three other pedals, and the filtering will be incredibly important. Proper filtering doesn't make it sound worse under ideal conditions, but can make it sound exponentially better when things are less than ideal.

Additionally, pedal circuits have gotten much more complex over time, even if we limit examples to just overdrives. A Tube Screamer is relatively simple, but you get into circuits like the Friedman Dirty Shirley or Amptweaker Tight Metal with several cascaded gain stages, and they benefit greatly from using several isolated sub-supplies within the pedal, each with their own small-value resistor and filter capacitor. So at that level of complexity, the designer is well past the question of whether the circuit needs a filter capacitor, and they've realized that a single one is nowhere near enough. Even the physical placement matters.

I've been designing pedals for maybe 12 years now, and as I've gotten more experience, I've added a great deal more filtering to my PCB designs as I collect fringe cases where even a commercial circuit can be made to perform better. Even things like adding ceramic bypass caps in close proximity to each IC can help a lot in some circuits. But again, not very noticeable in ideal situations, only in non-ideal ones.

As with everything, there is no simple solution and it depends heavily on the application. If you're just working with Big Muffs and single-stage overdrives as you mentioned in the original post, your summary might take you as far as you need to go, and you may never need to reevaluate. But it is very, very bad advice to anyone trying to learn about pedal design in the future, especially to go so far as to describe the idea of power filtering itself as though it is antiquated.

GibsonGM

I put the R-C in most everything I build (even when it's not shown). It's 2 parts...costs pennies. I guess it makes me feel better :) 

Can noise be coupled into a power supply, say a 1 Spot, thru its supply wires? How about its competitors?  It's something I've thought about, and while I use clean power...I just like knowing that a bit of crap that found its way in could be eliminated before it were ever a problem.  And if I ever want to use one of my 2 dozen older, not so great supplies, it's not a problem.   

For all I know, my PS is picking up all kinds of computer hash all the time, as the line runs right over it, and my pedals are filtering it out before it hits my interface  :icon_mrgreen:   I can hear it if I lean over there too close w/a single coil...
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

fryingpan

As per my understanding, to get decent power supply filtering (ie. reduce 50-cycle hum) you'd need at the very least 270 ohms as a series resistor (220u cap). That would cause excessive voltage drop and will only give you around 24dB attenuation at 50Hz, which as a PSRR value of sorts would be pitiful. So the series resistor isn't really all that useful for filtering. Most designs include up to 100 ohms as a series resistor (but usually just half that, if even), but what that is most useful for is basically current limiting in the event of a short. Considering that most power supplies these days are regulated and will "trip" due to overcurrent, you don't really need much current limiting (?). The cap is useful to control ripple somewhat (together with the series diode) and, purportedly, to provide a charge reservoir to stabilise operating voltages (?).

PRR

Do you guys carry parts and a soldering iron to gigs? When I did, I was prepared to fix shortcomings on the stage. But when there is a known potential shortcoming, I'd rather fix it on Thursday so I can spend Friday setting-up and checking out the groupies. (Or is that a boomer thing now?)
  • SUPPORTER

antonis

Despite the fact that I build all my own power supplies (hum-free, individual transformer secondary for each pedal, well filtered voltage regulator, etc..) I tend to place a simple RC filter on each circuit power input and counterbalance any voltage drop (plus Schottky series diode's voltage drop) by properly setting regulators output..

I do know that it's an overkill, but.. :icon_redface:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..