Mathcad Program for Selecting Best Resistor Approximation

Quote of the Day

Experience is inevitable; learning is not.

Paul Schoemaker. Expert in the process of decision-making. Everyone in corporate America understands this quote and has lived it.


Introduction

Figure 1: E12 Series of Resistor Values.

Figure 1: E12 Series of Resistor Values (Source).

I gave a seminar today on the use of Mathcad 15 in an engineering organization. The discussion was mainly on Mathcad basics, plus my exhortations on properly documenting your math work so that it can be understood and supported by others – and years from now, YOU. I have given this presentation before, and it went well. During these seminars, I like to include examples of my standard process for doing engineering mathematics using a computer algebra systems.

My personal development process includes a number of simple Mathcad functions to assist me with performing  common tasks. One simple Mathcad function that I wrote years ago helps me select resistor values from among the standard offerings from manufacturers. I keep this function in my electrical design template. I have used this function hundreds of times. Since other engineers also use it, I have to believe that it has been used thousands of times.

Background

I beat the standard resistor values to death in this post. In order to keep the algorithm simple, I ignored special cases like 0 Ω resistances and sub-1 Ω resistances.

Analysis

Source

I am including both Mathcad and Excel versions of this algorithm (Source). For the discussion below, I will focus on the Mathcad version – both versions work identically.

Basic Approach

Figure 2 shows  my Mathcad function for the best standard resistor match to my design value using E series resistors. Because the E series values only approximately correspond to geometric series values (i.e. you cannot compute the values easily from a function), I put all the standard resistor values into a table. Using this table, I computed all absolute differences between my desired resistor value and the E series values. I then selected the E series value corresponding to the minimum absolute error.

Figure 2: Algorithm for Selecting the Nearest Standard Resistor Value.

Figure 2: Algorithm for Selecting the Nearest Standard Resistor Value.

Conclusion

Over the next few weeks, I plan on reviewing a number of the utility functions that I use for designing electronic circuits. While none of these functions are complicated, they do speed your design work.

This entry was posted in Electronics. Bookmark the permalink.