Calculator program finds closest standard-resistor values

-February 03, 2005

Although it may not appear obvious to newcomers to the electronics-design profession, components' values follow one of several progressions that divide a decadewide span into equally spaced increments on a logarithmic scale. For example, when you plot the values of 1, 2.2, and 4.7 on a logarithmic scale, they divide the range 1 to 10 into three roughly equal increments (1... 2... 5). To meet requirements for greater precision, resistor manufacturers offer parts in several additional series. The most precise series divide a decade into 24, 48, or 96 increments by computing 10n/m, where n=1... (m–1), and m=24, 48, or 96, and then rounding the values to two or three digits. The results are the R24, R48, and R96 series and respectively contain 24, 48, or 96 values per decade.

You can use a Hewlett-Packard HP-48 or HP-49 calculator and one of the following programs written in RPN (Reverse-Polish Notation) to compute the nearest standard value that's closest to a required value. You enter a required resistor value, and the program returns the closest higher or lower value in the selected series. Table 1 lists a few examples.

Each program acts as an operator by processing the first line of the calculator's stack and returning the new value in the same line of the stack. The R48 and R96 series are mathematically exact, and their programs consist of only a single line of code. Listings show the code. The values of the older R24 series are not as strictly rounded, and the program is thus somewhat more complex.

Note that the values of other components, such as capacitors, inductors, and zener diodes, also follow preferred-value series, making these programs universally applicable. You can view an earlier version of a standard-value calculator for IBM-compatible PCs at a previous Design Idea. David Kirkby of the Department of Medical Physics, University College London, UK, wrote the program in C. EDN first presented it, "Resistance calculator yields precise values," in the Aug 3, 1995, issue. Note that certain portions of the software may require rewriting for better operation on today's PCs.

Check out our Best of Design Ideas section!

Loading comments...

Write a Comment

To comment please Log In