Active Filter Help: 3rd Order Sallen-Key

Started by thehallofshields, August 07, 2014, 09:02:27 PM

Previous topic - Next topic

thehallofshields

Hey guys. I'm trying to design an Opamp LPF with a steep falloff after a Guitar's Fundemental range, I'm going with 1.5khz for simplicity.



I tried using this tool:http://sim.okawa-denshi.jp/en/Sallenkey3Lowkeisan.htm and selected the Sallen Key 3rd Order Filter.

I entered 1500hz in the Butterworth field and it spit out these values.

R1 = 11kΩ
R2 = 110kΩ
R3 = 33kΩ
C1 = 0.01uF
C2 = 0.0047uF
C3 = 680pF

The only problem is I tried bread-boarding, and buffered or un-buffered, I think the corner Q is much too low. The top 2 strings barely make it through at all.

Could anyone give me some suggestions on how to implement this type, or similar filters for Guitar Pedal applications?

PRR

#1
What is driving the 11K input impedance?

If buffered: the filter design is correct. 1.5KHz comes through as -3.2dB, which is close-enuff for using Standard Values. Top strings are down but not so I'd say "barely make it through".

Re-check your values.

Try making all caps 0.8 times the value to set the frequency 1.25 times higher, for a smaller 1dB loss at 1.5KHz.

Note that, on lower pitches, a LOT of overtones come through; but up at fret 20 on the high strings, nearly ALL the harmonics are cut, so the sound-on-the-ear is much less rich.
  • SUPPORTER

thehallofshields

Quote from: PRR on August 07, 2014, 10:38:58 PM
What is driving the 11K input impedance?

I'm just using an MPF102 Buffer.

Thanks for confirming the Corner Frequency. I'll double check the values on my board.

thehallofshields

Okay, just checking. If I'm using a TL072 on 9v for the Sallen-Key, I should still be Biasing the +In at 4.5V right?

PRR

If the bias isn't right,  it will distort bad. You didn't mention a problem.

A JFET is not a very low impedance buffer. Could be over 1K output. This plus the nominal 11K resistor puts the first pole a little low. Not a big difference, but if you have chips you probably should try one.
  • SUPPORTER

thehallofshields

Quote from: PRR on August 07, 2014, 10:38:58 PM
Re-check your values.

I just discovered I had mistaken the blue of a 150k Resistor for the black of a 100k resistor. Whoops. Made myself look bad once again.

High Strings are now audible. Still not quite how I imagined it performing. I'll try a low Impedance Buffer.

thehallofshields

Ok last question: Can I take the Sallen-Key design, add a IN- Resistor Network for Gain, and expect a similar response. The Active LPF tutorials I read didn't really cover that.

Digital Larry

The response of the filter depends on the impedances being pretty much as shown and also probably assumes a very low driving impedance.  If you were to use an input gain control potentiometer (or "volume knob" as I hear it's called) you'd either want to buffer the signal after the pot, or just try it and see if it's OK anyway.  You might deviate from theoretical purity but have a subjectively OK result. 

Also, you said you wanted a "steep cutoff".  You will get a steeper cutoff, at the expense of some ripple in the passband (fluctuations in the gain before the cutoff frequency) by using a Chebyshev filter design.  I'm not sure how big the difference is for a third order filter, but while we're talking about active filters and all that, it does meet your stated design goal better than a Butterworth filter (whose stated goal is to be "maximally flat" in the passband).
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

samhay

If you use a dual op-amp, you can set up the other half an a non-inverting amplifier with a gain of 1+ and an output impedance low enough to drive your filter with little effort.

1.5 kHz is pretty low for guitar work. Is this for an effect, or do you need fairly drastic filtering prior to doing something fun with the signal?
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

Digital Larry

#9
Quote from: thehallofshields on August 08, 2014, 12:14:42 AM
Ok last question: Can I take the Sallen-Key design, add a IN- Resistor Network for Gain, and expect a similar response. The Active LPF tutorials I read didn't really cover that.

More to the point, if you want to add a fixed resistor divider to the input to reduce gain, you can do it and keep the filter response so long as the effective source impedance (looking backwards towards the front end from the first capacitor) is still 11k.

So you could make that first series input resistor 1k (arbitrary choice) and then make sure that the PARALLEL resistance of the series and shunt resistors (which form your input divider) is the remainder, or 10k.  This again assumes that the voltage divider is being driven by a low impedance.  If not, figure it into Re.

Suppose
Re = the series resistor in the input divider
Rh = the shunt resistor in the input divider

Re/(Re + Rh) is the voltage division ratio you want, let's call this Av.  Please note it is between 0.0 and 1.0.  Actually it needs to be greater than zero.
(Re * Rh)/(Re + Rh) = 10,000 (ohms)

After about a page of math, it comes out somewhat elegantly:

Re = 10,000/(1 - Av)
Rs = 10,000/Av

Suppose Av = 0.1 (-20 dB).

Re = 10,000/(0.9) = 11,111 ohms
Rs = 10,000/(0.1) = 100,000 ohms

Now there is going to be a bit of loading on this voltage divider from the filter input impedance which would decrease the actual gain even more.  To minimize this effect, make the divider portion of the impedance smaller by a factor of ten.  This gives you:

Re = 1,111 ohms
Rs = 10,000 ohms

You would then replace the 11k R1 in the filter with a 10k coming out of the divider we just designed.  The divider's impedance forms the remaining 1k.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Digital Larry

I'm sorry, the previous exercise was simply a flight of mathematical fancy.  If you had another op-amp to drive the voltage divider, the best option would be to put the voltage divider before the op-amp set up to be a unity gain follower, which would drive the filter circuit directly.  At least that way you wouldn't need to worry about the filter response changing from the input impedance.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

PRR

I dunno why you'd want to cut-down signal level before a unity-gain low-pass. You could just as well cut-down after the filter. Or just not build-up so much in front.

However there's a dead-perfect way with this topology. That 11K resistor? Replace it with two 22K, one to source, one to ground. That's 2:1 cut-down and the filter sees the exact right 11K. (Assuming the source impedance is <<22K, or is included in the 22K.) Same if you want 10:1(!) cut-down: something like 110K and 12K (counting on thumbs; an exact solution is about 2% different and hardly worth the wear on the slide-rule). Likewise a 4:3 or 0.75 cut-down is around 15K and 45K.
  • SUPPORTER

Transmogrifox

Quote from: thehallofshields on August 08, 2014, 12:14:42 AM
Ok last question: Can I take the Sallen-Key design, add a IN- Resistor Network for Gain, and expect a similar response. The Active LPF tutorials I read didn't really cover that.

I think I see what you're getting at.  Do you mean adding OUT to IN- , then IN- to GND (or 4.5V, as the case may be) to make a typical amplifier out of this instead of unity gain?

If you're talking about adding gain in this way, yes, you can do that, but it will change the frequency response (especially the Q).  If you add too much gain it will go unstable.

I think adding a gain stage after the filter makes the most sense.  Ideally you want to keep lower signal amplitudes going into the filter for purposes of lower distortion (clipping headroom, slew rate characteristics, etc). 

After the filter then wide-band noise coming from the line will be eliminated increasingly above your cutoff frequency.  If you were to amplify very much first, then filter, then you might drive the filter into clipping and intermodulate wide-band noise into the pass-band, thereby increasing the noise (and distortion).

If all signal levels (input and output) are kept within good linear operating range of your op amps then theoretically a filter after the amplifier would be better because the filter then bandlimits the noise from the amplifier stage itself.

In conclusion:
Low to moderate gain -- amplify first, then filter
moderate to high gain -- filter first, then amplify

My guess about your application tells me you probably will not be applying very much gain, so add the amplifier in front of the filter.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

Digital Larry

In the light of morning I think I totally misinterpreted the OP's desire to add gain via a resistor network at the (-) input of the op-amp (as in a typical non inverting stage with gain > 1.  :icon_redface:  And I don't exactly know the answer but I don't think you'd maintain the same filter response doing that.

Well, I hadn't done any algebra in awhile and I had some self indulgent fun doing it.   :icon_rolleyes:
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

PRR

> I think I see what you're getting at.  Do you mean adding OUT to IN- , then IN- to GND (or 4.5V, as the case may be) to make a typical amplifier out of this instead of unity gain?

OH!!

Well, if that is what he is asking....

First, find Equal Resistor Sallen-Key. Instead of 110K and 33K it has two 60k(?) resistors, and the opamp is rigged for a gain of 2 to 3. The opamp gain is really the Q, and can be adjusted. (I think for a reasonably flat corner the 2-pole Q is a hair higher than 1.0 to compensate the droop in the 1-pole filter in front.)

But it also gives you that voltage gain.

At first sight you must compromise the gain you would like to have with the gain needed for the Q you want. However gain of 2 or 3 is sometimes good enough.

However there are tricks. You can tap the voltage divider from OUT to IN- to get gains of whatever.

If you tap the NFB leg it must be VERY low impedance, or loading will foul things up. For common opamps figure the total NFB network a bit less than 2K total.

The basic trick is to let filter gain be 2.7 but take the final output from IN-, which will be unity gain.

You could reasonably rig for gain of 10 for the output, with a tap at gain of 2.7 for the filter kick-back.

OTOH, opamps today are 13 cents. Back in the old days we'd slave for days to trim a $25 opamp out, today it makes more sense to K.I.S.S. and use one opamp per function.
  • SUPPORTER

thehallofshields

Quote from: Digital Larry on August 09, 2014, 09:21:31 AM
In the light of morning I think I totally misinterpreted the OP's desire to add gain via a resistor network at the (-) input of the op-amp (as in a typical non inverting stage with gain > 1.  :icon_redface:  And I don't exactly know the answer but I don't think you'd maintain the same filter response doing that.

Whoops! I didn't keep up with my own thread. This is indeed what I meant to ask. If configuring an Opamp for a gain greater than 1 affects the response of the filter. I wish I would have saved everyone the confusion and stated it like that.