low pass and high pass filtering question

Started by pinkjimiphoton, April 19, 2017, 03:39:32 PM

Previous topic - Next topic

pinkjimiphoton

hi all
i gotta question.

i built a circuit for my bro as a simple overdrive/boost. he loves it. but he lives on top of a mountain and is getting bombarded by rfi noise and almost motorboating sounds. it doesn't happen here at all, it's quiet but up there it's like REALLY bad.

so i had already added more power supply filtering etc.. which is probably redundant, but it got me wondering and i need a couple questions answered.

does low and high pass filtering in the power supply itself have an effect on the tone of the circuit in terms of audible noise etc?

like... can you filter out hum with a high pass filter and hiss with a low pass one in the power supply part of the circuit, or is it better to do it in the audio part of the circuit?

since he's having problems with low freqency interference, i figure adding a high pass filter before the transistor will help roll off some of the unneeded lows and eliminate sub harmonic crud.

at the same time, i wanna add a lowpass filter to roll off most of the hiss and background noise of the pedal.
i DID add a small snubber to it for him between b and c, but it's still pretty hissy. turning the treble on his amp off makes it pretty much go away, so i'm figuring this will let me roll the hiss off.

i looked at an online filter calculator, and trying to work with nearest standard values, i came up with the following:

for my low pass filter i figured roll it off at 6khz, as the guitar spectrum pretty much ends around 4k-ish and the hiss seems to be prevalent above that..so figuring if i cut it off from there it should help him with the noise.

the calculations i got ended up suggesting a 56.44k resistor, so  100k pot as a variable resistance into a 470p cap should do the trick?

for my highpass filter i figure i'll roll it off at 60hz to help keep it tight.
the calculations i ended up with said 27n cap into a 98.24k resistor should do the trick. or 47n into a 56.44k resistor.... so should i try a 100k pot here too?

or am i better off to go down, and use 50k pots for both? i must admit a little confusion. a lot even. ;)

this is my first time trying to design filtering like this, so do those numbers look about right?

not looking for tone control, looking to try and wipe troublesome frequencies he doesn't need so he can use it..

thanks guys

calcs i used:

http://www.ekswai.com/en_highpass.htm

http://www.ekswai.com/en_lowpass.htm

  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

ElectricDruid

I got so bored of doing these on a calculator I wrote myself a program to do it for me. My version sticks to actual nearby resistor values. Here's the results for your sums:

Highpass:
http://electricdruid.net/rc-filter-calc/?f=60&r=&r_series=3&r_errors=1&c=47n&c_series=1&c_error=10

Lowpass:
http://electricdruid.net/rc-filter-calc/?f=6k&r=&r_series=3&r_errors=1&c=470p&c_series=1&c_error=10

Summary is if you use 56K resistors for both, and 470p for lowpass and 47n for highpass, you get 60Hz-6KHz.

Looks good to me. Go for it.

Tom

pinkjimiphoton

thanks for the info AND the links, tom!!

one more question if i may... do you think i'd be better off to use pots?
and if so, 50k (close enough to 56)  or 100k?

i figure 100k pots may give a little more adjustment, but i'm just now beginning to see what i have to do here.

i'm betting for my mess, i'm best with fixed resistances, but i AM curious if a pot would be more feasible for tweakage?

sorry... all these years in, still just an egg ;)
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

blackieNYC

#3
I don't think Ive built one myself, but what about a steeper filter - 2nd order, two identical (ish)rc filters in series.  In a single rc filter, low pass, I think if 4kz is down 3db, then 8k is down 9dB. If its second order (correct me if I'm wrong), if 4k is down 3dB, 8k is... (Calculator) ... gone. Ok, maybe 15dB.

If the fuzz sounds great but the highs get ugly, 1st order is great, but I figure if the highs are fine- but the hiss is unacceptable- a steeper approach is called for.  Thoughts?
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

pinkjimiphoton

i think i'm gonna make popcorn, sit back and shut up and try and learn.


say what? ;)

so you can add more than one filter after another to get steeper cutoffs? don't you lose more signal that way blackie?
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

Phoenix

Power supply filtering is important for noise, but you DON'T want a high pass filter there! An ideal power supply is 0Hz, so you want the lowest practical low-pass filter.

As to limiting RFI, what you want is bandwidth limiting on your signal. Unfortunately, knowing the types of circuits you like Jimi, you're going to have a bit of trouble implementing them in any sort of "textbook" fashion.
The problem is that precision bandwidth limiting requires defined impedance, and guitars are far from it, especially when coupled to a low input-impedance fuzz or the like, where the source impedance changes drastically with frequency and the setting of the guitar controls and often also the effect controls.

Anyway, the best place to put this band-pass filtering is after some defined impedance, like after your input buffer/first gain stage, so long as the output impedance stays within some manageable range with changes in control settings so that your bandpass actually stays where you want it.

And yes, as Blackie mentioned, there are also higher-order filters. The typical RC filter is a 1st order filter, it's 0dB point is one octave above or below the -3dB point (which is the frequency we calculate for), and it drops off at -6dB per octave past the -3dB point.
Multi-order filters have a steeper dropoff, being n*-6dB per octave where n is the number of orders, so a 2nd order filter has a -12dB per octave drop off, and 3rd order filter has -18dB per octave, etc. The opposite is true of the passband, the 0dB point becomes 1/2 an octave for a 2nd order filter, etc.
Multiple-order filters are more complicated as they also have quality factor "Q". This determines how flat the passband is, and also the rejected band. Different topologies of multi-order filters go by different names and have different Q's, Butterworth is ~0.707, Chebyshev is ~0.9565, Bessel is ~0.5773. Butterworth is the most commonly used in audio because it has the most linear response.
Unfortunately, it's not as simple as just cascading the same filter twice in a row to get a 2nd order filter.

Usually multi-order filters are implemented with opamps as that's the simplest, but they can be done passively. Anyway, getting into the design equations is way beyond the scope of this conversation. Hope I've given you some search terms to get started.

blackieNYC

Phx - why does a passive 2nd order filter, say lowpass, develop a Q problem?  In this article, about halfway down they describe the 2nd order passive filter, describing only one downside - cascading filters have diminishing accuracy. http://www.electronics-tutorials.ws/filter/filter_2.html  What are they leaving out?
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

Phoenix

Quote from: blackieNYC on April 19, 2017, 11:49:29 PM
Phx - why does a passive 2nd order filter, say lowpass, develop a Q problem?  In this article, about halfway down they describe the 2nd order passive filter, describing only one downside - cascading filters have diminishing accuracy. http://www.electronics-tutorials.ws/filter/filter_2.html  What are they leaving out?

To quote from your link:
QuoteBut there is a downside too(sic) cascading together RC filter stages. Although there is no limit to the order of the filter that can be formed, as the order increases, the gain and accuracy of the final filter declines.
Passive Nth-order filters don't HAVE to develop Q problems (I assume by Q problems you mean straying away from a Butterworth response?), but simply cascading the same values will give you a non-Butterworth response.
As to diminished accuracy, well, the tolerance of parts is cumulative, so by cascading multiple filters, of course accuracy will diminish. This is not really as big a concern as I think you're reading into it, I mean, we typically use 10% or 5% capacitors at best anyway, and 5% or 1% resistors. Just because it's a 2nd order filter doesn't mean it will have any bigger effect than the tolerance of parts in any other part of the circuit. In fact, a 5% above spec resistor in a bias circuit will probably have a MUCH bigger effect on the sound than a 5% above spec resistor in a 2nd order Sallen-Key filter.

Here's some further reading if you're interested in learning more: Rod Elliott Sound - Audio Design with Opamps 2.

blackieNYC

