Long tailed NPN pair as a VCA analysis  - Page 1
Forum section: electronics / projects

author: Yansi
author_rank: Super Contributor
timestamp: December 27, 2020, 08:19:54 pm
content: Hello,got some more interesting stuff to work on, which includes a voltage controlled amplifier (VCA). The design goal sounds simple enough (variable gain from 0 to 1, 20 Vpp signal capable), but the execution not so much. Before I will dive into using OTA (CA3080/LM13700 or similar) to do the job, I wanted to try it the "old fashioned way" using a bias current modulated long tailed pair.What I thought of trying, is to take an NPN differential pair, shove a voltage controlled current sink under it and be done. However, there is a lot more to it:Firstly, the input voltage to the differential pair must be very small, only a few multiples of VT, about 100 mVpp absolute maximum, otherwise distortion gets serious.So I thought I dive a bit into the math involved. Simple common emitter amplifier (considering small signal analysis) should have the output collector voltage equal toVc= Rc* gm* Vbe= Rc* Ic/VT* Vbe.Differential output voltage of a differential pair should be about the same:Vc1-c2= Rc* gm* Vin,diff= Rc* Ic/VT* Vin,diffThen I thought I will outsmart the non-linearity (requirement for only small input voltage) by using emitter degeneration. I have tried to find the correct equations, but all seems to come to about this, after some simplifications:Av~ Rc/ ReI have designed the emitter degeneration to lower the overall gain and tested the circuit. Sure it got very linear, but seems with the linearization, it kind-of lost its variable gain properties - at least from some amount of bias current gain no longer rises. That got me thinking, that I probably do miss a lot of how the VCA really should work.Aalso the voltage range the linearization adds depends on the tail bias (and of course the size of the REresistance). The less tail bias, the less voltage. In the end, it seems, one has to do without the emitter degeneration, otherwise the stage does not work properly.The main question then is, how to design this circuit? What full scale current to use and why? Should it be few mA or few hundred uA? How does the more exact math look like, which describes the gain depending on the tail bias?A few of the basic equations I got from here:https://wiki.analog.com/university/courses/electronics/text/chapter-12The article seems to be however incomplete and some formatting issues are preventing easy understanding of the matter. Could you please recommend any VCA specific design/analysis literature?The more I look into it, the more it seems that a VCA based on just a long tailed pair is difficult to design for predictable results - especially the full scale gain, which seems to depend both on the transconductance, but also internal emitter resistance re, which itself has the bias current as a parameter. So I am not really sure how or where to attack this one.I know, that I should use an OTA (and I know I will end up with one in the end), but I am trying to learn some moreThanks for any hints.Y.//EDIT: Math section reduced, to not show how badly I understand it. I need to study more of it.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 27, 2020, 09:10:04 pm
content: Yup, gain is Rc/Re -- but don't forget Re = external emitter resistance + intrinsic (r_e), and this is what varies with current (r_e = Vth / Ic).So you can't use emitter degeneration, that would swamp r_e -- and the variation in it, which is why it reduces distortion (in effect). Well, distortion is just variation in gain, and that's actually what we want this time.Current is set by bandwidth or noise factor.Bandwidth depends on collector load capacitance and resistance, and desired (maximum) gain or full-scale signal level.Noise depends on current, source impedance and so on.Typically the base voltage swing needs to be very small, 10 maybe 20mV; which affords barely an octave in Ic, so expect to use both collector outputs -- perhaps subtracting them with a current mirror, or using individual load resistors and sensing the differential voltage between them.All your basic OTA is, is a diff pair, plus enough current mirrors to set tail current, and bounce the collector currents around to the gain node, giving rail-to-rail-ish swing.Predistortion diodes can be used to extend the linear voltage range (and therefore SNR), by maybe 3x. These are provided in the LM13700, and some of the older (obsolete) types. See the datasheet for usage. Obviously, the diodes need the same matching (mfg and temp) the diff pair does (and the active devices in the current mirrors, if you use them).I did a discrete two-quadrant balanced multiplier on my Theremin, which unfortunately I don't have documented anywhere. The original had a single-ended output:https://www.seventransistorlabs.com/Theremin/Images/Theremin.pngI later added symmetrical loading (for both collectors), and a voltage diff amp I think, to the pitch mixer -- this both removes DC offset (which varies with the volume CV, obviously!) and increases signal level, which due to oversights in various places, wasn't great to begin with.(The project is probably relevant is several ways. It remains almost completely discrete -- mostly BJTs, with a few FETs and tubes. There's a TL431 that might be argued about, in the upgraded power supply -- a switching regulator, needed for the higher 6V load (includes two tube heaters) and 100V supply for varactor bias (shunt regulated down to 30V) and plate voltage. The major exception is the reverb effect box, using an MCU, SRAM and LCD display, among other things.)Tim

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 27, 2020, 09:24:41 pm
content: Oh, this is actually not just relevant, but illustrative -- one add-on module implements a pitch-zero function. It's a PLL circuit with this at the heart:Note the "Tune" button puts bias current into a mirror, into a diff pair. This is used as an error amplifier, so when released, the decaying gain should act to slow down the loop response, hopefully lessening any disturbance as it loses control. (The setpoint remains in place, referenced to the trimmer voltage -- that, plus the 0.01 cap which is what's storing state, and the MOSFET follows that voltage, adding very little leakage. So it has a sample-and-hold behavior. Obviously, the BJTs or capacitor dominate leakage, and they behave pretty well considering.)Anyway, the diff pair collectors are loaded with a current mirror, thus subtracting the two currents. This just goes into a PNP volt amp, which is CCS loaded. For a VCA, you need a resistor here (i.e., the 100k), probably a resistor divider so there's a default (Thevenin) voltage, within reach of the multiplier, and the difference in collector currents tugs up or down on it. You could also use the summing node of an op-amp, in which case you have a transresistance output. Don't really need the stable summing-node voltage that you get from one, but it's a handy way to use a proper op-amp if you like.Tim

