# Resistor calculator to find parallel values to make x-ohms

#### augustinetez

##### Active Member
I used to have calculator/spreadsheet where you enter a required value of resistor and it would calculate two (or more) parallel values to make up the value - anyone seen one anywhere?

Being a cheapskate here rather than going out and buying E96 resistors (I want to use whats on hand) and E96 in 2512 2W packages seem to be a bit thin on the ground from all the big suppliers anyway.

#### DrDoggy2

##### New Member
k try this, I forgot adding inverses was so difficult.

#### Attachments

• resistors.zip
31.5 KB · Views: 10

#### AnalogKid

##### Well-Known Member
I thought resistors were made and then sorted into tolerance ranges so 10% resistors were always 10% wrong so if you picked a high and low one you got close to actual value.
I just measured a bunch of 5% and 10% carbon composition resistors from the 70's, and they all are near the high limit of their tolerance range. This supports your test-then-mark idea, which I've heard before.

Mixing above- and below-value parts to cancel out their errors works fine if you hand-select the parts. But if you use parts straight out of the box or off the reel *without testing*, as a placement robot does, then multiple 5% parts will not yield a 1% value repeatably.

Over a large number of assemblies, the average value could equal the desired 1% value, but this assumes that the error distribution in the individual parts is completely random. I don't think this is a good assumption. In my experience, groups of resistors in the same production lot have similar errors (as did the ones I measured today). Back when 1% resistors still were a bit pricey, I had a junior dude measure the exact value of 1000 5% resistors on a reel, and then do the same thing a few weeks later with a reel from a different manufacturer. In both cases, the error distribution was a narrow, pointy bell curve. IIRC, one reel averaged less than 2% low and the other was around 4% high.

ak

#### Nigel Goodwin

##### Super Moderator
I just measured a bunch of 5% and 10% carbon composition resistors from the 70's, and they all are near the high limit of their tolerance range. This supports your test-then-mark idea, which I've heard before.

Carbon composition resistors tend to increase in value as they age, so it might just be natural ageing over 50 years?.

#### augustinetez

##### Active Member
would also suggest you knock a load of digits off the accuracy values (it's not needed), and get rid of the spurious scientific notation?.
Just in case anyone does decide to have a go at writing something, 2 digit resolution would be enough I think.

#### Pommie

##### Well-Known Member
Terry, here's a(n) HTML page that should open in any browser and do the desired calculation.
It currently has 4 tabs but only 3 are used. If anyone has an idea for the fourth tab then let me know.
I had to rename it .txt so just change the extension to .html and it should work fine.
ATM, it defaults to the "copy characters" page but this is easily modified by moving the id="defaultOpen" to the relevant line in,
Code:
<button class="tablink" onclick="openPage('page1', this)" id="defaultOpen">Copy useful Characters.</button>
<button class="tablink" onclick="openPage('page2', this)">LED series resistor calculator.</button>
<button class="tablink" onclick="openPage('page3', this)">Parallel resistor calculator.</button>
<button class="tablink" onclick="openPage('page4', this)">Page 4</button>

HTH,

Mike.
Note, the useful characters page can be expanded by modifying the data3 variable.

#### Attachments

• Mikes calculator.txt
11.3 KB · Views: 9

#### augustinetez

##### Active Member
Thanks Mike, that's a start.

It looks like it will however need all decades loaded to work properly - see pics :

#### Pommie

##### Well-Known Member
Terry, I've added a checkbox to use 2 decades which is hopefully enough.

Putting in 86.6 yields values of 100 and 620 with an error of 0.57%

I've also made it default to that tab.

Mike.

#### Attachments

• mikes calculator.txt
11.6 KB · Views: 10

#### Pommie

##### Well-Known Member
Here's a newer version that allows you to use any number of decades.
It also saves any relevant data that has been entered. Note only second time running as first time no data has been saved.
Any thought on what "page 4" could be used for?

Mike.

#### Attachments

• mikes calculator.txt
12.2 KB · Views: 13

#### augustinetez

##### Active Member
I've been mulling page 4 over and nothing is standing out as a possibility yet.

#### augustinetez

##### Active Member
I thought I would have a go at messing with that last one just to see how picky it's calculations were.

It actually works well (before I messed with it - doesn't seem to like 1.1)

#### augustinetez

##### Active Member
Re page 4 - Ohms law calculator?

#### Pommie

##### Well-Known Member
Re page 4 - Ohms law calculator?
Good idea. Just about to go out now but will have a go at this tomorrow morning.

I see you've entered the E24 series between 1 and 10Ω (guess where I got Ω from!!!). I can probably change the code to use the lower values - not sure why it doesn't work anyway.

Actually, it'll be javascript interpreting decimal numbers as strings 1.1 can be either a number or a string. I hate loosely typed languages.

Mike.

#### augustinetez

##### Active Member
Yeah just messing about in the back end (I modified the var string) to see what happens.

#### Pommie

##### Well-Known Member
Here's a version with page 4 explaining and calculating Ohm's Law.
I'm especially pleased with the illustrations on the Ohm's Law page as they are inline SVG to get around the Location Origin problem with loading images from your hardrive (It's a security risk so not allowed). There are ways around it but I like the inline SVG version.
Again, rename to .html

Mike.

#### Attachments

• mikes calculator.txt
17.8 KB · Views: 4

#### augustinetez

##### Active Member
Nice.

Couple of suggestions:

A bit more space between the boxes of the calculator? Move the current and resistance boxes down 1 line and move them apart a couple of spaces.

Limit the results to 4 decimal places for the current and 2 for the others, otherwise you're getting results like Resistance 166.66666666666669 or Current 0.03333333333333333

Add a Clear button for new calculations or make the Calculate button recalculate the answers Currently if you enter a new value in one of the boxes and hit calculate it does nothing.

#### Pommie

##### Well-Known Member
I've added the rounding and changed the spacing.

The problem with the calculator is that one of the boxes needs to be clear so the code knows which value to calculate.
To overcome this I've turned the calculated value red so the code knows which value to (re)calculate.

Mike.

#### Attachments

• mikes calculator.txt
18.7 KB · Views: 5

Replies
3
Views
1K
Replies
0
Views
1K
Replies
5
Views
1K
Replies
5
Views
1K
Replies
17
Views
2K