Variable Bandpass Filter

Started by Breakdancing Jesus, December 02, 2008, 09:51:25 PM

Previous topic - Next topic

Breakdancing Jesus

First off, hello everybody, nice community you have here, tons of great information and interesting stuff happening. I'm a newbie to the building/designing of music effects, much to learn, much to do. Have had some ideas floating around lately.

One idea is a variable bandpass filter. Use a highpass, and lowpass filter independent of each other to create a flexible bandpass, for use in a distortion pedal (or anything really). However, after finding a design (http://ourworld.compuserve.com/homepages/Bill_Bowden/opamp.htm) for 2nd order filters using opamps, and picking values I realized using a linear pot wouldn't work as desired because it would sweep through frequencies very quickly near 0 ohms resistance, and vary very little throughout the rest of the pots rotation. So I figured perhaps a log pot was the answer. After much searching I finally found a calculator to use (http://www.bcae1.com/potentio.htm) to approximate the pot's resistance at different degrees of rotation. After performing the calculations, I found that a 10k dual ganged log pot and a .47uf cap would give a very roughly, but hopefully tolerable, linear sweep through octaves. However, poor tracking, commercial log vs true log, and actual values could throw things off. The only real way to see if this would give the desired result is to breadboard it. But, I would like to ask for input of those more knowledgeable than myself before I set out building a possibly flawed design.

Lowest frequency: approx. 33Hz, Highest depends on pots lowest resistance, may have to put resistors in series w/ pot. 12db of attenuation per octave.


1) How accurate can the calculators results be given that different pots vary greatly. Besides an ohmmeter, is there a better way to approximate a log pots R value?
2) What would a good maximum frequency be?
3) What type of capacitor, and op amp would work best?
4) Is there anything flawed with this design or concept?
5) Is there an easier/more efficient way to implement this design (I know there are different filter methods up the whazoo)?
6) Anything else I should know :)

Thanks much for taking the time to read and respond.


Breakdancing Jesus

Made some modifications, but still need some feedback.



Is a log pot the solution to giving a nice evenly dispersed range of frequencies?
Would I be able to plop this in as a tone control in distortion or other stompboxes? I know op amps have high input and low output impedance, but I dunno how to figure the impedance for the entire circuit.

Any suggestions for applications?

Thanks.

oskar

Quote from: Breakdancing Jesus on December 16, 2008, 12:51:13 AM
Is a log pot the solution to giving a nice evenly dispersed range of frequencies?

Log pot is one way to go.
http://www.geofex.com/Article_Folders/potsecrets/potscret.htm

A vcf ( two in your case ) is another way. Maybe check out the LM13600 datasheet or google
for Korg MS20 VCF. The MS20 has two filters in series like yours.

I also stumbled upon this and thought it could interest you.
http://runoffgroove.com/mreq.html

Mark Hammer

In high-end stereo pre-amps, the usual strategy for solving problems like this is to use multi-position rotary switches and 1% resistors.  In some respects, that's pretty much what you want for something like this.  First off, because there is never any strong guarantee that the two halves of a dual-ganged pot will track each other.  Second, because there is never any guarantee that the taper of the dual-ganged pot that you can find is well-adapted to your particular needs.  And third, because you'd actually like to be able to know what the selected cutoff frequency is.

This introduces a second challenge: what switch?  There are two resistances to be changed in each filter section.  The multi-pole rotary switch most commonly available for this purpose is likely to be a 6-position 2-pole wafe switch, something that used to be easily found at Radio Shack for a very modest fee.  Were one to use this in tandem with a toggle that selected different capacitance values for each filter section, you could easily get many precisely-selected and known cutoffs.

So, select two pairs of matched caps for each filter.  Wire one from each matched pair in series with one from the other matched pair.  Their junction goes to the common of a DPDT center-off 3-position toggle, and the two outside lugs of the toggle go to the "far end" of each of those caps.  In the middle position the two caps are in series.  Flick the switch to one side and the toggle shunts one of those caps, making the effective capacitance the value of the unshunted cap.  Flick it the other way and you get the reverse.  So there you get 3 ranges.  Multiply that by 6 positions on the switch and you have 18 known filter cutoffs for each filter section, yielding 324 possible variations.  Is that enough to keep you happy, or at least do the job?

Breakdancing Jesus

Thanks for the responses guys, much appreciated. I had thought about using a 2P6T rotary switch when I thought about the pot issue, I will most likely go that route, now that the idea of changing cap values was brought up. 324 possibilities should be sufficient :)

Was this what you had in mind mark? (just one half of the DPDT shown for simplicity)

R.G.

Go to a library (remember those? Quaint old buildings where they have lots of books and people want you to be quiet?) and find a copy of Don Lancaster's Active Filter Cookbook. More than you ever wanted to know, including sensitivities to component variations and tracking.

Read up on the concept of "Q". High Q filters are very narrow, low Q filters are wide. For wider than about one octave (i.e. 2:1) people go to the separate lowpass/highpass filters as you've shown. It's difficult to get narrower than an octave with the separated filters.

But read the Active Filter Cookbook.
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.

JDoyle

