Two band Parametric EQ

Started by Guitar_Duderino, April 17, 2019, 01:16:17 PM

Previous topic - Next topic

Ben N

I leave the technical challenges of designing filters to people who, ulike me, have some idea of what they are doing. But why have a bandpass --especially one covering a large frequency range -- covering a range up to 20khz? And for guitar? Seems to me that lot of that territory (in the presence range for guitar and beyond) would be better handled with a highpass; keep your parametric bandpass filter to a lower and more restricted range, and it will be both more effective and easier to execute. Or is this for some other application?
  • SUPPORTER

Guitar_Duderino

#21
Quote from: jatalahd on April 23, 2019, 02:15:44 PM
Hi again,

I got carried away  and made a SPICE simulation. This is the complete circuit that will meet your requirement of the lower band (from about 100 Hz to 2kHz, Q from 0.5 to 16 and gain +-20dB):



Note that this is only a simulated model, the real circuit might need some additional resistors here and there to keep the circuit stable.


Most grateful for your time, jatalahd! And I am sorry for this delay...

If I rightly computed this with your above equations, for your proposed circuit I get fmax = ~2340Hz and fmin = ~97Hz. Do you confirm? Did you not put R10 and R16 (from BYOC circuit)? Are these 220kΩ?

With these equations for BYOC circuit I now get that fmin = ~33Hz...but still fmax = ~312Hz instead 333Hz (as they claim)...

What are the equations for that variable Q? How should your above equation include RpQ to get Qmin and Qmax?

And for said "stability" should C4, C2, C3, R7 be kept? Or where should those "here and there" resistors certainly be?

Do you know how to adapt those boost/cut equations for VR1 of BYOC circuit?

...Commercially is this so laborious? Is not all this solved already? Are these equations such trade secret?

If I am to ignore all these equations, transcribe this BYOC circuit to SPICE or other (EasyEDA, which could then convert this to PCB?) and change resistors here and there till I attain my needs, how shall I do this? What resistors must I change (hence my quest for these equations...)? In your circuit resistors are "all" of 10kΩ, BYOC has many of 5.1kΩ and some of 1.6kΩ (that affecting Q included). Should all these of equal value be kept of equal value? Damien Douxchamps already notes R15=R17, C5=C6, R10=R16 (adapted to BYOC circuit, which does not have equivalent resistors to Damien's R13 and R15), but what of others?

(Pardon my ignorance.)

jatalahd

Quote from: Guitar_Duderino on May 03, 2019, 07:49:27 PM

If I rightly computed this with your above equations, for your proposed circuit I get fmax = ~2340Hz and fmin = ~97Hz. Do you confirm? Did you not put R10 and R16 (from BYOC circuit)? Are these 220kΩ?

From my proposed circuit model fmax is 2340.0 Hz and fmin is 101.76 Hz. My model does not have R10 and R16 from BYOC, because that circuit is too complex to calculate full transfer function. It seems that you want to build the BYOC circuit so let's work on that:

Quote
With these equations for BYOC circuit I now get that fmin = ~33Hz...but still fmax = ~312Hz instead 333Hz (as they claim)...

They claim, because it is nice to write 33.0 to 330 to show "clean" decade. With real world resistor/capacitor values you have to accept that you cannot get exactly spot on frequencies. fmin = ~33Hz and fmax = ~312Hz are correct for BYOC circuit and you can use the equations for that circuit to design your own frequency range.

Quote
What are the equations for that variable Q? How should your above equation include RpQ to get Qmin and Qmax?

RpQ just adds to Rx or Ry depending to which end the pot is turned. Since most of the resistor values are the same (and should be) you only need the equation in the parenthesis (the square root term is just 1, when resistors are equal). You can use this also for the BYOC circuit. With those values given, in BYOC circuit max Q is 8.0 and min Q is 0.9. To get Q = 16, make 330r --> 150r. It seems that Q = 0.5 cannot be obtained from BYOC circuit with 5k1 resistors. 

Quote
Do you know how to adapt those boost/cut equations for VR1 of BYOC circuit?
Yes. The filter gives a gain of -3 (-R9/R8), that is about 9 dB and the differential amp gives a default of 9 dB gain. That is a total of +-18 dB boost/cut. (They claim 12 dB). If you want to add 3 dB more, add 5k1 resistor from -input of IC2b to ground. Typically, in these EQ applications the filter gives 0 dB gain and the differential amp sets all the boost/cut gain. The equations I gave for my circuit hold for the gain provided by the differential amp, and assume that filter gain is 1 (0 dB).

Quote
...Commercially is this so laborious? Is not all this solved already? Are these equations such trade secret?
This has not been laborious so far. You still have a long way to go to have a working circuit at your hands. Professional electronics designers use application notes provided by component manufacturers, where design equations are given. A simple stompbox forum is a wrong place to look for exact design equations.

Quote
If I am to ignore all these equations, transcribe this BYOC circuit to SPICE or other (EasyEDA, which could then convert this to PCB?) and change resistors here and there till I attain my needs, how shall I do this? What resistors must I change (hence my quest for these equations...)? In your circuit resistors are "all" of 10kΩ, BYOC has many of 5.1kΩ and some of 1.6kΩ (that affecting Q included). Should all these of equal value be kept of equal value?

I cannot help with EasyEDA. I would suggest taking BYOC circuit as base point. If you decide to change 5k1 resistor, change all 5k1 resistors to same value (whatever it is). You need to note that R9/R8 sets the gain for the filter, so you need to adjust that to your needs or keep it the same ratio 3:1. If you change R10, you set also R16 to same value. If you change VR3b, change also VR3a to same value, note that in your build you need a dual-ganged pot to turn VR3a/b simultaneously.

Hopefully all is clear now :)
  • SUPPORTER
