Low Pass and High Pass filters in one stompbox

Started by MrFrog, May 05, 2018, 06:43:43 AM

Previous topic - Next topic

MrFrog

A little background. I have built a couple of stompboxes following the layouts on tagboardeffects. I was thinking it would be neat to have a high pass and low pass filter in single stompbox and use it sort of like a poor mans cab simulator. Initially it seemed like this was a not too difficult design I could work my way through but I am having some trouble finding answers I understand online.

Somewhere I came across a diagram of a band pass filter where they had (what I now know) is a couple of first order filters with an amplification stage:
High pass filter -> boost -> Low pass filter

Further reading suggested a second order filter is better so I looked in to those and ended up on this site:
https://www.electronics-tutorials.ws/filter/second-order-filters.html
I didn't really follow the maths very well but got the general idea.

I then worked out a few promising looking values for the resistors and the capacitors using this site:
http://sim.okawa-denshi.jp/en/OPseikiLowkeisan.htm.

What I would like to do is work my way through this by:

  • creating a diagram
  • creating a veroboard layout
  • actually making the stompbox

Which leads me to my starting questions that I am hoping someone can help with. My current plan is to connect the out from a second order high pass filter to the input of a second order low pass filter.

->



  • From what I read to get a 'nice' knee without a resonant peak before the drop I want both a Q and a damping of around 0.707, is this right?
  • Will I get the same phase in and out of the stompbox since, based on what I have read, both the filters will change the phase?

I have been trying to find some useful values for the resistors and capacitors and have come up with the following:


HighPass FilterLow pass filter
(adjustable from 20-300hz(adjustable from 2kHz to 20kHz
using a dual pot)using a dual pot)
R136-536k120-1120k
R236-536k120-1120k
R356k56k
R433k33k
C10.015uF68pF
C20.015uF68pF

The only thing is I think this is not unity gain as the value "G" is at around 1.5 which assume means it will be amplifying the signal? I tried changing the number but it came back with some kind of invalid parameter error (looks like something to do with the values of the capacitors) but it was in Japanese so I was not sure what was wrong.

Thanks in advance for any help!




Digital Larry

Sorry I am not answering your questions directly.

#1 I recall the hughes and kettner "red box" DI/speaker simulator was nothing more than a low pass filter (2nd order op amp circuit) with a resonant peak at about 2.5 kHz.  So it's not clear to me that a "flat" bandpass such as you are constructing is going to give you a convincing speaker sound.  But you will sure learn a lot in the process.  I would put the caps and resistors onto terminals so that you can unsolder them more easily as you will probably spend a fair amount of time experimenting to get a sound you like.

#2 In general I do not think it is necessary to worry about phase shifts in a filter circuit of this type.  Phase shifts could be troublesome if they cause so much delay that you can hear it, or if there's some possibility of getting mixed together with a dry signal which could cause cancellation (as a "phase shifter" pedal does on purpose).
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Rob Strand

The high and low pass filters are the "cookbook" types which use equal R and C's.  They aren't often the best choice. The amplifier (via R3 and R4) to set the Q.

For the low pass it is possible to design the filter with gain=1 (R4 = short and R3 remove) with equal R's but not equal C's.  That still lets you adjust the frequency by adjusting R.  For example,

f3 = 1kHz
R1 = 10k ohm
R2 = 10k ohm
C1 = 22.5nF
C2 = 11.3nF

For the high-pass  it's also possible to design the filter with gain = 1 however you end up with equal C's and unequal R's.  If you want to set the frequency with a switch that's fine but if you want to use a pot then you can't do it.   So two options are.  Use the circuit you are using, which has gain, or, use a circuit which requires two opamps for the high-pass.  If you want I can draw it and post the schematic.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

ElectricDruid

#3
Quote from: MrFrog on May 05, 2018, 06:43:43 AM
I then worked out a few promising looking values for the resistors and the capacitors using this site:
http://sim.okawa-denshi.jp/en/OPseikiLowkeisan.htm.
I use this site all the time. It's the best filter calculator I've found. It often takes several iterations to get a nice design, but you can do it all without needing any of the maths. I often put the cutoff and Q values that I want in, get R and C values back, and then start tweaking the R and C values towards "sensible" or "common" values and checking to see if it doesn't shift the response too far from what I want. Often it doesn't and I can simplify the design the program came up with.