author: Yansi
author_rank: Super Contributor
timestamp: December 27, 2020, 10:29:15 pm
content: Quote from: T3sl4co1l on December 27, 2020, 09:10:04 pmThat was exactly what was my "aha" moment, when I have tried the circuit to see how the theory matches real world.The intrinsic reis equal to 1 / gm= VT/ Ic, if I remember correctly. That means the gain is not linearly proportional to the current.Is the full gain formula hence like this?Av = gm*Rc/ (1 + re+ gm*RE) = gm*Rc/ (1 + 1/gm+ gm*RE)Thinking about it, that does not prevent one from using the emitter degeneration - the external REjust limits the maximum gain to a better defined value, rather then relying just on rethat is directly proportional to the absolute thermodynamic temperature. This rabbithole leads to the VTcompensation attempt in my other thread, huh.So I can still use the REto define the maximum gain, that will be reached when re<< RE. That is what I have observed and noted that gain did not increase much after reaching a specific value. That makes much more sense now.Quote from: T3sl4co1l on December 27, 2020, 09:24:41 pmThat is however a very neat thing to do! Never seen a schematic utilizing this.That is almost exactly like making a simple OTA.The only annoying thing about that is, that most of the times signals need to be referenced to GND both as inputs and output (non-inverting node of the opamp at GND level), meaning one of the difamp NPNs will work with just Uce = Ube.//EDIT: See sch below as to what I mean about Uce equal Ube at the right side NPN.

author: TimFox
author_rank: Super Contributor
timestamp: December 27, 2020, 10:37:36 pm
content: My favorite reference on the performance of long-tailed pairs, including small- and large-signal behavior of bipolar circuits, is "Communication Circuits: Analysis and Design" by K K Clarke and D T Hess, Addison-Wesley 1971, re-printed by Krieger 1994. See pp 114-119.

author: Yansi
author_rank: Super Contributor
timestamp: December 27, 2020, 11:05:20 pm
content: Thanks for the tip on a book, found it somewhere in the googlewebz.Will have a read, hopefully it won't be too crazy with math.//EDIT: Awww! Very crazy math!

author: TimFox
author_rank: Super Contributor
timestamp: December 27, 2020, 11:17:02 pm
content: Bessel functions are your friends...

author: David Hess
author_rank: Super Contributor
timestamp: December 28, 2020, 04:22:46 am
content: Some differential pair based VCA designs used multiple differential pairs in parallel but offset to extend the linear input range.Another way and more along the lines of what you were attempting is to use two differential pairs with cross-connected outputs to invert the output of a degenerated differential pair so that the control voltage adjusts the ratio of currents. For a long time this configuration was commonly used for the "variable" function in analog oscilloscopes which allows the full bandwidth signal to be adjusted in gain. Tektronix called this a "paraphase" amplifier.The same configuration is used to make an analog channel switch with two outputs and the invert function which is just a gain of 1 or -1.https://w140.com/tekwiki/wiki/155-0273-00

author: moffy
author_rank: Super Contributor
timestamp: December 28, 2020, 10:13:50 am
content: Built this a while back and managed to get about 0.01% max distortion using the venerable MC1496. The circuit does its best with some opamps to minimise the transistor distortion, but didn't reach the 0.001% I was looking for. The MC1496 is a transistor based doubly balanced modulator.

author: jonpaul
author_rank: Super Contributor
timestamp: December 28, 2020, 12:14:11 pm
content: All this was done in 1950s..1970s.See work of Burwin, Dolby, Gilbert, THAT, etc.Craig TODD made the NE570 compander iC at Signetics.Why reinvent the wheel?Jon

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 28, 2020, 12:29:53 pm
content: Quote from: Yansi on December 27, 2020, 10:29:15 pmThis is... trying too hard, I think? Something's fishy because resistance is summed with a constant (1 + r_e + etc.). You should only ever use one of either r_e or g_m, since they're the same thing in different equivalent representations, and using both is either redundant, or will cause you to count it twice.The hybrid-pi model might be illustrative; again, you still need to be mindful of which equivalents you're using, to calculate r_pi and A_v (or whatever) correctly.QuoteRight, and the input range is very small too (but, with the other base grounded, that's fine, CM range is N/A).Good idea is to cascode the left diff transistor, so it sees about a Vbe. Easily enough done by stacking two diodes with a bias current (pull-up resistor?), then hang the cascode off that.Same goes for the current mirror, which has Vbe on the left side but +V - Vbe on the right. A Wilson current mirror addresses this.(The current mirror can have emitter balancing resistors, since the transistors and resistors are supposed to be symmetrical.)Tim

author: Yansi
author_rank: Super Contributor
timestamp: December 28, 2020, 03:16:31 pm
content: Quote from: T3sl4co1l on December 28, 2020, 12:29:53 pmHave I screwed up something in the equation?Quote from: T3sl4co1l on December 28, 2020, 12:29:53 pmOne should ask the obvious question then: Does it matter and why?I can only think of the Early effect - in this case the Vce is about constant, so shouldn't matter much. The second thing that comes to mind is heat. The transistor with significantly more Vce will have higher temperature. With for example about 200 K/W Rth junction-ambient for a TO92 packaged transistor, those 15 mW (15 V * 1 mA) will rise the junction by 3 K. Not by much, but that does not make things better, that is for sure.Is there anything significant, I forgot?Are there any negatives of running a transistor at Vce = Vbe levels?Quote from: moffy on December 28, 2020, 10:13:50 amHow come I forgot the lovely Gilbert cell MC1496? 0.01% already sounds quite good. I'll try to analyze how it works and report back. It seems it is the exact same circuit, as the Tektronix Paraphase amp, isn't it?//EDIT: Typos

author: Yansi
author_rank: Super Contributor
timestamp: December 28, 2020, 04:38:35 pm
content: Quote from: moffy on December 28, 2020, 10:13:50 amLooked more complicated, than it really was.The bias current is set fixed, the diff pair uses a degeneration of 2RE= 1 kohm and are forced into precision voltage follower mode by U1A, U1B. They get biased to about -5.2 V at the emitters. Input signal divided about 5 times.Control voltage is just divided down 10 times, transistor bias at about -1.5 V.Outputs are the classic trans-resistance with opamp.Just to get a sense of scale, what was the designed full scale input voltage and what was the range of the control voltage input?BTW, How have you analyzed the distortion?

author: mag_therm
author_rank: Frequent Contributor
timestamp: December 28, 2020, 05:34:05 pm
content: Quote from: jonpaul on December 28, 2020, 12:14:11 pmI remember in early 1970's there was talk of Lincompex becoming standard on AM broadcast and military HF radio.The compression channel was just at the LF end of b/w as I recall.Even some transmitters and receivers were available.What became of it?On HF, I expect it was overtaken by ssb.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 28, 2020, 05:45:45 pm
content: Quote from: Yansi on December 28, 2020, 03:16:31 pmYeah, the tempco and thermal time constant cause time- and history-dependent distortion.The dual-matched-die transistors often specify their performance as current mirrors, giving bounds on accuracy and stability. It doesn't take much temp rise to give a substantial error, so they recommend cascoding above a pretty modest point. (Of course, dual SOT-363s have even lower RthJJ (i.e. thermal coupling) than TO-92s, so it's somewhat exaggerated, but no less important either way.)Low Vce gives lower bandwidth, but again that's not much of a problem away from RF.Tim

author: Yansi
author_rank: Super Contributor
timestamp: December 28, 2020, 09:49:31 pm
content: Don't need much past 20kHz and I guess that will be a non-issue even at such low Vce (do I understand the limitation right, that the low Vce or Vcb respectively causes the miller capacitance Ccb to increase to almost the max value?)A loosely related question: Is there any equivalent OTA to the LM13700, but just a single OTA in a package? The only one I know of, is the CA3080, but it is long obsolete and not manufactured any more.

author: Yansi
author_rank: Super Contributor
timestamp: December 29, 2020, 12:12:07 am
content: To conclude the story a bit: Any way one tries to improve upon the simple two transistor tail current modulated differential pair VCA, one ends up either with a Gilbert cell multiplier, or by using current mirrors to subtract the collector current one ends up with an OTA. Doh! But, at least now (I think) I know why.Wouldn't like to derail the thread with OTAs, but I've been looking into a LM13700 datasheet and noticed the programming current IABCis recommended 1 mA maximum. Next to it I see a note LM13700 can do 6 decades of transconductance variation.Considering the output current is linearly proportional to IABC, is it really expected to work with 1 mA / 106large currents? I mean.. small.. very freakin small!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 29, 2020, 01:37:13 am
content: Quote from: Yansi on December 28, 2020, 09:49:31 pmSure, take a LM13700 and cut off half the pins.When it comes to old analog parts, be thankful they're still around at all, I suppose.Can always use the extra half as a regular op-amp or whatever!Quote from: Yansi on December 29, 2020, 12:12:07 amEven my discrete example shows leakage of nA, or possibly less. Albeit merely at room temperature.Devices are rarely specified to such low currents, mainly because it takes precious time to test them; but they often perform this well in practice. Likewise for MOSFETs and CMOS.Tim