# Prefered resistor range

• posted

"Rheilly Phoull" wrote in message news: snipped-for-privacy@individual.net...

Hi.

I have appended a very handy Perl script I wrote to deal with not knowing all (or having forgot some) of the 1% values. It also finds pairs of values to get closer values than the standard spreads allow. (This is useful when using 0.1% parts)

Run it without arguments for invocation tips. Get Perl at

.

```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```
• posted

"John Woodgate" wrote in message news:SrVhs+ snipped-for-privacy@jmwa.demon.co.uk...

Can you reconsider that assertion? I cannot make sense of it, being stuck in the following thought pattern: If there are 96 distinct values per decade, then for each

96 value steps, a whole power of ten is traversed. Expressed mathematically, (and ignoring the rounding necessary to get standard values), the E96 set can be obtained as 10^(N * log10(10) / 96) == 10^(N/96) for the 96 integer values of N from 0 to 95. This corresponds to a multiplicative interval equal to the 96th root of 10, not the 97 root.

In addition to the problem outlined above, what you say is contrary to the algorithm that I successfully applied to devise the program I posted earlier on this thread. I tested that quite a bit, so I am quite sure that the decade should be split logarithmically into 96 equal steps (sans rounding). In my testing, I compared results with the table published by several resistor manufacturers.

```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```
• posted

And the answers you get will not always be in the E96 series.

For example, 102 is the second in the E96 series; multiply by 1.024 and you get 104.448, which rounds to 104 which is not in the series.

Or, if you start with 100 and repeatedly multiply by 1.024, keeping the unrounded product as you go along (and *rounding* the running product at each step only to get the three digit number which should be a member of the E96 series), the first error occurs when the running product equals 136.1129468, which, rounded, is 136 and not 137 as it should be.

To get right results, you must use a multiplier of more than 4 digits.

Try this: go to

and put the 96 values from the E96 series in a list, take the log of all the elements of the list (still in a list), make another list of the 95 first differences, add up the 95 first differences, divide the sum by 95, and take the antilog of that number. This will be the average ratio between elements of the E96 series. I get

1.02427190671, which is much closer to the 96th root of 10 than to the 97th root of 10.

By the way, there is a peculiarity (error?) in the E192 series. If you use the 192nd root of 10 to generate the series, the 186th member will be calculated as 919.478686, which would round to 919, but the official value is 920. Apparently the folks who originally did the numbers were a little off on that one.

• posted

I read in sci.electronics.design that Rheilly Phoull wrote (in ) about 'Prefered resistor range', on Tue, 15 Mar 2005:

If you mean the E96 series, the ratio between adjacent values is the

97th root of 10 (97 because the 97th value is ten times the first value and is thus part of the next decade), which is 1.024021979....
```--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.```
• posted

Sure!

Who needs "formulas"? :-)

Cheers! Rich

• posted

I read in sci.electronics.design that Larry Brasfield wrote (in ) about 'Prefered resistor range', on Tue, 15 Mar 2005:

My understanding is that the values in these series don't include the first value of the next decade. So the E6 series has 7 values (which actually don't quite match the calculated values for reasons lost in the mists of time) : 1, 1.5, 2.2, 3.3, 4.7, 6.8 and 8.2, involving 6 multiplications by the *7th* root of ten; the 7th multiplication would give 10, which is the first value in the next decade.

However, I don't have the 'preferred numbers' standard, so I won't assert that I am correct.

Well, it depends on how your algorithm works, and I can't read PERL. The

96th root is 1.024275221... To four significant figures, the two roots are 1.024... So if you preserve only those four figures and calculate the values by successive multiplications, you will get the same answers whether you use the 96th root or the 97th root.
```--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.```
• posted

I don't think this is the correct explanation. If it were then why wasn't the 7th member of the E192 series calculated like this?:

107.4607828 -> 107.460783 -> 107.46078 -> 107.4608 -> 107.461

-> 107.46 -> 107.5 -> 108.

Or why wasn't the 13th member calculated like this?:

115.478198 -> 115.47820 -> 115.4782 -> 115.478 -> 115.48

-> 115.5 -> 116.

or the 43rd member, or the 44th member, etc.

You know better than to do this, as do I, and they probably did too as evidenced by the four cases just above, where they didn't do it.

• posted

Why not?