I have failed to understand.

Guitar_Duderino

Much much obliged, jatalahd, for your time and help. And may this help others.

I want this EQ to have around:
Band one: 50Hz < f < 2kHz
Band two: 500Hz < f < 20kHz
0.7 < Q < 16
Boost/Cut: +-20dB

Tweaking values I get these bands with
R15 (and its equals) = 800Ω
R10 (and its equals) = 400Ω
C5 = C6 = 100nF (Band one)
C5 = C6 = 10nF (Band two)

Any absurdity here? Resistors and capacitors with these values seem to be sold.

Can you explain how VR2 works? I did not understand that "adds to Rx or Ry depending to which end the pot is turned". Does not this potentiometer go from 0Ω to 10kΩ? How does it add to R12 or R11?

Following that addition to R12 or to R11 I get those
Qmax = 8 with R12+VR2
Qmin = 0.9 with R11+VR2

Square root() * R6 = 1, when resistors are equal, and not just Square root () = 1, right?

I get
Qmax = 16.8
Qmin = 0.77
with
R11 = 25Ω

Would it somehow be preferable to have Qmax = 10? I get this with R11 = 45Ω, but I do not see such resistors sold... With R11 = 50Ω (these are sold) I get Qmax = 9.15.

Why is gain negative (-R9/R8)? Its positive value is converted to dB (20log(5100/1600) = 10dB).

If BYOC circuit has 10dB + 9dB = 19dB, why would they say 12dB?

For my circuit I get Boost = 6dB, which with those 9dB of differential amplifier = 15dB, which is not bad. With that Rx=800Ω it would be 12dB instead of 9dB, thus Boost = 6dB + 12dB = 18dB. Is Rx = R15 necessary or may Rx be free?

But where is VR1 in this Boost/cut equation? Again it would go from 0Ω to 10kΩ?

jatalahd

Quote
Tweaking values I get these bands with
R15 (and its equals) = 800Ω
R10 (and its equals) = 400Ω
C5 = C6 = 100nF (Band one)
C5 = C6 = 10nF (Band two)