Quote
From what I read to get a 'nice' knee without a resonant peak before the drop I want both a Q and a damping of around 0.707, is this right?

Yep, that's the classic "Butterworth" response which you'll see a lot in audio since it messes with the sound the least, pretty much.

Quote
Will I get the same phase in and out of the stompbox since, based on what I have read, both the filters will change the phase?

*All* filters mess with the phase to some extent, but that's not really the question. When people say the phase in and out is the same, they mean that there's no inversion of the signal. Those Sallen-Key filters are non-inverting, so you've got no overall phase change.

Note that the multiple feedback filter MFB filter (also on the okawa denshi site) *is* inverting. But you've got two of them, so you could still use that design and have no overall inversion.

HTH,
Tom


PRR

Use the Unity-Gain connection whenever possible.

You can get Q up to 3 or 5 with unity-gain by offsetting values, and that is a LOT for most audio.

Q=0.7 is a nice tame maximally-flat (in math) response which works but is sometimes too boring for music. Especially on high-cut, your ear "misses" all the stuff cut-off, and a mild peak at the corner (Q=1.4-2) may mask this effect. OTOH sometimes a long slow corner cuts the crap yet still allows some use in the down-slope.
  • SUPPORTER

MrFrog

Hi all thanks for the help

QuoteUse the Unity-Gain connection whenever possible.
By this do you mean the point where my high pass meets my low pass should be unity gain? or that I should spend a bit of time following Rob Strands advice about how to get the low and high pass filters to be at unity gain as a better design?

QuoteI recall the hughes and kettner "red box" DI/speaker simulator was nothing more than a low pass filter (2nd order op amp circuit) with a resonant peak at about 2.5 kHz.
QuoteQ=0.7 is a nice tame maximally-flat (in math) response which works but is sometimes too boring for music.
That's interesting about the use of the resonant peak (I think that's the right term?) for now I think I'll stick with boring as in my head this is more of a 'tool' than something to help improve the toan. But also I just googled up "cabinet frequency response diagram" returns a lot of images where there is some kind of peak before the drop off so something I'll bear in mind if I think I'm missing something once I build this.

Now that I know my current design has a 'built in gain' I was thinking I could work with that by adding another variable pot between the high and low pass filters to drain some of the gain off as a boost control.

I was thinking the best place to put this is between the high and low pass sections. This would reduce the chance that I overload the input of the low pass filter. I don't have a sense of whether a gain of 1.5x would do this but it seems a sensible approach. Does this seem like a good idea or could I just put it after the low pass filter? In my head the advantage of after the low pass filter would be better noise control since the signal would be stronger going in to the low pass filter.

Danich_ivanov

I've been experimenting with filters recently, and this layout seemed to work well as a general tone control:

In - 10k r -|- 22nf c -|- out
              10nf c        22k r
                  |                |
  Lp 10k-50k pot    Hp 100k pot

And you can either make them to have seperate controls, or use a single 100k pot for both with lug 1 connected to 10nf cap and lug 3 to 22k res with middle lug going to ground. The other thing is to have an amplifier after each filter and buffer in the very beginning. Although what i would do is to rather have two parallel tone controls, one altering lower frequencies, the other one higher frequencies similar to bandaxall, or exactly bandaxall.

ElectricDruid

I had a play with the filter tool for your frequency ranges. Here's what I came up with:



For the highpass, I figured getting hold of a dual 100K pot is about as easy as it'll get, so we use a 100K pot with a 10K resistor in series. That gives 10K to 110K for the resistance range. Adjusting the caps to give the frequency range you wanted then gives:

R1: 10K + 100K pot
R2: 10K + 100K pot
R3: 56K
R4: 33K
C1: 47n
C2: 47n

Frequency range is 30Hz to 338Hz.



For the lowpass, I wanted to use the same pot and resistance range (simpler - less different parts), and we can also drop the gain and use two different cap values instead to tweak the Q. That gives this:

R1: 10K + 100K pot
R2: 10K + 100K pot
C1: 1n
C2: 470p

Frequency range is 2100Hz to 23KHz.

