# Built difference amplifier “tail” vs. SPICE models

I am working on a difference amplifier example lab 5L.1 from Art Of Electronics Hands on Lab Course (I am not a student). I simulated three types of "tail" circuits using SPICE. Then I built the three types of "tail" circuits using MMPQ3904 array for the Q1 and Q2 pair and discretes 2N3904 for the mirror and sink circuits. I see basically the same clean output in physical circuits for ALL 3 scenarios (no common mode noise on the output). However, in SPICE, as I assume is more correct, I see the "long tail" circuit with common mode signal on top of the output. The sink and mirror are clean in SPICE. I thought the physical implementation of the "long tail" would show at least some noise as well. Is that a correct assumption?

• Reading your writing, it appears that you are confusing the idea of noise with the idea of common mode rejection and interpreting your LTspice results on the basis of that confusion. Worse, you haven't even prepared a proper circuit for illustrating common mode rejection (or noise analysis.) So that's also a problem. So (1) you need to prepare better schematics for analysis; and (2) you need some help understanding the long tailed pair, better; and (3) you probably need some thoughts about what you are actually building and testing, too. Can you pick just one thing you'd like explained first? – jonk Aug 1 at 20:19
• Sorry all, for using wrong terms. I meant the output vo2 distortion due to CM input given by V5 source. CM signal is V5 = 1KHz, 1V. with 10 mSec delay; diff. signal is V6 = 100Hz, 0.2V created with center -tapped transformer in the built ckt. In SPICE v02 looks clean for 10mSec before V5 was added. After 10mSec there is 1KHz riding on the top of the amplified 100Hz output. Is that correct? I was expecting to see the same in my built circuit, since the "long tail" CMMR is worse then that of the sink and mirror. – vgeng Aug 1 at 22:21
• Please, let me know what is the correct setup to show CMMR? What i have i got from the AoE book. – vgeng Aug 1 at 22:25
• Does the AofE use 27 Ohm resistors at both bases in the lab course? Also, are you aware of the problems related to the Early Effect exacerbated by tying one collector directly to the positive rail? Also, you will have significant CM variation of your output voltage because of $R_3$'s current sink variation directly due to the CM changes. And you will have consequent variation of the voltage gain, as well. – jonk Aug 1 at 22:30
• The AofE example uses emitter degeneration resistors so that you get a predictable gain despite the fact that your two BJTs are discrete and likely have some differences in behavior. I'd want to drop about twice the voltage across the emitter resistors, though, so I'd double their values to 180 or 220. I'd also add a collector resistor of equal value where you have none. In building one discretely. Then, I think you'd get similar results from something you build to what LTspice provides in simulation. Much closer, at least. – jonk Aug 1 at 22:38

# Starting Point

Here's the basic idea, with some added parasitics worth a moment's thought:

simulate this circuit – Schematic created using CircuitLab

Above, I added the other collector resistor. The reason I did is because of $$\r_{o_{_1}}\$$ (Early Effect parasitic.) Without the added voltage drop across $$\R_{C_{_1}}\$$ there's a larger voltage drop across $$\r_{o_{_1}}\$$ and this leads to an unexpected increase in $$\Q_1\$$'s collector current that isn't matched in $$\Q_2\$$ under the same circumstances. I'm not saying you cannot operate the circuit well (reasonably so) without $$\R_{C_{_1}}\$$. It will work fine without it. It's just that if you are nitpicking tiny details, the differences will get in your way and confound your analysis. It's better if you simply remove that effect at the outset so that you won't waste time digging through some mysterious rabbit data-hole.

I've also added parasitics $$\r_{e_{_1}}\$$ and $$\r_{e_{_2}}\$$. These are actually pretty important for the purposes of quantifying the expected voltage gain (and to a smaller degree for your purposes, understanding temperature stability.) I'll talk more about this voltage gain issue, shortly.

Finally, I added the relatively unimportant (mostly) base bulk impedances $$\r_{b\,'_{_1}}\$$ and $$\r_{b\,'_{_2}}\$$. So long as the base current isn't too significant (and it won't be so long as you keep the voltage difference between A and B below a few tens of millivolts) the drop across these won't amount to much. But you may need to be aware of them, at times. So I added them. The values for small signal BJTs will be about the value I show -- perhaps to twice that much.