I know the diminished accuracy is negligible, and we're only talking second order here.  I think you know more about filters than I do, Phx, (I couldn't tell a Chevybchev from a Bessel if I was sitting right in the front seat of the thing!) but Jack Orman has a simple passive RC daisy-chain filter (based on the BMP) in an article at AMZ here: http://www.muzique.com/lab/dtone.htm
Sounds like you think he's oversimplifying something.  Other than overall gain loss that can be made up for, what are you saying will happen to the frequency response with a passive 2nd order filter?
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

pinkjimiphoton

phoenix and blackie, thanks again.. i gotta read this over morning coffee so my widdle bwain can handle it.
i TOTALLY "get" that nothing i do will likely make sense from an EE standpoint,
but i got halfway decent ears and am willing to let the magick smoke out if need be.

this has been a wealth of info in this thread so far, and i thank you all.

not only was my question answered, but it is gonna lead me down a couple rabbit holes that will lead to new vistas, i am sure.
making popcorn, and sitting back... thank you !
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

Phoenix

Quote from: blackieNYC on April 20, 2017, 12:39:59 AM
I know the diminished accuracy is negligible, and we're only talking second order here.  I think you know more about filters than I do, Phx, (I couldn't tell a Chevybchev from a Bessel if I was sitting right in the front seat of the thing!) but Jack Orman has a simple passive RC daisy-chain filter (based on the BMP) in an article at AMZ here: http://www.muzique.com/lab/dtone.htm
Sounds like you think he's oversimplifying something.  Other than overall gain loss that can be made up for, what are you saying will happen to the frequency response with a passive 2nd order filter?

Woops, I very much misspoke, it's a long time since I've played with Nth order passive filters, just checked my notes to refresh my memory. Of course it keeps the same Q, that's not the problem, but rather the gain at fc is different. Instead of being -3dB at 1/2PiRC, it's (1/√2)n, so -6dB for a 2nd order, -9dB for 3rd order, etc. This does mean that the actual passband will be different.
Just to show an example, here's a sim of Jack's first two circuits in that link (with pot set to 50%). The green trace is the first circuit, the blue is the second. Notice that not only has the slope of the filter increased, but it has also shifted to the left because the frequency has moved. Of course, this is not actually a problem at all, you just need to rearrange your calculations to get your desired frequency reponse. Just to reiterate, nothing at all wrong with passive Nth order filters, they're just a bit more of a pain to work out than 1st order ;D


blackieNYC

Ah, there you have it - I think there's something in that first article I linked that said something about fudging the values in the 2nd, 3rd,etc consecutive filter. Not exactly the same numbers-or was it the same corner freq but higher value used to get there? The sim is of course a BMP notch with the HP freq too high and the LP crew too low for Jimi's purpose (maybe you will do this with the opposite of a notch - a wide band pass, eliminating only the highs and lows you don't want), but you can see how steep the rolloff gets with 2nd order. Thanks for simming it - my links don't really tell the whole story then. JMP - let us know if you try this. Just one extra R and C is always worth a shot in my lazy*ss book
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

pinkjimiphoton

ok, so totally dumb question here... but i gotta ask.

so if i wanna be able to vary how much cut there is, should i
A: use a pot as a variable resistor
B: should i go with a BIGGER pot (say 100k instead of 50k) if a pot is a good way to approach this so it has more range,
or is the optimal the 56k resistor (so 50k pot)

i guess what i'm asking is, if i use a bigger pot, will it give me more cut, or will it shift the frequency? i THINK i'm beginning to "get" this in
my limited way. just not sure if i'm better off to just use a fixed 56k resistor. i mean, less parts, and if it's not worth
"adjusting" it seems the best way to go.

again, thanks for the info and patience ;)
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

Phoenix

#13
Quote from: pinkjimiphoton on April 20, 2017, 01:29:34 AM
ok, so totally dumb question here... but i gotta ask.

so if i wanna be able to vary how much cut there is, should i
A: use a pot as a variable resistor
B: should i go with a BIGGER pot (say 100k instead of 50k) if a pot is a good way to approach this so it has more range,
or is the optimal the 56k resistor (so 50k pot)

i guess what i'm asking is, if i use a bigger pot, will it give me more cut, or will it shift the frequency? i THINK i'm beginning to "get" this in
my limited way. just not sure if i'm better off to just use a fixed 56k resistor. i mean, less parts, and if it's not worth
"adjusting" it seems the best way to go.

again, thanks for the info and patience ;)

Those questions are basically impossible to answer without more context, sorry! If you could post a schematic of what you're thinking we'll be able to help out more.

But to start with some of the answers, (sorry I know you probably know most if not all of this already, but I find it best to provide fairly complete answers).

A: Yes, if you want to make something variable, a pot is pretty much the only practical choice (unless you want to go digital with rotary encoders or use switches/rotary switches for a limited number of preset values). There are variable capacitors but they have tiny values or are HUGE, and have limited range of adjustment. Pots can vary from 0 to whatever their full value is.

B: It depends on what range of adjustment you want, and the surrounding circuit values, as all the circuit impedances play a part (source impedance, load impedance, filter impedance, what parts of those impedances are variable vs fixed etc). Unfortunately there's no paint-by-numbers answer.

blackieNYC

#14
I just found a 2nd order rc filter calculator: http://sim.okawa-denshi.jp/en/CRCRkeisan.htm. This is great - you should be able to punch in any values and it will tell you what you'll get out of it. Grab two caps and two resistors at random and see what kind of rolloff frequency the thing spits out. They don't have to be the same values when you use this calculator - this might get weird, but it's still a 2nd order filter so the rolloff will be nice and steep.
Jimi - since there are two resistors, and a double ganged pot seems a bit exotic, punch in one (fixed)rc combo, and a second cap value. That's three of the components. For the last resistor, punch in zero and note the frequency, then punch in say, 100k and note that frequency. That would give you the range of adjustment a 100k pot will give you.  If it doesn't come out with a range you like, tweak something.
[edit] this calculator tells you the center frequency, which doesn't seem to jive with the graphed frequency curve (!) it gives you. Start with 1k, 33n, and 1k, 33n. The graph shows 4K is down 8db. If I change the second R to 10k, 4K is down 8dB. According to the bode plot graph. Then you're in the ballpark.
Why is the "center frequency" result not appearing to be the 3dB down point on the graph?
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

pinkjimiphoton

ok guys, i think i figured out how to ask my question in a way that is hopefully decipherable.

i guess what i am asking, is if ya make those kinda filters, do they roll off EVERYTHING above or below the point you choose, or just a band in that specific area?

i mean say i make the low  pass filter so it cuts off aropund 6k with a 47n cap and a 50k pot.... will it act like a guitar tone knob (i don't mean exactly, but just in general) where it will decrease the treble content above 6k ? so the more i turn it down, the less highs i get?

i think thats what i've been trying to ask... last nite i was entirely too tired to make much sense i guess.

but for all intents, i guess i'm looking for "treble and bass cut". not sure if a fixed resistance and a pot will do the same things i guess.

i figure a pot will be like a guitar tone control. turn it til it sounds good and be done with it.

the resistor is the part where the science and magick part come from. i've made treble cut filters with no idea what i'm doing with a pot and a cap.

but what i think is messing up my mind is the changing resistance. as the resistance changes, so does the affected frequency, right? it will rise or fall with the pot...?

thats why i was wondering if a 100k pot would be better than a 50k one or the 56k resistor. i figured the center of the pot would be where ya can mess with it from..

like, turn it down to cut, and turning it up, will it "boost" (or give the impression of boosting) or just change the point at which the pot grounds signal... like, man, i suck at explaning, sorry....

will decreasing the resistance make the filter less effective?

right now, sorry for the kindergarten explanation, but i'm visualizing it kinda like a tone pot on a guitar. turn it down and it sends more signal to ground, turn it up and it lessens the load of the signal so effectively it becomes out of the circuit?

@#$% me, i'm sliding down the wrong rabbit hole i am afraid!! ;)

i wish i knew the terms correctly to describe it, but basically, i just wanna be able to turn down above about 6 k and below about 60.
;)
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

