Filter calculation

Started by knutolai, November 05, 2014, 07:58:44 AM

Previous topic - Next topic

knutolai

So I keep seeing the filter-architecture to the right in various designs:

How would I go about calculating its frequency cutoff and the Q-factor? I know the filter to the left is a multiple feedback type, but the formulas used to calculate those doesn't seem to work for the the other kinda similar filter.

anotherjim

Good question.
I threw the r/h ones values in the on-line calculator I use and it did not like having one cap missing.
So I put 1pF in for the missing one, then it gave me a 2 pole answer - one somewhere up in the stratosphere, and one at about 3kHz which seems about right.
But, in practice, I can't think why you would use a multiple feedback circuit for a single pole response - I'd just use the simple 1 pole type where the caps across the feedback resistor.
Hopefully someone will come along who knows better.

PRR

> filter-architecture to the right in various designs

Name some.

I can't see it as anything but a single-pole low-pass, with one more resistor than it strictly needs.

Such things can happen when a designer tweaks it on the bench and doesn't go back to simplify. The resistor is not a big expense.
  • SUPPORTER

knutolai

It's in DeadAstronauts Abductor Echo and I know I've seen it in some other PT2399 based designs, but can't find any others at the moment.. typical. So shortcircuiting R2 should yield the same results?

MrStab

i've also come across that in my recent tri-PT2399 reverb attempts (decided against that IC in the end, project on hold).

after much searching last week, i found it on this site i use from time to time. you could cheat with the built-in calculators, but the equations are all present: http://sim.okawa-denshi.jp/en/Fkeisan.htm

Recovered guitar player.
Electronics manufacturer.

knutolai

QuoteSo I put 1pF in for the missing one, then it gave me a 2 pole answer - one somewhere up in the stratosphere, and one at about 3kHz which seems about right.

What program are you using for this?

Transmogrifox

PRR is about right.  I simulated this in LTSPICE thinking maybe there was something interesting happening with input impedance, but not at all.

An equivalent and more familiar 1-pole low-pass circuit with gain is as follows:
Replace R2 with zero ohms (replace it with a wire).
Replace R3 with 55.5k
Replace R1 with 25.2k

In this more familiar configuration, the 3dB corner frequency is nothing more than 1/(2*pi*R3*C), which is about 2.87 kHz.

In these conditions the frequency and phase response fall right on top of each other.  The multiple resistor feedback configuration does nothing more than obfuscate the purpose of the circuit.
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.

PRR

> did not like having one cap missing.
> So I put 1pF in for the missing one, then it gave me a 2 pole answer - one somewhere up in the stratosphere, and one at about 3kHz


Correct.... and the "stratosphere" is 10 MEGaHertz and 60dB down. You won't hear that. Your dog won't hear that. (Your op-amp won't actually do that.)

For any practical purpose it is a one-pole filter, around 3KHz with values shown, with some small gain. No bump or other odd effect. It can be done 12 cents cheaper.

> The multiple resistor feedback configuration does nothing more than obfuscate the purpose of the circuit.

Right. It *may* be an artifact of a 2-pole filter bodged for less drastic action ("What happens if I snip this cap?") and not re-studied for minimum parts.
  • SUPPORTER

anotherjim

I used the same on-line calculator that Mr Stab links.

knutolai

QuoteI used the same on-line calculator that Mr Stab links.
Ah didn't notice the "poles" result. Very useful. thanks!

I approach every new and unfamiliar circuit-block thinking "ah this must have some special purpose". Good to be able to write this one of as impractical.  :)

R.G.

Quote from: knutolai on November 06, 2014, 08:16:46 AM
I approach every new and unfamiliar circuit-block thinking "ah this must have some special purpose". Good to be able to write this one of as impractical.  :)
You're probably right that unfamiliar circuits must have some special purpose. In this case, the purpose was either to get the "designer" out of a hole by snipping out a capacitor (look up "Muntzing" on google) or to throw people off the track of what the circuit actually does; see "Dirty Tricks 101" at geofex.com.
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.

midwayfair

Quote from: R.G. on November 06, 2014, 08:28:18 AMIn this case, the purpose was either to get the "designer" out of a hole by snipping out a capacitor (look up "Muntzing" on google) or to throw people off the track of what the circuit actually does; see "Dirty Tricks 101" at geofex.com.

I'm gonna say that Rob Henry (deadastronaut) is not the sort of guy to employ dirty tricks.  :P
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

knutolai

Quotesee "Dirty Tricks 101" at geofex.com.

hehe yeh. Read that article some time ago. Fun stuff! ..there's a purpose for everything I guess.

Not to change the topic completely, but here is another circuit I've seen a few times (screenshot from rebote 2.5):


Normally you would just connect the positive inputs directly to Vb, but I'm guessing these resistors have more of a purpose?

midwayfair

Also, isn't the signal being mixed between a gain increase for the treble cut signal and a full-range signal that isn't amplified?

Anyway, I thought I'd offer a third possibility, besides ignorance and malice: It's also possible that to get exactly the same thing, a weird resistor value would be required. In quantities of 200, 10K resistors are super cheap. If you have to buy a single weird value for each build and you're only building a few, that's more expensive than the extra 10K resistor even if it's one less part, especially if it's a last-minute change. Sometimes projects are designed to make the BOM simple.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

