too many possibilities...

jlarkin@highlandsniptechnology.com wrote:

Now I have 19 different resistor values on my BOM. That makes
something like 8^19 possibilities. I also have 5 quad r-packs, each of
which can have 15 possible arrangements to make an equivalent
resistor.

I don\'t understand your math here. These realisable dividers are
independent problems so that eight or whatever it is does not go into
the base unless you make complex dividers out of simpler dividers. So it
makes 8*something, not 8^something and can be computed in parallel if
you have nothing better to do. Then, the complexity of \"something\" is
limited by the number of resistors it can be composed of.
If you have 3 resistors of 19 possible values, the complexity of the
full scan is then 19^3, not 3^19.

I routinely scan for 3-resistor combinations from the E192 space using
full state-space exploration. Any effort to optimise it would be wasted
time.

Best regards, Piotr
 
On Mon, 12 Oct 2020 22:32:37 -0700, Joerg <news@analogconsultants.com>
wrote:

On 10/10/20 10:41 AM, jlarkin@highlandsniptechnology.com wrote:


I\'m tweaking a big schematic to get to my layout guy first thing
Monday.

I\'ve got a few places where I need a specific resistor ratio. One is
for a home-made LDO to make a lot of clean 3.3 volt power. Another is
to make a very accurate +20 volt supply. Another is to scale a DAC
output into a varicap. Our pick-and-place will use almost all its
feeders on this board, so I prefer to use only resistors that are
already on the BOM.

A little futzing with a calculator suggests that I don\'t have values
available, given two resistors per divider and parts already on the
BOM. The BOM has already been brutally minimized.

I can tweak a divider with a third resistor. In series with the upper
or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

I could write a program that brute-force tries all possibilities of
values in some series-parallel circuit, say with 8 places where 4
resistors might go. It might run in minutes or years. Ugly.


This is where the old sliderule shines. In the past I have used one to
find LC ratios and such from catalog values, and there you have much
less selection versus resistors. Maybe a sliderule method using only
entered BOM values could be poured into code?

Slide rules don\'t add or subtract!

One day at a big company one of their engineers tapped on my shoulder.
\"You know, we do have electricity available here\".

[...]

I have a giant wooden drafting table sitting in the natural light of a
very big window. I draw on D-size vellum with a pencil.

I confess that I use an electric eraser and an electric pencil
sharpener.

It\'s hard to even buy D-size blue-grid vellum any more.

But no slide rules. Even my HP 32SII calculators are ancient
technology now. I need a simulator for my Android phone.

I got one of the first HP35\'s, which cost more than a motorcycle then.
I think in Reverse Polish now.

Before I got the \'35, I had an HP9100 calculator, which cost more than
a new car.



--

John Larkin Highland Technology, Inc

Science teaches us to doubt.

Claude Bernard
 
John Larkin wrote:

And how do you count them?

Count what?

Possible dividers constructible of the available resistors in an N-pack.
There are not that many and most of the arrangements are symmetric.

You count them in a wrong way and then are lamenting that the complexity
goes through the roof. Fix your math first. Then you will clearly see
that the problem is amenable to a brute force approach.

In the case of arrays, the task becomes particularly straightforward, as
the values come in a very limited quantity. As far as I know, there are
no arrays with every elementary resistor coming from the E192 possible
values, unless you order them as custom parts.

Best regards, Piotr
 
On Tue, 13 Oct 2020 18:06:56 +0200, Piotr Wyderski
<peter.pan@neverland.mil> wrote:

jlarkin@highlandsniptechnology.com wrote:

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

The equations describing a divider composed of N resistors are simple
for any value of N. If you feed them with all possible values of the
available resistors and store, say, 100 most promising candidates, you
will get your divider. There is no point in going with N>4 anyway, as
the tolerance is finite.

How many divider tolologies can be made from 8 resistors?

For each topology, I can put any one of 19 resistor values at any
location.

Even the 3-resistor cases (I think there are five) are a nuisance to
calculate.

MIPS are cheap nowadays, and there are so many of them per night. Let
the computer compute it for you when you are sleeping.

Sure, but I need a program first. I can\'t do that in my sleep.



There are more
sophisticated approaches based on, e.g. gradient descent, but you should
stick to a brute-force self-evidently correct 50-liner in C++, Java,
Matlab or whatever you like. The most challenging part is typing all
that E192 mantissa values.

Dividers are trivial if I\'m willing to buy new E192 parts. Less
trivial to make dividers from parts in stock, but my Rugrat program
does that. Downright tedious to do all my circuit functions on a
32-page schematic with, say, 20 values allowed.

Oh well, my board design is done. But this math puzzle will be back.





--

John Larkin Highland Technology, Inc

Science teaches us to doubt.

Claude Bernard
 
