{"id":114,"date":"2017-08-06T16:36:39","date_gmt":"2017-08-06T23:36:39","guid":{"rendered":"http:\/\/eequalspi.com\/?p=114"},"modified":"2017-08-06T16:36:39","modified_gmt":"2017-08-06T23:36:39","slug":"sorting-resistors","status":"publish","type":"post","link":"https:\/\/eequalspi.com\/index.php\/2017\/08\/06\/sorting-resistors\/","title":{"rendered":"Sorting Resistors"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>One problem with choosing closely matched resistors is that 0.1% of 1M\u03a9 is 1k\u03a9. Most <a href=\"https:\/\/bkprecision.desk.com\/customer\/portal\/articles\/1535307-difference-between-counts-and-digits\">multimeters are rated in &#8220;digits&#8221;<\/a>, e.g. &#8220;4 1\/2 digits&#8221;. This means that they can display a range from 0 to 19999. This means that with a ~1M\u03a9 resistor, you can measure \u00b150\u03a9 steps. This is enough to measure resistor tolerance within 0.005%, but the more digits the better. Since I happened to have an <a href=\"http:\/\/www.keysight.com\/en\/pd-1000001295%3Aepsg%3Apro-pn-34401A\/digital-multimeter-6-digit?cc=US&amp;lc=eng\">HP 34401A<\/a> 6 1\/2 digit multimeter handy, I figured that overkill was the better part of valor.<\/p>\n<figure id=\"attachment_125\" aria-describedby=\"caption-attachment-125\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-125\" src=\"http:\/\/eequalspi.com\/wp-content\/uploads\/2017\/08\/IMG_1145-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" \/><figcaption id=\"caption-attachment-125\" class=\"wp-caption-text\">HP Multimeter<\/figcaption><\/figure>\n<p>Then, I set about sitting down and measuring the value of 30 resistors or so.<\/p>\n<figure id=\"attachment_124\" aria-describedby=\"caption-attachment-124\" style=\"width: 169px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-124\" src=\"http:\/\/eequalspi.com\/wp-content\/uploads\/2017\/08\/IMG_1144-e1502062285842-169x300.jpg\" alt=\"\" width=\"169\" height=\"300\" \/><figcaption id=\"caption-attachment-124\" class=\"wp-caption-text\">30 Resistors, poked in to anti-static foam so that I can correlate which resistor has which value in a written table.<\/figcaption><\/figure>\n<p>Once I had them all measured, I had to pick a set of closely matched resistors. Simply writing all the values down, it&#8217;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.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"matlab\">function [closestVals closestPos] = smallestSet(randomVals, number)\r\n\r\nrandomSize = size(randomVals);\r\n\r\nif(randomSize(2) == 1)\r\n    randomVals = randomVals.'\r\nend\r\n\r\nclosestVals = randomVals(1:number);\r\nclosestPos = (1:number);\r\nrange(closestVals)\r\nfor value = randomVals\r\n    if(value == -inf)\r\n        continue;\r\n    end\r\n    nearVals = zeros(1,number);\r\n    nearPos = zeros(1,number);\r\n    distVals = abs(randomVals - value);\r\n    for n = 1:number\r\n        [minVal minPos] = min(distVals);\r\n        nearVals(n) = randomVals(minPos);\r\n        nearPos(n) = minPos;\r\n        distVals(minPos) = inf;\r\n    end\r\n    \r\n    if(range(nearVals) &lt; range(closestVals))\r\n        closestVals = nearVals;\r\n        closestPos = nearPos;\r\n    end\r\nend<\/pre>\n<p>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\u03a9, 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!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; One problem with choosing closely matched resistors is that 0.1% of 1M\u03a9 is 1k\u03a9. Most multimeters are rated in &#8220;digits&#8221;, e.g. &#8220;4 1\/2 digits&#8221;. This means that they can display a range from 0 to 19999. This means that with a ~1M\u03a9 resistor, you can measure \u00b150\u03a9 steps. This is enough to measure &hellip; <a href=\"https:\/\/eequalspi.com\/index.php\/2017\/08\/06\/sorting-resistors\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sorting Resistors&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-tools"],"_links":{"self":[{"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":5,"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":127,"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions\/127"}],"wp:attachment":[{"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eequalspi.com\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}