Any absurdity here? Resistors and capacitors with these values seem to be sold.

I would try to keep the low-valued resistors at minimum. How about:

R15 = R9 = R13 = R14 = R17 = R5 = R6 = 8.2k
R10 = R16 = 270
R8 = 4.7k
R12 = 2.7k
R11 = 220
Then add R56 = 3.9k (from between R5 and R6 to ground)
C5 = C6 = 10nF (Band one)
C5 = C6 = 1nF (Band two)

This is my proposal. With these values You'll get 6 dB from the filter and rest from the differential amp to make it to 20 dB total gain.

Quote
Can you explain how VR2 works? I did not understand that "adds to Rx or Ry depending to which end the pot is turned". Does not this potentiometer go from 0Ω to 10kΩ? How does it add to R12 or R11?
The center of VR2 goes to ground so and in my model Rx and Ry both go to ground as well. The part of resistance that is in the side of Rx from VR2 is obviously summed to Rx and the part of resistance in the side of Ry is summed to Ry. The extremes are (Rx [Ry + VR2] and Rx+Vr2 [Ry]) and (Ry [Rx+Vr2] and Ry + VR2 [Rx])

Quote
Square root() * R6 = 1, when resistors are equal, and not just Square root () = 1, right?
Right

Quote
Would it somehow be preferable to have Qmax = 10? I get this with R11 = 45Ω, but I do not see such resistors sold... With R11 = 50Ω (these are sold) I get Qmax = 9.15.
Check my proposals for component values above. That gives you Qmin = 0.7, and Qmax = 15.1, Of course the effect of R11 is so significant at low values, so maybe it is better not to demand too much Q.

Quote
Why is gain negative (-R9/R8)? Its positive value is converted to dB (20log(5100/1600) = 10dB).
Gain in decibels is always calculated from absolute value: 20*log10(abs(Av)), where Av is the gain. The sign in front just tells if the signal phase is inverted or not. In the filter, the signal goes in to the non-inverting input at IC2d and then in the inverting input at IC2c. It comes out inverted from output of IC2c --> minus sign.

Quote
If BYOC circuit has 10dB + 9dB = 19dB, why would they say 12dB?
Contact BYOC and ask them.

Quote
But where is VR1 in this Boost/cut equation? Again it would go from 0Ω to 10kΩ?
VR1 is a mixing (summing) resistor divider. It mixes the original signal with the inverted signal from the differential amp and send it to the filter. When in the middle position, it mixes the input signal with even amplitudes but with opposite signs, so there is no signal going to the filter, hence the boost/cut is totally flat at that point. The value of VR1 can be for example 100k and it does not affect the result in any way. It is just for mixing purposes.

  • SUPPORTER
I have failed to understand.

Guitar_Duderino

#25
Quote from: jatalahd on May 05, 2019, 05:41:35 AM
I would try to keep the low-valued resistors at minimum. How about:

R15 = R9 = R13 = R14 = R17 = R5 = R6 = 8.2k
R10 = R16 = 270
R8 = 4.7k
R12 = 2.7k
R11 = 220
Then add R56 = 3.9k (from between R5 and R6 to ground)
C5 = C6 = 10nF (Band one)
C5 = C6 = 1nF (Band two)

This is my proposal. With these values You'll get 6 dB from the filter and rest from the differential amp to make it to 20 dB total gain.

Grateful for your suggestion. Ah... So R8 and R12 may differ... I confirm results with these values, but get Gain of 4.8dB from linear 1.74, which I suppose rounded to 2 by you. Not much difference?

Quote
The center of VR2 goes to ground so and in my model Rx and Ry both go to ground as well. The part of resistance that is in the side of Rx from VR2 is obviously summed to Rx and the part of resistance in the side of Ry is summed to Ry. The extremes are (Rx [Ry + VR2] and Rx+Vr2 [Ry]) and (Ry [Rx+Vr2] and Ry + VR2 [Rx])

