Capacitors and resistors in low / high pass filters

Started by chromesphere, February 14, 2013, 06:25:41 PM

Previous topic - Next topic

chromesphere

Theres a thread going around that had a similar question, but i think mine is a bit different so im starting a new thread.

I (finally) get the basic function of a capacitor in an audio circuit and how it filters AC.  If the cap is in series it will only let through certain frequencies and block others (including DC).  Increasing the value -> increases the low end frequencies ie the old 'input cap mod'.

Adding a capacitor to ground will send those same high frequencies that once passed through into the circuit, to ground, removing them from the circuit instead, ie, a low pass filter.

But what funciton does the resistor have, in say, the last example (a low pas filter)?  What does it actually do?  I've seen resistors inline with the signal on the input and output of circuits before (ie, the soul bender), and, well i think it only removed some volume...lol actually now i remember, it actually removed some treble as well!  I replaced it with a switch for a 'bright' setting.

So, does adding a resistor in the signal path remove treble?  do certain frequencies get blocked by a resistor?  if so, how can you predict what frequency a resistor will block?

Thanks for your help!
Paul
.                   
Pedal Parts Shop                Youtube

chromesphere

#1
Just thinking further, ill expand on that.

If we put a low value resistor in series with the signal, 47k in the example of the soul bender.  It cuts some treble (and passes bass).  If we place that resistor to ground, would it infact cut bass, and pass only the treble portion of the frequency?

I may be way off with this whole resistor / frequency thing...

