Single knob [unidirectional] band pass filter?

Started by Andon, September 14, 2021, 10:23:55 AM

Previous topic - Next topic

Andon

Howdy! The Simple/Easy Mods pedal mods page of DIYStomp shows us that a band pass filter is pretty easy to implement, but I was wondering if anyone has ever had any luck with what I guess I would call a "unidirectional" band pass filter, for lack of a better term?

Basically I'm looking for a design that's single knob, and with the pot fully CCW the signal is unaffected but as you roll it up CW you start to shelve/cut frequencies both below 200/300Hz and above 3000/4000Hz simultaneously. No boosting really, just cutting - something akin to a "lo-fi" parameter.

Also, maybe relevant to this general neighborhood of ideas, but in my reading I found that Rob Strand put together a great little summary on peaking equalizers that's sort of the inverse of what I'm looking for, but instead of boosting or cutting a specific range I'd like to just cut TWO broader ranges.

Thoughts?
  • SUPPORTER

Fancy Lime

In a passive bandpass filter, you have one resistor and one cap that are connected to ground. Instead of connecting those to ground directly, insert one half of a dual-gangue log pot wired as a variable resistor here. This will give you a variable frequency high pass and shelving low pass, which should be fine for most applications.

The value of the pot should be around 10x the value of the resistors. The R and C values should be chosen much that the two R values are not too far apart, maybe within a factor of 5 or so.

HTH,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Rob Strand

#2
QuoteBasically I'm looking for a design that's single knob, and with the pot fully CCW the signal is unaffected but as you roll it up CW you start to shelve/cut frequencies both below 200/300Hz and above 3000/4000Hz simultaneously. No boosting really, just cutting - something akin to a "lo-fi" parameter.

One way is to set-up a filter which has the low-cut and high-cut that you indicated, then just blend between the clean signal and the filtered signal.

So create say a passive RC filter  feed it into a buffer.  Take the clean signal feed that into a buffer then strap a pot between the two outputs and take the output from the pot wiper.    You might find the level on the filtered signal is a little low so you could add a small amount of gain instead of a straight buffer.

Circuits like this sort of follow a block diagram of the idea.  What you sometimes find is someone bends things around a bit to simplify the circuit,  perhaps not working 100% like it but good enough.


Here' an example,

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Andon

Thank you both for your input! I sort of had the idea of blending in my head, but also thought that the filtered signal would be lower and you wouldn't hear much of a difference. Looking at some opamp voltage and gain calculators, I can see that a 1K resistor in the negative feedback loop, and a 4.7K or 3.3K input resistor (I would assume after the R2 100K resistor in your example) provides a gain of about 1.2x or 1.3x respectively - do you think that would be enough, or should I look at going closer to 1.5x+?

Also, based on your example, I'm looking at capacitor values around 470-530nF, correct?
  • SUPPORTER

PRR

A similar version. With audio-center cap values. My triangle is Rob's VCVS a.k.a. gain of 2 amplifier.


  • SUPPORTER

Rob Strand

#5
QuoteThank you both for your input! I sort of had the idea of blending in my head, but also thought that the filtered signal would be lower and you wouldn't hear much of a difference.

Looking at some opamp voltage and gain calculators, I can see that a 1K resistor in the negative feedback loop, and a 4.7K or 3.3K input resistor (I would assume after the R2 100K resistor in your example) provides a gain of about 1.2x or 1.3x respectively - do you think that would be enough, or should I look at going closer to 1.5x+?
You often have to try these thing to get a working solution.    Different taper pots like PRR's exampel might help.  Another tick is to just put a resistor  between 1 and 2 or 2 and 3 to move where the centre is (often doesn't help the ends).

My gain of 1.1 is only for pictorial purposes.   On full cut it will sounds softer and how much will depends on the signal.   You basically want each end to be at roughly the same volume.

QuoteAlso, based on your example, I'm looking at capacitor values around 470-530nF, correct?
I got 5.3nF for the high-pass and 530nF for the low pass.   If you raise the 1k you can make the cap a much more friendly value of 100nF.
[I rechecked this below and got 53nF for LPF and 5.3nF for the HPF]
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Andon

#6
By all means please correct me if I'm wrong and learn me on how I goofed this, but when I enter those values I get a cutoff frequency of 300Hz for each of them? Plugging in 100 Ohm for R1 gets me the 3000Hz cutoff frequency for the low pass filter, but 1K gets me 300Hz.

EDIT: And accordingly, if I keep both caps at 530nF and change R1 to 100 Ohm and R2 to 1K I get the 300Hz/3000Hz cutoffs shown (unless I'm wrong of course).
  • SUPPORTER

Rob Strand

#7
QuoteBy all means please correct me if I'm wrong and learn me on how I goofed this, but when I enter those values I get a cutoff frequency of 300Hz for each of them? Plugging in 100 Ohm for R1 gets me the 3000Hz cutoff frequency for the low pass filter, but 1K gets me 300Hz.

EDIT: And accordingly, if I keep both caps at 530nF and change R1 to 100 Ohm and R2 to 1K I get the 300Hz/3000Hz cutoffs shown (unless I'm wrong of course).
Larger resistors will lower the frequency.  That applies to both filters.

You probably don't want to use resistors lower than 1k since it will cause unnecessary loading on the stage driving the filter.

As shown the high-pass filter is loading down the low-pass filter, as it appears after it in terms of connections.      The biggest conceptual issue is the load effect.  The two filter cannot always be treated as separate.    I deliberately chose 1k and 100k so the loading effect is minimized (for demonstration).    PRR's circuit has 10k and 100k that's perfectly fine too and I'd say are more practical values.    However when you try to make the caps the same, or the resistors aren't spread apart in value the filter won't behave like you expect.   The filter frequencies will shift and the gain at the central peak becomes a lot lower than what is should be.     Such things need to be analysed with maths or with a circuit simulator, or avoided by making sure the filters don't interact due to loading.

You can also swap the ordering of the filters so you have high-pass then low-pass.   You will get loading problems but they will affect the circuit in a different way.  In fact for this set-up you would make high-pass with the low value resistor then the low-pass with the high-value resistor.   What happens for your case is you need a much larger high-pass cap and much smaller low-pass cap.    (To avoid the spread in parts value I went with the form I posted in the schematic.)

Yes, so a little bit more going on under the hood than just calculating the low-pass and high-pass values independently.



EDIT:

Here's a few examples,


I didn't put up any crazy examples as the lowest gain examples #2 and #4 give the idea.

Notice also how 1 and 3 have the same response.   Circuit 1 has a spread of 100 in the resistors and a spread of 10 in the caps.
Circuit 3 has a spread of 100 in caps and a spread of 10 in the resistors.

The other comparison is while both circuit 2 and circuit 3 have the same resistor ratios and input impedance (10k) circuit 3 has better performance and that comes about from the higher capacitance ratio.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Andon

#8
Alrighty, that's starting to make a little sense with the different ratios, but I'll have to keep reading to understand how loading affects everything.

So - ignoring the standard pulldown resistor, etc. - is something like this in the ballpark of what we're talking about?



That is, would tacking this onto an existing circuit work, provided it were isolated? If I were to drop this into a RAT or a Big Muff in lieu of their usual tone stacks would it have the original intended effect of acting as a [unidirectional] band pass filter? PRR mentioned a gain of 2, which I believe R3 and R4 cover (unless I'm misunderstanding how to calculate gain for an opamp)?
  • SUPPORTER

anotherjim

R3 isn't setting the gain and not doing much at all.
It's the -input that needs a resistor (Rin) to 0v via a capacitor or to Vref.
The +input already gives x1 gain. Rin and feedback (Rf) therefore need to be equal to add another x1 - both 1k - giving a total x2 gain. That does mean the cap connection Rin to 0v will be at least 10uF. I'd be happy with 10k resistors and a 1uF cap.
Also, R2 can't go to 0v - it will have to be at Vref (half supply voltage).


Andon

My apologies Jim, I'm not completely following! Are you suggesting that the band pass filter (R1, C1, C2, R2) and R3 should instead be fed to the inverting input of the opamp and then biasing the non-inverting input to 4.5V/Vref, or would the same issues present themselves again if I did that?

This was just my attempt at picking up what PRR was putting down (same values and everything), but I guess I made a mistake somewhere! I do see now in other examples that Rin and Rf should be on the same input (inverting), so that's as easy as just moving the band pass filter and Rin up to that input if that will fix it.
  • SUPPORTER

R.G.

Build the bandpass you want, then use a good panning circuit to pan between the dry and effect signals.
A single pot strung between the two signals works in many cases, but there are asterisks and footnotes to get it to work well. An alternative, but more complex variant of a panner is presented in "Panning for Fun" at geofex.com.
A panner can obviously be used for a variable amount of any two effects.
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.

Andon

#12
Quote from: R.G. on September 15, 2021, 07:47:42 PM
Build the bandpass you want, then use a good panning circuit to pan between the dry and effect signals.
A single pot strung between the two signals works in many cases, but there are asterisks and footnotes to get it to work well. An alternative, but more complex variant of a panner is presented in "Panning for Fun" at geofex.com.
A panner can obviously be used for a variable amount of any two effects.
"Panning For Fun" is a document I reference often, R.G., so thank you for that! I guess what I'm trying to figure out now is how best to gently boost the band passed signal so that the effect is more prominent when used (like what I believe PRR is alluding to in his post with the opamp provided a gain of 2x unless I misunderstood) if needed. I tend to use the diagram in the box on the left of the "Panning For Fun" document - do you think that would be a suitable option for this application?

EDIT: And funny enough, instead of looking for "no boosting really, just cutting" per my first post, it seems as though I'm now looking at how to, uh, boost a signal that cuts frequencies, ha ha.
  • SUPPORTER

PRR

Quote from: Rob Strand on September 14, 2021, 09:52:09 PM....Different taper pots like PRR's exampe.........
My gain of 1.1 is only for pictorial purposes.   

Mine uses plain linear. As R.G. footnotes, buffering both ends of that pot may be essential and a lot easier in sim than a compact build.

Yes, we may want more or less effect/degree but I don't think it is essential and would best be evaluated in an extended trial.

A dartboard run suggested a recovery gain of 2. Why 2!?? Well, we want a narrow band and so both filters will overlap at their several-dB-down points. If "several" is 3dB then of course 3+3=6 which is 2:1 and wants a 1:2 boost. That's just to match theoretical curves. In real life a full tone with all the bass chopped-off will sound weak for its amplitude. So use the sliderule to scratch your nose and trim the booster-amp by ear on real signal to real ear.
  • SUPPORTER

anotherjim

Quote from: Andon on September 15, 2021, 07:35:43 PM
My apologies Jim, I'm not completely following! Are you suggesting that the band pass filter (R1, C1, C2, R2) and R3 should instead be fed to the inverting input of the opamp and then biasing the non-inverting input to 4.5V/Vref, or would the same issues present themselves again if I did that?

This was just my attempt at picking up what PRR was putting down (same values and everything), but I guess I made a mistake somewhere! I do see now in other examples that Rin and Rf should be on the same input (inverting), so that's as easy as just moving the band pass filter and Rin up to that input if that will fix it.
If you make it an inverting amp, the signal output is the opposite polarity to the input. If the blend pot is set 50:50 then audio in the passband will cancel out and you have a notch filter. So you do want a non-inverting amp.
No, I just mean that with only a feedback resistor as drawn, it's only x1 gain. so it needs Rin on the -input. Rf would be increased versus Rin to get over x2 if needed to get the perceptual balance PRR mentions. See any standard tutorials about the non-inverting opamp except they are so often with dual supplies and you have single. So Rin either goes to 1/2 supply or 0v via a capacitor.

For the blend pot to be balanced well, the input also needs to come from an opamp so both ends of the pot are driven equally "hard". A BMP with BJT stages has an output drive (source impedance) equal to the collector resistor value while an opamp source impedance is practically zero - the opamp will always win!
You could make it with a dual TL072 and use one amp to buffer the input (unity gain buffer op-amp circuit).

Andon

#15
I've actually got a TLO72 as an input buffer already, so I just changed the TL071 to the second half of the 072 for the band pass. Is something like this a little more in line with what you are talking about?



The 47nF is just a coupling capacitor for a block between the input and the band pass section. I've now got a 1K resistor off of the inverting input to ground, but you mentioned a capcitor and the examples I've seen have a resistor going to either Vref or ground instead. Does this seem right?
  • SUPPORTER

PRR

Quote from: Andon on September 16, 2021, 10:49:42 AM..... Does this seem right?

Look at the DC bias on the second stage. Everything stuck at zero volts DC is not going to work nicely. Study single-supply opamp circuits.
  • SUPPORTER

anotherjim

Then you should do what you have done with the 1M in the first amp - connect to 4.5v. The circuits where you see them going to the ground is because the opamp in those cases has 2 equal power supplies, a positive voltage and a negative voltage - the ground is halfway between so 0 volts. Those are bi-polar or balanced power supply circuits which are standard for op-amps to the extent they are not even shown in most tutorials. Note the chip negative power pin is explicitely called that rather than ground or 0v.
We only have one supply voltage and must make a reference of half that voltage -  your 4.5v. This makes the circuit act like it has a dual supply of +4.5v and -4.5v; although the negative power is actually our ground.



Andon

Ah duh, I forgot to bias the non-inverting input on the other amp (I had even left the 9v power tag as a reminder after switching from the 071 to the 072 but forgot when I updated the schematic). Okay, so easy fix for that. Does everything else seem kosher, or do I need a capacitor following Rin to ground. I read through some biasing designs and found what you had mentioned earlier. If so, what value should it be?

And theoretically speaking, if the first side of the 072 were feeding directly into the second side of the 072 would it still need a bias, or would the bias from the first half also bias the second? I feel like I've seen that on some designs.
  • SUPPORTER

anotherjim

Going backward, you can maybe lose the coupling cap from the first stage - but the hi-pass filter cap breaks the DC bias into the second amp, so the 100k reference resistor still needs connecting to 4.5v.  If that filter cap wasn't there, yes you could bias from the output of the first amp and not need the reference 100k resistor either.

In short, you don't need a cap on Rin but Rin must go to 4.5v, never ground.
When you have a cap after that resistor, it's either because it made an easier board layout to use the ground instead of 4.5v, or you want a hi-pass filter effect on the gain the amp adds. Have a look at the Proco Rat circuit to see this being exploited in a more complex way. The cap if used can either go to 4.5v or ground, but if you need a cap and the value is so high it would be a polarized electrolytic type, the ground is the best choice as the negative plate of the capacitor will be on the most negative point so can't get a reverse polarity voltage that can damage or degrade it.