Excluding sqrt()*R9 equations are
Qmax = ( (1/R9) + (1/R8) + (1/R11) ) / ( (1/R13) + (1/R14) + (1/(R12+VR2)) )
Qmin = ( (1/R9) + (1/R8) + (1/(R11+VR2)) ) / ( (1/R13) + (1/R14) + (1/R12) )
Right?

Quote
Check my proposals for component values above. That gives you Qmin = 0.7, and Qmax = 15.1, Of course the effect of R11 is so significant at low values, so maybe it is better not to demand too much Q.

I confirm those values. How "so significant"? What implications does it have? How would it differ from 350Ω (Qmax = 9.9)?

Quote
VR1 is a mixing (summing) resistor divider. It mixes the original signal with the inverted signal from the differential amp and send it to the filter. When in the middle position, it mixes the input signal with even amplitudes but with opposite signs, so there is no signal going to the filter, hence the boost/cut is totally flat at that point. The value of VR1 can be for example 100k and it does not affect the result in any way. It is just for mixing purposes.

So that differential amplifier will have (with R56 = 3.9kΩ) boost/cut = +-14dB and 20*log10(R9/R8) through VR1 will be added either way?

jatalahd

Quote
Grateful for your suggestion. Ah... So R8 and R12 may differ... I confirm results with these values, but get Gain of 4.8dB from linear 1.74, which I suppose rounded to 2 by you. Not much difference?
Yes, I don't like decimals, so I round to the closest integer. With decimals I get a gain of 1.7447. Same as you.

Quote
Excluding sqrt()*R9 equations are
Qmax = ( (1/R9) + (1/R8) + (1/R11) ) / ( (1/R13) + (1/R14) + (1/(R12+VR2)) )
Qmin = ( (1/R9) + (1/R8) + (1/(R11+VR2)) ) / ( (1/R13) + (1/R14) + (1/R12) )
Right?
Right.

Quote
I confirm those values. How "so significant"? What implications does it have? How would it differ from 350Ω (Qmax = 9.9)?
By significant I mean that the Q seems to change rapidly only at small resistance values and it might be difficult to tune with 10k pot if you want for example Q=11 or Q=12 when Qmax = 15 at 220 and Q = 10 with 350 . Also When handling small resistances, then there might be some other "hidden small resistance" in the circuit, for example op-amp output impedance that sum up with the other small resistances, or the pot might not turn to 0, it might have some remainder resistance. It is sometimes hard to get exactly the value you want. This is why I don't like to use very small resistors in a circuit.

Quote
So that differential amplifier will have (with R56 = 3.9kΩ) boost/cut = +-14dB and 20*log10(R9/R8) through VR1 will be added either way?
Yes, you will get balanced boost and cut, the gain to both directions is the same.
  • SUPPORTER
I have failed to understand.

Guitar_Duderino

#27
Excellent. Moving on with these values. Are these resistors and capacitors apt? What should be my criterion for Watts, Voltage and tolerance?

8.2kΩ
https://uk.farnell.com/multicomp/mcf-0-25w-8k2/res-8k2-5-250mw-axial-carbon-film/dp/9339728

270Ω
https://uk.farnell.com/multicomp/mcf-0-25w-270r/res-270r-5-250mw-axial-carbon/dp/9339353?st=resistor%20270

4.7kΩ
https://uk.farnell.com/multicomp/mcf-0-5w-4k7/res-4k7-5-500mw-axial-carbon-film/dp/9338829?st=resistor%204.7

2.7κΩ
https://uk.farnell.com/multicomp/mf12-2k7/res-2k7-1-125mw-axial-metal-film/dp/9342940?st=resistor%202.7