Now that you have the answer to your first question, don't you want to know why the 10% and 5% standard values don't result from a simple root-of-10 formula?

• posted

"John Woodgate" wrote in message news:uYUewiBywqNCFw+ snipped-for-privacy@jmwa.demon.co.uk...

I should maybe leave this at that point, but I am responding also to some points you make elsewhere in this thread.

You don't need to study my code to understand my point, which is that by splitting the decade logarithmically into 96 intervals, the correct 96 values are obtained. I conveyed this experience to underscore the idea that the reasoning I laid out should be examined carefully, as it is likely correct.

When I evaluate 1.024^96, I get 9.7453 on my HP32S. (And this agrees with another calculator I checked.) For the E96 series starting with 1, the 96th and last member is 9.76. So your method requires one more step (times 1.024) to reach the next decade. It produces 97 values per decade, (assuming we round off to 3 digits at each closest approach to whole powers of 10), whereas all the tables I've seen have only 96 values per decade.

Maybe there is some trick rule for rounding, dropping accumulated "erroneous" residue at special places, or other machinations, that will convert what would otherwise be 97 intervals into the 96 that are required to duplicate the standard values. I do not doubt your ability to devise such a rule. But I would hope you could see, if not acknowledge, the preferable simplicity of this rule: for (N = 0 to 95) standard_value[n] = round_to_3_digits( 10 ^ (N/96) )

Answering Mr. Phoull's request for "the formula that calculates the

1% 'preferred' range of resitors", absent any authoritive statement about how somebody long ago derived those tables, we have a choice: Use the above formula because it is easy and works; or complete the task of devising or elucidating your formula, which will be more complicated, amenable to no closed form solution, and unintuitive; or await or discover some other formula in the hope that it will be better. I should think it is an easy choice.
```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```
• posted

I read in sci.electronics.design that Allan Herriman wrote (in ) about 'Prefered resistor range', on Tue, 15 Mar 2005:

Thank you.

Yes, of course. I should have chosen E12, where such an error would have been much more obvious to me. The magnitude of the error for the E96 series is 0.000253241...

```--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.```
• posted

range of

Gee, I just had a copy of the page in the Digi-Key catalog. You have to be able to buy the value you spec. GG

• posted

I can appreciate the humor here, abstractly. But after designing the Nth precision active filter, countless dividers, and other precise circuits, I got tired of table lookups. To lookup just one value is not overly hard, just tedious. You start with what you want, look at the table, and do a little simple arithmetic (often by eye) to decide which value is closest. Maybe you adjust that choice according to which way it went for some nearby resistor(s).

Now, if I want a 63.54k resistor, I enter: stdvals 1% 63.54k and get back 63400. This saves just a little time, so I cannot argue any clear superiority there.

Here is where an algorithmic approach really pays. I really want something closer, and I am willing to parallel two parts to get it. I enter: stdvals 1% 63.54k 2p and quickly get a useful result: Approximate 63540 as 1(1/66500 + 1/1.43e+06), yielding 63544.9 (ratio = 1.0001) This saves some real time. (I can remember when, during my stint as an engineering tech, I was given the task of doing approximately this same search for a short list of resistors. If not for the aid of an HP-35, it would have taken days, not the hours I had to spend on it.)

A common task in active RC filter design is to come up with capacitor pairs that deliver a close approximation to the values you really want. Ask: stdvals 5% 588p 2a and ye shall receive: Approximate 5.88e-10 with (5.6e-10 + 2.7e-11), yielding 5.87e-10 (ratio = 1.0017)

Any of you who have done this by hand know the lingering doubt that remains when you have not used an exhaustive search to find whatever answer you settled upon. Or you know just how tedious the exhaustive search is. Or both.

I guess the natural extension of Rich's joke is: Who needs calculators or computers? I've got tables of values and logarithms, a slide rule, and my trusty pencil and pad. Valves forever!

```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```
• posted

I read in sci.electronics.design that The Phantom wrote (in ) about 'Prefered resistor range', on Tue, 15 Mar 2005:

They obviously looked at rounding: 919.478686..-> 919.47869 -> 919.4787

-> 919.479 -> 919.48 -> 919.5 - > 920.

This is a well-known effect of rounding and can be combated, but not necessarily eliminated (as in this case), by 'casting to the odd'. This means that you round down a number ending in 5 if the resulting final digit would be odd if you rounded up.

