M
Martin Brown
Guest
On 12/10/2020 16:27, jlarkin@highlandsniptechnology.com wrote:
However, you have one in twice (inverted) and missed R25||R26 + R27||R28
There are a relatively finite number of possible configurations:
N Circuits Nodes Resistor choices
2 1 1 19^2
3 2 2+1 19^3
4 5 5+4 19^4
+M other internal nodes present that could be used
You actually have only 19^2+3*19^3+9*19^4 combinations to consider which
is less than a quarter of a million using a brute force attack for N<4.
Since A+B = B+A and A||B = B||A you can easily gain a couple of factors
of two increase in speed by insisting that certain values must be larger
than their friend in any pairs.
--
Regards,
Martin Brown
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
However, you have one in twice (inverted) and missed R25||R26 + R27||R28
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.
There are a relatively finite number of possible configurations:
N Circuits Nodes Resistor choices
2 1 1 19^2
3 2 2+1 19^3
4 5 5+4 19^4
+M other internal nodes present that could be used
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.
You actually have only 19^2+3*19^3+9*19^4 combinations to consider which
is less than a quarter of a million using a brute force attack for N<4.
Since A+B = B+A and A||B = B||A you can easily gain a couple of factors
of two increase in speed by insisting that certain values must be larger
than their friend in any pairs.
--
Regards,
Martin Brown