Quote from: R.G. on December 23, 2008, 11:09:05 PM
Go to a library (remember those? Quaint old buildings where they have lots of books and people want you to be quiet?) and find a copy of Don Lancaster's Active Filter Cookbook. More than you ever wanted to know, including sensitivities to component variations and tracking.

Read up on the concept of "Q". High Q filters are very narrow, low Q filters are wide. For wider than about one octave (i.e. 2:1) people go to the separate lowpass/highpass filters as you've shown. It's difficult to get narrower than an octave with the separated filters.

But read the Active Filter Cookbook.
Modesty probably precludes him from mentioning it, but R.G.'s article on EQs at Geofex is equally required reading.

Especially the bit on Gyrators. Methinks you will find it interesting...

Regards,

Jay Doyle

Breakdancing Jesus

#7
Thanks everyone for their responses. Very helpful stuff.

RG, the local library doesn't carry the book, however the local university library does, gonna have to find a buddy who goes there to check it out methinks, thanks for the advice!

Great article too, always wanted a x band EQ.

Could use some folks input on what good cutoff freqs would be (I'm going to go the 2P6T rotary route). Was thinking octave steps up from 30 Hz for the high pass (so it could be used with bass). And was thinking octave steps down from about 10.5kHz would be a good start. (using the middle value cap configuration).

I've got a design all figured out just got to decide on the freq range/steps and then pick the appropriate values. Got a nice long winter break from school, will probably try to build some stuff. Once again thanks all.

Added:
I was thinking maybe a rather fuzzy fuzz into this followed by a compressor to boost some of the harmonic frequencies then an adjustable notch or peak could deliver some rather rauncy synth-like sounds.


Breakdancing Jesus

#8
Alrighty, finally going to build the sucker soon here. Have been procrastinating, busy, etc. Now I'm about a week and a half into my wait for parts from Futerlec, any day now hopefully. Ordered the log pots too, so I can see how that would work. If I like how this all turns out, I'll probably build another so I can run them in parallel. Now I just need to find a good distortion/fuzz circuit to run into it. Anyways, heres the schematic, and a chart of the cutoff frequencies. As always, feedback welcome. Thanks all for the help. 

http://www.aronnelson.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=38354&g2_GALLERYSID=2e750ef73e0635905c20b5d6857b4852

http://www.aronnelson.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=38352&g2_GALLERYSID=2e750ef73e0635905c20b5d6857b4852

Added:
I don't know much about impedance, but I'm guessing the signal will see the circuit as a relatively low resistance in parallel with the op-amp's high impedance, especially at higher frequencies where the capacitive reactance is low, so should I use two more op amps as an input/output buffer?

Paul Perry (Frostwave)

Yes, I believe the circuit assumes that the input is coming from a low impedance source.

Breakdancing Jesus

Well the parts finally arrived, started putting the "pieces" together. Pretty much everything is wired to the switches, except for the op amp and power supply circuit, which are on a board. Now I just need to find an enclosure to mount the switches so I can wire it all together. The 4PDT switch is gonna be somewhat confusing, but should be manageable.

Only issues now are:
-Is the input impedance high enough, or should I use another op amp as a unity-gain buffer
-Finding a proper enclosure and drilling things out properly and not half-ass-like

Also, upon looking at the NE5532 op amp datasheet, I realized that this device is meant to be powered with at least +5V/-5V. The supply circuit I'm using is meant to supply +4.5V/-4.5V, anyone know if it should still work?

Thanks

oskar

yez... The TI5532 datasheet mentions a recommended supply voltage of minimum +/-5V but it will work from +/-3V.

chi_boy

I'm no expert, but this thing looks a lot like the low-fidelity phone pedal at Geofex.

I have the Geofex filter section on a breadboard now and it sounds good, but I want to play with filter options too.  My sights are set a little lower though.  Right now I'm looking at 9 combinations total.  3 for the low and 3 for the high. 

To make a filter like this adjustable, is it better to vary the resistors or the caps?  Or does it matter?  and what makes up the filter part exactly?  I know of the basic R/C filtering and the calculator at AMZ, but the basic filter is 2 parts.  It looks as if this type of filter is set by 2 caps and 2 resistors.  What happens if they aren't changed in pairs?

This is the Geofex schematic also:

"Great minds discuss ideas, average minds discuss events, small minds discuss people." — Admiral Hyman G. Rickover - 1900-1986

The Leftover PCB Page

brett

Hi
the big muff tone section is a bandpass filter (combination low pass - high pass filters).
Simple and passive.  The input impedance isn't too high though (ideally about 10k output impedance from previous section) and the output impedance is high (ideally need to drive a >100k input impedance section)
cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

Breakdancing Jesus

Quote from: chi_boy on January 20, 2009, 12:48:59 AM
To make a filter like this adjustable, is it better to vary the resistors or the caps?  Or does it matter?  and what makes up the filter part exactly?  I know of the basic R/C filtering and the calculator at AMZ, but the basic filter is 2 parts.  It looks as if this type of filter is set by 2 caps and 2 resistors.  What happens if they aren't changed in pairs?

What I did, as you can see from the schematic, is vary the resistor values mostly, and also switch caps to allow for more ranges because the max amount of different cutoff freqs for a 2nd order filter section using a rotary switch was 6. I would go with varying the resistance rather than capacitance because caps are much more expensive, also I found it easier to find suitable value resistors than caps, though I guess I could've gone .47uf, .22uf, .1uf, .047uf, for a roughly octave step up in cutoff frequency. I originally planned to use a pot but the taper isn't good for a smooth transition across a broad range of frequencies.

Using the 2 pairs of matched resistors and caps instead of 1 resistor and cap makes a 2nd order filter (12db in attenuation per octave rather than the six if a 1st order filter was used). I think of it as some frequencies getting attenuated by a filter once, then those same frequencies getting attenuated yet again. I guess using the op amps negative feedback path is just a way of adding another filter. (I'm not sure what the 3rd 56k resistor in the negative feedback loop is for exactly)

Heres the formula for the cutoff freq if you use non-matched components (otherwise you can use 1/(2piRC):
1/2pi(R1*R2*C1*C2)^.5

Most of the info I got for building this pedal was found on these forums, and on this website:
http://ourworld.compuserve.com/homepages/Bill_Bowden/opamp.htm

hope this helps man.

Also, good to know thanks oskar for the op amp power info!
And Brett, yea I just modified a distortion pedal I made to use a big muff tone control, really love it, adds many more possibilities. Tried to before, but thinking that because I only had a 10k pot instead of a 100k pot I had to compensate by increasing resistor and cap values by a factor of 10 (or was it decrease), it wasn't very usable after that, the one I'm currently using uses a spare 10k pot, works just dandy. I'm guessing now that the pot just works as a voltage divider?

chi_boy

Steve,

Thanks for the extended info.  My understanding of all of this is fragile at best.  Fortunately this stuff is low voltage and relatively low cost.  The only thing likely to get hurt is my pride!

I do have one more question though.  In the low pass section of the schematic you are varying the R value between 42.2R to 1.37K.  Since that resistor is in the signal path, is is reasonable to expect that there will be a signal loss in the form of a volume drop as the switch is rotated to higher values?  If so, would the same occur with differing caps?

If the volume loss is present when in the signal path, would the same loss occur if the resistor (or cap) was going to ground, like in the high pass section?

I have it in my head that the volume change will be present, but I can't say where I got that from.   I am planning to experiment with my breadboarded Geo Telephone pedal, but have not yet.

Cheers,
George




"Great minds discuss ideas, average minds discuss events, small minds discuss people." — Admiral Hyman G. Rickover - 1900-1986

The Leftover PCB Page

Breakdancing Jesus

Ha, I'm in the same boat as you on the fragile at best understanding.

One would think that the resistors would drop some of the volume, but I've simulated the circuit usuing a frequency well below the cutoff freq or the curve, and it looks like it doesn't drop a noticeable amount of voltage. My guess would be because of the input impedance of the op amp is so high that very little is dropped across the two resistors in the signal path.

I'm not really sure how or why this type of filter works, and don't know much about op amps. Hopefully someone can answer some of your questions, glad it helped tho! Let us know how the breadboarding goes.

chi_boy

Quote from: Breakdancing Jesus on January 21, 2009, 12:39:37 AM
Let us know how the breadboarding goes.

Did a little playing with the breadboard and made a couple of observations. 

1) Altering the low pass (signal path) resistors changed the frequency with very little change in volume
2) Altering the high pass (going to ground) resistors changed the frequency with very little change in volume

3) Altering the low pass caps (going to ground) changed the frequency with very little change in volume
4) Altering the high pass caps (signal path) changed the frequency with a radical drop in volume