220Ω
https://uk.farnell.com/multicomp/mcf-0-25w-220k/res-220k-5-250mw-axial-carbon/dp/9339329?st=resistor%20220

3.9kΩ
https://uk.farnell.com/multicomp/mf25-3k9/res-3k9-1-250mw-axial-metal-film/dp/9341854

10nF
https://uk.farnell.com/vishay/562r5gas10/cap-0-01-f-1-kv-20-z5u/dp/1612166

1nF
https://uk.farnell.com/multicomp/mc0805n102j500a2-54mm/ceramic-capacitor-1000pf-50v-c0g/dp/1694183?st=capacitor%201nf

For frequency I want to use guitar potentiometers separated from board. Are these apt? Should I use linear for smooth response?
https://mauser.pt/catalog/product_info.php?cPath=324_1001_845_2010&products_id=005-0058
https://mauser.pt/catalog/product_info.php?cPath=324_1001_845_2010&products_id=005-0055

For Q and Boost/Cut I want to use trimpotentiometers fixed on board. Are these apt? As more turns they allow, so more smoothness I get? Particularly with such high Q?
https://uk.farnell.com/bourns/3299w-1-103lf/pot-trimmer-10k-25-turn-3-pin/dp/9353704

Or would these of 1 turn be enough?
https://uk.farnell.com/bourns/3362p-1-103lf/pot-trimmer-10k-3-pin/dp/9354301?st=trimpot%2010k

ElectricDruid

For the resistors, 0.25W will be ok,  but I mostly use 0.5W or 0.6W just because there's not really much difference in price. Metal film for lower noise.

For voltage ratings - well, what supply have you got? Double it. Use the next voltage rating up from that. For most stuff, 50V is fine for caps, and for 9V-powered pedals 25V rated caps are fine too.

One thing to note about State-variable filters is that they won't achieve high resonance without good matching between the stages (or you'll need a lot more gain to compensate, anyway). So I wouldn't recommend the +/-20% ceramic caps. The +/-5% C0G caps are much better, but filter applications like this are one place where tighter tolerances *do* actually make a difference. I've even used 1% caps (rare, but there are some) for synthesiser filters, since the filter is such a key part of the sound for a synth.

Guitar_Duderino

#29
Excellent. Thank you, ElectricDruid.

I will use 9V battery. So they should have any Volts above 18. But for resistors should I want more Watts (0.5W or 0.6W better than 0.25W)?

Are these capacitors (1% tolerance) apt and good match with each other, as you said? These are ceramic...and I notice BYOC has film capacitors. Would film be apter here, than ceramic?

10nF (only this allows minimum order of one)
https://uk.farnell.com/kemet/c330c103f1g5ta/cap-0-01-f-100v-1-c0g-np0/dp/2819705?st=capacitor%2010nF

and from same series

1nF
https://uk.farnell.com/kemet/c322c102f5g5ta/cap-1000pf-50v-1-c0g-np0/dp/2819687?st=capacitor%201nF

And any opinion on those (trim)potentiometers?

bluebunny

Quote from: Guitar_Duderino on May 06, 2019, 10:54:39 AM
But for resistors should I want more Watts (0.5W or 0.6W better than 0.25W)?

Any resistor you can buy will cope with more watts than it will ever see in a pedal circuit.  Buy the lowest/cheapest.

And check out V=IR and P=IV:



You don't need to "know electronics" to do this pedal stuff, but a little goes a long way to help you understand.  :icon_cool:
  • SUPPORTER
Ohm's Law - much like Coles Law, but with less cabbage...

Guitar_Duderino

Not wanting LED, bypass, third band and last general gain, may these parts be cut?

And what does that first block including IC1a, R1-4 and C1?


ElectricDruid

Quote from: Guitar_Duderino on May 07, 2019, 05:26:12 PM
Not wanting LED, bypass, third band and last general gain, may these parts be cut?
Quote

Mostly. You'd want to keep some of those output components: R48, R49, C18 and the jack of course. Plus...

