too many possibilities

They have different division ratios, 0.6 and 0.4.

Wouldn't that be 0.5? 0.5 is the easiest one!

I wasn't trying to find all possible topologies, but all possible ratios. Did I miss a ratio?

It would be cool to do something with two quad r-packs. They are cheap and don't take much more room that a single resistor. One probably couldn't make a list of all possible ratios, but one could make a list of all practical ratios, given tolerances.

The downside is that using r-packs on a schematic gets really ugly.

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin
Loading thread data ...

Certainly. But even my fairly simple problem had no obvious systematic way to find a good-enough solution. I seem to spend a lot of time on BOM optimization, specifically juggling resistor values all over the schematic.

We have a few chips, like ethernet PHYs and DRAMS, that want specific resistor values. And we need, or think we need, a few cardinal values like 49.9 ohms, so that at least nails down some starting points.

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin

Hmm, you use only identical resistors. And how do you count them? On the drawing there are 9 different ratios and by symmetry one can get few more. When using different resistors there are more possibilities for different ratios. First, look at possibilities for single resistor. We can just use one resistor, that is 1 possibility. We can use two resistors in series or in parallel, that give 2 possibilities. Using three resistors we can put them in series, in parallel or in three series-parallel combinations. Two series-parallel combinations give the same value, so we get 4 possible values. In divider when one branch consists of single resistor we can use up to three for other branch, which gives 1*7 = 7 possibilities. When one branch is two resistors, the other is up to two resistors which gives 2*3 = 6 possibilities. When one branch is three resistors, the other is single resistor so we get 4*1 = 4 possibilities. Together 17 possibilities. You get few more if you allow combinations that strictly speaking are not dividers (like tap between R27 and R29 in your picture).

No, if you use indentical resistors in divider then ratio does not depend on resistor value, so you have just fixed number of combinations. When using different resistor for each of 17 configurations you have up to 19^4 choices of components. In fact, when design requires fixed ratio once you make choice of one resistor in divider value of the other is determined and you can look up is this value appears in list of obtainable combinations (this is similar to what Chris wrote).

--
                              Waldek Hebisch
Reply to
antispam

The exercise was assuming 1206-size quad r-packs, in which the four resistors are the same value. They cost under 1 cent per pack and the resistors seem to match very well, probably laser trimmed together.

Making a divider from two identical r-packs, or two different value packs, gets more interesting.

Count what?

I posted a pic of my program that selects resistors that we already have in stock, to make ratios.

It's trivial to make ratios if you are willing to buy new parts for stock.

Reply to
John Larkin

Do you mean different dividers? And with identical resistors? There's at least nine ways to make a 2:1 ratio.

Better, would be if you could get 1,1,2,2,3,3,5,5 eightpacks (at manufacture time, Bourns could do that easily). You could even get a pinout (5,3,2,1,1,2,3,5) that allowed end/end reversal.

Reply to
whit3rd

I want different ratios, which is a subset of all possible dividers. I did say 1K.

The number of possible dividers that you can makes from 8 resistors must be largish.

Given that we have two resistor packs, all that really matters is that we can hit a desired voltage divider ratio. I guess that if multiple topologies can hit a target ratio within 0.1% or something, we'd pick the simplest one, to make the pcb layout easy.

You'd only need 998 circuits to go from 0.001 to 0.999 in steps of

0.001. If that's possible.

In that case, just use two of the resistors in one r-pack.

Those would cost more than a penny, and wouldn't solve the problem of finding a topology to hit a target ratio.

My big theme is that it's hard, sometimes borderline impossible, to find the right way to connect a few resistors.

Reply to
John Larkin

In quantity, it wouldn't cost Bourns very much; if the need is widespread, it would be a good product opportunity, and you can afford an extra cent. Rational-number ratios are easy to hit from a few prime-number steps, was my thought. Fibonacci steps are another possibility (any three adjacent values makes another 2:1 possibility, though; there's a lot of repeat and near-repeat ratios).

Reply to
whit3rd

Ok, I had not expected 19 values in your BOM. 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.

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.

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.
Reply to
Chris Jones

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.

Exhaustive is a good word.

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

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.

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin

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?

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

[...]
--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

But not very evenly distributed. Most of the ratios you can hit with a pack of identical resistors tend to be of the form p+q/r : s+t/u

p+q+r+s+t+u = N

With a rather high degeneracy factor for the ratio 1:1.

Maybe but to get that resolution would use up more than two packs of 8.

Rmax = NR Rmin = R/N

The largest bounding ratios you can ever hope to make with N resistors are of the form series and parallel (N-m:1/m)

Nm-m^2:1

Maximised when m = N/2 with a value N^2/4:1

So to get 1:1000 ratio would require at least a 20 pack of identical resistors.

No it isn't you just have to develop an algorithm to do it. After a little thought and doodles on the back of an envelope I think that the maximum number of distinct graphs with N identical resistors is determined by the Catalan numbers (or something very closely related).

formatting link
A000108 Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!).

(1,) 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786,

The problem starts to get interesting for N=5 when you start to get the possibility of internal resistors bridging a pair of potential dividers a la Wheatstone bridge (which can be used to give you very fine adjustment with a suitable choice of non-identical values).

Rats nest territory after that...

--
Regards, 
Martin Brown
Reply to
Martin Brown

If you are going to do it like that then the optimum pattern for minimal redundancy series additive values is 1,1,3,6,12,24,48,... 3x2^N.

It is more fun when you can add and subtract which gives rise to Golumb rulers only the first few of which are perfect.

formatting link

--
Regards, 
Martin Brown
Reply to
Martin Brown

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.

Reply to
Chris Jones

A divider can drive a divider, a ladder attenuator. That can be referenced to V+ or to ground. I get 0.0294 (34:1) with eight identical resistors.

Or two different quad packs. We have a lot of those in stock, from 10r to 100K. So I can do 10000^4 attenuation.

I was thinking about how to even enumerate the possible dividers, and then how to calculate each divider ratio, and how to report the results. Sounds like a project.

Each divider has one input and an output at every node.

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin

Interesting, as applied to resistor networks. Digikey doesn't have Golumbs yet.

People already make R:2R ladder networks. One of those plus one additional tweak resistor, or two ladders, give divider possibilities.

Multiple taps of one ladder can be connected to taps of another. More math fun.

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin

This technique also works when the routing becomes a nightmare. Once upon a time, I was working on a heavily protected 3-phase mains-powered board. I wasn't able to meet all the requirements at once (safety clearance, functional HV insulation spacing, etc.) even on a 4-layer board, given the size constraints. Identifying and cutting out the most challenging part of that routing allowed me to use a dirt-cheap 2-layer board with a module encapsulating the problematic piece. It was much smaller than required, too.

Best regards, Piotr

Reply to
Piotr Wyderski

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.

MIPS are cheap nowadays, and there are so many of them per night. Let the computer compute it for you when you are sleeping. 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.

Best regards, Piotr

Reply to
Piotr Wyderski

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

3-volt reference.

formatting link

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

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:

formatting link

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin

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

Reply to
Piotr Wyderski

Slide rules don't add or subtract!

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
Reply to
jlarkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.