### First, a little disclaimer:

I’m by no means an expert on this subject. But I do hold a little interest in electronics (and programming. And procrastination. Sometimes I combine those :P).

Btw, It’s been a while since last time I blogged. I probably will edit this post a bit in the following days. Also, I finally made BloGTK 2.0 work in 64-bit Ubuntu 10.04 LTS.

# Resistor E-series

(Screenshot from my little test program – Ok I’ll admit I’m no GUI expert :P)

Resistors come in fixed “preferred values” determined by what “E-series” they belong to. Which says how many resistors there are in a decade (1 to 10, 10 to 100, 100 to 1000 etc ohms).

The E series are standardized to have 3, 6, 12, 24, 48, 96 or 192 values pr. decade. E.g. E24 have 24 values. Generally the value is determined by a simple formula:

Ri = 10^(i/Eseries)

Where:

- Ri = A “preferred value” resistance normalized to 1.00 – 9.99 ohm for the i’th index resistor in a given E series. Multiply or divide by factors of 10 for a given decade.
- Eseries = is the E-series value: 3, 6, 12, 24, 48, 96 or 192
- i = is the (zero-based) i’th index, up to Eseries-1 (2, 5, 11, 23 etc).
E.G. The last index in E24 is 23. The first is zero (always).

E series below and including E24 the is rounded to two significant digits.

Above E24 is rounded to three significant digits.

The preferred value series is such that each value will be a fixed factor (a step factor, depending on what series) times the value before it. For E24 the factor is 10^(1/24), or about 1.10 (rounded). Put another way, step factor

The reason I had to finally diving into this subject was that I wanted an automated way of calculating E-series resistors. Simple, right?

Well, nope! I discovered to my horror that “they”, whoever they are, did not follow the simple formula for preferred values exactly. Of course not. Now, I did’nt want to use tables, even if there are only about 16-17 exceptions to the rule, and all but one are in the E24-series and below (In other words, above E24 it *is* simple).

# PPPP

## Procrastination-Programming-Periods in Processing

Eventually I made me a little test program in processing 1.5.1 to help me determine if I could make a make-shift correction formula, which I believe I did (Unless I missed something basic…). In addition I found the program somewhat fun to make and play with. Probably good for learning resistor color codes too btw. And it does contain a few useful (I hope) functions easily adapted to other programs.

## Correction formula

I made a correction formula of sorts to cope with this instead of storing a table. Whether this is more efficient or not I’m really not so sure of (there are only like 16 exceptions or so out of 45 values).

There is also one exception in E192 (9.20 instead of 9.19), which is simply hard-coded (I *can* live with one exception… barely – Besides I really hate to think about what kind of equation that would be!).

As a short description of what I did, consider if you will this error bar diagram for E24 series between 100 and 1k ohm:

The values are rounded to two significant digits, and thus everything between -5 and +5 comes out correctly.

- The blue bars are the original formula of 10^(i/Eseries), and several are outside the -5 to +5 limits.
- The red bars are due to a correction formula I cobbled together for E24.
- And finally the yellow bars are the new differences from the ideal, (after adding the red and blue together) just barely between -5 and +5, but it is enough.

There is a similar pattern for the other E series below E24, and except for a factor the correction formula is the same. In fact for two of the series this factor is also the same.

I hope I got this right, I had Wolfram Alpha help me out a bit to format the equation, except it didn’t really understand me (*i* was not the imaginary unit, and I tried convince it that my E was not *e* (2.718…), but with some Gimp magic here it is:

Where:

- Rc = The correction resistance to add to the normalized (1.00 – 9.999… range) E-series “preferred value” resistance equation of 10^(index/Eseries).
- Es = The E-series number (12,24,48 etc).
- i = index of the E-series (in the above equation it is
1-based, IE it starts from 1, not zero).- F = A factor that varies with the E-series calculated:

- E3: F = 2.4
- E6: F= 3.38
- E12: F = 3.38 also, and
- E24: = 3.2
The rest of the E-series above E24 follows the preferred value equation, with one exception in E192, where the normalized value of 9.19 instead is 9.20 in the E192 table.

(Also, FYI, it’s made by trial-and-error in an Open Office spreadsheet, kind of a manual slow fourier transform, well okay not exactly, actually I more or less just winged it – Probably not the optimal equation but it does work. Good enough for me ðŸ™‚ ).

### Values between 0.1 and 1 ohms

Btw, in the program (or “sketch” as they call it), resistance values below 1 ohms, while shown, does not necessarily exists nor are represented correctly (rounding errors for the color coded rings – digits simply cut off) for E48 through E192. I don’t think this is any big deal. – Besides I doubt most of the values below 1 ohms are obtainable anyway (though some are). Below 0.1 ohms are not calculated.

### Tolerances

When it comes to tolerances, I simply use the direct conversion where E3 have 50% through E192 that have 0.5%. I’m aware that there exists better tolerances for E192, but my program does not take that into account.

- E3 – 50%
- E6 – 20%
- E12 – 10%
- E24 – 5%
- E48 – 2%
- E96 – 1%
- E192 – 0.5%

Which by the way follows another preferred value series, that of 10^(1/3), IE 1,2,5, 10,20,50… (When rounded to one significant digit).

## Download

Well enough shitchat I suppose. Here is the processing “sketch” I made for this. Unfortunately I don’t know how to incoorporate it into this blog page. But it is multi-platform, as processing of course is and there are versions for Windows, Linux and MacOS included. As well as the source code for use in processing.

Resistor E-series v1.05 as of 2012.10.16 (Just renamed a function, otherwise no change)

Alternate download link on my google code page.

And yes, the source code is in “kind of a mess”, but it is what it is – just a test program.

Here’s some nice sources I skimmed while making this program:

- Wikipedia on preferred numbers
- Hobby hour Really nice! Includes examples and a color code calculator. (Seems they have a slight error in E96, as 959 ohm is non-standard (I belive). 953 ohm follows formula and I’m inclined to believe that one.)
- Another nice table
- www.resistorguide.com Seems really nice too (And you gotta like the URL graphics! Btw seems they also have a slight error, in E24. There is no 140 ohm in that series, it should be 150 ohm)
- Radio Electronics
- Wikebooks on electronics also have a nice page about resistors

Until next time,

– raron

Just came about the same problem when I compared my calculated values against the defined ones for E192 and found the 9.19 (calc) vs. 9.19 (defined) problem. A short google search sent me here. Nice to see somebody thinking about this as I do (hate to hard-code tables).