My concern with your version is that the you need a large pot value because the caps are so small. If you make the caps a bit bigger, you don't need such large resistor values.

Of course, this kind of design is a question of taste and which compromises you're willing to make, so your taste may differ from mine, but I hope you find it useful to see how someone else would do it.

Tom

MrFrog

#8
Thanks for the help so far everyone!

Thoughts and changes
In the end I decided to use the simpler (less component low pass filter) as suggested by ElectricDruid and Rob.
I used the lowpass filter values suggested by Electric Druid.
For the high pass I had another go at finding some new values using larger capacitor values. The reason is that ideally I wanted to be able to engage the high and low pass filters independently. I tried to think through how I could do this with a 3 position switch but in the end I figured it would be easier just to have it so that the the high and low pass dials could be set to something close to "no effect".
The values I am using for the high pass are:
R1/R2 = 22k - 522k
R3 = 56k
R4 = 33k
C1 = 22nF
C2 = 22nF

I also put a 1MOhm variable resistor to reduce the gain between the highpass and lowpass stages and put a 10uF capacitor on the output. I had seen this a few places and apparently is helps reduce popping when switching the pedal on and off.


Veroboard Layout

I have drawn up a veroboard layout using the DIYLayout creator:


I seem to have  bit of wasted space in there but at this stage everytime I try to make it smaller I just seem to create more problems! I had not considered that using dual gang pots was basically two pots so have ended up with input and output wires everywhere.

I'm off to order parts now which will take a couple of weeks to arrive but would really appreciate if someone could eyeball the layout to check that I have translated it across properly.

Thanks again!


ElectricDruid

I'm not sure about the 1M gain pot. Shouldn't that be wired as a volume control, with the signal taken from the wiper? You've got signal going *into* the wiper. I think 2 and 3 need swapping over. Also there's going to be DC across that pot, so it'll probably crackle.

Aside from that, LP R1 Pot - why does that have a ground connection? It shouldn't. If you're bothered about leaving the other connection open, connect it to the wiper, but there's no huge need really.

Can't see anything else untoward right now.

Ben N

The EH Knockout paired a steep LP and HP filter. I'm pretty sure there's a schematic knocking about.
  • SUPPORTER

MrFrog

#11
Thanks for taking a look.

Question about the volume pot. After reading your comments I looked at some other vero layouts and tried to search for posts and discussions around how to add volume pots but I don't know that I am much wiser :-)

I have a couple of questions about how to put a volume pot in and they might be contradictory.

1. To reduce/remove the crackle can I put an electrolytic capacitor in series so it goes (I saw this suggested somewhere in relation to a noisy volume pot)
high pass output ----> +ElectroCap- -----> [ volume pot in -> volume pot out ] -----> low pass input

2. I realised that I don't think I put the pot in how I was originally thinking which was as a variable resistor to ground:

                     |----> [ volume pot in -> volume pot out ] ---> Ground
high pass output --->|
                     |--->  low pass input

This was why I picked such a large resistor value since I thought I wanted to have a high resistance to not lose any 'volume' by accident.

3. Looking at other volume pots they seem to use 100k. I did read something about the fact that the volume pot action is about the ratio of the resistors on either side of the sweeper (or at least that is what I took from what I read) and that the resistance of the pot itself might not be that important.

Cheers!

MrFrog

Hi all,

For anyone following along at home some further research has me believe that putting the volume pot to ground rather than in series is not a good idea.

As far as the potential (no pun intended) for cracking when adjusting the pot goes I will try two things:
1. I'll put the electrolytic capacitor in before the volume pot
2. failing that I'll just pop a trimpot in there and adjust the volume to unity. I was only trying to take advantage of the gain as an extra 'feature' anyway.

Once I have it working I'll come back and update my veroboard layout.

Cheers!

ElectricDruid

The important thing about the pot if you're using it as a "volume pot" is that it is wired up as a potential divider, with all three legs in use. If it's wired as a variable resistor with only two legs in use, you'll get some effect, but it'll depend on other stuff (the rest of the circuit around it, basically) rather than working in its own right. And that's true whether its wired in series or to ground. So make sure you've got signal in to one end, signal out from the wiper, and the other end grounded. That's one issue.