After thinking about this though, I may have gone too extreme with the change in the high pass caps and may have caused the two filters to overlap, causing the volume drop in error.  I'll have to try that one again with different caps to verify, but not tonight.

Overall, I think you are probably right about the choice of component to modify not being a concern.  Resistors are definitely easier.
"Great minds discuss ideas, average minds discuss events, small minds discuss people." — Admiral Hyman G. Rickover - 1900-1986

The Leftover PCB Page

Breakdancing Jesus

cool stuff chi boy

Yea seeing as its an active filter It shouldn't drop the volume in the passband, not sure why tho, much more to learn :)

Mugshot

Quote from: chi_boy on January 20, 2009, 12:48:59 AM
I'm no expert, but this thing looks a lot like the low-fidelity phone pedal at Geofex.

I have the Geofex filter section on a breadboard now and it sounds good, but I want to play with filter options too.  My sights are set a little lower though.  Right now I'm looking at 9 combinations total.  3 for the low and 3 for the high. 

To make a filter like this adjustable, is it better to vary the resistors or the caps?  Or does it matter?  and what makes up the filter part exactly?  I know of the basic R/C filtering and the calculator at AMZ, but the basic filter is 2 parts.  It looks as if this type of filter is set by 2 caps and 2 resistors.  What happens if they aren't changed in pairs?

This is the Geofex schematic also:



is there a PCB layout of this project somewhere? im interested, and looks cool.
i am what i am, so are you.