## When to bother matching...

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, Joe., luketeaford, lisa

jakobprogsch
Common Wiggler
Posts: 103
Joined: Tue Jul 31, 2018 7:48 pm
Location: Switzerland

### When to bother matching...

I'm currently trying to design my way through the usual synth building blocks using only discrete components as an exercise. And also maybe to do some "basic components only" DIY kits at some point.

Reading up on the various building blocks of bjt circuits (long tailed pair, current mirror, exponential converter) I always end up in places that discuss the principles and then throw up their hands going "but why even bother with discrete, the matching is too hard!" without actually discussing what these apparently horrible consequences of unmatched transistors are.

Now since I'm doing DIYish stuff I'm probably ok with more trimming and component picking than one would be in an industrial setting. The question is, what should I match and or trim for?

For most of the above mentioned we mainly care about Vbe matching which is maybe a bit of a misnomer anyway since Vbe isn't an inherent property of the transistor. Assuming the Ebers Moll model, my understanding is that by "matching Vbe" we are actually matching Ies which acts as a scale factor on the exponential relationship between Vbe and Ie.

So how does a Ies mismatch affect the aforementioned building blocks? From what I found so far:
• Current mirror: instead of Ia = Ib we get Ia = C*Ib where the constant C is a function of the mismatch. So as long as I don't care for the mirroring to be exact but merely proportional that may be ok.

Long tailed pair: The mismatch causes an input offset, which at high amplification (without feedback) may cause a significant output offset. If we are using feedback of some form such as when building a discrete opamp only the input offset is really an issue though.

Exponential converter: Instead of Iout = Iin*exp(Vbe/Vt) we get Iout = C*Iin*exp(Vbe/Vt) where C= Ies1/Ies2 so again just a scaler in front of the exponential law
Particularly the last one has me somewhat surprised given how apparently everyone just knows how crucially important matching the expo converter transistors is etc. But who cares for that scale factor? We can take care of that with the exact same offset trimmers we use for tuning anyway? Am I missing something here? Maybe if the transistors are wildly mismatched you might run out of trimmer range. For a scale mismatch of factor two you'd need about 18mV of Vbe mismatch which even very "casual" matching with a diode test function on a multimeter should easily provide.
Last edited by jakobprogsch on Sun Nov 24, 2019 9:16 am, edited 1 time in total.

KSS
Super Deluxe Wiggler
Posts: 4101
Joined: Mon Jan 25, 2016 7:28 am
How timely. Just covered this in the last day or two in the TTSH V4 build thread. Have a look. Rather than repeat the Till.com pertinent links and extensive explanation here.

jakobprogsch
Common Wiggler
Posts: 103
Joined: Tue Jul 31, 2018 7:48 pm
Location: Switzerland
I scanned that thread. But most of the discussion there seems focused on the (related) temperature aspects?

guest
Super Deluxe Wiggler
Posts: 4857
Joined: Mon Aug 19, 2013 11:49 am
there are other secondary effects, as the ebers moll equation is an approximation, but the Ies effects are so large, that you wont be bothered by them. Ies has such a large temperature dependence, that the "C" in your equations will not be constant at all. just the random thermal fluctuations of 0.1C will make very noticable effects. this makes matching doublely difficult, because the devices are not on the same die, and therefore not at the same temperature.

in the long tailed pair you get distortion with mismatched transistors, as the gain is not the same in both transistors.
openmusiclabs.com

cygmu
Super Deluxe Wiggler
Posts: 1593
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK
This is something I wondered about a bit too. guest's point about distortion in long-tailed pairs is an interesting one which I hadn't thought of. I'll have to do some calculations to see what goes on there.

The thing that is definitely interesting to me is to what extent the scale factor that crops up -- the ratio of the Ies currents -- is constant, or varies with temperature.

http://www.muffwiggler.com/forum/viewto ... 7f5d3f772b

http://web.mit.edu/klund/www/papers/UNP_device.pdf
which discusses models for BJTs which would imply very little temperature effect on the ratio of the Ies currents.

If that is actually true then the scale factor is indeed constant and we can relax The point then would be that, for expo converters at least, using two transistors and having them at the same temperature is way more important than matching them. But I am not sure.

jakobprogsch
Common Wiggler
Posts: 103
Joined: Tue Jul 31, 2018 7:48 pm
Location: Switzerland
guest wrote: in the long tailed pair you get distortion with mismatched transistors, as the gain is not the same in both transistors.
Yep they suck . That is one of the main reasons why I'm looking into this now. So far I just blindly used unmatched (but from the same reel/pack) transistors for my prototypes and nothing bad has happened until I tried to build some dc coupled circuitry that included a long tail pair as a variable gain element. My issue was not with distortion (just call it character and it's a feature) but the nasty output offset behavior which I ended up resolving with coupling capacitors. Otherwise the combination of variable offset and high gain elements would frequently cause some internal signal to clip out of existence.

The really nasty part is that while the behavior of current mirrors and expo converters seems to be mostly Is/Vbe dependent the long tailed pair also significantly depends on the very volatile beta. This is extra annoying when using the pair for VCA purposes with variable emitter currents. The Vbe mismatch would be less of an issue since it can be easily trimmed out by applying a small offset to one of the bases but the input offset caused by beta varies with gain... So my conclusion so far is that in that case I should match for hfe/beta and trim for Vbe (or just not rely on dc coupling).

http://web.mit.edu/klund/www/papers/UNP_device.pdf
which discusses models for BJTs which would imply very little temperature effect on the ratio of the Ies currents.
Seems like it. That would suggest something like:
Is1(T1)/Is2(T2) = C*exp(1.2V*q/k*(1/T2-1/T1))

So it wouldn't introduce an absolute temperature dependence (constant for T1=T2). It would also mean though that the Is temperature dependence utterly dominates as compared to "Ebers Moll" part. The law is essentially the same, except that deltaV between the transitors in an expo converter will only be a few mV while here it is 1.2V. Which is funny since most of the derivations of the first order temperature compensation completely ignore this but just happen to be right by accident since the same arguments apply?

KSS
Super Deluxe Wiggler
Posts: 4101
Joined: Mon Jan 25, 2016 7:28 am
jakobprogsch wrote:I scanned that thread. But most of the discussion there seems focused on the (related) temperature aspects?
Yes, simply scanning that thread will not get you far. However, following this advice
the Till.com pertinent links and extensive explanation
will provide decidedly better results. But you'll need to actually read the patents, not simply scan the thread.

And you are correct in that thread being about thermal effects while you're not necessarily asking about it. However, the circuits and equations in the patents apply to both thermal and what you're asking.

cygmu
Super Deluxe Wiggler
Posts: 1593
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK
jakobprogsch wrote: Seems like it. That would suggest something like:
Is1(T1)/Is2(T2) = C*exp(1.2V*q/k*(1/T2-1/T1))
I think that is right, and if correct, it makes the case very strongly that the most important thing is to keep the transistors at the same temperature. If they are at the same temperature then the above reduces to a constant, regardless of what that same temperature is -- which is what we are shooting for of course.

However, any temperature difference between the transistors changes this value quite a bit. I've tried plugging some numbers in to this expression, and if I didn't mess it up, a one degree difference between T2 and T1 will make about a 14% difference to the I_S ratio.

There is a whole lot of "I don't know what I am talking about" in this but if the models / assumptions are at all reliable then I think these are the consequences.

guest
Super Deluxe Wiggler
Posts: 4857
Joined: Mon Aug 19, 2013 11:49 am
yeah, my test results (linked above in one of the muffs threads), seem to point to this as well. i had such a hard time keeping 2 transistors in different packages at the same temperature, that i couldnt get usable results. the currents would fluctuate all over the place. there arent a whole lot of transistor arrays on a single die anymore (at least for low cost). the best you can do is get a dual in the smalles package available. this is pretty cheap, and you might not have to buy the matched variant (although these are only pennies more, so why not?). OTAs arent that expensive either. the V13700 is 0,30\$@100, which is around the same cost of building a discrete diffamp. a TI 13700 is only 0.75@100. although it sounds like cost isnt the constraint here, and its more of a learning/curiousity thing, which is good,
openmusiclabs.com

jakobprogsch
Common Wiggler
Posts: 103
Joined: Tue Jul 31, 2018 7:48 pm
Location: Switzerland
guest wrote:yeah, my test results (linked above in one of the muffs threads), seem to point to this as well. i had such a hard time keeping 2 transistors in different packages at the same temperature, that i couldnt get usable results. the currents would fluctuate all over the place.
This makes me wonder if using larger transistors would be an alternative to the less available transistor arrays? a TO-92 has about 80 K/W thermal resistance to case and 200 K/W to ambient. So mounting two to each other you end up with about the same junction to junction thermal resistance as junction to ambient. By instead using say a BD139 you get 10 K/W to case or lets say 25 K/W (+5 for a thermal pad for isolation) junction to junction but 100 K/W to ambient. Further they are easily mounted to a heat sink. Not for cooling purposes but just to provide a large thermal mass/reservoir. Also as a bonus these larger geometry transistors presumably have lower Rbulk etc?

I guess I know what experiment I'm going to conduct on the week end.

guest
Super Deluxe Wiggler
Posts: 4857
Joined: Mon Aug 19, 2013 11:49 am
cool, please report back. the aluminum heat sinks on the large transistors should help keep them pretty close in temperature, but they will be further apart than they are in SOT packages. there is a just a fraction of a millimeter in those tiny things. it might help to insulate the large transistors as well, this will keep the temperature more consistent on the inside.
openmusiclabs.com