The other issue is the crackling that you'll get if there's a DC level across the pot. That happens if you take an audio signal like the output from an op-amp which has been biased around the midpoint voltage and then use a volume pot that has the bottom end tied to ground. If you imagine you stop playing for a minute, you've got the bias (so 4.5V usually) at the top of the pot and ground at the bottom. There are several solutions to this:

1) Separate the volume pot from the DC bias on the output by using a "DC blocking" aka "AC coupling" capacitor. This lets the audio pass, but blocks the DC. No DC equals no problem. If you're feeding the result to another op-amp that is *also* biased to 4.5V, you need another cap *after* the volume control too. Otherwise you could try solution (2)...
2) Don't connect the bottom of the volume pot to ground. You can connect it to the bias voltage instead. Then both ends are at the same basic level and there's no problem.
3) Separate the *bottom* of the pot from ground by putting a capacitor between it and ground. Again, this blocks the DC and removes the problem.

Solution (1) is what you generally see. (2) is less common, but makes sense in your situation I'd say (saves two caps), and (3) only seems to get used in the feedback paths of op-amp circuits! Don't ask me why, I've no idea. Perhaps there's a good reason and someone else knows, or perhaps it's just that people tend to copy stuff that works, so everyone finishes up doing things the same way.

MrFrog

I've got a few parts coming now so I'll experiment once it all gets here. I ended up ordering some rotary switches based on comments in this thread
https://www.diystompboxes.com/smfforum/index.php?topic=72601.0.

Some how I did not find this until I was searching for stuff about how to add a volume control. My google-fu is obviously weak!
Anyway, in that thread there is a suggestion to use a rotary switch with a number of fixed cut off points, mostly to avoid quality issues with dual-gang pots. If nothing else it give me another fall back plan if things don't quite work as intended.

While I wait for the parts to arrive I am going to crack out my google skills and read up on how to use two opamps so that my high pass does not have gain:
QuoteSo two options are.  Use the circuit you are using, which has gain, or, use a circuit which requires two opamps for the high-pass.  If you want I can draw it and post the schematic.

Rob offered to draw it up but I think it will be more fun to try to work it out first, plus, who knows what else I might stumble over :)

MrFrog

Hi all,

Bringing this one back as I have finally managed to get all the parts (I missed one of the pots and could not find one locally so had to wait for another order!

In the end the vero diagram I built from was this one:

It is the same as the earlier one I posted except for the addition of two electrolytic capacitors to address the crackling issue.

The problem I have is that I don't appear to have any output (using the audio probe) in the section marked with a red box in the top diagram.

Update:
I have just found that if I set the highpass variable resistor to about 120 ohms the volume of the circuit before the volume control is much louder.
Also there is some output I can pick up now from the output wire (although it is quite low).


The film capactitor has signal on the left hand side but not on the right.
The opamp has signal on the +ve input but nothing on the -ve or on the output. The opamp legs have continuity to the backside of the veroboard.
I have replaced both the opamp and the capacitor.

The voltages are:
TL072





11.46|88.96
20.92|74.34
30.88|64.30
40|51.47
On the row where with the left hand side of the capacitor and the resitor meet = 0.9v
Where the small jumper is next to the capacitor by the output = 1.47v

I've checked everything I can think to check. Something that seems odd to me is the 4.3v on inverted input b and output b but I don't know what it means.

Can anyone point me in the right direction?

Thanks!




ElectricDruid

I'd be more suspicious about the first op-amp - under one volt for those pins is very low.

Have you got a schematic?

Thanks,
Tom

duck_arse

as ED said while I was scrolling - schem? I'd have thought pins 1 and 5 were shorted, but then I traced part of the vero [please, don't make people do this without a schem .....] and see there is no bias voltages. is that correct?
" I will say no more "

MrFrog

Sorry, first time trying to build something from scratch. I'll draw up the schematic and post it this week. It's not too complicated (basically the high pass filter running in to the low pass filter) but I get why seeing that drawn out that would be a good starting point for trouble shooting.

Cheers!

MrFrog

Hello. Hopefully I have managed to get this right.

Below is the schematic I used to design the vero layout (well, the original was sketched on a piece of paper which I threw out once I was happy with the vero layout. This one is much tidier!).



Any feedback and suggestions welcome.

Thanks!