Sallen Key Filter with Resonance

I am in the process of trying to understand filters by building them ground up. Currently I made a Sallen Key Filter based on this design.


(I found it on the Doepfer homepage.)
It works well but I cannot get the typical squeaky resonance one is used to from analogue synths, even with very high gain on the opamp. Am I using the wrong filter layout for this kind of sound? Or is something else wrong?

Here are the details:
Opamp is TL047CN

R1 10k pot
R2 1k
C1 and C2 100nF
R4 100k pot.
I played around a lot with R3 to get resonance but no success. It does change the sound of the filter though.

2 Likes

i made several of this one for 9V

it’s for modular ?

i’m not shure that you can have some resonance with this simple circuit ?

2 Likes

Nit: The latter (by Tim Escobedo?) is neither Sallen Key nor MS20; it’s a bit like MS20 but w/o diodes in the feedback loop (the main MS20 topology is a slightly tweaked version of a filter in the LM13700 data sheet).

(Sallen Key is a way to build a second-order filter with only one opamp, but the MS20 has one between each stage so is in practice just two cascaded first-order filters, plus feedback. Or one first-order filter, if you use it in HP mode).

2 Likes

Thanks for the layout. As I said, my objective is to understand filters – so I started from the most basic layout I could find and slowly add to it. First a simple first order filter, then a second order filter, now a second order filter with variable characteristic. This is all on a breadboard right now. I know there are tons of better filters out there for my modular synth. This is really just a self-educational DIY project.

2 Likes

I’m just learning this stuff myself. Shouldn’t the RC for both stages be the same? (Edit: No, not necessarily, see below.) If R1 is fixed at 1k then RC = 100 µs or f = 15.9 1.59 kHz. For high resonance you want gain ~ 3 so R4/R3 ~ 2; R3 = 50k should work. Here’s what I get in a simulation:

using this circuit:

On the other hand if I change R1 to say 3k without also changing R2 I get

(Edit: This is with the same gain, you do see sharp resonance at a different gain.) So I suspect your problem is an RC mismatch. Make R1 equal to R2 (with C1 and C2 equal too) and it looks like it should be plenty resonant (Edit: with gain = 3).

4 Likes

I’m not sure that you need to have the components matches.

To go a little deeper into the theory, it’s important to differentiate the filter topology from the “filter approximation function”.
Examples of functions:

  • 1st/2nd order
  • Butterworth
  • Chebychev
  • …

And the topologies can be:

  • Simple RC/LC circuits
  • Sallen-Key
  • Rausch (Multi-FeedBack)
  • …

If you want a resonance, you probably want to select the 2nd order approximation function: image
Where d is the damping, the inverse of Q, the resonance.
You want Q to be higher than sqrt(2):
image

Ok, so now you need to choose the topology that suits you. If you go for Sallen-Key, you have something like that:


Where the Zx are the complexes impedances (can be either R, C, or L).
By choosing Z1,Z3 as resistors and Z2,Z4 as capacitors, you get a low-pass filter, and you can rearrange the Sallen-Key transfer function to match the 2nd order one. This way you can tell the component’s values you need, depending of the resonance and cutting frequency (maths are here: https://en.wikipedia.org/wiki/Sallen–Key_topology#Application:_low-pass_filter)

7 Likes

Do you hear any resonance at all?

B.t.w. if the simulation shows the resonance should amount to 15.9 kHz, you need good hearing to hear that, which is age dependent. According to a study I found, people younger that 30 should be able to hear 16kHz, but often older people won’t. Better lower the resonance frequency to test the circuit.

3 Likes

If my calculations are correct, 15.9 kHz corresponds to R1 = 10 ohm. Turn it over to the other end (10k), and you get ~500 Hz.

(the other pot controls Q, as noted)

Looks like this is the source, btw: http://www.doepfer.de/a1011_tec.htm

3 Likes

R1 = 1k = 1E3 R
C1 = 100 nF = 1E-7 F

R1*C1 = 1e-4 s
1/(2Ď€R1C1) = 1591 Hz

(As is seen in the plot. Text corrected in previous post.)

1 Like

This is what happens in the simulation (circuitlab.com) to the frequency response as R1 is stepped from 200R to 2000R, with all other components as above (in particular R4/R3 = 2).

So you do get some resonance but at 800R or 1200R it’s a good deal broader and lower than at 1000R (matching R2).

Edit to add: Actually the fair comparison is maximum resonance as a function of R1, not resonance at fixed gain. With R1 = 2k and varying R4 you get this:

So, correcting myself, you should indeed find sharp resonance even if R1 differs from R2, just not at the same gain.

@telec16 As I said above I’m just learning some of this stuff myself, and I’ve been hindered by some sources that seem to have the concepts of topology and transfer function muddled. I haven’t yet found anything that’s clear, correct, and suited for readers with not much technical expertise in electronic theory, but I’m picking things up here and there.

5 Likes

Yep, I totally agree with that: filters are quite mysterious!
I think I will try to make some sort of guide… For now, I have made (or rather hacked together) a small app to fiddle with a lowpass S&K filter: https://old.telec16.fr/content/pratique/utils_elec/filters.html
(That’s still a WIP though, and I haven’t really tested it, but I need to sleep at some point :p)

5 Likes

That is super awesome! WIP or not.

3 Likes

Yes, that is the source. Sorry, should’ve included it in the first place.

1 Like

Thanks so much, @analogoutput for these plots (and the link to the simulation software)! That helped me a lot understand what is going on. I guess my problem was that I had not realized how much the amount and shape of resonance actually depends on the cutoff frequency. I somehow had assumed that the resonance just tracks the cutoff as it changes when changing R1 (or R1 and R2). Yet – at least in that filter layout – this seems not to be the case.
Using the values from the plots and fixed resistors I could actually produce a resonant filter. Using the pots it needs a lof of fiddling to hit that spike from the plots.

2 Likes

That app is great, thanks! I would love to read that guide.

2 Likes

So I updated it a bit, but I’m not happy with the phase responses, I think I’m wrong somewhere…

Edit: It’s all ok now (always use atan2!!) ! Tell me if you spot an error, or if you want more info.

1 Like