R.G.

Quote from: midwayfair on November 06, 2014, 10:01:34 AM
Anyway, I thought I'd offer a third possibility, besides ignorance and malice: It's also possible that to get exactly the same thing, a weird resistor value would be required. In quantities of 200, 10K resistors are super cheap. If you have to buy a single weird value for each build and you're only building a few, that's more expensive than the extra 10K resistor even if it's one less part, especially if it's a last-minute change. Sometimes projects are designed to make the BOM simple.
I'd go along with that. I've even known one case where part values were picked as a "signature". There are resistor values in many circuits where the exact value simply doesn't matter much. The pull-down resistor on a bipolar transistor base is one of those that you commonly find.

In one company's design shop, you could tell who did the design of a given circuit because one engineer would always pick 1K, another 910 ohms, another 1.1K, another 1.2K and so on.
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.

PBE6

QuoteNormally you would just connect the positive inputs directly to Vb, but I'm guessing these resistors have more of a purpose?

According to Wikipedia, an extra resistor to Vref/ground can reduce the input offset voltage by balancing out the impedances seen by both inputs. This seems to be the case with the 240k resistor, but the 1k seems a little low.

anotherjim

We can usually ignore the bias resistor and tie straight to Vref - Resistor is for computational offset accuracy which doesn't affect audio circuits much. Although I think it's probably worth fitting the resistor in some precision full wave rectifier circuits to help get both half waves to match up nicely.

I go with the simple idea that R(ref) = R(in)//R(f). That is, the + input bias resistor is equal to the feedback resistor in parallel with the - input resistor. But, I've a horrible feeling you should look in the data sheet for input bias currents and such.
Anyway, I've looked, but never found a simple guide to how to work that resistor out - I've just noticed the value in published circuits is proportional to the gain resistors as above. The multiple feedback case makes that simple formula go to hell with the feedback joining a split input resistor.

And if there's a mixer?


R6 is easy, but R7?



R.G.

Quote from: anotherjim on November 06, 2014, 03:39:31 PM
R6 is easy, but R7?
Not that hard. You're trying to balance the resistance from an input pin to a low impedance termination.

In this case that's R5 (10K) paralleled by R2 (20K) and R1 and R3 in series (40K). The parallel combination of resistors is
Req = 1/(1/R5+1/R2 + 1/(R1+R3)) = 5.714K. Call it 5.1 to get close, or use 5.6K for really close, or tinker with 1% resistors for best results, and take note that R2 is not really 20K, it's 20K to 22.5K.
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.

Quackzed

to me,at first glance it looks like a sallen key (double pole (12 db/oct)) filter...
but it isn't... almost tho!
nothing says forever like a solid block of liquid nails!!!

PRR

#19
> An equivalent and more familiar 1-pole low-pass circuit with gain is as follows:
> Replace R2 with zero ohms (replace it with a wire).
> Replace R3 with 55.5k
> Replace R1 with 25.2k


Yes. Or---

Since the resistors may be chosen for some reason (specific input impedance, DC bias, or Standard Values), leave them alone and scale the cap. Looks like 396.8pFd. And since a 1-pole filter is VERY gradual, nobody will care if you use standard 390pFd part.
___

The offset-balance resistors in post #12 are almost always a Bad Idea in audio. We don't want response to DC and will always strip-out subsonics somewhere in the system (coupling caps). We may need DC-accurate computations for ALC and other demon chores, true; today we can always find a part with "no" bias current thus nothing to balance. The resistors add hiss, so should be bypassed with caps. 240K adds a LOT of hiss to most audio systems.

> the 1k seems a little low.

There's another "Old Designer's Rule". Never tie a sensitive input to a powerful source without a little resistance. Best example of "1K" is TTL logic design. Some military specs required the 1K on any input permanently tied "high". It is not enough to sag the "high" level down, but would set some limit to the current that could flow in unexpected glitches. Notably most commercial designs ignored this, and lived.

The Vref is not a high-power source, but with a cap on it, it could be enough burst-energy to pop an input. However we omit this resistor all the time, and a chip-maker who let his inputs be too fragile for "common use" would soon go broke. There's some issues with outside sources, like Phantom and regulators, and you should *always* protect against stuff plugged into jacks, but mostly we don't do this on internal circuits.

There's another point. On single/few-layer PCB you often need to get to a point on the other side of a cross trace. In DIY we use scrap resistor leads as jumpers, but these are un-handy for robot stuffers. Eventually a "zero ohm resistor" was sold which was a robot-stuffable jumper. But unless your robot has 0-Ohms in bins, often it is expedient to use any low-value resistor already on your shopping list.

And as R.G. sez, sometimes it is designer's-choice what low value to pick. It is a mind-numbing job to detail a product, and this is one place the designer can stamp his work.
___

> R6 is easy, but R7?

R7 appears to be 10K||20K||21.25K, which is near 5K. However the place the 20K goes to is not low-Z, but another 20K away from ground.

Likewise for R6, which is supposed to balance a node which is at least 30K away from any ground.

The source (old National docs) is respectable; however some of these suggestions were detailed by junior engineers on tight deadlines. Think "serving suggestion". Try it, but expect to add more parsley or curry or Ohms before you really like it.
  • SUPPORTER