Sorting Resistors

 

 

One problem with choosing closely matched resistors is that 0.1% of 1MΩ is 1kΩ. Most multimeters are rated in “digits”, e.g. “4 1/2 digits”. This means that they can display a range from 0 to 19999. This means that with a ~1MΩ resistor, you can measure ±50Ω steps. This is enough to measure resistor tolerance within 0.005%, but the more digits the better. Since I happened to have an HP 34401A 6 1/2 digit multimeter handy, I figured that overkill was the better part of valor.

HP Multimeter

Then, I set about sitting down and measuring the value of 30 resistors or so.

30 Resistors, poked in to anti-static foam so that I can correlate which resistor has which value in a written table.

Once I had them all measured, I had to pick a set of closely matched resistors. Simply writing all the values down, it’s easy to pick a pair of closely matched resistors, but I needed two sets of eight closely matched resistors. The result was the following Matlab script, which picks the closest set of numbers from a group.

function [closestVals closestPos] = smallestSet(randomVals, number)

randomSize = size(randomVals);

if(randomSize(2) == 1)
    randomVals = randomVals.'
end

closestVals = randomVals(1:number);
closestPos = (1:number);
range(closestVals)
for value = randomVals
    if(value == -inf)
        continue;
    end
    nearVals = zeros(1,number);
    nearPos = zeros(1,number);
    distVals = abs(randomVals - value);
    for n = 1:number
        [minVal minPos] = min(distVals);
        nearVals(n) = randomVals(minPos);
        nearPos(n) = minPos;
        distVals(minPos) = inf;
    end
    
    if(range(nearVals) < range(closestVals))
        closestVals = nearVals;
        closestPos = nearPos;
    end
end

Using this script, I turned my random pile of 30 1% resistors into two sets of 8 resistors matched to better than 0.05%. While the value they are centered around is not exactly 970kΩ, the spread of values means that my CMRR does much better than a 1% priced pile of resistors should deliver, and it cost me a lot less than buying sixteen 0.05% matched resistors!