Band pass filter pedal

Started by Bastis, November 24, 2015, 05:44:40 AM

Previous topic - Next topic

Bastis

Hey!

I'm new to the forum! I've read the "Read this before posting", but if I'm doing something wrong anyway please feel free to correct me.

I am also new to making pedals. I've made two basic fuzz pedals and they work pretty much as intended. The next build however is one that I want to actually use, not just play around with. I mostly use my pedals for with a saxophone, so the impedance is (if I've understood that part) different from a guitar source. This whole thing with impedance is something that I havn't quite gotten my head around yet, so if I make a mistake please point it out.

I want to make a band pass filter with 4 switches. Each switch turns on a band pass filter with a certain frequency range. The lowest filter will cover the lower half of the saxophones (alto) fundamental note register, the second filter will cover the second half. Then the two remaining filters cover different ranges of harmonics.

The plan is to put an OP AMP controlled with a pot at the beginning of the input signal, then the signals pass through the filters and eventually go through another OP AMP to make up for the signal loss. The OP AMP will of course be wired correctly to the power source and ground, and so will the input and output jacks be. I'll make a 3PDT true bypass switch as well, but I figured all that would just clutter up the circuit if I included it at this stage..

I have a hard time figuring out the values for all the caps and resistors, but I have tried to come up with a suggestion at least and I hope you guys can help me figure out how to improve those numbers. I believe the circuit should work, but being a novice I assume I've made a bunch of mistakes. So feel free to suggest improvements, different solutions, alternatives or that I should just give up and build something easier before attempting this.

To increase the Q value for the filters I stacked 3 RC filters for each HP and LP filter. I tried to find a way to calculate at what frequency the dB decrease would be noticable, but all I could find was equations and calculators to calculate the corner frequency, and that shouldn't be the same thing, right? If I was to use the corner frequencies instead though I figured out these values for resistors and caps "should" do the trick:

All resistors in the filter part: 10k ohm

Band pass filter 1:
HP:
Freq: 130Hz
C: 0.122uF

LP:
Freq: 350Hz
C: 0.045uF

Band pass filter 2:
HP:
Freq: 350Hz
C: 0.045uF

LP:
Freq: 1042Hz
C: 0.015uF

Band pass filter 3:
HP:
Freq: 1042Hz
C: 0.015uF

LP:
Freq: 2kHz
C: 0.008uF

Band pass filter 4:
HP:
Freq: 2kHz
C: 0.008uF

LP:
Freq: 4kHz
C: 0.004uF

If the frequencies shouldn't be spot on it's not a huge deal. I'm looking to get a cool sounding effect, not score high on a maths test.



I don't know what OP AMPs to use. I spent most research time trying to figure out the values for the resistors and caps. Help me pick suitable ones or ask just redirect me to google if you prefer.
If I missed out any other vital information, ask for it and hopefully I'll understand what you're asking for!

Thank you in advance!
Bastis

Granny Gremlin

The title made me think this would be about one single (possibly parametric as regards center freq and/or Q) filter, but what you're doing is more like a fixed graphic.  Assuming you're not trying to design/build this from scratch for whatever reason (learning; proving you can do it etc) you could just use the  BA3812L EQ chip, or a project that already incorporates this chip such as the 5 band EQ (you don't have to use all 5 bands) by THCustoms:

http://diy.thcustom.com/shop/5-band-eq-pcb/
my (mostly) audio/DIY blog: http://grannygremlinaudio.tumblr.com/

PBE6

#2
This will not work as intended the way it's been drawn. If you only want a single band at a time to be passed, a simple fix would be to use DPDT switch on each of the filter banks to ensure they are completely cut out of the circuit when bypassed. As drawn, the "back end" of each of the filter banks is still connected to the signal path which will result in unwanted filtering. If you go this route, I would also suggest making the output stage a simple buffer instead of a gain stage to avoid excess hiss from amplifying accumulated circuit noise. The input stage will likely have to be changed as well if you are expecting a mic level input, but more on that later.

If you want to be able to mix and match the band pass sections, the circuit will will have to be slightly more complicated. One way to do this would be to implement a buffered signal splitter on the front end (http://www.muzique.com/lab/splitter.htm), setup your respective filter banks on each path, end each path with a buffer, and then run each path through a small resistor into an inverting opamp setup as a mixer circuit (http://sound.westhost.com/articles/audio-mixing.htm). If you put a SPST switch on each path, you can add or subtract them as necessary at the flick of a switch.

With regard to the input stage, you probably want something closer to a mic preamp than a guitar buffer to cut down on noise. You don't have to go overboard, but something like this would be a good starting point: http://sound.westhost.com/project122.htm

Strategy

Search the forum and internet for "Anderton Peakmaker" - it's EXACTLY what you're describing, albeit with more filters 6 or 8 I think.
There's a layout in this forum. It takes bipolar power, if you wanted to avoid having to use two batteries, there is a PCB from Madbean called "Road Rage" that allows you to generate + and - 9V from one +9V power input.

Strategy
-----------------------------------------------------
www.strategymusic.com
www.community-library.net
https://soundcloud.com/strategydickow
https://twitter.com/STRATEGY_PaulD

Bastis

Thanks a ton for all the pointers! I should have alot of stuff to try, and eventually I'll get back to you to discuss some values! Thanks!!

PRR

+2 to what GG and PBE say.

Stepping back....

Never invent when you can steal. (Only call it "research".) This stuff is hard. Nothing you can think of hasn't been done before, and an awful lot of that has been published, and you live in the wonderful world of the Web.

It takes time, but understand what you steal. Your R3 R11 balance resistors are for DC accuracy with older opamps. We do not need DC accuracy, and the best-bet opamps for experimentation (TL072) never needed balance resistors anyway. In this case they add hiss, and more importantly more joints to do wrong.

> I mostly use my pedals for with a saxophone, so the impedance is (if I've understood that part) different from a guitar source.

Say what you mean. You use a microphone(??). Microphones (and guitars) have weak outputs; we often need to pre-amplify them before we fiddle with the signal. Modern mikes can drive long cables, which means they are low impedance. (Guitarists are meant to have the amplifier at arm-length, cables historically short, hi-Z reduces amplification cost, so guitars are wound for hi-Z.)

You need to steal research mike preamps. There are some super-fancy ones around. For basic experimentation on filtered sax, keep it simple. If using a dynamic (SM58) mike at close range, really simple (not balanced, no phantom).

You sketched the inverting amplifier. This has a low input impedance, in this case just the 1K resistor. That will work, and unobjectionably here, but is a bad habit for capturing fine signals. Use non-inverting connection 90% of the time.

You show input network of 0.1uFd and 1K. At some point in this project you will become much too smart about R and C and frequency. 0.1uFd into 1K load will "cut the bass" at 1,592 Hz. Not bass, but over half the audio band. Far above any fundamental of sax and most of your suggested filter ranges. When I see "1K" I think "10uFd". This comes to 17Hz bass-cut, which is very-little cut of anything audible, certainly anything out of a practical loudspeaker. For the specific purpose of sax, 10uFd is about 3 octaves more bass than most sax has. As it happens in electronics parts, a 10uFd is about as cheap as anything a little smaller, so 10uFd would be good *if* you keep the 1K resistors (which you probably shouldn't).

Note that if you have 1K at R9, then any reasonable values at your several R5s is probably overwhelmed by the 1K at R9. Also all your R5s load each other.

One R-C lowcuts or highcuts, yes. Three R-Cs cuts sharper, yes. But the three R-Cs interact on each other. All equal values interact so much that the corner is super un-sharp. Staggered values interact less: R4a=1K C2a=0.047uFd, R4b=10K C2b=0.047uFd, R4c=100K C2c=0.0047uFd, IC2 load >>100K. This is still a slow roll-off, but MUCH sharper than 3 equal R-C pairs.

For the type of sharp-cut you seem to be looking for: Don Lancaster, Active Filter Cookbook. Get it. A 3-pole filter much sharper than even the stagger-pole filter is just one opamp (half of 39 cents) per section, plus 12 cent more resistor. OTOH, focused research (stealing) will turn up many pre-made sharp-cut filter designs (speaker crossovers, and rumble filters). If you know what freq it works at, you can convert to any other freq by scaling the capacitors (don't change the resistors much, they are picked for loading and DC reasons).

You show "+9V" bias and not the power rails. Perhaps you know what to do. If you ask someone else to build it, it will get built un-powered. If asking for critique, you leave readers guessing which often results in conflicting off-point comments.

And WELCOME!
  • SUPPORTER

Bastis

#6
Wow thanks for another very good answer! This is awesome, pointer to other circuits and solutions, and explainations to my mistakes! You rock guys!

Edit: I should probably answer what you asked for as well... On gigs I play into a DPA microphone through a Shure ULX wireless system. When testings stuff out I normally just use a SM58 straight into the pedals.

Bastis

#7
I've read all of your answers a bunch of times, and I understand a little more each time. I've tried to read up on filters, but it pretty quickly gets way more advanced than I can handle. I tried to use a Buttersworth third order filter, but I realized I would never be able to get the values right, so I went for a multiple feedback active filter. If this is a bad choice, feel free to say so.

I tried to follow PBE6's suggestion for the effect and came up with a result circuit. I may have gotten things super wrong, and if so you're free to shoot me down. I learnt from my last failed circuit and your responses so hopefully I can do that again.

I looked at the Anderton Peakmaker by the way. I think it would do pretty much what I'm looking to do, but the bipolarity scares me a bit so I figured I should work with "regular" circuits a bit more before checking out his stuff.

The circuit is set up like PBE6 suggested (assuming the signal comes from a microphone preamp).

After an input stage the signal is split using buffers, then they go through the filters, then joined though a mixing stage.

I am trying to figure out how to calculate the values for the resistors and capacitors for the filters, but it's a complicated subject for me. Since English isn't my native language, all the info I find get even more complex than it already is.

Anyway, here comes the circuit:


Could this work if I figure out some values for the filters?

PBE6

#8
Nice work! This is very much what I was trying to describe. Just a few more comments:

1. You've biased the input stage at Vref = V+/2, which is correct if you're using a single supply like a battery. However, the '+' terminals on each of your inverting opamps are connected to ground, which is only correct if you're using a dual supply. If you're using a battery, connect the opamps to Vref instead.

2. The output impedance of an inverting opamp is very low (probably less than 100 ohm) so the extra buffers leading to the mixing stage aren't necessary. They would be if you were using straight forward RC filters, but the active filters take care of the impedance problem for you. Just connect the outputs of the filter opamps to the mixing stage input resistors and you're good to go.

3. The mixing stage opamp should be in an inverting configuration, not a non-inverting configuration as shown on your drawing. Take another look at Fig 4 on the Elliott Sound Products page:
http://sound.westhost.com/articles/audio-mixing.htm

Just make sure to connect the '+' terminal on the mixer opamp to Vref instead of ground. You might also want to make the mixer's feedback resistor a variable pot so you can get some additional gain out of it.

Other than that, good work!

Bastis

#9
Thank you!

I have a new schematic almost ready, but I'm trying to figure out some values for the filters. When I try to find online calculators to do the maths for me most schematics for multiple feedback bandpass filters use one more resistor. If you look at my Band pass filter 1-section, they have another resistor between R5 and C2 going to ground. What is the difference between the kind of filter I use and that one?

Edit: I've added the resistors that I mentioned to the filters and used http://sim.okawa-denshi.jp/en/OPtazyuBakeisan.htm to try to figure out some values for the caps and resistors to match my wanted frequencies. I think I corrected the things you mentioned, PBE6. I'm still not 100% I've done sensible things at the output and input (mostly the cap values) and I'm certainly not sure about the filter values. I've tried to figure out how to work the LTSpice simulator, to check out what frequencies the filters will work at, but that simulator seems crazy complicated if you have no clue what you're doing.

(The Vref-section cap got moved somehow, it should just be positioned... well, between the ground and the junction.

PBE6

#10
One thing I missed the first time around is that the JFET buffers should be immediately followed by 10uF caps to block DC without losing too much bass content.

With respect to the filter sections, there are lots of options. For example, the Linkwitz-Riley crossover scheme uses Sallen-Key filters to separate the audio into high and low pass sections. Because the filters are second order, the slopes are 12dB per octave which will give you decent separation, and they also add up to a flat response when summed (provided you flip the polarity of one of the signals). Here's some info on Sallen-Key filters and Linkwitz-Riley crossovers:

https://en.m.wikipedia.org/wiki/Sallen-Key_topology

http://www.linkwitzlab.com/filters.htm#2

That's fine if you want to separate the audio into two sections, but you're looking for four. It is doable with this scheme, but will require doubling up on the filters for the band pass sections (you'll need a high-pass and low-pass in series for each one) which will require a few more opamps. Luckily, opamps are cheap! A LP-BP1-BP2-HP scheme would probably require 7 opamps total, which when added to the mixer opamp gives you 8, which is two TL074s or four TL072s. Easy.

Other filter topologies exist, but Sallen-Key filters are simple, effective and easy to  tune and implement. One note, the band-pass version in the Wikipedia article will only give you 6dB per octave slopes, which might be fine but it will not result in as pronounced a "slice" of audio, and will not add up to flat response when mixed with the other sections.

Good luck!

PBE6

Another simpler alternative is to use a basic state variable filter:

http://sound.westhost.com/articles/state-variable.htm

This circuit will split the audio into LP-BP-HP using three opamps. If you can live with only one BP section, just add a buffer to the front end and you're done! You could also process the BP section to split it into two sections BP1 and BP2 using a Sallen-Key filters (don't forget to flip the polarity of one section as needed!) using three more opamps.

ElectricDruid

I'd just like to say that this thread shows a real progression from a good idea with promise but little hope of working towards a basically practical circuit that you could breadboard and tweak.

Nice work everyone! This sort of stuff is why I like to hang out here. It's cool to see something improved over a few iterations and with several people's input, and it definitely makes for better circuits.

Tom

PS: For me, I wouldn't worry about the response adding up to flat - after all, if you wanted the flat response, you wouldn't be feeding it through a filter bank, right? But at this point, this is personal taste, not science.


teemuk

#13
Since a source follower is a low output impedance current amplifier, a "buffer", you only need a single one to drive the parallel signal paths of the filters. With low output Z stage as driver the interference between the circuit elements will be minimal. You can effectively eliminate three JFET amps from the circuit since you only need one of them.

With the depicted circuit the FETs will also very likely blow up as soon as you "disable" the signal path: Source short circuits directly to ground, grid drives to drive the source and there is no drain resistance to speak of to limit current. Remember it's a current amp, it drives a short circuit with all the pontential it can muster. Device failure is a risk!

The "muting" idea is sensible but you not want to accomplish it by short circuiting the FET drain directly. Put some series resistance to the "shunt" path, enough to limit current to safe magnitude. Or use some other scheme. Personally I'd rather "T" the muting signal shunt at the input resistors of the opamp mixer stage. Split the single 10K resistor to, say, 1K and 9K in series. Place shorting switch after the 1K. With your depicted mute scheme you also leave  opamp input "floating" whenever the particular signal path is disabled. It's not probably the best scheme considering overall interference and the tendency of "floating" high impedance terminals to act as little antennas. The "T" scheme at the mixer input would both prevent direct short circuits (of current amps) and the formation of "floating" nodes.

Bastis

Thanks again! I'll get back to work on this thing later this week!

Bastis

I redrew the filters with Sallen-Key filters as PBE6 suggested, but I'm having some trouble following what you're saying, Teemuk. I "almost" understand most of the stuff you say, but I don't understand your explainations on how to solve the problems. Could I split the signal after a single buffer in the "Splitter stage" into my 4 filters (going through a 10uF capacitor as PBE6 suggested)?

Will putting the shorting switch at the mixer stage as you suggested solve the problem with blowing up the FET? And I havn't heard of a T-scheme. I kind of get the idea, but I'm not sure. Do I lead the signal through a 1k resistor, then a switch sends the signal to the opamp when on, and through a 9k resistor to ground when muted? Or... First through a 1k resistor, then through a 9k resistor before hitting the opamp when on, and directly to ground after the 1k resistor when muted?

Again, I'm still very much at the learning stage of electronics.

ElectricDruid

Quote from: Bastis on December 03, 2015, 06:50:22 AM
I redrew the filters with Sallen-Key filters as PBE6 suggested, but I'm having some trouble following what you're saying, Teemuk. I "almost" understand most of the stuff you say, but I don't understand your explainations on how to solve the problems. Could I split the signal after a single buffer in the "Splitter stage" into my 4 filters (going through a 10uF capacitor as PBE6 suggested)?

Will putting the shorting switch at the mixer stage as you suggested solve the problem with blowing up the FET? And I havn't heard of a T-scheme. I kind of get the idea, but I'm not sure. Do I lead the signal through a 1k resistor, then a switch sends the signal to the opamp when on, and through a 9k resistor to ground when muted? Or... First through a 1k resistor, then through a 9k resistor before hitting the opamp when on, and directly to ground after the 1k resistor when muted?

Again, I'm still very much at the learning stage of electronics.

Here's a tweaked version. I've removed the three extra buffers as Teemuk suggested, and I've made my own suggestion for the muting switches (only one shown). I'd put them over on the op-amp mixer and short the inputs to ground when they're not used.



HTH,
Tom

PBE6

#17
It depends.

As teemuk notes, the buffer is a current amplifier with a low output impedance. The most important part for our purposes is the low impedance, because it means the signal loses very little voltage when connected to a load (or multiple loads) with any reasonable input impedance. The output impedance of the buffer and the input impedance of the load can be thought of as forming a voltage divider. The voltage at the junction (i.e. the input to the load) is given by:

V(junction) = V(input) * Z(load) / [ Z(buffer) + Z(load) ]

So for high load impedance and low buffer output impedance we have a V(junction) very close to V(signal), which is what we want. If you have the opposite situation, V(junction) becomes a small fraction of V(signal), which results in weak signal strength and higher noise.

In this case, we have 4 loads in parallel which means the total load impedance will be roughly about 1/4 (or less) of the average of all the load impedances. If the loads were all opamps there would be no problem since the total load impedance would still be on the order of 10^12 ohms (trillions of ohms!). However, the Sallen-Key filters (and many other 2nd order filters) have resistors or capacitors to ground before the opamp, so the average load impedance will probably be on the order of 10k. With 4 loads in parallel that's looking more like 2.5k, which could deliver anywhere between 95% (good) and 80% (not so good) of the signal strength depending on the JFET and the filter resistors chosen. An impedance mismatch may also mess with the filter frequencies, although this DIYStompboxes and not DIYHifi, so that's probably secondary.

I'd recommend using one buffer for each filter just to be safe, but others may be able to give you a better estimate on the impedance match.

EDIT: As an alternative, you could use single opamp buffer instead of a JFET buffer. A TL072 has a small output impedance of a few hundred ohms that becomes vanishingly small (on the order of about 10 ohms or less) when wired as a buffer. This will drive a 2.5k load and retain more than 99% of the signal. I like this better than 4 JFET buffers for sure. You can leave out the capacitor here to keep the buffer output impedance low (they would otherwise add in series), just remember that any "ground" connections in the filter section should be connected to Vref instead.

PBE6

With regard to switching, I think the best scheme is something like this:

This way, the opamp is always driving at least a 10k load. The capacitor is there to block DC and prevent pops and clicks when switching channels in/out, and any value above about 1uF will let the entire audio bandwidth through.

garcho

QuoteOn gigs I play into a DPA microphone through a Shure ULX wireless system. When testings stuff out I normally just use a SM58 straight into the pedals.

If your wireless system has a mic preamp built in, it won't be the same as plugging a dynamic mic into a guitar pedal.

  • SUPPORTER
"...and weird on top!"