etheory

Python script for matching jfets using Atlas DCA75 Pro
« on: May 31, 2020, 04:02:53 AM »
Hi all!

I've been working on a 1176 compressor design recently, and, as always, matching of jfets was required.

To do this, I used the following process:

1.) Record curves for each jfet using the Atlas DCA75 Pro
2.) I then store the following filenames for each of the 3 recorded curves:
  • 2N5457 - 001.txt
  • 2N5457 Id Vds - 001.txt
  • 2N5457 Id Vgs - 001.txt

Where 001 is a number that I draw on the top of the jfet by first wiping it with liquid-paper, then writing on the number in very fine ink pen (uni pin fine line 0.1)

Then I run the following code that I wrote (for python 3) over the directory of files:

Code: [Select]
import os
import re
import collections

data = {}

directory = "/full/path/to/the/directory/containing/your/files"
for filename in os.listdir(directory):
# find the first set of data
if filename.find('2N5457 - ') != -1:
id = int(filename.strip('2N5457 - ').strip('.txt'))
file_object = open(os.path.join(directory, filename), 'r')
contents = file_object.readlines()
for line in contents:
if line.find('Vgs(off)=') != -1:
splitData = line.strip('Vgs(off)=').split(' at ')
vgsoff = float(splitData[0].strip('V'))
vgsid = splitData[1].strip('Id=').strip('µA\n')
data.setdefault(id, {}).update({'Vgs(off)' : [vgsoff, vgsid]})
elif line.find('Vgs(on)=') != -1:
splitData = line.strip('Vgs(on)=').split(' at ')
vgsoff = float(splitData[0].strip('V'))
vgsid = splitData[1].strip('Id=').strip('µA\n')
data.setdefault(id, {}).update({'Vgs(on)' : [vgsoff, vgsid]})
elif line.find('Idss=') != -1:
splitData = line.strip('Idss=').split(' at ')
idss = float(splitData[0].strip('mA'))
vds = splitData[1].strip('Vds=').strip('V\n')
data.setdefault(id, {}).update({'Idss' : [idss, vds]})

# sort by Vgs(off)
sortedData = []
for item in data.items():
sortedData.append(item)

# sorting function is the Vgs(off) value of the jfet
# we can then visually match jfets, and further match by Idss
def sortFunction(elem):
return elem[1]['Vgs(off)'][0]

sortedData.sort(key=sortFunction)
for item in sortedData:
print(item)

Which you could trivially modify to your specific use-case.

But the idea is that it effectively sorts by Vgs(off).
From there, you can visually match jfets, then compare their Idss.

From there, you can load the graph data, and plot them.

I'm sharing this since it might be useful to someone in the future.

For instance, I found a great match for 2 jfets, specifically for me, 020 and 046:


etheory

Re: Python script for matching jfets using Atlas DCA75 Pro
« Reply #1 on: May 31, 2020, 04:03:52 AM »
You can also see that the Id Vgs curves are also extremely well matched:

You could obviously improve this code to match across multiple data sets, provide groupings etc.

For me, however, simply sorting by Vgs(off) was sufficient to find a match by loading the associated graphs and comparing them.


etheory

Re: Python script for matching jfets using Atlas DCA75 Pro
« Reply #2 on: May 31, 2020, 04:14:05 AM »
Here is the PCB I designed for the compressor I'm matching the jfets for.

It has a guitar pre-amplifier that can be switched in as the input, or the line input, a side-chain high pass filter, and a new, and (something I will share when I prove it works) completely original method for stereo-linking that doesn't use any opamps, and directly connects the side-chains in a way that's a lot more natural and simple than any other method I've ever seen for a 1176.

I'm quite excited by this design. SO FAR it all works. Fingers crossed it'll keep working with these matched jfets and the side-chain will work correctly.

The design has a Rev F front end, and a Rev A output amp, along with on-board monitoring outputs for the input, compression, and output that feed a sub-board microprocessor running real-time analysis code that drives VU meters for monitoring (rather than further needing to match other jfets).

All options are relay-switched on the PCB to avoid noise from long-run audio cables. This would also allow micro-processor control for almost all of the functionality if someone ever wanted to do that.

squarewave

Re: Python script for matching jfets using Atlas DCA75 Pro
« Reply #3 on: May 31, 2020, 09:12:46 AM »
Cool. Nice work.

ruffrecords

Re: Python script for matching jfets using Atlas DCA75 Pro
« Reply #4 on: May 31, 2020, 09:42:54 AM »
Are you matching these for a stereo pair or within the one channel of compression?

Cheers

Ian
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

etheory

Re: Python script for matching jfets using Atlas DCA75 Pro
« Reply #5 on: May 31, 2020, 04:56:26 PM »
Are you matching these for a stereo pair or within the one channel of compression?

Cheers

Ian

Hi Ian!

I'm matching 2 jfets for a stereo pair. I only need 1 gain control jfet per channel in my design as a microprocessor is doing my VU metering.


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
3934 Views
Last post October 09, 2006, 08:12:18 AM
by
1 Replies
1270 Views
Last post April 29, 2005, 03:34:49 PM
by nacho459
0 Replies
3098 Views
Last post January 14, 2009, 07:14:07 PM
by 1954U1
2 Replies
303 Views
Last post April 12, 2020, 04:45:11 PM
by bluebird