what does this circuit do?

Started by EATyourGuitar, July 11, 2016, 09:46:51 AM

Previous topic - Next topic

EATyourGuitar

on the output of a boss blues driver BD2. is this some EQ? frequency dependant non-linear waveshaping?

WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

strungout

Don't know what the diodes do but the part of the circuit connected to the feedback loop, starting with C21 looks like a gyrator, which would boost some frequencies. There's a lot of em in the Zoom TM-01 and Boss Metalzone.
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

EATyourGuitar

I think the diodes are just clipping diodes actually. those pins on the opamp measure the difference in voltage. we know with the diodes the difference between input pins will never exceed +/-Vf
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

Bill Mountain

The AMZ gyrator calculator tells me it's a 107.09 Hz boost.

The size and shape is unknown but I could sim it later.

The q is 17.7 which may be quite narrow (that part always confuses me).

Seems like a nice way to add some bass back in after distortion stages.  Possible some sort of de-emphasis.

EATyourGuitar

WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

PBE6

Do the diodes do anything at all here? The opamp will do its best to keep the + and - inputs equal by changing its output, which means ideally there would be no voltage across the diodes and no current flowing through them.


Sent from my iPhone using Tapatalk

strungout

Just noticed your profile picture, pretty awesome! That a zombie getting shotgunned?  ;D
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Transmogrifox

That final gyrator stage is just a low-end recovery stage.  I don't know whether the designer intended it to model part of a speaker cabinet response or if they just wanted to recover some of the lows, but it definitely makes the pedal feel less "empty" than a typical diode clipper stompbox.

My best guess about the purpose of the diodes is to aid in graceful recovery from clipping.  When the op amp clips it loses its ability to control the '-' input and then there will be a differential there.  If that differential gets too large before the opamp regains control then there will be nasty blats as it pulls against C17 and the gyrator to get back into control.    The headroom is certainly there -- that final discrete op amp stage can go almost rail-to rail and it seems there wouldn't be a great deal of loss in the tone control so that op amp could see up to 8V peak-peak input. 

Quote from: Bill Mountain on July 11, 2016, 10:16:37 AM
The q is 17.7 which may be quite narrow (that part always confuses me).

When a BJT is used in a gyrator the Q is not as high as you might calculate based on the simplified approach where the amplifier is considered ideal.

I haven't taken the time to work out a formula for what the Q might be in a BJT version, but it is strongly affected by the output impedance of the amplifier element being used. 

This lower gain effect of the BJT will have an effect on both Q and resonant frequency so the best way to find out is to simulate it.

I made this same mistake when making DSP (software) models of the BOSS MT-2 and DOD Death Metal Distortion circuits.  The EQ controls in my software version were way over-the-top.  Then I stuck the circuits into sim and realized the Q and the frequencies were not where I expected them to be because the gyrator uses the BJT element instead of an op amp.
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.

PBE6

Quote from: Transmogrifox on July 11, 2016, 12:12:14 PM
My best guess about the purpose of the diodes is to aid in graceful recovery from clipping.  When the op amp clips it loses its ability to control the '-' input and then there will be a differential there.  If that differential gets too large before the opamp regains control then there will be nasty blats as it pulls against C17 and the gyrator to get back into control.   

I should have guessed, if the ideal case doesn't require it then it's something non-ideal!

Thought experiment - would a smallish (470 ohm-1k) resistor accomplish the same thing?


Sent from my iPhone using Tapatalk

Transmogrifox

Quote from: PBE6 on July 11, 2016, 02:06:46 PM
Thought experiment - would a smallish (470 ohm-1k) resistor accomplish the same thing?

I vote a "yea" on this one  :icon_biggrin:

It would behave differently than the diodes so one would need to experiment using the ears to see whether one way or another is "better".  The resistor is better in a fiber optic receiver circuit in terms of keeping pulse width distortion from going out of spec with strong input signal levels but this doesn't say much about what it sounds like in an audio application.

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.

EATyourGuitar

do I understand correctly you are saying that it is possible to have a peak of 8v across R17? if that is true then is it also possible that the diode makes the opamp do voltage to current? I think maybe now I am starting to see the gyrator. the NPN is one half of the gyrator and the opamp is the other half?
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

PRR

Gyrator is R19 C22 R18 and the unity-gain buffer Q10 and R20.

This makes a choke.

C21 with this choke makes a resonant circuit.

IC1A is a plain non-inverting amplifier.

There is NO voltage across its input pins as long as the opamp is working good (not clipping). Such diodes are sometimes seen to protect against hostile inputs (loudspeaker lines plugged to guitar inputs). They can also cut-short extended overloads, but as we can't see (here) what is feeding this snippet, we can't say?

Gain is set by R17 and R18 over most of the band, modified by a bell-curve where tuned circuit does its thing.
  • SUPPORTER

Transmogrifox

Quote from: EATyourGuitar on July 11, 2016, 10:49:27 PM
do I understand correctly you are saying that it is possible to have a peak of 8v across R17?
About +/-3.75V across R17 as a rough estimation with a strong battery.  The op amp tries to hold the inverting input equal to the inverting input, but once the output goes within about 1V of either ground or Vcc. With a gain of 6-ish (depending upon frequency), the noninverting input stays reasonably close to 4.5V while a strong battery can let the rail be 9.6V.  This makes for something as much as 7.5V peak-peak swing on the output (8V maybe a little bit exaggerated).

Once the output goes to the rail, then the op amp no longer has control and the inverting input will then be stuck wherever it is and the noninverting input would normally not follow along with the inverting input.  To recover from this large differential input voltage often is ugly so you can make the noninverting input track reasonably close to the inverting input by letting the inverting input brute-force it through a diode.  Then when the op amp swings back into linear operation it doesn't have quite so much of a voltage error to pull back into line.

Paul -- here is a link to the full schematic so you can see what's driving this.  As you can see the preceding stage can drive it almost rail-to-rail - and that input driving level could be more than 8V peak-peak with a high gain setting and loud master output volume setting.
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.

EATyourGuitar

when I use TL072 as a comparator with open loop gain, they never get stuck. or maybe they do? I designed a lot of modular synth stuff like this and it seems to be working. I made a guitar pedal with an opamp and no resistors. I think I had a voltage divider for the comparator (V+/2).

WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

amz-fx

AMZ gyrator calculator:  http://www.muzique.com/lab/gyrator.htm

Also, datasheet for the TL072 says that it has latchup-free operation. The M5218A opamp used in the BD-2 does not have this feature, therefore, the diodes were included. Diodes D8 and D9 in the original poster's schematic are probably not needed with the TL072.

regards, Jack


Bill Mountain

Now I've got a hankering to stick everything from C10 on after a DOD250 as a bass overdrive.

Man I need to stop coming here.  I have enough projects as is!!!

Transmogrifox

Quote from: amz-fx on July 12, 2016, 08:09:02 AM
AMZ gyrator calculator:  http://www.muzique.com/lab/gyrator.htm

Gyrator calculator gives Q of almost 20, simulation gives Q of 3.7 (which is a number that makes more sense in this application).  Resonant (center) frequency agrees with the calculator.

Simulation provides with Q of 10 if using an op amp instead of BJT, and a third sim using a behavioral voltage source confirms the assumption of an ideal op amp is a good assumption (Q still about 10). 

Be warned the AMZ gyrator calculator does not include the effect of the lower gain of the transistor vs op amp.  That said you won't be making a very high Q filter with a BJT.

Furthermore the AMZ gyrator calculator uses some simplifying assumptions that result in significant error in this particular case (when C1 and C2 are not orders of magnitude different).

Here is the scoop on the AMZ calculator:
The Q is computed assuming a series RLC network neglecting the effect of R1. Here is the more complete model presented by Rod Elliot:


This model agrees with gyrator resonant filter simulations.  My guess is the AMZ calculator makes the more common gyrator assumption which calculates Q ignoring Cc and Rp (Jack confirm), which reduces to a series RLC resonant tank:
Q = w0*L/Rw =19.79, which agrees with AMZ calculator (Rw is R2 in AMZ diagram).

Alternatively a parallel tank using Rp and neglecting Rs gives you
Q = w0*Rp*C = 19.79 (Rp is R1 in AMZ diagram)(it's only coincidental that these are identical -- it's because C1 and C2 are identical)

Now that series capacitor "Cc" is inconvenient to getting a straightforward calculation but if 1/(2*pi*Rp*Cc) << f0 (RC cut-off much less than resonant frequency) we can fudge it away by replacing it with a wire.  Then you can convert a parallel RLC tank into a series RLC tank by solving for what series resistor results in the same Q in a series RLC network as a parallel resistor does in a parallel RLC network.  The relationship algebraically is:
Rs = equivalent  series resistor
Rp = parallel resistor (R1 in this case)

Rs = L/(Rp*C) = 31.6H/(470k*56n) = 1.2k (again this value is coincidental because C1=C2)

Now we have 2 series resistors of 1.2k.  One is directly in the gyrator model, and the other one is converted to a series equivalent from the parallel 470k.  The composite Q of the network can be calculated as follows:
Q = w0*L/(Rs1+Rs2) = 2*pi*119.67*31.6H/(1.2k+1.2k) = 9.9

This value agrees more closely with simulation.  If you make C1 more than 10 times C2 then the AMZ approximation is a decent estimate of the actual circuit Q.

Now back-check:  This is an identical network to a Sallen-Key high-pass filter.  Q and resonant frequency will be the same as these calculations.  In this case all that has been done is to use the Sallen-Key input impedance to contour the voltage output of the op amp:
http://sim.okawa-denshi.jp/en/OPseikiHikeisan.htm

Drum roll for this filter's Q.....
QuoteCut-off frequency
fc = 119.67200095721[Hz]
Quality factor
Q = 9.8952850725316

These numbers agree perfectly with simulation.

So we have identified a case where using the common gyrator approximation that neglects the large-valued parallel resistor results in a significant error.

Take-home is this:
1)  With BJT transistor the Q is much lower than the simplified calculation will tell you.
2)  The simplified calculation is accurate for an op amp IF C1 >> C2 (C1 is a much much larger value than C2 for those not familiar with the mathematical notation ">>").
3)  Even better is to realize that this network is identical to a high-pass implementation of a Sallen-Key filter and the equations (and online calculators) for the high-pass Sallen-Key provide accurate results for all combinations of R's and C's.

And...this might serve as a request that Jack updates the AMZ calculator with the Sallen-Key equations so the results don't depend on certain relationships to agree reasonably with reality.  For the op-amp this is straightforward but more work is needed to account for degradation in Q due to the use of a BJT as an op amp substitute.
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.

Bill Mountain

Quote from: Transmogrifox on July 12, 2016, 03:35:03 PM

Now back-check:  This is an identical network to a Sallen-Key high-pass filter.  Q and resonant frequency will be the same as these calculations.  In this case all that has been done is to use the Sallen-Key input impedance to contour the voltage output of the op amp

Holy shit dude...Mind blown!