```--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.```
• posted

If you need 63.54K and you have the complete range of 1% tolerance resistors available you have a problem that no elementary, or sophistacated, calculator is going to solve

• posted

...

You appear to have assumed that the resistors to be used would be 1% tolerance. It happens that the 0.1% tolerance parts come in the same values, (or more, for more money), so there is a use for calculations such as the above example.

```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```
• posted

G'Day All, I seem to have lost the formula that calculates the 1% 'preferred' range of resitors. Can anyone help out please ??

-- Regards ..... Rheilly Phoull

• posted

This script doesn't work as advertised using perl under cygwin (suprise). What version of perl is it targeted towards? If you send me some sample output, I'll take a look. It's probably something simple.

( snipped-for-privacy@comcast.net)

```--
Regards,
Robert Monsen```
• posted

version of perl is it targeted towards? If you send

Thanks for the report and offer. While I mentioned the ActiveState distro, I am actually using the cygwin version here. To wit (with extranea cut): > set | findstr .pl= .pl=perl > perl -v This is perl, v5.8.6 built for cygwin-thread-multi-64int

What version are you using? I will be happy to find and fix the problem if I can replicate it (or if you want to send me its blurp via email). And if your difficulty reflects a shortcoming in the admittedly sparse "help", I will be more than happy to fix that. I wrote that script for my own purposes, so it probably has plenty of room for improvement in a wider context.

Here is a simple session that "should" replicate, with a newline inserted after certain commas for legibility and the prompt reduced: =========== begin near screen scrape ===============

Usage: stdvals tolerance or stdvals tolerance value [2a|2p|2r] or stdvals -n decsplit Standard tolerances are: 1% 10% 20% 5% 50% Standard decade splits are: 12 24 3 6 96

Approximate 5.88e-10 with (5.6e-10 + 2.7e-11), yielding 5.87e-10 (ratio = 1.0017)

Approximate 63540 as 1(1/66500 + 1/1.43e+06), yielding 63544.9 (ratio = 1.0001)

63400
1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2

Standard 1% values:

1.00 1.02 1.05 1.07 1.10 1.13 1.15 1.18 1.21 1.24 1.27 1.30 1.33 1.37 1.40 1.43 1.47 1.50 1.54 1.58 1.62 1.65 1.69 1.74 1.78 1.82 1.87 1.91 1.96 2.00 2.05 2.10 2.15 2.21 2.26 2.32 2.37 2.43 2.49 2.55 2.61 2.67 2.74 2.80 2.87 2.94 3.01 3.09 3.16 3.24 3.32 3.40 3.48 3.57 3.65 3.74 3.83 3.92 4.02 4.12 4.22 4.32 4.42 4.53 4.64 4.75 4.87 4.99 5.11 5.23 5.36 5.49 5.62 5.76 5.90 6.04 6.19 6.34 6.49 6.65 6.81 6.98 7.15 7.32 7.50 7.68 7.87 8.06 8.25 8.45 8.66 8.87 9.09 9.31 9.53 9.76

Standard 20% values:

1.0 1.5 2.2 3.3 4.7 6.8

=========== end near screen scrape ===============

```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```
• posted

version of perl is it targeted towards? If you send

I'm using 5.8.5. However, I figured it out. You keep typing '1%' in your examples. The program, however, seems to want '1' as opposed to '1%', and adds on the % internally. If you type in the percent sign, it fails, and prints the usage.

I wonder if you posted a version of the script that is a different version than the one you are running?

```--
Regards,
Robert Monsen```
• posted
[sniiiip]

examples. The program, however, seems to want '1' as

sign, it fails, and prints the usage.

That is because the shell you are using has been swallowed something. Usage is blurted for any unrecognized arguments.

than the one you are running?

Not a bad supposition. The problem is that I am using a command-line shell (4NT) that is nowhere near as brain-dead as the cmd.exe that ships with Windows. I think, given that most people on that platform put up with that shell, (which I remember mainly like bad dream), I'll revise my script to not use the '%' at all and repost. It was a PITA to type anyway. I'm reviewing the help for sufficiency and adding a few comments so nobody thinks I am a complete bozo, (at least not for that reason! ;-)

If anybody ever sees a comprehensive, complete and accurate explanation of the quoting rules for that miserable shell, I would like to see them.

```--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com```

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.