(I didn't add the bulk Ohmic collector and emitter resistances. Even in small signal BJTs they are usually under a few tenths of an Ohm.)

# Response of VOUT to CM Changes

Let's assume away all the parasitics and just focus on the most important detail. This is the fact that if you lift both A and B by the same voltage (we are assuming an ideal voltage source directly applied to both bases) then the voltage across $$\R_{E_{_3}}\$$ increases by exactly the same amount (okay, slightly less for a variety of reasons, but one of them being that an increased collector current implies a larger voltage difference between the base and emitter of a BJT.) This means that the shared sink current increases and, assuming it divides equally to each BJT, causes of change of half that current variation in $$\R_{C_{_2}}\$$. That's most certainly going to cause the voltage at B to decline. So, right away, we know there's a problem using a resistor as a current sink.

How much? Well, assuming $$\V_A=V_B\$$, then $$\\Delta I_{R_{E_{_3}}}=\frac{\Delta V_\text{CM}}{R_3}\$$ and therefore $$\\Delta I_{R_{C_{_2}}}=\frac12 \frac{\Delta V_\text{CM}}{R_3}\$$ so then $$\\Delta V_{\text{OUT}_\text{CM}}=-\frac12 \Delta V_\text{CM}\cdot \frac{R_{C_{_2}}}{R_{E_{_3}}}\$$. With both resistors the same, as in your circuit, this works out to half of the common mode change. So if you change it by one volt, I'd expect a change at the output of half a volt in the opposite direction of the common mode change.

Now this would not be such a problem if you replaced $$\R_{E_{_3}}\$$ with something that acted a lot more like a current sink.

This doesn't mean you cannot use a resistor. It only means that if you do use a resistor, you need to be able to calculate some kind of estimate about the effect of common mode changes upon your output so that when you analyze the output you do see, with respect to changes you make in the common mode voltage, you at least will better understand the observations.

# Residuals -- A Diversion

There's an important point to bring up here that has nothing to do with circuits but everything to do with understanding quantitative measurements. This is the concept of residuals.

When you make quantitative observations ("measurements") of some process variable (voltage, current, temperature, mass, your happiness at the moment on a scale of 1 to 10, or whatever), there will be theoretical considerations, which together with the specifics of some circumstance, can be applied in a rigorous way to develop mathematical formulae that you can use to generate numbers -- quantities -- that we imagine "predict" those observations.

The difference between the predicted values and the observed values are one of the following sources:

1. Known applicable theories that were neglected when developing the mathematical formulae
2. Unknown applicable theories that need to be further investigated to improve current theories
3. Random events (anything where we don't hope to develop newer theories to explain)
4. Unknown and unknowable quantum entanglements

In our large scale statistically-emergent-phenomena world, we never really worry about #4. And #3 is chalked up as "noise" that comes in a few different but common flavors (until/unless someone comes up with a predictive theory at which point it's not noise anymore.)

So as you peel back the layers, one at a time, you increasingly know more about various effects, which operate at varying levels of importance and/or in differing circumstances. And you can improve upon the quantitative predictions given any particular circumstance. So things will match up better.

What remains, after all known appropriate-to-circumstances theories have been comprehensively applied, is called the residuals. There may be new theories to be found in that unexplained residual data. Or the residuals may pass a series of statistical tests to determine if that data fits one or more of the types of random Poisson events that can integrate into more commonly understood things such as the ever-famous Gaussian distribution.

You should consider your physical experiments in this way. Start with some basic and very simplified theory about how things work. Take measurements and compare them with your earlier, more prosaic ideas and look at the residuals. Then, if you know some more theory worth applying, apply it and see what residuals remain. Repeat until your own knowledge is exhausted. Then write something here, as you did, to see if anyone can add additional ideas that help further explain your residuals.

# Voltage Gain -- A Diversion

Assuming $$\R_{E_{_1}}=R_{E_{_2}}\$$ and that your signal's voltage amplitude is small (say, $$\\le 1\:\text{mV}_\text{PP}\$$) and the signal source impedance is negligibly low:

1. You should expect to see a voltage gain at the output that is $$\A_v=\frac12 \frac{R_{C_{_2}}}{R_{E_{_2}}}=50\$$
2. #1 will be wrong because it neglected $$\r_{e_{_2}}\$$, so we now compute $$\r_{e_{_2}}=\frac{V_T}{I_{E_{_2}}}\approx 37\:\Omega\$$ and then re-estimate $$\A_v=\frac12 \frac{R_{C_{_2}}}{R_{E_{_2}}+r_{e_{_2}}}\approx 36\$$
3. #2 will be wrong because it neglected the varying gain and current in $$\R_{E_{_3}}\$$ which varies with signal, neglected the ohmic resistance in the emitter, and so on

But now, at least we have a sense of the expected voltage gain. It will probably slightly less than predicted in #2. But not so far from it that we should be bothered. Yet there will be unexplained residuals and we can pursue those as deeply as we wish, as there ARE plenty of existing (unexplored here) theorIES remaining to be applied, if you've a mind for it.

But now that you can do something about computing a gain and now that you have something with which to estimate the effect of a common mode voltage upon your output, as well, you should be able to do something about theoretically predicting an output given your combined input signal.

# Summary

Now, the problem with experimentation is exactly how you choose to generate the input signal to A and B. I have signal generators here on the shelf. But they have $$\50\:\Omega\$$ outputs (well, that's one choice they offer -- the others are worse for these purposes.) I also have bench power supplies with very low output impedances, capable of many amps. But are you using a bench supply that's capable of automatically moving sinusoidally? Or are you just using another signal generator for that common mode voltage purpose? Your own LTspice schematic suggests two signal generators to me.

When you do things "physically" on your workbench, are using two signal generators? If so, are their ground floating? (I doubt it.) My signal generators have one side of their $$\50\:\Omega\$$ output tied directly to the Earth-ground pin of the mains plug. If I were using two of them, one side of both signals would be tied together simply because they are both plugged into mains outlets when operating. So if you are using two similar signal generators, then you probably will NOT have floating outputs. And that's important to know, if so. You can't just go connecting stuff up without knowing, in detail, all of the implications of those connections you are making.

So now you need to explain, in detail, how you are wiring up your physical testing. I very much doubt it is anything like what you did with your LTspice schematic, even in principle. This is why I was complaining in comments about your schematic.

So I'll leave things here, for now. You need to be very detailed about what tools you have on hand and how you are arranging them in your physical setup. With sufficient details about those tools, it's possible to recommend a reasoned hookup to perform some tests as well as some idea about what you should expect to observe. (Or else, simply explain the differences you say that you see between the physical implementation and the LTspice simulation.) For now, I must beg off until more information arrives from you. But at least, you have an idea about possible difficulties between what's in your head, what's in LTspice that you write up, and what's on your workbench when you are stuffing parts together to see what happens.

• Thank you very much for presenting analytical, practical and philosophical view on the analysis and implementation approach. I was blown away by your approach. I will sketch my setup and let you know. I do, by the way, use two grounded 50 ohm function generators and use a center taped transformer to create differential signal. I'd like to apply what you described and will report the setup and results later. – vgeng Aug 2 at 4:47
• I have HP 8116A and Wavetek 271 generators with 50ohm outputs. I switched to using center-tapped xformer like in AoE. At 1st i wanted to see the signals w/o the amplifier. Please, see the diagram in the original question (can i add pictures to comments?). Does it look ready to be connected to the amplifier circuit? – vgeng Aug 2 at 18:30
• @vgeng Place two separate 10k resistors, each connected on one end to ground, with the other ends to TP1 and TP3 (unconnected to long tailed pair) and see if you still see the same signal amplitudes at those test points. That's about the loading the transistors will present. Separately, under no circumstances do you want your differential signal to exceed about 10 mV peak, or 20 mV peak to peak. As you increase towards 100 mV peak you are moving the BJTs towards saturation and that's a problem. Is your transformer "heavy iron" so it handles that low frequency well? – jonk Aug 2 at 18:39
• Finally! Just like in SPICE (sorry i had to peek at it) ,in the built circuit I see the bad signal with "long tail" and nice clean one with mirror and sink circuits. As you recommended i reduced diff. signal amplitude to 10mV (input to xformer 100mV). I got the gain of 36.3, so very close to predicted 36. Is the reason the diff gain must be <= 10mV, because we want Vc >= Ve + 0.2V? I have to review that. I cannot gather from the xformer spec if it is heavy iron, but i could see good signal at 1 KHZ w/o attenuation. Thanks for your help. – vgeng Aug 3 at 0:48
• @vgeng Good to hear!!! The reason for the small signal is that as a general rule if there is too much difference between the BJT bases then one of them will saturate. However, this is more true when you are NOT using an emitter degeneration resistor and your gain is a lot higher (as it will be with bipolar opamps.) Your case has emitter degeneration so you can feel free to increase the signal a bit. Your observed gain will decline somewhat and, just before saturation/clipping, it will be maybe 30 or even less. But without those emitter resistors the saturation problem is serious. – jonk Aug 3 at 1:59

I thought the physical implementation of the "long tail" would show at least some noise as well. Is that a correct assumption?

There will always be noise on any analogue output because noise is always everywhere (above absolute zero) but, the CM gain is significantly less than 1 so why would you expect to see noise if you don't have much noise on the inputs?

You can do a noise simulation run in LTspice to show you the spectral density of the simulated noise.

Transient analysis does not include internal noise (flicker, shot and thermal noise) of the components.