Quote
And what does that first block including IC1a, R1-4 and C1?

It's an input buffer to make sure that there's good separation between whatever you plug in and the rest of the circuit. You should keep it. You could increase the input impedance by making R1 and R3 something larger (1M or 2M2 instead).

Also, how do you intend to do the bypass switching? You've crossed out the 3PDT and the "no effect" path to the output.

Guitar_Duderino

This?



R45 and C17 kept? Or these were for that general gain? What do R48 R49 C18? Regulate output impedance?

Must R2 = R15, R4 = R10, C1 = C5, as they are in BYOC circuit?

Here I just want this circuit...jack intended on Input and Output.

antonis

#34
Quote from: Guitar_Duderino on May 07, 2019, 06:53:36 PM
R45 and C17 kept? Or these were for that general gain? What do R48 R49 C18? Regulate output impedance?
Must R2 = R15, R4 = R10, C1 = C5, as they are in BYOC circuit?
R45 mainly prevents IC3D overloading (restricts output current..)
C17/R48/C18/R49 form a 2 pole (2nd order) HPF
R49 sets max output impedance (any input impedance of whatever follows is set in parallel with R49, ignoring C17 & C18 capacitive reactance..)

IMHO, R2 could have any value of some kilo order or even omited (placed there for input bias current good design practice..)

C1 forms input HPF togheter with R3 (3.4Hz cut-off freq) and its value has nothing to do with C5's value (which forms integrator with R15 & VR3b//R10)

P.S.
If you want to deal with present circuit for educational purpose, go for it.. :icon_wink:
Otherwise, R.G.'s http://www.geofex.com/Article_Folders/EQs/paramet.htm is more simple build with more easily tweaking parts..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Guitar_Duderino

#35
This part on LTSpice



Produces this



Which by itself seems to attain my needs...without those parts at input (R1-R4, C1, IC1a) and output (R45-49, C17-18).

I even preferred to increase C4 from 0.1μF to 10μF, which almost keeps 0dB (-0.49dB) just before first band (with 0.1μF it decreased to -1.78dB just before first band).
But little difference C4 and C9 make... And truly without C2-4 and C7-9



Perfect symmetry is attained... What to do about these capacitors?

What do you, experts, opine? Will this work? What must it still have for stability and input/output impedance?

antonis

Can't follow the whole circuit idea but your input impedance is now(*) ridiculously  :icon_redface: LOW..!!
(unless, of course, you WANT it so low - in such a case you have to place an input cap..)

(*) roughly 2k3, according to my -by heart- calculations..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Guitar_Duderino

Certainly...input and output impedance need yet to be defined...hence my question... By what criterion must they be defined?

What does this circuit still need for stability?

And what say you, antonis (or anyone), about those C2 C3 C4 and C7 C8 C9? Needed?

antonis

"Stability"..??
(you don't want us to calculate Nyquist loop values, do you..??)

About C2, C3 & C4 (C7, C8 & C9):
We DON'T delete any cap in series with signal unless we know very well what are we doing..!!
(e.g. shorting C2 & C3 shouldn't mind AC but it should mind DC a lot..)
C4 in your simulation is 100 times greater than respective C3 on BYOC circuit - is that done under any specific purpose..??
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Guitar_Duderino


Stability:
Quote from: jatalahd on April 23, 2019, 02:15:44 PM
Note that this is only a simulated model, the real circuit might need some additional resistors here and there to keep the circuit stable.

Full BYOC simulation:



First very uneven band.

My adaptation with C2-4 (C4=0.1μF) and C7-8:



As I noted above:
QuoteI even preferred to increase C4 from 0.1μF to 10μF, which almost keeps 0dB (-0.49dB) just before first band (with 0.1μF it decreased to -1.78dB just before first band).

And, since these capacitors were not in previous diagram from jatalahd, I tried to remove them and got symmetry: