Trimless VCA w/LM324A and discrete transistors
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Trimless VCA w/LM324A and discrete transistors
I've written up a blog post on my research for a VCA made out of lower cost parts like the LM324A and 2N5088 discrete transistors that does not require trim pots. I didn't even match transistors or thermally couple them. The VCA certainly works, its performance is fairly good, has some nice properties. I don't have annotations for the scope fotos yet, but some are more obvious than others. I'll get to that soon, expand on the post other ways, perhaps.
https://modeliiiems.blogspot.com/2023/0 ... a.html?m=1
https://modeliiiems.blogspot.com/2023/0 ... a.html?m=1
Onto a DIY novel implementation of an electronic music synthesizer.
Re: Trimless VCA w/LM324A and discrete transistors
very nice! thank you for sharing. a couple of questions:
0. i swear i see a trimmer in there!
1. why 0.1% base resistors on the diffpair? arent they small enough that base current errors will be pretty negligible? and wouldnt having a 90k on one side and not the other give a 1% error already?
2. personally, i really like doing the tail current the way you have it setup - it gives a softer "on", and a bit more control at the very low end. but, it does have Vbe drift. any thoughts on that tradeoff here?
3. why the 3.3k pulldown on the CV amp? isnt that one always sourcing current?
0. i swear i see a trimmer in there!
1. why 0.1% base resistors on the diffpair? arent they small enough that base current errors will be pretty negligible? and wouldnt having a 90k on one side and not the other give a 1% error already?
2. personally, i really like doing the tail current the way you have it setup - it gives a softer "on", and a bit more control at the very low end. but, it does have Vbe drift. any thoughts on that tradeoff here?
3. why the 3.3k pulldown on the CV amp? isnt that one always sourcing current?
openmusiclabs.com
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
0. Sorry about the elision there; the actual test circuit was later adjusted to use 1MΩ 1% + 510Ω 5%. There are notes in text to that effect, but it's non--obvious. But I didn't want to erase the fact that I tested initially with a trimmer, in effort to decide what fixed resistance provided the necessary offset. The two-resistor value was derived from measurement. And the 510Ω actually made a difference. I'm used to this kind of phenomena with my LM3900 circuit designs.guest wrote: ↑Thu May 25, 2023 3:55 pm very nice! thank you for sharing. a couple of questions:
0. i swear i see a trimmer in there!
1. why 0.1% base resistors on the diffpair? arent they small enough that base current errors will be pretty negligible? and wouldnt having a 90k on one side and not the other give a 1% error already?
2. personally, i really like doing the tail current the way you have it setup - it gives a softer "on", and a bit more control at the very low end. but, it does have Vbe drift. any thoughts on that tradeoff here?
3. why the 3.3k pulldown on the CV amp? isnt that one always sourcing current?
1. When I did the original Trimless VCA, which had expensive 250µV Vos op amps, and a super-matched MAT-04 transistor array, the balance to the output mV level was not achieved unless the voltage developed across the base resistor was equal. And this took using a 0.1% resistor to both sides. So, I retained that muscle memory. The 0.1% resistor at least makes balance not worse than the best ΔVbe for these unmatched transistors.
2. Vbe drift is common mode which the subsequent differential amplifier addresses as ΔVbe. This circuit topology has proven to be fairly robust thermally. In truth, I don't have a test chamber to test with ... but bench testing several times across different California weather seasons 2021, 2022, 2023, the circuit design appears to use differential effects most favorably so that thermals appear neglible.
3. The pulldown for all op amp outputs is because the LM324/A data sheet from 1972 is wrong. Without constantly having a load to GND/Vee, even under DC load conditions, my bench testing reveals that the LM324/A will always exhibit crossover distortion without a pulldown. There's some choice on the value, and it could be a higher resistance; but I find 3.3kΩ a good compromise value.
Onto a DIY novel implementation of an electronic music synthesizer.
Re: Trimless VCA w/LM324A and discrete transistors
0. i was just teasing on this one!
1. i found a similar thing when working with otas, except i was looking at bleedthrough. this required well balanced impedances. but, the base sees both the 90k and the 604ohm, making the input side actually 596ohm, whereas the other side is 604ohm, or 1% error. im a little suprised to hear that the MAT04 and 1% resistors had issues though, particularly in a trimless setup. the MAT04 has a beta of 400, so even if you have 1mA in the collector, thats still only 2.5uA in the base, which times a 1% difference in resistance (6ohms) is only 15uV. thats an order of magnitude less than the offset voltage of the untrimmed MAT04.
3. good to know!
1. i found a similar thing when working with otas, except i was looking at bleedthrough. this required well balanced impedances. but, the base sees both the 90k and the 604ohm, making the input side actually 596ohm, whereas the other side is 604ohm, or 1% error. im a little suprised to hear that the MAT04 and 1% resistors had issues though, particularly in a trimless setup. the MAT04 has a beta of 400, so even if you have 1mA in the collector, thats still only 2.5uA in the base, which times a 1% difference in resistance (6ohms) is only 15uV. thats an order of magnitude less than the offset voltage of the untrimmed MAT04.
3. good to know!
openmusiclabs.com
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
0.guest wrote: ↑Fri May 26, 2023 2:25 am 0. i was just teasing on this one!
1. i found a similar thing when working with otas, except i was looking at bleedthrough. this required well balanced impedances. but, the base sees both the 90k and the 604ohm, making the input side actually 596ohm, whereas the other side is 604ohm, or 1% error. im a little suprised to hear that the MAT04 and 1% resistors had issues though, particularly in a trimless setup. the MAT04 has a beta of 400, so even if you have 1mA in the collector, thats still only 2.5uA in the base, which times a 1% difference in resistance (6ohms) is only 15uV. thats an order of magnitude less than the offset voltage of the untrimmed MAT04.
3. good to know!
1. I think your analysis is correct, but that offset is less important than one in another form. The issue on the first trimless VCA was that for single ended input, I originally had the undriven base tied to ground. And I kept having an output offset I could not locate. Until I realized that without the other side of the differential pair having a similar "load" the extremely well-matched MAT-04's would in effect have an offset input. I used 0.1% to ensure I was preserving the balance of the transistors -- and that worked. Using the same strategem with this new unmatched transistors case still more preserves DC balance.
3. I'd like to characterize the LM324/A more. It really is capable of low distortion for a commodity op amp. I was quite impressed with the very mild harmonic evolution in this VCA design as seen wideband with a 12-bit FFT, and particularly that it was primarily second order. Not exactly tube sound, but with character, much like the Moog System 55 mixer.
Onto a DIY novel implementation of an electronic music synthesizer.
Re: Trimless VCA w/LM324A and discrete transistors
3. this would be very interesting, especially considering that the lm324 is the least expensive opamp out there. i wonder if a current source on the output would be any better or worse than just a resistor.
openmusiclabs.com
- devinw1
- Super Deluxe Wiggler
- Posts: 3452
- Joined: Tue Aug 07, 2018 11:20 am
- Location: Portland, OR
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Isn't the relatively high input bias current of the LM324 (nanoamp range) an issue with dc offset since you don't want to trim? Wouldnt a FET front end op amp be better in that regard?
Re: Trimless VCA w/LM324A and discrete transistors
for the output stage, the offset currents will be a small percentage of the offset voltage due to the small resistors used. its worst case offset current is 30nA (at 25C, the datasheet is unclear about higher temps), but this times 10k is just 300uV, so not so bad. the offset voltage is multiplied by 1+Ro/Ri, or 11 in this case, so the typical value of 2mV becomes 22mV. but, for higher impedances it is a problem, or non-matchd impedances so you have to use the bias current, not the offset current. there is also a tradeoff with the diffamp topology being driven by a current source - the output votlage is I*Ro, but offset is Vo*(1+Ro/Ri), so you want to make Ri as large as possible, without violating common mode input constraints. also, if the opamp has any common mode modulation of gain or offset voltage, etc, then a smaller Ri is better. the dual input stage rail to rail opamps are pretty bad for this, and are best used with the least amount of common mode modulation as possible.
openmusiclabs.com
- devinw1
- Super Deluxe Wiggler
- Posts: 3452
- Joined: Tue Aug 07, 2018 11:20 am
- Location: Portland, OR
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Ah yes, OK that makes sense. Those numbers are not too bad at all.
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Yes or course a FET op amp would offer lower input bias current. But that was not the purpose of this effort: how much good VCA performance can be obtained with the LM324A?
In any case, input offset current probably matters more, as the voltages generated by input bias currents appear as common mode. Further, at the impedance levels used in this design the imputed voltage offset from current offset is smaller than the worst case voltage offset.
The output offset voltage for no VCA output in this design was very consistently 7mV. I attribute about one third of this to the op amp offset voltage, a very tiny bit to offset current, and the rest (most of it) due to untrimmed Vbe mismatch.
0V output offset would be ideal. But < 10mV is quite adequate and usable for a VCA.
Onto a DIY novel implementation of an electronic music synthesizer.
Re: Trimless VCA w/LM324A and discrete transistors
i often wonder how things like the LM324 are made these days. there is no way they are still cranking them out with the same masks and process as they used in the 70s when it was invented. did they go through and update the datasheet? is the typical offset voltage just way better than its actually listed as?
openmusiclabs.com
Re: Trimless VCA w/LM324A and discrete transistors
interestingly enough, there is a "new" LM324B:
https://www.ti.com/lit/ds/symlink/lm324 ... 252FLM324B
it has pretty much the same specs, same output compliance, but much lower offset voltage, offset current, and probably lower noise, but the original datasheet doesnt list noise. its offset voltage is 600uV typical, which would give an offset of 6.6mV for this application. either they updated the datasheet or the process; id give even odds.
[EDIT] BA variety is 300uV offset, although doesnt seem for sale yet. the B variant is cheaper than the regular ones as well (0.04$@1k!).
https://www.ti.com/lit/ds/symlink/lm324 ... 252FLM324B
it has pretty much the same specs, same output compliance, but much lower offset voltage, offset current, and probably lower noise, but the original datasheet doesnt list noise. its offset voltage is 600uV typical, which would give an offset of 6.6mV for this application. either they updated the datasheet or the process; id give even odds.
[EDIT] BA variety is 300uV offset, although doesnt seem for sale yet. the B variant is cheaper than the regular ones as well (0.04$@1k!).
openmusiclabs.com
- devinw1
- Super Deluxe Wiggler
- Posts: 3452
- Joined: Tue Aug 07, 2018 11:20 am
- Location: Portland, OR
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
I would bet a lot of the time they are able to easily control processes to make the same basic part now vs. when they were designed that they just go through and update like the case of this "B" versions. It's almost like getting a "new" part number that's improved for "free" if the Gaussian spread on a bunch of parameters is just narrower due to having manufacturing processes more dialed in as a matter of course as we've developed parts that have much more stringent requirements.
I'm not sure if that applies to existing stuff that they may still be making. I wouldn't be so quick, though, to say that there's no way that in some factory there is still some very old equipment still being used. It could be indeed. When I worked in silicon stuff in around 2006, we were working on a 12" wafer inspection machine but at that time there was still tons of 8" and 6" stuff still out running in the field.
https://www.startribune.com/why-compute ... 510984342/
I'm not sure if that applies to existing stuff that they may still be making. I wouldn't be so quick, though, to say that there's no way that in some factory there is still some very old equipment still being used. It could be indeed. When I worked in silicon stuff in around 2006, we were working on a 12" wafer inspection machine but at that time there was still tons of 8" and 6" stuff still out running in the field.
https://www.startribune.com/why-compute ... 510984342/
- devinw1
- Super Deluxe Wiggler
- Posts: 3452
- Joined: Tue Aug 07, 2018 11:20 am
- Location: Portland, OR
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Cool, gotcha. And great work with nice documentation as usual, uniqview! I always appreciate your posts!uniqview wrote: ↑Fri May 26, 2023 4:02 pmYes or course a FET op amp would offer lower input bias current. But that was not the purpose of this effort: how much good VCA performance can be obtained with the LM324A?
In any case, input offset current probably matters more, as the voltages generated by input bias currents appear as common mode. Further, at the impedance levels used in this design the imputed voltage offset from current offset is smaller than the worst case voltage offset.
The output offset voltage for no VCA output in this design was very consistently 7mV. I attribute about one third of this to the op amp offset voltage, a very tiny bit to offset current, and the rest (most of it) due to untrimmed Vbe mismatch.
0V output offset would be ideal. But < 10mV is quite adequate and usable for a VCA.

- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Yeah, I lusted after the new B parts, but they are SMT only, which I will not use for SDIY.devinw1 wrote: ↑Fri May 26, 2023 4:45 pm I would bet a lot of the time they are able to easily control processes to make the same basic part now vs. when they were designed that they just go through and update like the case of this "B" versions. It's almost like getting a "new" part number that's improved for "free" if the Gaussian spread on a bunch of parameters is just narrower due to having manufacturing processes more dialed in as a matter of course as we've developed parts that have much more stringent requirements.
I'm not sure if that applies to existing stuff that they may still be making. I wouldn't be so quick, though, to say that there's no way that in some factory there is still some very old equipment still being used. It could be indeed. When I worked in silicon stuff in around 2006, we were working on a 12" wafer inspection machine but at that time there was still tons of 8" and 6" stuff still out running in the field.
https://www.startribune.com/why-compute ... 510984342/
I have to agree they're not building packaged parts at the volumes they do strictly from die bank. New wafers, new parts. And there are certainly still 200mm fabs out there for devices with larger feature sizes. But I could believe one or two process shrinks may have been done since 1972, merely for yield enhancement. This would explain tighter distributions on datasheet parameters. A reason to leave the datasheet untouched is that guardbands on the tester head don't have to check for the tighter distributions. Pass rate goes way up with better yield, way fewer outliers. So, a good reason to use a 50 year old op amp design aside from it being inexpensive is that it's really made with late-modern tech.
Onto a DIY novel implementation of an electronic music synthesizer.
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Thank you devinw1 for the kind words, really makes my day. I feel massively behind in building my modular, but the BJT yet remains a most seductive Muse.
Onto a DIY novel implementation of an electronic music synthesizer.
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Thank you guest for your analytical insight in all our conversations. I know there is digital, but I often feel there is a deeper analog possible: that a major form of electronic music is the sound of the transistor.
Onto a DIY novel implementation of an electronic music synthesizer.
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
I forgot to mention that another one of the "stars" for these designs is the 2N5088 NPN transistor. And it's complement, the 2N5087 PNP transistor..These devices have worked so well repeatedly. Very high beta across a wide range of Ic, reasonably good NF. Apparently, pretty closely matched Vbe with random selection. I'm so used to this facet, I don't even think about it.
Onto a DIY novel implementation of an electronic music synthesizer.
Re: Trimless VCA w/LM324A and discrete transistors
that transistor has a crazy low Vce,sat as well. i was just looking at the datasheet, and its quite impressive all around, and well specified. the 2N5089 looks to be slightly lower noise.
openmusiclabs.com
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Yes, a virtually perfect device! I do have some of the 2N5089 in the collection too, which I obtained around 2004, as they were the lower noise binning. Another amazing low-noise device is the 2N5961. But 20+ years later, I found them both harder to obtain. To compensate with more-available parts, I looked up the amazing research at Dick's Website in the Netherlands. And there I found some extremely low-noise Zetex devices (now p/o Diodes Inc., and generally available at Digi-Key). Based on that, I added the ZTX853 (NPN) and a complementry ZTX951 (PNP) to the parts store.
http://dicks-website.eu/low_noise_amp_part6/part6.html
I think someday I'll build my own discrete mixer console out of these kind of devices.
Aside from sharing, another part of the reason I blog about electronic music circuit design is so I can find my own notes and documentation

