Searching \ for '[EE]: 1% resistors - How to find exact integer mu' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=resistors+how+find
Search entire site for: '1 resistors - How to find exact integer mu'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: 1% resistors - How to find exact integer mu'
2003\08\09@224921 by Ken Pergola

flavicon
face
Sorry guys -- I made a mistake in the text -- I meant 12.0 K ohms for the
upper leg instead of 6.0 K ohms. Sorry for the confusion and brain lapse.
Corrected text below.

Regards,

Ken Pergola








Hi,

Kind of a strange question but very basic:

Without pulling out the calculator or spreadsheet and doing it manually,
what is the quickest way to come up with resistors that are exact *integer*
multiples of each other (from the 1% standard value list)?

Let me elaborate: In other words, say I want to make a 'divide by 4' voltage
divider using 1% resistors and *only* two resistors (no building of new
resistance values allowed).

For example, let me pick 2.00 K ohms as the bottom leg of the voltage
divider.  That means I need 12.00 K ohms as the upper leg of the voltage
divider. Well, 12.00 K ohms is not a standard value, so I need to try again:
So I'll try the next standard value for the bottom leg -- 2.05 K ohms
(standard value). This would require 12.3 K ohms as the top resistor which
is not a standard value. Try again...ad nauseam...

Some values are exact integer multiples of each other -- what's the quickest
and easiest way to identify them?
Does anyone have something in their 'toolbox' they'd like to share?

Does anyone know of any existing chart, software, or Excel spreadsheet that
already exists to do this. I realize this is simple math and I could go off
and do this myself, but it would be nice having something that already
exists. I'm sure a lot of people have had a need for this at one time or
another.

Thanks very much.

Best regards,

Ken Pergola

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2003\08\09@235440 by M. Adam Davis

flavicon
face
This is an interesting question.  As far as your example goes, I'd say
that using a 6k resister and a 2k would yield 1/4 the voltage at the
junction.  The 12k and 2k would be 1/7 the voltage.

To answer the question though, there's little point to trying to get
integer multiples of resistors to build nice bridges.  The reason the
values jump oddly from one value to the next is simply because, in the
case of 5% resistors, 5% of 1.3 and 1.5 are large enough that having a
1.4 would really be redundant.

In the 5% resistor world there are really only 24 values:
10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30,
33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91
Which are close to 10% away from each other.  You create all the
standard 5% resistor values by multiplying by some magnitude of 10.

I don't have my digikey catalog handy, otherwise I'd look in its list of
1% resistors to see what those standard values are.  However, there are
good reasons for having the list we have.

Currently the above 24 values, when factored, contain 11 of the 25 prime
numbers from 2 to 100:
2, 3, 5, 7, 11, 13, 17, 31, 41, 43, 47
Missing the following:
19, 23, 29, 37, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

This means that it's possible to have very few resistors to represent a
divider of any combination of those primes.  You want a divide by four?
Use the 10 and 30.  Divide by 8? 56 and 91 are divisible by 7.  91 is
easier to use since its factors are 7 and 13, so parallel the 91 with 13
and you'll have a 7 ohm resister.  Use a 1 ohm to get your 1/8th.

3/8?  Put two 30s and a 20 in series and use one of the junctions.

In the end it's all about factors, whether you're using the 1% or 5%.
Since there are more options among the 1% you probably have a wider
range of choices, and it becomes more complex - I don't think there'll
be an 'easy' in your head calculation that will give you what you want,
but if you practise I'm sure you can learn the factors of the resistors
and do the calculation in your head.

Interesting trivia:
13 resistors are divisible by 2 (have factors of 2)
11 have factors of 3
5 have factors of 5
2 have factors of 7
3 have factors of 11
3 have factors of 13
2 have factors of 17
1 each have factors of 31, 41, 43, 47

So you can represent any resistance which only has factors of those
primes with a 'small' number of resistors.  In theory you could
represent any resistance with an infinite number of resistors.

Probably doesn't answer your question, but I'm pretty bored right this
minute, and I've always found use for factorization.  It would be
interesting to generate a table of fractions to 1/8, but once you start
using more than a few resistors the tolerance just gets to large.  It
probably wouldn't be useful to do much finer than 1/8, even with 1%
resistors.

-Adam

Ken Pergola wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu

2003\08\10@002143 by Ken Pergola

flavicon
face
Hi Adam,

Whew!

Thanks for the comments -- I guess you were bored! :) I'm kiddin' with you.
I caught my error too -- I meant to write 12.0 K ohm.

Seriously, I appreciate your lengthy response, but I was looking at things
more from a time-saver design standpoint when you need to use scaling
resistors with op-amps and want to be as precise as possible. Even in
non-integer cases too.

I thought that there may be someone out there that has a nifty Excel
spreadsheet where you type in a resistor value, the scaling factor, and it
searches through the standard 1% values in a table to find an integer match
if possible, and if not the resistor combo that is the closest to the ideal.

Hey, I like your resistor trivia!


Thanks again Adam.

Regards,

Ken Pergola










{Original Message removed}

2003\08\10@005948 by Picdude

flavicon
face
I wrote a C program some months ago that asks for a resulting resistance,
then it chooses 2 resistors from a list of standard values and calculates how
it could come up with the resulting resistance either in parallel or series.  It outputs many possible combinations within a tolerance that you also enter.
And it sorts in by how close it gets.

With a few minutes of work, you could adapt it for voltage dividers quite easily.  Let me know if you want it, and I'll forward it.

Cheers,
-Neil.




On Saturday 09 August 2003 21:47, Ken Pergola scribbled:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@010814 by Ken Pergola

flavicon
face
Hi Neil,

Thanks. If you don't mind sending it I'd appreciate it greatly. Right now
I'm just playing with this in Excel.

Thanks kindly,

Ken Pergola


{Original Message removed}

2003\08\10@013958 by Picdude

flavicon
face
part 1 4182 bytes content-type:text/plain; (decoded quoted-printable)

Attached.  If you can't open .tgz, I can send a zip instead.

There were supposed to be 2 data files of resistance values (with 1 per line) -- the intention was that the primary is the resistors I actually have, and the secondary is what I can get.  But IIRC, I never finished implementing the secondary-resistors file.

The tolerance you specify is the tolerance to the stated value, and does not take the resistors' tolerances into account.

Excuse the coding inefficiency -- it had been a while since I programmed anything serious in C. :-)

I'm actually looking at the code now, so give me a couple minutes and I'll see if I can convert it easily.

Cheers,
-Neil.



On Sunday 10 August 2003 00:08, Ken Pergola scribbled:
> Hi Neil,
>
> Thanks. If you don't mind sending it I'd appreciate it greatly. Right now
> I'm just playing with this in Excel.
>
> Thanks kindly,
>
> Ken Pergola
>
>
> {Original Message removed}
part 2 9353 bytes content-type:application/x-tgz; (decode)

2003\08\10@015116 by Ken Pergola

flavicon
face
Hi Neil,

I'm sorry, but I'll have to download something to open the .tgz file (Linux
compression format?)

Don't worry about the code -- I know the feeling -- either you never have
the time to do it the way you want, or you just realized how much you've
grown as a coder when you look at old code and say "did I write that"?

Thanks very much.

Regards,

Ken Pergola



{Original Message removed}

2003\08\10@015327 by Picdude

flavicon
face
part 1 5349 bytes content-type:text/plain; (decoded quoted-printable)

Okay, that was fairly simple.  I guess I'm not as washed up w.r.t. C-programming as I thought I was :-)

I've attached a new file called rdiv.c .  Add/remove resistors for what you have and run it.  For 1/7 (IIRC that's what you asked for, type in the value "0.1429" for the ratio, and try 2% accuracy ... you'll get some possible combinations.  For exact multiples, use 0% for accuracy.

Thanks for the exercise -- it was a refreshing break from all the other crap I have to do here. :-)

Cheers,
-Neil.




On Sunday 10 August 2003 00:46, Picdude scribbled:
{Quote hidden}

> > {Original Message removed}
part 2 5751 bytes content-type:text/x-csrc;
(decoded 7bit)

#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <math.h>


float rreq, areq;
double rmin, rmax;
FILE *frespri, *fressec;
int num_res, i, j;
char sres[51];
double r;
char res[1000][50];                     // Array of resistors available
double accuracy;
struct resultnode
{
   double accuracy;
   char r1[51];
   char r2[51];
   double rnet;
   char format;
};
struct resultnode results[500];         //Overkill, I know
int num_results;
char r1[51], r2[51];
double rnet;
char format;
int anotherpass;
char c;


double divcalc(double, double);


main(int argc, char *argv[])
{
   printf("\n***************************\n");
   printf("RESISTOR-DIVIDER CALCULATOR\n");
   printf("***************************\n\n");

   while ((c=getopt(argc, argv, "h")) != -1)
   {
       if (c=='h')
       {
           printf("Usage: rcalc [-h]\n");
           printf("Prompts:\n");
           printf("   Required ratio -- the voltage-divider ratio you're trying to achieve\n");
           printf("   Accuracy -- error allowance (over stated value)\n");
           printf("Note:  rdiv does not calculate for tolerance of available resistors.\n");
           printf("Additional files:\n");
           printf("   rdiv_primary.dat -- list of common/easily-available resistors\n");
           exit (0);
       }
   }

   // Get list of primary resistors...
   printf("Loading primary resistor values...");
   if ((frespri=fopen("rdiv_primary.dat","r"))==NULL)
   {
       printf("\n   ERROR: Could not load primary resistors data.\n");
       exit(1);
   }
   else
   {
       // Build list of resistors...
       num_res = 0;
       while (!feof(frespri))
       {
           if (fgets(sres,50,frespri) != NULL)
           {
               sres[strlen(sres)-1] = '\0';
               strcpy(res[num_res],sres);
               num_res++;
           }
       }

       fclose(frespri);

       printf("done (%d).\n\n", num_res);
   }

   // Print back all values in table to check...
   //for (i=0; i<num_res; i++)
   //    printf("Check >%s<\n", res[i]);


   // Get requirements...
   printf("Enter required voltage-divider ratio (< 1) ... ");
   scanf("%f", &rreq);

   printf("Enter accuracy (%) ... ");
   scanf("%f", &areq);


   // Initial calculations...
   rmin = (double)rreq*(100-(double)areq)/100;
   rmax = (double)rreq*(100+(double)areq)/100;

   printf("\nTarget ratio = %.4f ohms\n",rreq);
   printf("Accuracy = %.2f\%\n", areq);
   printf("Acceptable range = %.4f to %.4f \n\n", rmin, rmax);


   // Test all pairs ...
   printf("Calculating...");
   num_results = 0;
   for (i=0; i<num_res; i++)
   {
       for (j=i; j<num_res; j++)
       {
           // Test voltage divider pairs...
           r = divcalc(atof(res[i]), atof(res[j]));
           if (r >= rmin && r <=rmax)
           {
              accuracy = 100*fabs((r-rreq)/rreq);
              results[num_results].accuracy = accuracy;
              results[num_results].rnet = r;
              results[num_results].format = 'P';
              strcpy(results[num_results].r1, res[i]);
              strcpy(results[num_results].r2, res[j]);
              num_results++;
              //printf("Voltage-divider: %s || %s = %.4f (%.2f\%)\n", res[i], res[j], r, accuracy);
           }
       }
   }
   printf("done.\n");


   // Sort results here by resulting accuracy...
   printf("Sorting...");
   if (num_results >1)
   {
       anotherpass = 1;
       while (anotherpass)
       {
           anotherpass=0;
           for (i=0; i<num_results-1; i++)
           {
               if (results[i].accuracy > results[i+1].accuracy)
               {
                   // Swap nodes...
                   accuracy = results[i].accuracy;
                   rnet = results[i].rnet;
                   format = results[i].format;
                   strcpy(r1, results[i].r1);
                   strcpy(r2, results[i].r2);

                   results[i].accuracy = results[i+1].accuracy;
                   results[i].rnet = results[i+1].rnet;
                   results[i].format = results[i+1].format;
                   strcpy(results[i].r1, results[i+1].r1);
                   strcpy(results[i].r2, results[i+1].r2);

                   results[i+1].accuracy = accuracy;
                   results[i+1].rnet = rnet;
                   results[i+1].format = format;
                   strcpy(results[i+1].r1, r1);
                   strcpy(results[i+1].r2, r2);

                   anotherpass=1;              // Gotta run thru again.
               }
           }
       }
   }
   printf("done.\n");


   // Display results...
   if (num_results==0)
       printf("No solutions found.\n");
   else
   {
       printf("Solutions...\n");
       for (i=0; i< num_results; i++)
       {
           printf("  V-Divider: %s || %s = %.4f (%.2f\%)\n",
               results[i].r1,
               results[i].r2,
               results[i].rnet,
               results[i].accuracy);
       }
   }



   // TODO:  Read extended resistors file here...

   printf("\n\n");
}


double divcalc(double a, double b)
{
   double c;

   c=(a/(a+b));
   return c;
}



part 3 678 bytes content-type:text/plain;
(decoded 7bit)

10
22
47
100
120
150
180
220
270
330
390
470
560
680
820
1000
1200
1500
1800
2200
2700
3300
3900
4700
5600
6800
8200
10000
12000
15000
18000
22000
27000
33000
39000
47000
56000
68000
82000
100000
120000
150000
180000
220000
270000
330000
390000
470000
560000
680000
820000
1000000
1200000
1500000
1800000
2200000
2700000
3300000
3900000
4700000
5600000
6800000
8200000
10000000
12000000
15000000
18000000
22000000
27000000
33000000
39000000
47000000
56000000
68000000
82000000
100000000

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



2003\08\10@021232 by Ken Pergola

flavicon
face
Hi Neil,

Thanks very much for the attachment and for sharing.

I'll probably get to it tomorrow.

Best regards,

Ken Pergola



{Original Message removed}

2003\08\10@021641 by Picdude

flavicon
face
On Sunday 10 August 2003 00:50, Ken Pergola scribbled:
> Don't worry about the code ...

Oops, too late. :-)

Cheers,
-Neil.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@041453 by Michael Davidson

flavicon
face
>Hi Neil,
>
>I'm sorry, but I'll have to download something to open the .tgz file (Linux
>compression format?)

It's a fairly common format (TAR - GNU Zipped). If you're on Windows then
WinZip will open it. Heck, I think even the built in View-Zip-As-Folder
Explorer extension may even do it (But don't quote me).

Michael
--

Drive defensively.  Buy a tank.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@052658 by Nate Duehr

face
flavicon
face
Ken Pergola wrote:

> Hi Neil,
>
> I'm sorry, but I'll have to download something to open the .tgz file (Linux
> compression format?)

The later versions of WinZip will handle .tgz files just fine on Windows
platforms.

Not sure if I should tag this [OT] now or not...

--
Nate Duehr, .....nateKILLspamspam.....natetech.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@061632 by

picon face
Back to the original problem...
Why do you need a 1/4 divider ?
Can't you use (e.g.) 1/10 and adjust in software ?

Note also that there are special made "decade"
and "binary" divisors, much like the standard
"resistor nets" that might help.

And, if you check high precision resistors
(0.1%), you'll find that some of them do not
follow any E-series values, but comes in e.g.
1k, 2k, 5k, 10k, 20k, 40k, 50k and 100k.
Fine to build dividers.

The 0.1% series also has better temp coef, b.t.w

Jan-Erik.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@085730 by Olin Lathrop

face picon face
> I thought that there may be someone out there that has a nifty Excel
> spreadsheet where you type in a resistor value, the scaling factor, and
> it searches through the standard 1% values in a table to find an
> integer match if possible, and if not the resistor combo that is the
> closest to the ideal.

I don't know of one, but it should take less time to write such a program
than the time you seem to have spent agonizing of this problem so far.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@114707 by Ken Pergola

flavicon
face
Hi Jan-Erik,

Thank you for the comments. I was coming more from a hypothetical angle --
the divide by 7 was an example.
Thanks for the tempco tip.

Best regards,

Ken Pergola



{Original Message removed}

2003\08\10@120027 by Picdude

flavicon
face
On Sunday 10 August 2003 05:14, Jan-Erik Soderholm XA (TN/PAC) scribbled:
> Back to the original problem...
> Why do you need a 1/4 divider ?
> Can't you use (e.g.) 1/10 and adjust in software ?

Since 2 resistors are needed anyway, being able to get the ratio you need can make life quite simple by not having to do significant math.  I do this currently with a limited-range PIC-based voltmeter -- by getting an exact ratio (within the tolerances of the 1% resistors, that is), and using a 4.096V voltage reference, the math in the PIC is as simple as multiplying by an integer.

Also, if I would've strayed too far from the best ratio (like using 1/10 instead of a required 1/4), then I wouldn't be using the full a/d range on the PIC input.

Cheers,
-Neil.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\10@150322 by

picon face
I see.
So the answer is then, don't build (precision) voltage
dividers with standard (E-series) resistors. There are
ready made components for this. Vishay has a couple
a 3-leads (SOT-23) components with rations between 1:1
to 1:100, and also "decade dividers"  with 5 or
6 steps (1:10, 1:100, 1:1000, 1:10000 1:100000) in the
same package. These are 0.05% "ratio tolerance" with a
2.5 ppm/C temp coeff. Or use "stadard" 0.1% resistors
that has vaules in "decimal" steps, not the normal
(logarithmic) E-series steps, and build your own
custom divider with these.

Jan-Erik.



Ken Pergola wrote:

> Hi Jan-Erik,
>
> Thank you for the comments.
> I was coming more from a hypothetical angle --

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\08\11@063948 by Alan B. Pearce

face picon face
>Without pulling out the calculator or spreadsheet and doing it manually,
>what is the quickest way to come up with resistors that are exact *integer*
>multiples of each other (from the 1% standard value list)?
>
>Let me elaborate: In other words, say I want to make a 'divide by 4'
voltage
>divider using 1% resistors and *only* two resistors (no building of new
>resistance values allowed).

And what sort of tolerance in division ratio are you prepared to put up
with?

Try doing a calculation of the division ratio when each resistor is at the
limits of its value. You may find that you are actually better off to get
0.1% resistors where you are more likely to get a pair of values very close
to the ratio you want, and for only a tiny bit more in cost. If not then it
is just as easy to put another pair of pads on the board to have a pair of
SOT positions.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...