Resistor Values Computation: Super-annoying consequence of human perception?

12 posts / 0 new
Author
Message

The simple purity of mathematics tells us that:

pow(1.212, 5) = 2.615249328

which rounds to 2.6

yet IE IEC 60063 tells us that it rounds to 2.7

Oi.

So instead of a simple, elegant mathematical formula I need to use table look ups to generate and verify random standard resistance values.

Okay, I'm done for now.

EDIT: I am assuming that there is some physical aspect to this that I do not know, something in the manufacturing process, materials proportions, or the like that makes this case.

• "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
• "All right wise guy, where am I?"   -- Daffy Duck
• "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville
Last Edited: Mon. May 2, 2016 - 02:04 PM

Wikipedia has a nice graph. I don't think there was any magic, just the way the cookie crumbled.

The table computation is probably faster than calculating the pow()!

Kartman wrote:
The table computation is probably faster than calculating the pow()!

Probably true, but I love the elegant simplicity of the mathematical approach.

• "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
• "All right wise guy, where am I?"   -- Daffy Duck
• "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville

It seems they followed the following series function:

nextValue = ROUND(previousValue * 1.211527659)

And, to compensate the rising value of steps, they applied on 3.3 and 4.7 (as previousValue) the function:

nextValue = ROUND[(previousValue -1) * 1.211527659]

But, I think, this is just one possibility of many other ones to get their standard values.

Kerim

Here's the sequence I get on a spreadsheet, using EXP(N*(LN(10)/12)).  Lot of off-by-one values using this approach.

 1 1.21153 1.4678 1.77828 2.15443 2.61016 3.16228 3.83119 4.64159 5.62341 6.81292 8.25404 10

kk6gm wrote:
Here's the sequence I get on a spreadsheet, using EXP(N*(LN(10)/12)).  Lot of off-by-one values using this approach.

Yep. My R function:

iecResistors <- function(series) {

base <- round(10 ^ (1 / series), 3)

timesBase <- function(index) {

round(base ^ index, 1)

}

lapply(seq(from = 1, to = series), timesBase)

}

Returns the same:

"1.1"  "1.2"  "1.3"  "1.5"  "1.6"  "1.8"  "2"    "2.2"  "2.4"  "2.6"  "2.9"  "3.2"  "3.5"  "3.8"  "4.2"  "4.7"  "5.1"  "5.7"  "6.2"  "6.9"  "7.5"  "8.3"  "9.1"  "10.1"

There are values that are not mathematically correct. Wondering if anyone knows the rationale behind the differences. My hypothesis is twofold:

1) There is some physical reason involving either the resistive materials, or manufacturing process; or

2) The odd values have been adjusted to be centered in the range between the adjacent values.

Hoping someone could confirm one of these. If I find the answer I will share it here...

• "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
• "All right wise guy, where am I?"   -- Daffy Duck
• "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville

ciroque wrote:
yet IE 60063 tells us that it rounds to 2.7

For us less learned, could you give a hint?

ciroque wrote:
I need to use table look ups to generate and verify random standard resistance values.

Finally, I think I get it.  Reading and re-reading I kept wondering what the utility would be to generate a random resistance value, and whay it would matter if rounded up or down.

zoomcityzoom put up links 10 years ago.

http://www.edn.com/design/analog...

http://www.edn.com/design/system...

The lead of the first link implies to me a formula.  But I haven't tested it.  Never worried about that fourth significant digit too much.

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.

...

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.

Obviously, when our ancestors created the R24 series with only charcoal stick ends and rounded pebbles to work with, the results wern't as exact as you demand.

BTW, when you do your calculations to end up with 1.234567 or whatever, you have indeed applied an error band to your results via standard numerical methods?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

theusch wrote:
For us less learned, could you give a hint?

I started with this table: http://ecee.colorado.edu/~mcclur...

and wrote code that used that table by generating random indexes into the table and then randomly applying a 'decade' to that value (Typescript):

getResistance(): number {
let baseResistances = [1.0, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.7, 3.0, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1];
let multipliers = [1, 10, 100, 1000, 10000, 100000, 1000000];

let resistanceIndex = parseInt(Math.random() * (baseResistances.length));
let multiplierIndex = parseInt(Math.random() * (multipliers.length));

return baseResistances[resistanceIndex] * multipliers[multiplierIndex];
}

When I was writing tests for this method I decided it was wrong to use the same implementation (table lookups) to test. Not really testing anything. So I started looking to see if there were The Maths behind the sequence. Lo and behold I found this: http://www.resistorguide.com/res...

Yes! There are Maths behind the sequence. When I re-wrote my method to use that formula (first in R, as above, and then in Typescript to replace the above method implementation) I noticed the discrepancy.

The driver behind all of this is the creation of a web app that will generate random circuits with complete calculations, but display only some of the values and allow me to perform the calculations manually and then check my work. (It is on github: https://github.com/ciroque/cirquet)

theusch wrote:
Obviously, when our ancestors created the R24 series with only charcoal stick ends and rounded pebbles to work with, the results wern't as exact as you demand.

I know, right? I can be quite obnoxious at times ;-)

This was definitely one consideration, but the rounding is ultimately to only one decimal place. Even an abacus can deal with that level of precision.

theusch wrote:
BTW, when you do your calculations to end up with 1.234567 or whatever, you have indeed applied an error band to your results via standard numerical methods?

Not quite sure I follow, but I have done no explicit calculations against the error bands. It was my understanding from the articles I read (most of which say exactly what the links you provide) that the tolerances are built into the specific series (E6, E12, E24, E48, E96, and E192) where there are more values per decade with the larger numbers for tighter tolerances.

Ultimately I am not getting into a twist over this, merely curious.

KerimF wrote:
And, to compensate the rising value of steps, they applied on 3.3 and 4.7 (as previousValue) the function: nextValue = ROUND[(previousValue -1) * 1.211527659]

Why did they apply a different function on those values? That is my quest!

• "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
• "All right wise guy, where am I?"   -- Daffy Duck
• "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville
Last Edited: Sun. May 1, 2016 - 02:46 AM

EDIT: Moved to previous response, can't seem to delete this...

• "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
• "All right wise guy, where am I?"   -- Daffy Duck
• "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville
Last Edited: Sun. May 1, 2016 - 03:18 AM

Even in science (when applied and definitions are needed), some people decide and the rest should follow ;)

This is clear in Literature (decisions taken for spelling and meaning of words/expressions for example). This is why, I, being a rational man, was never pleased learning languages though I had to as it is the case for many other matters.

So when I needed using the 12 resistance values of E12, I just followed other’s decision by referring to them via a preset table.

By the way, let us not forget the +/- 5% tolerance, if not +/-10%, of the real E12 resistors ;)

Kerim

Last Edited: Sun. May 1, 2016 - 06:42 AM

ciroque wrote:
theusch wrote: For us less learned, could you give a hint?

...as to what an IE 60063 is?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

theusch wrote:

ciroque wrote:
theusch wrote: For us less learned, could you give a hint?

...as to what an IE 60063 is?

Typo, should have been IEC 60063. It has been corrected :-)

I am guessing you are making a point about my mistake in light of me making a point about someone else's mistake. Point taken.

• "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
• "All right wise guy, where am I?"   -- Daffy Duck
• "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville