David_
Advanced Member level 2
Hello.
I want to update my excel inventory file, I have a page for resistors, one for caps etc.
My resistor page needs to be more fun but also there are times when a 208,4kΩ resistor can't be replaced by a 200kΩ resistor without making a loss in accuracy or precision that is not acceptable when you are trying to design a precision device.
Although perhaps rare there are those occasions, but if you don't like that motivation then I have a second one for this thread.
Because it's fun.
What I want to do is to input a value, lets say 208,4kΩ and then the algorithm shall calculate the combinations of the resistors in my inventory that gets as close as possible to that value.
Forget I mentioned Excel, I just want a general algorithm that I can implement in what way I end up seeing best.
I have been thinking about it and I have seen a website which have a calculator that does this but uses hole series of resistor values, it outputs a list of combinations. It uses series-, parallel- & series/parallel-combinations if I recall correctly but I have run into a thought wall.
I got so far as to consider to compile a "library", in my inventory the resistors are labelled R1, R2, R3 and so on.
So first I take R1 and calculate the combination of and so on, then
R1//R1, R1//R2, R1//R3, R1//R4, R1//R5, etc
R2//R1, R2//R2, R2//R3, R2//R4, R2//R5, etc
R3//R1, R3//R2, R3//R3, R2//R4, R2//R5, etc
etc
etc
etc
Then... ... ... ... well... help.
I don't know how to proceed apart from continue generating more series of values somewhat like the first but that I foresee will go nowhere.
Do anyone have any good idea, or idea for how to realize this algorithm?
Regards
I want to update my excel inventory file, I have a page for resistors, one for caps etc.
My resistor page needs to be more fun but also there are times when a 208,4kΩ resistor can't be replaced by a 200kΩ resistor without making a loss in accuracy or precision that is not acceptable when you are trying to design a precision device.
Although perhaps rare there are those occasions, but if you don't like that motivation then I have a second one for this thread.
Because it's fun.
What I want to do is to input a value, lets say 208,4kΩ and then the algorithm shall calculate the combinations of the resistors in my inventory that gets as close as possible to that value.
Forget I mentioned Excel, I just want a general algorithm that I can implement in what way I end up seeing best.
I have been thinking about it and I have seen a website which have a calculator that does this but uses hole series of resistor values, it outputs a list of combinations. It uses series-, parallel- & series/parallel-combinations if I recall correctly but I have run into a thought wall.
I got so far as to consider to compile a "library", in my inventory the resistors are labelled R1, R2, R3 and so on.
So first I take R1 and calculate the combination of and so on, then
R1//R1, R1//R2, R1//R3, R1//R4, R1//R5, etc
R2//R1, R2//R2, R2//R3, R2//R4, R2//R5, etc
R3//R1, R3//R2, R3//R3, R2//R4, R2//R5, etc
etc
etc
etc
Then... ... ... ... well... help.
I don't know how to proceed apart from continue generating more series of values somewhat like the first but that I foresee will go nowhere.
Do anyone have any good idea, or idea for how to realize this algorithm?
Regards