On 10/13/20 9:27 AM, jlarkin@highlandsniptechnology.com wrote:
On Mon, 12 Oct 2020 22:32:37 -0700, Joerg <news@analogconsultants.com
wrote:

On 10/10/20 10:41 AM, jlarkin@highlandsniptechnology.com wrote:


I\'m tweaking a big schematic to get to my layout guy first thing
Monday.

I\'ve got a few places where I need a specific resistor ratio. One is
for a home-made LDO to make a lot of clean 3.3 volt power. Another is
to make a very accurate +20 volt supply. Another is to scale a DAC
output into a varicap. Our pick-and-place will use almost all its
feeders on this board, so I prefer to use only resistors that are
already on the BOM.

A little futzing with a calculator suggests that I don\'t have values
available, given two resistors per divider and parts already on the
BOM. The BOM has already been brutally minimized.

I can tweak a divider with a third resistor. In series with the upper
or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

I could write a program that brute-force tries all possibilities of
values in some series-parallel circuit, say with 8 places where 4
resistors might go. It might run in minutes or years. Ugly.


This is where the old sliderule shines. In the past I have used one to
find LC ratios and such from catalog values, and there you have much
less selection versus resistors. Maybe a sliderule method using only
entered BOM values could be poured into code?


Slide rules don\'t add or subtract!

Normally you don\'t need to, assuming you want to get by with just two
components. All you need to achieve is a ratio. Well, disregarding the
error term from the regulator adjust pin current.

If three parts then adding 100ohms or whatever by memory is easy.


One day at a big company one of their engineers tapped on my shoulder.
\"You know, we do have electricity available here\".

[...]

I have a giant wooden drafting table sitting in the natural light of a
very big window. I draw on D-size vellum with a pencil.

I confess that I use an electric eraser and an electric pencil
sharpener.

It\'s hard to even buy D-size blue-grid vellum any more.

I should have brought you my vellum when I was down there. Next time I
sure should.


But no slide rules. Even my HP 32SII calculators are ancient
technology now. I need a simulator for my Android phone.

I got one of the first HP35\'s, which cost more than a motorcycle then.
I think in Reverse Polish now.

I still use an HP-11C. When I sat for the US ham radio exams I asked
around if friends had a spare calculator with trig functions for the
unlikely event that the HP-11C quits on me. None did. None! Since cell
phones are prohibited for obvious reasons I brought my slide rule. And
yeah, again some people stared at that thing.


Before I got the \'35, I had an HP9100 calculator, which cost more than
a new car.

Early adopters always bear the brunt. Our family was first in town with
PCs. Dad always had the latest and greatest from IBM , starting with
this one:

https://en.wikipedia.org/wiki/IBM_5100#/media/File:IBM_5100_-_MfK_Bern.jpg

The model with 64k RAM cost a lot more than a car back in the 70\'s.

--
Regards, Joerg

http://www.analogconsultants.com/
 
On Tue, 13 Oct 2020 18:37:01 +0200, Piotr Wyderski
<peter.pan@neverland.mil> wrote:

John Larkin wrote:

And how do you count them?

Count what?

Possible dividers constructible of the available resistors in an N-pack.
There are not that many and most of the arrangements are symmetric.

You count them in a wrong way and then are lamenting that the complexity
goes through the roof. Fix your math first. Then you will clearly see
that the problem is amenable to a brute force approach.

How many dividers can be made from two identical quad r-packs, namely
8 identical isolated resistors?

Then how many using two different-value quad r-packs?



--

John Larkin Highland Technology, Inc

Science teaches us to doubt.

Claude Bernard
 
jlarkin@highlandsniptechnology.com wrote:

> How many divider tolologies can be made from 8 resistors?

1. There is only one topology composed of one resistor.
2. Any topology composed of N+1 resistors can be created by connecting a
single resistor to any N-resistor topology either in series with it as a
whole or to any resistor it contains or in parallel to any two different
nodes of the N-resistor circuit.

With this recursive rule you will be able to enumerate all possible
arrangements.

For each topology, I can put any one of 19 resistor values at any
location.

But it does not make any practical sense. You either have N<=4 for any
possible resistor value or N as big as 8, but the values are equal and
then you are operating on ratios, not values. Got a quad with 1k, 1.1k,
1.2k and 1.3k on the same chip?

Indeed, if you make your life deliberately hard, it will be hard. Try
working smart, not hard.

Even the 3-resistor cases (I think there are five) are a nuisance to
calculate.

Oh, come on. For 3 resistors you have only 6 topologies to consider.
R1+R2+R3, R1+(R2|R3), (R1|R2)+R3, (R1+R2)|R3, R1|(R2
+R3), R1|R2|R3. 6*192^3, piece of cake for a PC. And embarrassingly
parallel if you need that.

> Sure, but I need a program first. I can\'t do that in my sleep.

Indeed, with this kind of attitude only a magic wand would help.

Dividers are trivial if I\'m willing to buy new E192 parts. Less
trivial to make dividers from parts in stock

Fewer values make the problem simpler, not harder.

Best regards, Piotr
 
jlarkin@highlandsniptechnology.com wrote:

How many dividers can be made from two identical quad r-packs, namely
8 identical isolated resistors?

Then how many using two different-value quad r-packs?

I have already given you a bottom-up enumeration algorithm, so code it
and count.

Or is it a commercial inquiry?

Best regards, Piotr
 
On Tue, 13 Oct 2020 10:23:10 -0700, Joerg <news@analogconsultants.com>
wrote:

On 10/13/20 9:27 AM, jlarkin@highlandsniptechnology.com wrote:
On Mon, 12 Oct 2020 22:32:37 -0700, Joerg <news@analogconsultants.com
wrote:

On 10/10/20 10:41 AM, jlarkin@highlandsniptechnology.com wrote:


I\'m tweaking a big schematic to get to my layout guy first thing
Monday.

I\'ve got a few places where I need a specific resistor ratio. One is
for a home-made LDO to make a lot of clean 3.3 volt power. Another is
to make a very accurate +20 volt supply. Another is to scale a DAC
output into a varicap. Our pick-and-place will use almost all its
feeders on this board, so I prefer to use only resistors that are
already on the BOM.

A little futzing with a calculator suggests that I don\'t have values
available, given two resistors per divider and parts already on the
BOM. The BOM has already been brutally minimized.

I can tweak a divider with a third resistor. In series with the upper
or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

I could write a program that brute-force tries all possibilities of
values in some series-parallel circuit, say with 8 places where 4
resistors might go. It might run in minutes or years. Ugly.


This is where the old sliderule shines. In the past I have used one to
find LC ratios and such from catalog values, and there you have much
less selection versus resistors. Maybe a sliderule method using only
entered BOM values could be poured into code?


Slide rules don\'t add or subtract!


Normally you don\'t need to, assuming you want to get by with just two
components. All you need to achieve is a ratio. Well, disregarding the
error term from the regulator adjust pin current.

If three parts then adding 100ohms or whatever by memory is easy.


One day at a big company one of their engineers tapped on my shoulder.
\"You know, we do have electricity available here\".

[...]

I have a giant wooden drafting table sitting in the natural light of a
very big window. I draw on D-size vellum with a pencil.

I confess that I use an electric eraser and an electric pencil
sharpener.

It\'s hard to even buy D-size blue-grid vellum any more.


I should have brought you my vellum when I was down there. Next time I
sure should.

Maybe the Mission Saloon will be open by then. You\'ll like Jessica.

But no slide rules. Even my HP 32SII calculators are ancient
technology now. I need a simulator for my Android phone.

I got one of the first HP35\'s, which cost more than a motorcycle then.
I think in Reverse Polish now.


I still use an HP-11C. When I sat for the US ham radio exams I asked
around if friends had a spare calculator with trig functions for the
unlikely event that the HP-11C quits on me. None did. None! Since cell
phones are prohibited for obvious reasons I brought my slide rule. And
yeah, again some people stared at that thing.


Before I got the \'35, I had an HP9100 calculator, which cost more than
a new car.


Early adopters always bear the brunt. Our family was first in town with
PCs. Dad always had the latest and greatest from IBM , starting with
this one:

https://en.wikipedia.org/wiki/IBM_5100#/media/File:IBM_5100_-_MfK_Bern.jpg

The model with 64k RAM cost a lot more than a car back in the 70\'s.

My PDP-8I cost $12K, with a teletype and 4K of 12-bit core. That would
have bought a house.



--

John Larkin Highland Technology, Inc

Science teaches us to doubt.

Claude Bernard
 
On Tue, 13 Oct 2020 19:31:02 +0200, Piotr Wyderski
<peter.pan@neverland.mil> wrote:

jlarkin@highlandsniptechnology.com wrote:

How many divider tolologies can be made from 8 resistors?

1. There is only one topology composed of one resistor.
2. Any topology composed of N+1 resistors can be created by connecting a
single resistor to any N-resistor topology either in series with it as a
whole or to any resistor it contains or in parallel to any two different
nodes of the N-resistor circuit.

With this recursive rule you will be able to enumerate all possible
arrangements.

OK, it\'s simple. What\'s the answer?

For each topology, I can put any one of 19 resistor values at any
location.

But it does not make any practical sense. You either have N<=4 for any
possible resistor value or N as big as 8, but the values are equal and
then you are operating on ratios, not values. Got a quad with 1k, 1.1k,
1.2k and 1.3k on the same chip?

Indeed, if you make your life deliberately hard, it will be hard. Try
working smart, not hard.

Even the 3-resistor cases (I think there are five) are a nuisance to
calculate.

Oh, come on. For 3 resistors you have only 6 topologies to consider.

And 19 candidate values. I got my 20 volt supply to 20.25 with
available parts, good enough.


R1+R2+R3, R1+(R2|R3), (R1|R2)+R3, (R1+R2)|R3, R1|(R2
+R3), R1|R2|R3. 6*192^3, piece of cake for a PC. And embarrassingly
parallel if you need that.

Sure, but I need a program first. I can\'t do that in my sleep.

Indeed, with this kind of attitude only a magic wand would help.

Dividers are trivial if I\'m willing to buy new E192 parts. Less
trivial to make dividers from parts in stock

Fewer values make the problem simpler, not harder.

Best regards, Piotr

The limiting case is \"impossible\", which is admittedly simple.



--

John Larkin Highland Technology, Inc

Science teaches us to doubt.

Claude Bernard
 
jlarkin@highlandsniptechnology.com wrote:

> OK, it\'s simple. What\'s the answer?

No idea, I guess it is in the 50e3-1e6 ballpark. Giving an exact answer
would be only barely simpler than solving your general problem. And
solving your general problem would be a commercial activity.

Oh, come on. For 3 resistors you have only 6 topologies to consider.

And 19 candidate values. I got my 20 volt supply to 20.25 with
available parts, good enough.

One of the six enumerated is not even a proper divider, but detecting
this kind of outliers could be more costly than incorrectly assuming it
is a valid arrangement and performing the calculations blindly. Barely
41154 possibilities.

> The limiting case is \"impossible\", which is admittedly simple.

The limiting case is the ratio 0.5, which you may like or not.
How close you need to be is an input parameter.

Best regards, Piotr
 
On Tue, 13 Oct 2020 19:36:27 +0200, Piotr Wyderski
<peter.pan@neverland.mil> wrote:

jlarkin@highlandsniptechnology.com wrote:

How many dividers can be made from two identical quad r-packs, namely
8 identical isolated resistors?

Then how many using two different-value quad r-packs?

I have already given you a bottom-up enumeration algorithm, so code it
and count.

Oh. I thought it was simple and you\'d know the answer.

Or is it a commercial inquiry?

At this point, it\'s just interesting to me, exploring an enormous
solution space in a finite time. (I prefer overnight, but this isn\'t
that sort of problem.)

But if there was a good program that found resistors and dividers,
from a list of available values, I\'d pay for it.
 
John Larkin wrote:

> Oh. I thought it was simple and you\'d know the answer.

It is not trivial and I cannot give you the answer off the tip of my
head. The three first values are 1, 2, 6 -- looks very much like the
factorial function. If it is indeed the case, the answer would be 40320.
Validating that would require more effort than I am willing to spend at
the moment. Anyway, what I am trying to say is that the state space will
be smaller than you suggest and perfectly amenable to automated
exploration for the value of 8.

Best regards, Piotr
 
This troll almost never posts about electronics,
but when it does even then it\'s a troll...

--
Bill Sloman <bill.sloman@ieee.org> wrote:

X-Received: by 2002:ae9:ee01:: with SMTP id i1mr8375762qkg.11.1602467004636; Sun, 11 Oct 2020 18:43:24 -0700 (PDT)
X-Received: by 2002:ac8:6a05:: with SMTP id t5mr8113431qtr.269.1602467004452; Sun, 11 Oct 2020 18:43:24 -0700 (PDT)
Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 11 Oct 2020 18:43:24 -0700 (PDT)
In-Reply-To: <rlv6gm$10nh$1@gioia.aioe.org
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=202.53.36.8; posting-account=SJ46pgoAAABuUDuHc5uDiXN30ATE-zi-
NNTP-Posting-Host: 202.53.36.8
References: <fuq3ofh1bklp18olftus3nbcq058cgaijr@4ax.com> <rlv6gm$10nh$1@gioia.aioe.org
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7798430-38f1-47e0-a55f-7e630d11ca57n@googlegroups.com
Subject: Re: too many possibilities
From: Bill Sloman <bill.sloman@ieee.org
Injection-Date: Mon, 12 Oct 2020 01:43:24 +0000
Content-Type: text/plain; charset=\"UTF-8\"
Content-Transfer-Encoding: quoted-printable
Lines: 32
Xref: reader02.eternal-september.org sci.electronics.design:610295

On Monday, October 12, 2020 at 1:57:37 AM UTC+11, Martin Brown wrote:
On 10/10/2020 18:41, jla...@highlandsniptechnology.com wrote:


I can tweak a divider with a third resistor. In series with the upper

or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.
You only have a quite finite number of resistor values on the board
enumerate their possible values in the series and series parallel
combinations you are prepared to allow and then create a sorted list to

search for your chosen ratio at acceptable precision.

It isn\'t unlike writing a solver for the TV show \"Countdown\" where with

reasonable reliability you can hit any 3 digit target from 6 random
numbers and the various arithmetic operators. Bit more limited in this
case since you only have additive series or parallel combinations.

https://en.wikipedia.org/wiki/Countdown_(game_show)#Numbers_round

Negative resistors are very hard to come by.

Negative resistance is fairly easy to set up - over a finite frequency range. Philips had a motor control circuit that cancelled out the series resistance of the windings in a DC motor to that iwould keep it on spinning at the same speed even if the load increased - but only up to a point.

--
Bill Sloman, Sydney
 
On Wednesday, October 14, 2020 at 12:34:45 PM UTC+11, John Doe wrote:
This troll almost never posts about electronics,
but when it does even then it\'s a troll...

--
Bill Sloman <bill....@ieee.org> wrote:

X-Received: by 2002:ae9:ee01:: with SMTP id i1mr8375762qkg.11.1602467004636; Sun, 11 Oct 2020 18:43:24 -0700 (PDT)
X-Received: by 2002:ac8:6a05:: with SMTP id t5mr8113431qtr.269.1602467004452; Sun, 11 Oct 2020 18:43:24 -0700 (PDT)
Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 11 Oct 2020 18:43:24 -0700 (PDT)
In-Reply-To: <rlv6gm$10nh$1...@gioia.aioe.org
Complaints-To: groups...@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=202.53.36.8; posting-account=SJ46pgoAAABuUDuHc5uDiXN30ATE-zi-
NNTP-Posting-Host: 202.53.36.8
References: <fuq3ofh1bklp18olf...@4ax.com> <rlv6gm$10nh$1...@gioia.aioe..org
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7798430-38f1-47e0...@googlegroups.com
Subject: Re: too many possibilities
From: Bill Sloman <bill....@ieee.org
Injection-Date: Mon, 12 Oct 2020 01:43:24 +0000
Content-Type: text/plain; charset=\"UTF-8\"
Content-Transfer-Encoding: quoted-printable
Lines: 32
Xref: reader02.eternal-september.org sci.electronics.design:610295

On Monday, October 12, 2020 at 1:57:37 AM UTC+11, Martin Brown wrote:
On 10/10/2020 18:41, jla...@highlandsniptechnology.com wrote:


I can tweak a divider with a third resistor. In series with the upper

or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.
You only have a quite finite number of resistor values on the board
enumerate their possible values in the series and series parallel
combinations you are prepared to allow and then create a sorted list to

search for your chosen ratio at acceptable precision.

It isn\'t unlike writing a solver for the TV show \"Countdown\" where with

reasonable reliability you can hit any 3 digit target from 6 random
numbers and the various arithmetic operators. Bit more limited in this
case since you only have additive series or parallel combinations.

https://en.wikipedia.org/wiki/Countdown_(game_show)#Numbers_round

Negative resistors are very hard to come by.

Negative resistance is fairly easy to set up - over a finite frequency range. Philips had a motor control circuit that cancelled out the series resistance of the windings in a DC motor to that would keep it on spinning at the same speed even if the load increased - but only up to a point.

This troll almost never posts about electronics, but when it does even then it\'s a troll...

The top-posting troll isn\'t all that interested in electronics, so misses most of what I do post.

There\'s absolutely nothing trollish in what I did post - it really is quite easy to set up a negative resistance (as other posts in the same thread also said) and the Philips constant-speed drive for a DC motor really did exist, and was quite well-known for a time. I put one together for a prototype once but we ended up putting a rather different circuit into production - we ended up getting the micro-stirring we wanted from a vibrating element rather than a rotating one.

--
Bill Sloman, Sydney
 
On 13/10/2020 17:45, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 18:06:56 +0200, Piotr Wyderski
peter.pan@neverland.mil> wrote:

jlarkin@highlandsniptechnology.com wrote:

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

The equations describing a divider composed of N resistors are simple
for any value of N. If you feed them with all possible values of the
available resistors and store, say, 100 most promising candidates, you
will get your divider. There is no point in going with N>4 anyway, as
the tolerance is finite.

How many divider tolologies can be made from 8 resistors?

I think the answer to that is 16!/8!/9! but some of them are a complete
waste of parts - at least if the resistors all have the same value.

eg for N=5

--R---R--
|
R
|
--R---R--

As N increases you get other fairly pointless ones that look like
regular N-gons with one resistor spanning a pair of internal nodes and
fishing nets. None of these make much sense for a potential divider.

The best buy solution is to work out all the two terminal series
parallel combinations out to some fixed depth like 4 with your list of
chosen parts. It probably isn\'t worth the effort of going any deeper.

BTW Resistors in the approximate ratio between 1:phi (5:8) and 1:3 look
like about the best buy for spanning a decent range values with the
smallest number of parts in modest combinations hence E12, E24 etc.

For each topology, I can put any one of 19 resistor values at any
location.

x 19^8

Even the 3-resistor cases (I think there are five) are a nuisance to
calculate.


MIPS are cheap nowadays, and there are so many of them per night. Let
the computer compute it for you when you are sleeping.

Sure, but I need a program first. I can\'t do that in my sleep.


There are more
sophisticated approaches based on, e.g. gradient descent, but you should
stick to a brute-force self-evidently correct 50-liner in C++, Java,
Matlab or whatever you like. The most challenging part is typing all
that E192 mantissa values.

Simulated annealing is probably the way to go for this sort of tedious
combinatorial problem keeping the best 10 result(s) found so far in a
safe place until you get bored. It quickly finds a good local optimum at
relatively low computational cost but can also drift away again.

Dividers are trivial if I\'m willing to buy new E192 parts. Less
trivial to make dividers from parts in stock, but my Rugrat program
does that. Downright tedious to do all my circuit functions on a
32-page schematic with, say, 20 values allowed.

Oh well, my board design is done. But this math puzzle will be back.

It is tedious to do by hand but essentially instant for a brute force
attack given a list of available R and a choice of network size N.

The problem that you ought to be wanting an answer to is given a pick
and place machine with M resistor feeds and a BOM requiring N>M distinct
resistor values what is the optimum way to obtain all those values with
specified tolerance from P<=M resistors. A greedy algorithm will
probably suffice. In reality you probably don\'t want any combos of more
than 4 resistors if the board layout isn\'t to look like a rats nest.

That really is a moderately hard NP problem.

--
Regards,
Martin Brown
 
On 14/10/2020 03:17, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 22:56:53 +1100, Chris Jones
lugnut808@spam.yahoo.com> wrote:

On 13/10/2020 15:32, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 12:06:20 +1100, Chris Jones
lugnut808@spam.yahoo.com> wrote:

On 13/10/2020 02:27, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 00:12:58 +1100, Chris Jones
lugnut808@spam.yahoo.com> wrote:

On 11/10/2020 04:41, jlarkin@highlandsniptechnology.com wrote:


I\'m tweaking a big schematic to get to my layout guy first thing
Monday.

I\'ve got a few places where I need a specific resistor ratio. One is
for a home-made LDO to make a lot of clean 3.3 volt power. Another is
to make a very accurate +20 volt supply. Another is to scale a DAC
output into a varicap. Our pick-and-place will use almost all its
feeders on this board, so I prefer to use only resistors that are
already on the BOM.

A little futzing with a calculator suggests that I don\'t have values
available, given two resistors per divider and parts already on the
BOM. The BOM has already been brutally minimized.

I can tweak a divider with a third resistor. In series with the upper
or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

I could write a program that brute-force tries all possibilities of
values in some series-parallel circuit, say with 8 places where 4
resistors might go. It might run in minutes or years. Ugly.

No, if you write it in C you should be able to do pretty much all
possible combinations of (many) more than 4 resistors, in a time that is
negligible for a human. Computers are very fast nowadays.

1. Make a list, of all the resistor values given.
2. Make another list with each thing on the first list in parallel with
each thing on the first list.
3. Make a third list with each thing on the first list in series with
each thing on the first list.
4. Put everything on any of the lists you have so far, into the first list.
5. If you haven\'t used enough resistors yet, go to step 2 again.
6. Now you have a big list. Go through it and pick the thing closest to
what you want. In your case, try all combinations of two things on that
list, as upper and lower resistors in a divider. Try them all and pick
the best one, by whatever criteria make it best for you.

You could do it with some recursive program I guess. I just stored them
all in RAM because I had a lot of resistors to approximate. I also made
it figure out what the standard deviation of the combined resistor was,
because some topologies give better averaging than others.

There are lots of ways to be clever and do it quicker, but there is no need.

I think that there are 8 different dividers that you can make from
four resistors

https://www.dropbox.com/s/m56k4bp21z4fb6z/Rpak_Dividers_1.jpg?raw=1

Now I have 19 different resistor values on my BOM. That makes
something like 8^19 possibilities. I also have 5 quad r-packs, each of
which can have 15 possible arrangements to make an equivalent
resistor.
Ok, I had not expected 19 values in your BOM.

There are 1024 parts on this board, which includes 19 different
single-resistor values (1 ohm to 1 Meg) and 5 different quad r-pack
values. It was a fight to get it down to that. The pick-and-place is
just about out of feeders. As if this wasn\'t hard enough already.

Maybe an exhaustive search
of all of those is not worthwhile as it would take some thought or
effort to make it fast. Probably you would not lose much by excluding
the milliohm and gigaohm values when doing feedback dividers for your LDO.

Exhaustive is a good word.



If you use a quad R-pack, to me that counts as 4 resistors, at least for
computing effort. You were talking about 4 resistors total in the post
that I replied to.

An r-pack just takes one feeder, and has a bunch of value
possibilities. Makes the math problem worse.




So we have 8^34 possibilities. Many more if you are flexible about how
you use the r-pack sections. The program would run for millenia. It
might take millenia just to write.

And this is a simple problem. My main point is that very many circuits
can be made from a few parts.

It\'s a 32-page schematic, and this is just one dumb voltage regulator.

Somehow our brains deal with this, and we get things to work.

It would be cool to write a program that found the best divider that
can be made from two 1K quad r-packs. Even that would be a serious
chore. How many dividers can you make from 8 resistors?

Well, the one that I have actually written used identical unit resistors
because they match well on chips, and the limit where it started to take
more than a few seconds was 13 resistors on my desktop machine 15 years
ago, and a couple more resistors on a bigger machine.

I just tried it again on a dumpster PC, and for example, a pi kOhm
resistor can be made from nine 1 kOhm resistors as:
1+1+((1+1)//(1+1+(1//(1+1))))
There were no better combinations using 10 to 13 resistors.


I might try writing a program for 8 resistors, namely two r-packs.
Different values in the two packs would make it more interesting. But
I want divider ratios, not resistor values.


If you\'re willing to divulge the ratios you want, I can probably find
time to adapt my program to work out ratios, and see if it can give you
an answer - just for fun.

Here\'s a case where I wanted to make a good 20-volt supply based on a
3-volt reference.

https://www.dropbox.com/s/g4q4v2twdv3flc4/P20_Divider.jpg?raw=1

I got to 20.25 with already available parts and manual guesswork.

With 5 identical resistors each Ru in value, the best one can get is
5.6% error. For example, Ru/2 in the bottom, Ru*3 in the top, so 21V out.

With 8 identical resistors, the best one can get is 3% error, many
different ways.

With 9 identical resistors with value Ru, you can get 20V exactly. At
the bottom of the divider is 1Ru, top of the divider is 5.6666Ru, which
can be made from 6 x Ru resistors in series, with 2Ru in parallel with
one of these unit resistors. That is probably fairly obvious though.


I have a lot of stuff on this board that\'s referenced to the +3R, so
many things are ratiometric and errors cancel.

Here\'s another ad-hoc hack:

https://www.dropbox.com/s/djchmdox0tsag83/P12_Switcher.jpg?raw=1

That one is pretty constrained by one half of the divider being inside
the module. Without knowing your BOM, I can\'t really help you with the
other half.
 
On Thu, 15 Oct 2020 23:55:19 +1100, Chris Jones
<lugnut808@spam.yahoo.com> wrote:

On 14/10/2020 03:17, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 22:56:53 +1100, Chris Jones
lugnut808@spam.yahoo.com> wrote:

On 13/10/2020 15:32, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 12:06:20 +1100, Chris Jones
lugnut808@spam.yahoo.com> wrote:

On 13/10/2020 02:27, jlarkin@highlandsniptechnology.com wrote:
On Tue, 13 Oct 2020 00:12:58 +1100, Chris Jones
lugnut808@spam.yahoo.com> wrote:

On 11/10/2020 04:41, jlarkin@highlandsniptechnology.com wrote:


I\'m tweaking a big schematic to get to my layout guy first thing
Monday.

I\'ve got a few places where I need a specific resistor ratio. One is
for a home-made LDO to make a lot of clean 3.3 volt power. Another is
to make a very accurate +20 volt supply. Another is to scale a DAC
output into a varicap. Our pick-and-place will use almost all its
feeders on this board, so I prefer to use only resistors that are
already on the BOM.

A little futzing with a calculator suggests that I don\'t have values
available, given two resistors per divider and parts already on the
BOM. The BOM has already been brutally minimized.

I can tweak a divider with a third resistor. In series with the upper
or lower resistor, or in parallel with either. I could even use four
resistors. We also have several values of quad resistor pack on the
board, and a quad pack has a lot of options.

So the general problem is that there are zillions of possibilities,
surely some good ones, but no good way to find them. Spicing would at
least save a lot of calculator use, but still has no methodical
approach.

I could write a program that brute-force tries all possibilities of
values in some series-parallel circuit, say with 8 places where 4
resistors might go. It might run in minutes or years. Ugly.

No, if you write it in C you should be able to do pretty much all
possible combinations of (many) more than 4 resistors, in a time that is
negligible for a human. Computers are very fast nowadays.

1. Make a list, of all the resistor values given.
2. Make another list with each thing on the first list in parallel with
each thing on the first list.
3. Make a third list with each thing on the first list in series with
each thing on the first list.
4. Put everything on any of the lists you have so far, into the first list.
5. If you haven\'t used enough resistors yet, go to step 2 again.
6. Now you have a big list. Go through it and pick the thing closest to
what you want. In your case, try all combinations of two things on that
list, as upper and lower resistors in a divider. Try them all and pick
the best one, by whatever criteria make it best for you.

You could do it with some recursive program I guess. I just stored them
all in RAM because I had a lot of resistors to approximate. I also made
it figure out what the standard deviation of the combined resistor was,
because some topologies give better averaging than others.

There are lots of ways to be clever and do it quicker, but there is no need.

I think that there are 8 different dividers that you can make from
four resistors

https://www.dropbox.com/s/m56k4bp21z4fb6z/Rpak_Dividers_1.jpg?raw=1

Now I have 19 different resistor values on my BOM. That makes
something like 8^19 possibilities. I also have 5 quad r-packs, each of
which can have 15 possible arrangements to make an equivalent
resistor.
Ok, I had not expected 19 values in your BOM.

There are 1024 parts on this board, which includes 19 different
single-resistor values (1 ohm to 1 Meg) and 5 different quad r-pack
values. It was a fight to get it down to that. The pick-and-place is
just about out of feeders. As if this wasn\'t hard enough already.

Maybe an exhaustive search
of all of those is not worthwhile as it would take some thought or
effort to make it fast. Probably you would not lose much by excluding
the milliohm and gigaohm values when doing feedback dividers for your LDO.

Exhaustive is a good word.



If you use a quad R-pack, to me that counts as 4 resistors, at least for
computing effort. You were talking about 4 resistors total in the post
that I replied to.

An r-pack just takes one feeder, and has a bunch of value
possibilities. Makes the math problem worse.




So we have 8^34 possibilities. Many more if you are flexible about how
you use the r-pack sections. The program would run for millenia. It
might take millenia just to write.

And this is a simple problem. My main point is that very many circuits
can be made from a few parts.

It\'s a 32-page schematic, and this is just one dumb voltage regulator.

Somehow our brains deal with this, and we get things to work.

It would be cool to write a program that found the best divider that
can be made from two 1K quad r-packs. Even that would be a serious
chore. How many dividers can you make from 8 resistors?

Well, the one that I have actually written used identical unit resistors
because they match well on chips, and the limit where it started to take
more than a few seconds was 13 resistors on my desktop machine 15 years
ago, and a couple more resistors on a bigger machine.

I just tried it again on a dumpster PC, and for example, a pi kOhm
resistor can be made from nine 1 kOhm resistors as:
1+1+((1+1)//(1+1+(1//(1+1))))
There were no better combinations using 10 to 13 resistors.


I might try writing a program for 8 resistors, namely two r-packs.
Different values in the two packs would make it more interesting. But
I want divider ratios, not resistor values.


If you\'re willing to divulge the ratios you want, I can probably find
time to adapt my program to work out ratios, and see if it can give you
an answer - just for fun.

Here\'s a case where I wanted to make a good 20-volt supply based on a
3-volt reference.

https://www.dropbox.com/s/g4q4v2twdv3flc4/P20_Divider.jpg?raw=1

I got to 20.25 with already available parts and manual guesswork.

With 5 identical resistors each Ru in value, the best one can get is
5.6% error. For example, Ru/2 in the bottom, Ru*3 in the top, so 21V out.

With 8 identical resistors, the best one can get is 3% error, many
different ways.

With 9 identical resistors with value Ru, you can get 20V exactly. At
the bottom of the divider is 1Ru, top of the divider is 5.6666Ru, which
can be made from 6 x Ru resistors in series, with 2Ru in parallel with
one of these unit resistors. That is probably fairly obvious though.



I have a lot of stuff on this board that\'s referenced to the +3R, so
many things are ratiometric and errors cancel.

Here\'s another ad-hoc hack:

https://www.dropbox.com/s/djchmdox0tsag83/P12_Switcher.jpg?raw=1

That one is pretty constrained by one half of the divider being inside
the module. Without knowing your BOM, I can\'t really help you with the
other half.

LTM8078 is cool, a dual switcher with magnetics in a tiny BGA. It has
an internal 0.8 volt reference and a 250K resistor.

Vout = 0.8 * (1 + 250K/Rext)

It will also switch positive-to-negative, if one is careful.

I\'m out of coffee. Gotta go.





--

John Larkin Highland Technology, Inc

Science teaches us to doubt.

Claude Bernard
 

Welcome to EDABoard.com

Sponsor

Back
Top