blackieNYC

#16
A single order (variable) R and (fixed) C, as you turn the pot, you would "see" the curve, the slope, remain the same, but it would simply slide left or right, changing the corner frequency. With the passive 2nd order I would expect the same, just with the steeper slope - but - I think the shape of that curve might change a little. Maybe?  But who cares- steeper slope, variable corner freq, and finding that spot where you decide you don't need any more highs from the guitar and anything above is noise.  I've become convinced it will work well.
They roll off everything - this is not a shelf type filter where the highs are all dropped by exactly X decibels. Level is reduced as frequency goes up (past the corner freq, in a low pass). It drops off at 6dB per octave in a 1st order-single R and C, and 12 dB per octave in a 2nd order-with two Rs and two Cs.
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

pinkjimiphoton

thanks bro, i understand THAT.

i think what was throwing me... as usual... was the math involved. the calcs made it stupid easy to figure out the values,  but i've never really messed with this in this context before, and i knew as the resistance changed the frequencies would change.

for some reason, i was seeing the filters as being like one band on an eq, pulling everything down in just that area of the eq.

so i see now that it will work kinda like guitar knobs. PERFECT, exactly what i wanted to know.

but the question remains... better to go the nearest standard value? in  my case r for both filters should be 56k, so a 50 k pot... or double it, to get more range?

obviously i can try it on the board and make ir do something until it works "close enough" but i'm still an egg. thanks so much for the patience, i know i can rub some folks the wrong way. often. frequently, even ;)
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

anotherjim

Quotebut he lives on top of a mountain and is getting bombarded by rfi noise

Mind if I do some thinking out of the box - literally out of the box?

Interference cleanliness starts at home. Is the AC wiring at your friends place good enough? I've heard of places getting DIY wiring with figure-8 door bell cord. Even the lighting circuits should be 3 core cable so there's a ground connection  - even if the light fitting is plastic and doesn't need grounding. The ground wire in the cable helps to keep down rf induction.
Goes without saying the wall outlets should also have a ground that really does go to earth.

Identify and avoid/fix/replace noisy electrical equipment. Fluorescent lighting, light dimmers/air con/freezers AFTER being certain the AC wiring is good.

Worst come to the worst, some who want top notch clean audio in out/up in the sticks end up fitting an AC power conditioner, but they do cost. A UPS (Basically a battery/charger/inverter combo) can double as a conditioner as well as keep the power going for a bit if the AC supply fails.

Back in the box, low pass filter on the DC supply input is so easy it's not worth not doing it, and we already know how to do that.

With guitar stuff, the wonderful thing is the reduced bandwidth in the first place. So a low pass filter to clean the input of FX can be a single pole RC which starts cutting no lower than, say 7kHz with the highest possible impedance pickups plugged in. So if there's 1k added in series with the input, then a 2.2nF cap to ground will kick a fair amount of rf out no matter what you plug into it. This is the place to kill rf in the signal, right at the start. There are other good places such as caps across BJT base/collector or op-amp feedback loop, but the thing is that rf can bypass an active device since at some point they cut-off.

At the low end, you have not only 60Hz hum, but the 120Hz that is produced on top by anything with a rectifier. 120Hz can be very difficult to filter out because it's within the instrument bandwidth. Fortunately, it can be managed with good DC supply filtering, screening and good grounding.

blackieNYC

Excellent point.  We get too excited about seeing what a pedal can do. It works fine in Jimi's crib, seems a shame to build a pedal around a location-specific fault like this. Maybe you have no choice.

Friend of mine: "Cel coverage in my house is terrible. Interference, dropped calls - whenever the microwave is on." 
"Dude, that microwave is leaking. Replace it." Problem solved.
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers