Quote of the Day
Being defeated is often a temporary condition. Giving up is what makes it permanent.
— Marilyn vos Savant
Many analog circuits are designed so that their critical performance characteristics are a function of the ratio of resistances (e.g. Figure 1). For example, I worked on analog pacemakers as a student intern. Those pacemakers were hybrid analog circuits with a number of parameters that were set using laser-trimming. In fact, a goal of many analog designers is for their creations to be ratiometric.
While you can laser trim values in production, this operation is expensive and may not be necessary if you can achieve a sufficiently accurate resistor ratio value using standard E-series resistors.
This post presents an algorithm, implemented in Mathcad and Excel, for determining the optimum resistor ratio approximation using standard resistor values. I also include a comparison of the output of my algorithm with that of a web-based application I use as a reference for determining resistor ratio approximations.
All the background you need on standard resistor values is included in this post.
My Mathcad (source and PDF) and Excel routines are included here.
Figure 2 shows my array that holds the E-series resistor values. Note that the table does not show the all the resistor values – only the top few values are shown.
Figure 3 shows the algorithm. There is nothing sophisticated here – it is pure brute force. The routine returns a vector representing two resistor values, which I call R1 and R2.
Test Case Evaluation
Figure 4 shows the test cases that I substituted into the reference web page and the resistor values it produced. I also show the utility functions that I used to take this data and compare it to the output from my algorithm.
Figure 5 shows the comparison of my algorithms output and the output from the reference web page. Most of the results are identical. I found five exceptions (colored in red on the right-side of the table):
- Two of my resistor choices are different than produced by the web page, but have the identical resistor ratio (no issue).
- Three of the results are distinctly different, and my results are more accurate than produced by the web paged – I believe that the web page has a bug.
I wrote this post because I was recently working with an analog designer who asked if I had a routine for determining the resistors required for an optimum ratio approximation. I have used this routine for years and it has worked well.