Quote of the Day
Being defeated is often a temporary condition. Giving up is what makes it permanent.
— Marilyn vos Savant
Introduction
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.
Background
All the background you need on standard resistor values is included in this post.
Analysis
Source
My Mathcad (source and PDF) and Excel routines are included here.
E-Series Resistors
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.
Algorithm
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 Cases
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.
Comparison
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.
Conclusion
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.
Even though I have been a hardware designer for a long time, I didn't realize until a few years ago that most resistor manufacturers supply 1% resistors in the E24 series values in addition to the standard E96 series values. This increases the range of values available for resistor divider networks and allows you to sometimes get an exact match when restricting yourself to the E96 series would be a compromise. I have not seen anyone include the option for E24 series values when trying to find the optimum 1% resistor values. Also with the drive to lower power consumption these days, I am using much larger resistor values than I ever used to. I found that many times the error was off more than it should have been due to not accounting for the bias currents. I've never seen anyone account for this either.
Thank you for this nice write-up. I followed up with a post "E24, voltage divider, slide rule, and some history" https://www.jurasz.de/en/jarek/e24