Here's a view of the discrete transistors and diodes I've looked at for a variety of roles:
https://modeliiiems.blogspot.com/2017/1 ... lists.html
I had already learned that with discrete transistors I could build op amps with higher performance than many integrated circuits. But there just aren't enough weekend days to build modular synthesizer systems at that level of functional density, with all the work required. All that said, amazing high-performance transistors still do lend themselves to novel transcendental computation circuits that would otherwise require IC design.
One example is guest's emulation of the AD639, with his SineCore:
https://synthcube.com/cart/open-music-l ... s-sinecore
I will never tire of the BJT.
Onto a DIY novel implementation of an electronic music synthesizer.
Re: Trimless VCA w/LM324A and discrete transistors
Shhhh! There'll be a run on them if this^ gets out there..
Too late!
See #6 in this should be required reading for all SDIY link:
http://www.geofex.com/effxfaq/keenslaws.htm
Treat utility modules as stars instead of backup singers.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
Re: Trimless VCA w/LM324A and discrete transistors
i hear you on this one!
by the way, thanks for sharing the transistor website. i hadnt heard of it before, and its interesting reading. in particular i like this bit:
Once I read on the internet, that you can ruin the noise performance of a transistor, by putting a reverse current trough the base-emitter junction.
I have tested this with the ZTX851 transistor which is tested above.
A 12 volt supply was connected with the minus to the base, and the plus via a 1 kΩ resistor to the emitter.
That gives about 4 mA reverse current, this means the b-e junction comes in reverse conduction (like a zenerdiode) at -8 volt.
I let the current flow for 10 seconds, then put the transistor back in the test setup, and tested the transistor noise once again.
But the noise was exactly the same as before.
openmusiclabs.com
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
I do actually think about stuff like thatKSS wrote: ↑Sat May 27, 2023 1:13 amShhhh! There'll be a run on them if this^ gets out there..
Too late!
See #6 in this should be required reading for all SDIY link:
http://www.geofex.com/effxfaq/keenslaws.htm
Onto a DIY novel implementation of an electronic music synthesizer.
- stepvhen
- Wiggling with Experience
- Posts: 454
- Joined: Sun Jun 07, 2020 10:41 am
- Location: Indianapolis, USA
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
I just use BC847/857 for everything, since it is usually showing as highest stock at mouser, and they come in dual and matched versions. I built little SOT->DIP chiclets for breadboarding, and its been very successful so far. Someday I hope to get this fancy with my BJTs.
new stuff: attention
hyperfixated dream sequences
vapornoise, power ambient, feedback modular patches from the depths
attention
hyperfixated dream sequences
vapornoise, power ambient, feedback modular patches from the depths
attention
- uniqview
- Wiggling with Experience
- Posts: 359
- Joined: Mon May 18, 2020 3:18 pm
- Location: Silicon Valley, California
- Contact:
Re: Trimless VCA w/LM324A and discrete transistors
Nice! Do you solder the SOTs yourself? Or have a shop do that?stepvhen wrote: ↑Sat May 27, 2023 6:24 pm I just use BC847/857 for everything, since it is usually showing as highest stock at mouser, and they come in dual and matched versions. I built little SOT->DIP chiclets for breadboarding, and its been very successful so far. Someday I hope to get this fancy with my BJTs.
Onto a DIY novel implementation of an electronic music synthesizer.