Power filtering. School me please.

Started by Greenballs, September 15, 2021, 05:59:17 PM

Previous topic - Next topic

Greenballs

Can someone please explain the finer points of power filtering to me? For ages now I've been putting a 100n and 100uf cap across the earth/+9v rail and I've realised I don't fully understand why!

I'd like to know what it's main application/s is/are, why it's useful and how it does what it does. Layman's terms would be very much appreciated where possible! Thanks.

antonis

#1
Layman's terms implied in your query are:
100μF for reservoir cap (giving current when asked for it) and 100nF for high frequency ripple rejection (providing a convenient path to GND)

P.S.
There are many textbooks (not using Layman's terms) concerning rectifiction, smoothing, filtering etc.. :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..

ElectricDruid

I'd also add that it's not a filter unless there's a resistor present too. Of course, in reality even a bit of wire presents a limited resistance, but practically we want a proper "known" resistance, so we'd stick a resistor in series with the power coming in to make a complete RC filter:



As soon as you start drawing current by putting a circuit on the output end of this, there will be a voltage drop across the resistor. Since we'd rather not run our circuit at 6V when we have 9V available, we like to keep the resistor small (often under 100 ohms, sometimes a bit more) and therefore make the capacitor big. This is why you see 47uF, 100uF, and 220uF values for the main cap. These large value caps don't have a great filtering response at high frequencies, so then a small cap is added in parallel to filter those higher frequencies. Mostly though, we're trying to filter mains hum on the power supply, so we need a cutoff frequency well below 50 or 60Hz. The 100n cap is for high frequency noise and doesn't affect that.

Greenballs

#3
Thanks Antonis and Electric Druid, much appreciated!

Can I ask in addition, what are the effects of changing the value of the 100n and 100uf caps? And also the voltage rating? I've seen one example of a minimum 50v rating being required.

And finally, can power filtering adversely affect/change the frequency response of a circuit at the high and low ends of the spectrum?

antonis

Quote from: Greenballs on September 16, 2021, 03:03:30 AM
Can I ask in addition, what are the effects of changing the value of the 100n and 100uf caps? And also the voltage rating? I've seen one example of a minimum 50v rating being required.
Capacitor value "reflects" its "resistance" (impedance or capacitive reactance) form any given frequency, obtained from the R = 1/(2*π*f*C) or 0.159/(f*C)..
That resistance forms the lower (shunt) part of a voltage divider with series resistor as the upper part..
(see Tom's LPF configuration above..) :icon_wink:
So, the higher the cap value the lower its resistnace, hence more AC residual (ripple) passes to GND and not to load..

P.S.
The argument for 10-100nF placed in parallel with a much bigger cap (like 100μF or even bigger) is a different kettle of fish.. :icon_lol:

Quote from: Greenballs on September 16, 2021, 03:03:30 AM
can power filtering adversely affect/change the frequency response of a circuit at the high and low ends of the spectrum?
Strictly speaking, No.. :icon_wink:
(OK, perhaps around double the mains frequency for a lousy filtered supply..)

"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..

antonis

Quote from: ElectricDruid on September 15, 2021, 06:57:21 PM
Mostly though, we're trying to filter mains hum on the power supply, so we need a cutoff frequency well below 50 or 60Hz.

Only for half wave rectified supply.. :icon_wink:
(100 or 120 Hz for full wave rectification..)
"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..

Greenballs

Quote from: antonis on September 16, 2021, 08:15:38 AM
Quote from: Greenballs on September 16, 2021, 03:03:30 AM
Can I ask in addition, what are the effects of changing the value of the 100n and 100uf caps? And also the voltage rating? I've seen one example of a minimum 50v rating being required.
Capacitor value "reflects" its "resistance" (impedance or capacitive reactance) form any given frequency, obtained from the R = 1/(2*π*f*C) or 0.159/(f*C)..
That resistance forms the lower (shunt) part of a voltage divider with series resistor as the upper part..
(see Tom's LPF configuration above..) :icon_wink:
So, the higher the cap value the lower its resistnace, hence more AC residual (ripple) passes to GND and not to load..

P.S.
The argument for 10-100nF placed in parallel with a much bigger cap (like 100μF or even bigger) is a different kettle of fish.. :icon_lol:

Quote from: Greenballs on September 16, 2021, 03:03:30 AM
can power filtering adversely affect/change the frequency response of a circuit at the high and low ends of the spectrum?
Strictly speaking, No.. :icon_wink:
(OK, perhaps around double the mains frequency for a lousy filtered supply..)

Thanks for that Antonis. So a 220uf cap will filter out more AC residual than a 47uf cap? And the AC residual takes the form of mains hum?

What is the argument for the 10n - 100n cap in parallel? This cap reduces high frequency noise, no? So does this work within the same principle that the higher the value, the more noise is filtered out? Or is it just that the frequency threshold lowers as the cap value gets higher?

Bolsyo

If I use a 7660S/TC1044 as a charge pump or inverter, should I have filtering at the power input of the chip, after it, or both? I think I've seen all of these solutions in different pedals, but I have no idea what is considered best practice.

antonis

Quote from: Greenballs on September 16, 2021, 11:29:02 AM
Thanks for that Antonis. So a 220uf cap will filter out more AC residual than a 47uf cap? And the AC residual takes the form of mains hum?
Generally speaking, yes.. :icon_wink:
(but have in mind that it's always needed a series resistor for effective LOw Pass filtering - even some "invisible" resistance like diode dynamic  plus trasformer secondary winding ones..)

Quote from: Greenballs on September 16, 2021, 11:29:02 AM
What is the argument for the 10n - 100n cap in parallel? This cap reduces high frequency noise, no? So does this work within the same principle that the higher the value, the more noise is filtered out? Or is it just that the frequency threshold lowers as the cap value gets higher?
I knew that we wouldn't limit discussion using Layman's terms, only.. :icon_wink:

https://www.electronicdesign.com/power-management/power-supply/article/21808839/3-ways-to-reduce-powersupply-noise
https://ec.kemet.com/blog/the-importance-of-filtering-for-power-supplies/
https://www.tempoautomation.com/toms-circuits/power-supply-filter-design-for-pcb/
"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..

Greenballs

Quote from: antonis on September 16, 2021, 02:23:06 PM
Quote from: Greenballs on September 16, 2021, 11:29:02 AM
Thanks for that Antonis. So a 220uf cap will filter out more AC residual than a 47uf cap? And the AC residual takes the form of mains hum?
Generally speaking, yes.. :icon_wink:
(but have in mind that it's always needed a series resistor for effective LOw Pass filtering - even some "invisible" resistance like diode dynamic  plus trasformer secondary winding ones..)

Quote from: Greenballs on September 16, 2021, 11:29:02 AM
What is the argument for the 10n - 100n cap in parallel? This cap reduces high frequency noise, no? So does this work within the same principle that the higher the value, the more noise is filtered out? Or is it just that the frequency threshold lowers as the cap value gets higher?
I knew that we wouldn't limit discussion using Layman's terms, only.. :icon_wink:

https://www.electronicdesign.com/power-management/power-supply/article/21808839/3-ways-to-reduce-powersupply-noise
https://ec.kemet.com/blog/the-importance-of-filtering-for-power-supplies/
https://www.tempoautomation.com/toms-circuits/power-supply-filter-design-for-pcb/

Haha! Thanks for the links, I shall have a good look at them!

ElectricDruid

Quote from: antonis on September 16, 2021, 08:19:01 AM
Quote from: ElectricDruid on September 15, 2021, 06:57:21 PM
Mostly though, we're trying to filter mains hum on the power supply, so we need a cutoff frequency well below 50 or 60Hz.

Only for half wave rectified supply.. :icon_wink:
(100 or 120 Hz for full wave rectification..)

True, but that just means that if you want decent filtering for half-wave rectified signals, you need even bigger caps. The basic principle is bigger caps + bigger resistors equals better filtering. But there are reasons for not wanting bigger resistors (more voltage drop as the current increases) and there are reasons for not wanting bigger capacitors (bigger cost and caps that get bigger themselves!).

The little 100n ceramic cap in parallel is certainly much harder to explain. It's traditionally 100n because it's the standard value used in logic circuits and therefore tends to be very common and cheap. The exact value isn't crucial, but ceramic is usually preferred because it has low series resistance at the kind of frequencies it's there for - the links Antonis gave you go into more detail on this. The basic idea is that the big electrolytic caps stop filtering effectively at high frequencies, although in theory that should be where they work best (since the roll off of a RC filer is -6dB/oct, so you get half as much noise each octave you go up). So we stick another cap in to cover the bit of the spectrum that they miss.


Greenballs

Quote from: ElectricDruid on September 16, 2021, 04:59:59 PM
Quote from: antonis on September 16, 2021, 08:19:01 AM
Quote from: ElectricDruid on September 15, 2021, 06:57:21 PM
Mostly though, we're trying to filter mains hum on the power supply, so we need a cutoff frequency well below 50 or 60Hz.

Only for half wave rectified supply.. :icon_wink:
(100 or 120 Hz for full wave rectification..)

True, but that just means that if you want decent filtering for half-wave rectified signals, you need even bigger caps. The basic principle is bigger caps + bigger resistors equals better filtering. But there are reasons for not wanting bigger resistors (more voltage drop as the current increases) and there are reasons for not wanting bigger capacitors (bigger cost and caps that get bigger themselves!).

The little 100n ceramic cap in parallel is certainly much harder to explain. It's traditionally 100n because it's the standard value used in logic circuits and therefore tends to be very common and cheap. The exact value isn't crucial, but ceramic is usually preferred because it has low series resistance at the kind of frequencies it's there for - the links Antonis gave you go into more detail on this. The basic idea is that the big electrolytic caps stop filtering effectively at high frequencies, although in theory that should be where they work best (since the roll off of a RC filer is -6dB/oct, so you get half as much noise each octave you go up). So we stick another cap in to cover the bit of the spectrum that they miss.

Thanks for that, much appreciated!

teemuk

#12
Of course there won't be much of AC ripple with 9-volt batteries but you will still probably want to have AC decoupling filters in the power supply, which prevent signal currents from developing corresponding AC voltage to the supply nodes, from which they would couple to all stages supplied by the node causing feedback. So we place a filter there that shunts AC signals to ground and retains the node in steady DC potential.

That's usually what the 100uF cap in a 9-volt circuit is for. With opamps and their wonderful PSRR we fortunately can cope with less effective decoupling practices than in the days of discrete circuits.

The 100 nF cap? ...or caps. Well that's "close vicinity" decoupling for circuits (or chips) that draw transient currents. At higher frequencies the inductive characteristics of wires or PCB tracks start to pose a considerable series resistance. So, we need another decoupling filter - now in physically close vicinity - to the circuitry in question. Capacitance can be lesser, we don't need to decouple the entire audio band of frequencies there. We are merely concerned about the very highest ones, i.e. HF oscillation.

And do note: these are literally close vicinity caps! If you place them physically too far away from the circuit (or integrated chip power supply pins) they are as good as NOT being in the circuit in the first place. If you just customarily locate the cap in parallel to that 100 uF cap (like is often done by those who don't understand why these parts are there) you might as well omit the cap completely.

antonis

#13
Quote from: teemuk on September 17, 2021, 04:34:24 AM
If you place them physically too far away from the circuit (or integrated chip power supply pins) they are as good as NOT being in the circuit in the first place. If you just customarily locate the cap in parallel to that 100 uF cap (like is often done by those who don't understand why these parts are there) you might as well omit the cap completely.

True & Correct..!!  :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..

GibsonGM

More on what Teemuk / Antonis said:  Above the point where the 100u cap forms a resonant circuit with parasitic series inductances, the capacitor basically appears as an inductance (self-resonance).  It then becomes useless for bypassing purposes as its upper frequency is limited.
   
The self-resonant frequency of a capacitor is lower for high-capacitance units than it is for smaller value ones, hence the addition of the typical 100n.  The larger value cap offers a low reactance to low frequencies (audio range), while the smaller one acts as a bypass for frequencies above the first cap's self-resonant frequency.   Their functions "overlap".

Physical distance can negate this property by the addition of further stray inductances.
  • 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...

Mark Hammer

A pedal doesn't particularly care where fluctuations in the output come from.  It does not discriminate.  Ideally, every "up-and-down" in the electrical output is exclusively an amplified or modified version of the input signal.  But since the circuit "doesn't care", that up-and-down at the output could also include fluctuations in the power supply.

So, the goal of regulating the power supply is to provide juice to the pedal with NO up-and-down.  Wall power will provide an input at 60hz (other frequencies in other countries).  Full-wave regulation will double that to 120hz.  We try to eliminate it with a kind of "treble cut". 

Keep in mind that a simple 1-pole lowpass filter, formed by a series resistance and cap/s to ground, will only roll off at 6db/oct.  That means the ripple is reduced a bit, but not completely eliminated.  If one uses 100R and 100uf, that yields a lowpass filter, rolling off 6db/oct, beginning around 16hz.  That implies that any 60hz ripple would be reduced by around 24db (4 x 16hz = 64hz).  Is that enough ripple rejection?

If the ripple from our mostly-smoothed power supply was at 120hz, then our filter would reduce the "treble" in the supply by roughly 45db.  Again, is that "enough"?  Depends on the application and your ears, I suppose.  It is also one of the reasons why the blocking capacitors between stage rarely allow AC lower than around 60hz to pass.  Yes, it's partly or even mostly for tone-shaping.  But it is also a supplementary version of power filtering.  If I use a cap value that rolls off anything below 80hz at 6db/oct, then I won't end up amplifying any residual ripple quite as much, and my up-and-down at the output won't include supply fluctuations as part of it.

It's funny that we generally think of power filtering in terms of a single stage.  As long as it does not detract from providing sufficient current (by imposing too high a series resistance), I don't see anything wrong with using two cascaded RC networks to yield 12db/oct smoothing.  And keep in mind that, just like filtering out fizz from a drive pedal, a steeper slope (12 vs 6db/oct) means one can afford to move the corner frequency up a bit.  So, if one inserted two 68R/100uf pairs in series, each one would provide 6db/oct rolloff, beginning just under 24hz, but the pair of them would provide 12db/oct.  That would work out to just over 60db of attenuation at 120hz, which is better than 45db.  Using a pair of 68R resistors doesn't provide much more current-limiting than a single 100R.

The real EEs can chime in here.  I'm just an amateur.


antonis

Quote from: Mark Hammer on September 17, 2021, 08:50:32 AM
if one inserted two 68R/100uf pairs in series, each one would provide 6db/oct rolloff, beginning just under 24hz, but the pair of them would provide 12db/oct.

Not exactly, due to 1st filter loading by the 2nd one hence raising its theoretical corner frequency, but the general idea is right.. :icon_wink:
(of course, by using identical values for both stages, you can estimate 1st filter "loaded" corner frequency and set items values for -12dB slope at this particular frequency 'cause 2nd filter's corner frequency always is lower than 1st filter's one..)


edit: After reading what I've wrote I tend to consider myself tremenous waffler.. :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..

DavidFet

#17
EEVBLOG video on filtering: