What do you think would work best?

Started by fryingpan, November 04, 2024, 11:09:06 AM

Previous topic - Next topic

fryingpan




Response as above. C5 or C7? (They both produce about the same response, of course only one of the two in the circuit).

idy

Am I confused? C7 allows more treble through on one leg of the signal path. C5 cuts some treble with negative feedback. No?

That is an interesting circuit. What I think I see is:
A booster transistor from which you take both inverted and non-inverted signal. The non-inverted is affected by the gain control on the emitter. Higher gain means almost no non-inverted signal.
This signal then goes through R8 and C7, making it brighter.It then goes to Q3, which buffers it.

The inverted signal gets inverted again, and this Q2 has that feed back cap to roll off some treble. It is then added (not really mixed?) to the other signal at the emitter of the buffer.

So at high gain you get a darker sound, and at low gain brighter?

fryingpan

#2
C7 basically provides 100% global feedback for frequencies above a certain threshold (about 20kHz, if I'm correct, independent of total gain). C5 instead provides local feedback on a single transistor.

You are correct in saying that C5 causes the circuit to have more treble roll-off at higher gain (as the impact of the "upper" pathway is stronger). Keep in mind that the roll-off is in any case beyond the audio range (actually 0.2dB down at 20kHz at maximum gain - I could put a smaller cap, but I have a 68p cap on hand, although it's a cheap ceramic cap, whereas 330p would be a poly cap - and I hate going to the local electronics shop because the guy there keeps "schooling" me wrong about stuff - for instance, I went to get a brass tip cleaner the other day and he just told me "use a dry cotton cloth, brass cleaners damage tips").

One of the two caps might more readily cause oscillation. I am guessing C7 is rather more problematic than C5.

By the way, I imagine that with a larger cap you could totally get what you're saying as an effect. The problem, at that point, is that the available gain on tap would be quite reduced though.

PRR

The output RC is hiding the true HF response. Measure at C4. Let the plot run well past 1MHz. And step that gain control from 2 to 30. You will tend to have "horns", gain-peaks at the limits of response.
  • SUPPORTER

m4268588

What happens when the corner frequency of high-freq rolloff by C5 or C7 falls below the corner frequency due to C3?

This amplifier circuit is equivalent to a non-inverting Op-Amp. Try adding an emitter follower to negative feedback to the Q1 emitter. What will appear?
https://postimg.cc/2LxWm5Pz

Rob Strand

#5
Deliberate filtering is best done with C7 as it's part of the feedback network (ie. predictable filtering).

Using C5 is inside the feedback loop.  For it to have an effect you must impact the forward gain (open lopp gain) to an extent that it has an effect on the close loop response.  For deliberate filtering where C5 is large you can also get slewing issues - perhaps the best case against it.

C5 is generally used for feedback stability.   C7 for filtering.   There are amplifiers where small C7 values are use for stability, but then you don't use it for general filtering - in this case general filtering would be done with an input or output filter.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

R.G.

Dead on correct, Rob.

Quote from: Rob Strand on November 04, 2024, 10:16:26 PMDeliberate filtering is best done with C7 as it's part of the feedback network (ie. predictable filtering).

Using C5 is inside the feedback loop.  For it to have an effect you must impact the forward gain (open lopp gain) to an extent that it has an effect on the close loop response.  For deliberate filtering where C5 is large you can also get slewing issues - perhaps the best case against it.

C5 is generally used for feedback stability.   C7 for filtering.   There are amplifiers where small C7 values are use for stability, but then you don't use it for general filtering - in this case general filtering would be done with an input or output filter.

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.

m4268588

If you want to reduce the high-freq response when the gain is increased, you can do it this way.
https://postimg.cc/SYpyd71s
However, C7 does not completely reproduce Gain-band-width.
Version 4
SHEET 1 800 600
WIRE 192 -352 144 -352
WIRE 208 -352 192 -352
WIRE 144 -336 144 -352
WIRE 368 -336 320 -336
WIRE 96 -320 32 -320
WIRE 320 -320 320 -336
WIRE 272 -304 256 -304
WIRE 368 -288 368 -336
WIRE 96 -272 80 -272
WIRE 272 -256 256 -256
WIRE 80 -224 80 -272
WIRE 112 -224 80 -224
WIRE 192 -224 192 -352
WIRE 192 -224 176 -224
WIRE 80 -192 80 -224
WIRE 96 -192 80 -192
WIRE 192 -192 192 -224
WIRE 192 -192 176 -192
WIRE 256 -192 256 -256
WIRE 272 -192 256 -192
WIRE 368 -192 368 -208
WIRE 368 -192 352 -192
WIRE 384 -192 368 -192
WIRE 80 -176 80 -192
WIRE 256 -176 256 -192
WIRE 368 -176 368 -192
WIRE 32 -96 32 -320
WIRE 80 -80 80 -96
WIRE 256 -80 256 -96
WIRE 32 0 32 -16
WIRE 80 0 80 -16
WIRE 80 0 32 0
WIRE 256 0 256 -16
WIRE 256 0 80 0
WIRE 368 0 368 -112
WIRE 368 0 256 0
WIRE 32 16 32 0
FLAG 32 16 0
FLAG 32 -320 Sig
FLAG 144 -256 0
FLAG 208 -352 Out_1
IOPIN 208 -352 Out
FLAG 256 -304 Sig
IOPIN 256 -304 In
FLAG 320 -240 0
FLAG 384 -192 Out_2
IOPIN 384 -192 Out
SYMBOL signal 32 -112 R0
WINDOW 123 2 120 Left 2
WINDOW 39 2 104 Left 2
SYMATTR SpiceLine Rser=0
SYMATTR InstName V1
SYMATTR Value ""
SYMBOL e 144 -352 R0
SYMATTR InstName E1
SYMATTR Value 100k
SYMBOL res 192 -208 R90
WINDOW 0 32 50 VRight 2
WINDOW 3 48 62 VLeft 2
SYMATTR InstName R1_8
SYMATTR Value 6k8
SYMBOL cap 176 -240 R90
WINDOW 0 8 38 VRight 2
WINDOW 3 8 26 VLeft 2
SYMATTR InstName C1_7
SYMATTR Value 33n
SYMBOL res 64 -192 R0
SYMATTR InstName R1_9
SYMATTR Value 240
SYMBOL cap 64 -80 R0
SYMATTR InstName C1_3
SYMATTR Value 470n
SYMBOL e 320 -336 R0
SYMATTR InstName E2
SYMATTR Value 100k
SYMBOL res 352 -304 R0
SYMATTR InstName R2
SYMATTR Value 1
SYMBOL cap 352 -176 R0
SYMATTR InstName C5
SYMATTR Value {C_GBW}
SYMBOL res 368 -208 R90
WINDOW 0 32 50 VRight 2
WINDOW 3 48 62 VLeft 2
SYMATTR InstName R2_8
SYMATTR Value 6k8
SYMBOL res 240 -192 R0
SYMATTR InstName R2_9
SYMATTR Value 240
SYMBOL cap 240 -80 R0
SYMATTR InstName C2_3
SYMATTR Value 470n
TEXT 0 56 Left 2 !.AC Oct 10 10Hz 100kHz
TEXT 376 -112 Left 2 !.Param GBW   = (6k8/240+1)/(2*pi*6k8*33n)\n+      C_GBW = 100k / (GBW*2*pi)

fryingpan

#8
Now, I don't know whether 68p would cause significant slew issues (I would have to scope it and see, I suppose). I have a 27p cap I could fit in there. And maybe move the 68p across R8 for more proper filtering (bandwidth would be limited to 110kHz or so - I don't have a 150p cap, the smallest I have is 330p). I want to keep C6 for better ultrasonic filtering, the 470 ohm resistor (actually 240) is probably overkill but the target load impedance is something around 47k (a passive DI) or at most (well, least) 10k (a line input). 10k:240 is over 50 to 1, it should make very little difference.

antonis

Quote from: fryingpan on November 05, 2024, 05:29:23 AMI don't know whether 68p would cause significant slew issues
You can estimate C5 dominant pole via Q5 Collector load and current..

Quote from: fryingpan on November 05, 2024, 05:29:23 AMI don't have a 150p cap, the smallest I have is 330p
Place 2 of them in parallel..

"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..

fryingpan

#10
Quote from: antonis on November 05, 2024, 06:04:25 AM
Quote from: fryingpan on November 05, 2024, 05:29:23 AMI don't know whether 68p would cause significant slew issues
You can estimate C5 dominant pole via Q5 Collector load and current..

How would I do that? LTSpice anyway tells me that 68p does not limit slew (step response shows slew to be about 5V/us with both 27p and 68p).
To show slew rates below 2V/us (gross overkill anyway) it requires close to 1nF...

Quote
Quote from: fryingpan on November 05, 2024, 05:29:23 AMI don't have a 150p cap, the smallest I have is 330p
Place 2 of them in parallel..



Not much space on the veroboard :D

fryingpan

LTSpice (I know, it's just a simulation...) shows gross ringing if I add both 27p and 68p in the respective positions. This ringing goes away if I add a series resistor (over 68 ohm) to 68p, parallel to R8. That is what I was afraid of (the capacitance in the feedback network causing instability).

antonis

What LTSpice says about 2N3906 C-B capacitance..?
"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..

fryingpan

If I read the model correctly:

.model 2N3906 PNP(IS=1E-14 VAF=100 BF=200 IKF=0.4 XTB=1.5 BR=4 CJC=4.5E-12 CJE=10E-12 RB=20 RC=0.1 RE=0.1 TR=250E-9 TF=350E-12 ITF=1 VTF=2 XTF=3 Vceo=40 Icrating=200m mfg=Philips)
then it's 4.5pF.

R.G.

I think you should approach this from a more orthodox feedback amplifier direction, as many of the posters here have mentioned. You might try this:

Remove c3, c5 and c7 from the sim. Split R8 from 6.8K to two 3.4k resistors in series, and insert a capacitor from the center of the two 3.4k resistors to ground. Make the capacitor be BIG, enough to get a sub-1-Hz or so roll off. This should effectively show you the open-loop gain of the Q1-Q2-Q3 AND your simulator will probably also give you the phase response as well.

The trick in getting nominally "best" response is to make the compensating cap in the c5 position be the smallest value that cuts the open loop gain to less than unity by the time the phase response causes the output to change by 180 degrees, AND the gain/phase changes are single-sloped. There are fancier multi-sloped compensation tricks, but the single-slope "dominant pole" method is what is used in nearly all opamps and discrete power amps.

Once you get the open loop response converted, remove the cap to ground between the two 3.4K feedback resistors. Is it stable in simulation?  If so, you can now replace the 6.8K feedback resistor and start messing with resistors and caps to get the treble response you want.
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.

fryingpan

#15
Quote from: R.G. on November 05, 2024, 10:29:20 AMI think you should approach this from a more orthodox feedback amplifier direction, as many of the posters here have mentioned. You might try this:

Remove c3, c5 and c7 from the sim. Split R8 from 6.8K to two 3.4k resistors in series, and insert a capacitor from the center of the two 3.4k resistors to ground. Make the capacitor be BIG, enough to get a sub-1-Hz or so roll off. This should effectively show you the open-loop gain of the Q1-Q2-Q3 AND your simulator will probably also give you the phase response as well.

The trick in getting nominally "best" response is to make the compensating cap in the c5 position be the smallest value that cuts the open loop gain to less than unity by the time the phase response causes the output to change by 180 degrees, AND the gain/phase changes are single-sloped. There are fancier multi-sloped compensation tricks, but the single-slope "dominant pole" method is what is used in nearly all opamps and discrete power amps.

Once you get the open loop response converted, remove the cap to ground between the two 3.4K feedback resistors. Is it stable in simulation?  If so, you can now replace the 6.8K feedback resistor and start messing with resistors and caps to get the treble response you want.
I actually did do an analysis with a 1000H inductor in series with the 6.8k resistor and it appears to be stable with both caps in as mentioned.

fryingpan

This is just with a 27p cap in and a 1000H inductor in the feedback loop, maximum gain (of course it's just really moving the zero).



Now minimum gain.



Although the "large inductor" (or "large capacitor to ground") model is not perfect, since phase margin is very comfortable, I think it should suffice.

fryingpan

By the way, if I remove all caps from the circuit, the circuit appears NOT to be stable.

Here it is done the way R.G. suggested (there is no big difference in HF between the two methods):



(If I disconnect C6 too, there is no difference).

fryingpan

#18
I had a free hour at work (I'm an English teacher by trade... as far as you can get from engineering, I presume...), and I employed Tian's method to evaluate stability since it is probably vastly more accurate here as the circuit depends on current, not voltage feedback. By the way I realised I should be grounding the input and injecting AC into the circuit, instead of injecting AC from the input, so my previous analyses were probably wrong...

This is the result:



Cursor 1 is 0dB, Cursor 2 is at the local phase minimum (over 0dB).

It would appear to be very stable, with or without the compensation cap (and without the feedback cap, I tested all the permutations). I presume LTSpice acting up in one of my previous simulations, showing gross oscillation in a step response, is some sort of "bug"/precision error since it only happens if I increase the gain (rev log pot below) over "0.27:1". So at *lower*, not higher feedback.

Rob Strand

#19
Quote from: fryingpan on November 05, 2024, 10:40:12 AMI actually did do an analysis with a 1000H inductor in series with the 6.8k resistor and it appears to be stable with both caps in as mentioned.
The Tian method is the only method which provides the exact result.   All the other methods are approximations.  If you break the loop at the right point you can get usable results in most (but not all cases) using the approximate methods.   If you look at your original thread from some months back I mentioned voltage and current injection.  These have less problems than the inductor method but are still approximations.  I think I posted Tian vs current injection in that old thread.   You can see how one is an approximation but still usable (in that case).

https://www.diystompboxes.com/smfforum/index.php?topic=132374.msg1289176#msg1289176

If you don't have inductance in the supply lead and/or capacitive loads those amplifiers tend to be stable.  If you have long leads with say 1uH inductance on the +ve rail things can change quickly.  Similarly for capacitive loads.  For a preamp on a PCB you can often ignore the capacitive load case but there can be cases where 10pF capacitive load has an effect on stability.

If you intend on using a feedback cap in the final design then you should do the stability analysis with the feedback cap present.  It does change things because the loop gain will *increase* at high frequencies with the cap present.   (If you use the feedback cap to help stability, like in a wideband amp then that's a whole different game and the choice of the feedback cap is to help improve the phase margin; essentially adding phase lead compensation.)
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.