Edit: i have a feeling that the 47k on the end of the soul bender was reacting that way because of the 150pf cap infront of it!  Ok, still confused about the function of the resistor... :(

Thanks again,
Paul
.                   
Pedal Parts Shop                Youtube

Kesh

the other resistor makes a voltage divider with the cap


chromesphere

#3
So it only sets the volume and has nothing to do with the frequencies been cut?  But then you've got the stupidly wonderful tone control that uses the pot to effect the frequency :(

EDIT: Nup that cant be right, low pass filter reacts to changes in both resistance and capacitance...(not saying what you said isnt right kesh, my understanding of what you said)...

Paul
.                   
Pedal Parts Shop                Youtube

R.G.

The way to understand what resistors and capacitors to is to look first at a resistor voltage divider.

Two resistors in series from a signal source to ground form a voltage divider. The voltage taken from the junction of the two resistors is divided in the ratio of the lower resistor to the total of the two resistances. A volume pot does this by using one long resistor that can be tapped at any point between top and bottom.

If instead of two resistors you replace one of the resistors with a capacitor, as far as output volume goes, you have replaced a resistor with a **frequency varying impedance**. Capacitors vary in how much they **impede** current flow with frequency. They **impede** current less as frequency goes up. A resistor **impedes** current flow equally at all frequencies (theoretically, for an ideal resistor at least).

So if you replace the upper resistor in a two resistor divider with a capacitor, it lets through more signal as frequency increases. That's a HIGH PASS filter. If instead,  you replace the lower resistor with a capacitor, the capacitor sucks more signal to ground as frequency increases. That's a LOW PASS filter.

If you think about it for a minute, in the **HIGH PASS** version with the capacitor for the top resistor, at very high frequencies, the capacitor is effectively a short circuit, so the value of the bottom resistor almost doesn't matter. The bottom resistor only matters when the frequency gets low enough that the capacitor's impedance is about the same as the resistor's - well, resistance. That happens when
F = 1/(2*pi*R*C)

Likewise, in the **LOW PASS** version, at very high frequencies, the capacitor effectively shorts the signal to ground until the frequency gets low enough that the capacitor's impedance is about the same as the resistor's impedance. That also happens at
F= 1/(2*pi*R*C).
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.

chromesphere


Ahh, impedence...we meet again...

Thanks for the explanation RG.  Read it 10 times. I understand most of it.  I understand how the capacitor works as far as its role in blocking the frequency of the signal (or in the case of low pass, sending it to ground, filtering it out) and voltage dividers including how output potentiometers work. 

But I still dont understand how that dam resistor comes into play.  Its almost like, in my head, it doesnt even need to be there (but clearly it does)...The capacitor functions as the filter without the resistor even being included.  In the high pass filter example, if we lowered the resistors value to something really low...lets say, 100 ohms, i would expect the same frequencies being passed by the capacitor, just at lower volume...How can the resistor value change the frequency response of the capacitor...?

Oh hang on....does reducing the value of the resistor (low pass filter) reduce the size of the AC signal coming into the capacitor (thus changing the frequencies it will pass / block)?  Am i on the right track there?

I'll think about this some more, thanks for your help RG!
Paul
.                   
Pedal Parts Shop                Youtube

Kesh

you need that resistor there for the same reason you need two resistors in a voltage divider. it's their ratio, not their actual value, that decides things.

the RC circuit is just a voltage divider where one of the "resistors" (the cap) varies its "resistance" with frequency. its ratio with the other resistor (the actual resistor) decides the effect. because it's the ratio, both the resistor and the cap matter.

chromesphere

Thanks Kesh, I think i understand RG's explanation now!  The high frequencies pass no matter the resistance value of the lower resistor, but the low frequencies are effected similar to how a voltage divider works.  Its a voltage divider that reacts to frequencies depending on the value of R and C !!  I'll need to experiment with this now on breadboard to be sure im on the right track.
Cheers,
Paul
.                   
Pedal Parts Shop                Youtube

ashcat_lt

Not exactly.  The high frequencies are affected exactly like a voltage divider, as well.  It's just that the impedance of the cap may be extremely small.  If the resistance is also extremely small...

It is a voltage divider, period.

chromesphere

it may be a voltage divider, but obviously not of the output volume control type that i understand. 

The difference between the 2 is the part that im having trouble understanding, and would appear, still dont understand.

I'll mess around with it on breadboard and see if i can get something that makes sense from it.

Thanks,
Paul
.                   
Pedal Parts Shop                Youtube

Ronan

#10
Paul,

The formula F= 1/(2*pi*R*C) is the -3dB cut-off point of an RC filter. You need R and C to do the calculation. The bigger R or C is, the lower the cut-off frequency. This is true for low and high pass filters.

This calculator does the maths for you.

The point you may be missing, is that the value of the resistor directly affects the -3dB cut-off point, not just the capacitor...

Edit - it might help to envisage it this way, say you have a low-pass filter with a big series resistor and a small cap to ground. At high frequencies, it will be like a voltage divider, very similar to a volume control turned down low. It is this "turning the volume down" on the high frequencies that makes them effectively disappear, which is what we want. But at low freqencies, the capacitor acts like a very large value resistor say 1M or 10M, so the circuit appears as a voltage divider with the "volume turned right up".

I'm glad you asked this question, I actually learnt something myself :)

chromesphere

Im glad one of us is learning something ian :D haha

No i actually get that part.  But like i said early, i dont understand why you need the resistor (omg here we go again).

Ok, how about this.  Would placing a cap to ground with no resistor remove highs (value dependant) from the circuit?  From my understanding, the answer is yes.

So in the example that you gave Ian, if we removed the top resistor (1 or 10m), wouldnt the low pass filter still work?  The capacitor is still removing highs (sent to ground). The resistor does nothing except set how much of the voltage will appear at the junction.   But it MUST have an effect cause increasing its value effects the cut off frequency. 

This is mentally where im stuck with this dam pass filter...I thought i had it with my last post.  OK thats it.  Breadboard time.

Paul
.                   
Pedal Parts Shop                Youtube

PRR

> The capacitor functions as the filter without the resistor even being included

No it doesn't.

Stop thinking general/absolutes and look at *ratio*.

> voltage divider ... of the output volume control type that i understand.

That voltage divider always has two resistors. When we want a knob on it, we use a potentiometer, which is *2 resistors*. The *ratio* of these 2 resistors is set by where we set the wiper.
  • SUPPORTER

nocentelli

You can check how this works on a breadboard: An extremely crude treble roll-off control can be made using a pot (say 100k) as a variable resistor in series with the guitar input, leading to a small (e.g. 4n7) cap to ground). The output is taken from this node. With the pot at minimum resistance, only the very highest frequencies are bled to ground: As the pot is rotated, increasing the resistance progressively bleed off more of the highest frequencies - You are effectively lowering the cut-off frequency by increasing the resistance. Removing the pot (i.e no resistor) will still reduce treble, but only at the highest frequencies, set by the value of the cap. 
Quote from: kayceesqueeze on the back and never open it up again

WhenBoredomPeaks

what happens if you start "stacking" RC lowpass filters after each other? can you get a steeper cutoff (like 24db/octave or steeper depending on the number of the filters) or you will just get a circuit where the values can be simplified down to a single cap-resistor filter? (via series/parallel relationships)


chromesphere

Thanks PRR and Nocentelli.

Lets see if i can get it right this time.

Low pass filter example.  When the resistors value is low, most of the signal will appear at the output.  So roughly speaking all bass will leave the circuit.  The capacitor will send high frequencies to ground and of course, block the lower frequencies (depending on the value, etc etc)

Increasing the value of the resistor, will reduce the size of the signal leaving the circuit (less bass i guess) like a voltage divider potentiometer. I assume that the high frequencies will still be sent to ground even if the signal is small.

So if you made the resistor in a low pass filter a potentiometer, it would essentially be a bass control? 

Please...tell me im right... :)

Paul
.                   
Pedal Parts Shop                Youtube

ECistheBest

the realization is somewhat difficult in the time domain where you plot a sine function and you see a wave. the -3dB cutoff frequency and whatnot are used, but you cant figure out how much attenuation there are at other frequencies.


putting it in the frequency domain will help a little more. this way you can solve for the actual output, or the gain (in a LPF/HPF, attenuation) at any frequency that you apply.

