A common problem faced by electrical engineers and others is that most
passive components (resistors and capacitors) are only available in
certain values.
Note: if you're willing to pay enough money, you can get any value you want, in any tolerance. The rest of us have to settle for the standard values.These values were selected to fall uniformly on a logarithmic scale with the spacing determined by the part tolerance. For example, here are the standard values for 5% tolerance resistors in the 1000-ohm decade (a decade is a 10:1 span of part values). There are 24 values in each decade. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
My program accepts ideal input values and outputs values that are the nearest standard value based on the tolerance specified, using the standard value series for that tolerance value. As you can see, if you want the values spaced closer together, then you must buy a closer (more precise) tolerance part.
The program runs from the MS-DOS command line, and accepts a space-separated list of values according to the following form: 1.5, 1R5, 1k5, 1.5k, 1500, 1.5e5, 1.5m, 1.5meg, 1500000. The less common formats are described in the table.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
The program can also calculate the combination of paralleled 5% values that come closest to the input value. An interesting detail of this program is that it does not use a lookup table to find the standard value.
You get help from the program by invoking it with the -h (ala unix) option. Do this as soon as you get it onto your machine. It has more tricks than described here. Mac users, sorry...only PC spoken here. The algorithm for finding the nearest standard value was written by Jerry K. Brown and published as a Design Idea in Electronic Design, May 10, 1974. Jerry's original code was written in BASIC. I rewrote it in C and wrapped a front end around it. Much later, someone redid the same algorithm for Excel, although the idea of typing that much code into one spreadsheet cell is at the very minimum daunting, and worst case it is downright scarry. My source code is available on request. |
Copyright © 2001, 2008 by Rick Chinn. All rights reserved.
Last modified 04/14/2011. 18:35:44