to make it sound easy, calculating in the frequency domain allows you to see resistors (and inductors too) as resistors. -wow!- the values of these resistors, i'll call impedance for now. and the frequency in Hertz that you apply into the calculation will be 'S'.


impedance of a resistor in frequency domain is still the same, in ohms. but the impedance of a capacitor is 1/(S x C). for example:

converting a resistor into frequency domain: 100 ohms in time domain = 100 ohms in frequency domain. 100k is 100k.

converting a capacitor into frequency domain: 1nF capacitor = 1/(SC) ohms in frequency, so 1/(S)(10-9F) = 1,000,000/S ohms. what this means, is that for this capacitor to "look" like a 100k resistor, 100k = 1,000,000/S and the S has to be 10Hz and the impedance "looks" the same as the 100k resistor. when the frequency is higher, the impedance of the capacitor is smaller. when the frequency is 1kHz, the impedance "looks" as though its a 1k resistor. when the frequency is 10kHz, the impedance "looks" like a 100 ohm resistor.


once you done that, an HPF or LPF is like a simple voltage divider. with volume controls, the output of a voltage divider network is Vout = Vin x (R to ground / R to ground + R in series). its just the same in frequency domain, but you get an S somewhere, which is important. plug in a frequency into the resulting formula's S, and you get a "gain" for that frequency. lets try it.


a low pass filter has a resistor in series, with a capacitor to ground.




say, R = 10k, and C = 1nF. see what we have. R(s) = 10k still in frequency. C(s) = 1/SC = 1/(S x 10-9) = 109/S.

the output voltage Vo is Vin x C/(R+C). so the gain of this thing, is C/(R+C). gain, or attenuation, for this circuit is: (109/S)/[10k + 109/S].  to get the gain at certain frequencies, just plug them into S.

if S = 100Hz
gain = 0.999

if S = 1kHz
gain = 0.99

if S = 10kHz
gain = 0.91

if S = 100kHz
gain = 0.5


so at 100kHz, the input signal would be halved by the time it gets to the output. you can do the same with high pass filters.

ECistheBest

Quote from: chromesphere on February 15, 2013, 03:11:56 AM
Thanks PRR and Nocentelli.

Lets see if i can get it right this time.

Low pass filter example.  When the resistors value is low, most of the signal will appear at the output.  So roughly speaking all bass will leave the circuit.  The capacitor will send high frequencies to ground and of course, block the lower frequencies (depending on the value, etc etc)

Increasing the value of the resistor, will reduce the size of the signal leaving the circuit (less bass i guess) like a voltage divider potentiometer. I assume that the high frequencies will still be sent to ground even if the signal is small.

So if you made the resistor in a low pass filter a potentiometer, it would essentially be a bass control? 

Please...tell me im right... :)

Paul
this would actually make the pot a treble control. the treble frequency will be affected first when you start turning the pot to more resistance. when resistance is zero, no signal would go through the cap to ground. when resistance is little, only the highest frequency will go to ground. when resistance gets higher, a bigger range of frequencies will start to go through the cap to ground. and what's the bass frequency doing all this time? being unaffected.

ashcat_lt

If you put a capacitor parallel to an ideal voltage source with no series resistance you will see no treble loss - the cutoff frequency approaches infinity.  The frequency equation shows this because 1/x approaches infinity as x approaches 0.  But it's the voltage divider which causes it.  The "top" resistor is 0, so no voltage is dropped across it and therefore it must all appear across the cap, no matter the frequency.

But in the real world there are no perfect sources.  Everything will have some impedance to current flow.  To get completely accurate calculations you must include this source impedance as though it were in series with the "top" of the voltage divider.  It gets even more fun when this is a reactive (frequency dependent) impedance like the inductive (and slightly capacitive) pickups in a guitar.

So, basically, if you don't stick in the "top" resistor in the low-pass config, the source itself will be that resistor.

I think you need to really look at how a voltage divider works.  The only difference between a volume pot and a lowpass filter is the frequency dependent nature of the cap's impedance.  If you think of exactly one frequency at a time, and substitute for the cap a static resistor equal to the cap's impedance at that exact frequency, it tells you everything you need to know about that exact frequency.  Now do this for a number of frequencies and you'll start to get an idea of how the filter will behave.


Not to complicate things, but it is worth mentioning that these things are also sensitive to load impedance.  The load appears in parallel with the "bottom" of the voltage divider, and needs to be included in calculations.  To the extent that this impedance is very large it won't make much difference, but it can't be completely ignored.

chromesphere

Thanks for everyones responses.  I'm going to be distracted with family life for the next day or 2, but when i get a moment, hopefully sunday, im going to read through this thread until it penerates my skull.  I have learnt some things from this thread (great explanation of the formula ECisthebest!!).  I think i will also hit the books and get a better understand of filters.  They are obviously everywhere in pedal electronics and there seems to be a world of information about them.
Thanks again.
Paul
.                   
Pedal Parts Shop                Youtube