Author Topic: Fun with resistors  (Read 26788 times)

0 Members and 1 Guest are viewing this topic.

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #25 on: August 28, 2015, 09:29:59 pm »
Yeah, that's probably good enough.

Cool !

There's a new version available at https://github.com/theageman/rfun/releases/tag/v0.21.

new features:

-    added voltage divider via ratio
-    added multi-tap voltage divider
-    added rudimentary tempco calculations
-    added rudimentary tolerance calculations

missing features:

-    gaussian distributions
-    user sets
-    threading (be careful with large sets! UI gets locked during calculations!)

Uploaded Delphi XE2 sources as well. Hope they compile under Lazarus.

Greetings,
Olli.
Jazz is not dead, it just smells funny
 

Offline Zeyneb

  • Regular Contributor
  • *
  • Posts: 233
  • Country: nl
Re: Fun with resistors
« Reply #26 on: August 29, 2015, 01:31:30 am »
Hi,

Currently I'm using an Excel table for this. Your application might be very handy but something isn't right (yet). I'm using v0.21. I was trying the "voltage divider via ratio". The classic voltage divider is R2 / (R1 + R2). But you wrote R1/R2. Then if I ask to utilize 2 resistors I get an solution with 4 resistors.

So, I would like to see the basic voltage divider getting to work.

Also for basic opamp circuits this is very useful. So entering just a desired gain and then having the application calculate the required resistors for the inverting opamp and separately the non-inverting.
one.

Also if I do single value resistor and utilize 3 resistors I get a presumable divide-by-zero exception.

Anyway nice idea. Keep going.
goto considered awesome!
 

Offline quantalume

  • Supporter
  • ****
  • Posts: 26
  • Country: 00
Re: Fun with resistors
« Reply #27 on: August 29, 2015, 03:15:31 am »
As I'm not using super special components, the sources should be compatible to Lazarus. I could upload the sources to Github if you like.

Olli.

That would be great. I will see what's involved in compiling under Lazarus.
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #28 on: August 29, 2015, 03:29:18 pm »
Hi,

Currently I'm using an Excel table for this. Your application might be very handy but something isn't right (yet). I'm using v0.21. I was trying the "voltage divider via ratio". The classic voltage divider is R2 / (R1 + R2). But you wrote R1/R2. Then if I ask to utilize 2 resistors I get an solution with 4 resistors.

So, I would like to see the basic voltage divider getting to work.

Also for basic opamp circuits this is very useful. So entering just a desired gain and then having the application calculate the required resistors for the inverting opamp and separately the non-inverting.
one.

Also if I do single value resistor and utilize 3 resistors I get a presumable divide-by-zero exception.

Anyway nice idea. Keep going.

Uploaded a new version to https://github.com/theageman/rfun/releases/tag/v0.21/.

Greetings,
Olli.
Jazz is not dead, it just smells funny
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #29 on: August 29, 2015, 03:39:25 pm »
As I'm not using super special components, the sources should be compatible to Lazarus. I could upload the sources to Github if you like.

Olli.

That would be great. I will see what's involved in compiling under Lazarus.

Hope it works. If there are problems, I could install FreePascal/Lazarus as well.

Greetings,
Olli.
Jazz is not dead, it just smells funny
 

Offline Zeyneb

  • Regular Contributor
  • *
  • Posts: 233
  • Country: nl
Re: Fun with resistors
« Reply #30 on: August 29, 2015, 07:54:45 pm »

Uploaded a new version to https://github.com/theageman/rfun/releases/tag/v0.21/.

Greetings,
Olli.
Hi Olli,

Thanks man. You're quick. You as well thought the opamp ones where a nice feature?

Now I tried the voltage divider with a gain of 0.02. You suggested 100k for R1 and 2k for R2 in the E24 series. But I know 330k for R1 and 6k8 for R2 is closer to that gain. Would you be able to get that right?

Also I still can't see your logic behind the amount of resistors to utilize. Why do I need to ask to utilize 1 resistor to get a two resistor voltage divider?

I just have suggestions to make the application better. Well at least in my eyes.

As opamp circuits aren't voltage dividers I would suggest to make them a separate item in the tree view. By doing so you'd remove the type drop-down menu. You don't need to have that small example picture on the top right if your output window display's this already. So for the opamp versions having a separate picture indicating the locations for R1 and R2. After "Go" you can add the values as well.

Greetings Zeyneb

goto considered awesome!
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #31 on: August 29, 2015, 09:05:47 pm »

Hi Olli,

Thanks man. You're quick. You as well thought the opamp ones where a nice feature?

Sure  :-+

Now I tried the voltage divider with a gain of 0.02. You suggested 100k for R1 and 2k for R2 in the E24 series. But I know 330k for R1 and 6k8 for R2 is closer to that gain. Would you be able to get that right?

Let me try to explain.
When you type "330k" into the RSum-edit-field with the parameters given above, you get exactly the same 330k/6k8 result.
(Btw. you can actually type resistor values "the engineering way" everywhere, like 6k8, 330, 330R etc. Scientific notation, like "3.3e6" for example, is available as well)
This Rsum-parameter is not just for convenience. It's used to get the total current through the circuit. The R-values are calculated using the total current and the voltage drops across the resistors. I just have no idea how to solve that otherwise.


Also I still can't see your logic behind the amount of resistors to utilize. Why do I need to ask to utilize 1 resistor to get a two resistor voltage divider?

It's simply the number of resistors per branch. It uses the algorithm from the "Single value"-panel. Perhaps I should label it accordingly?

I just have suggestions to make the application better. Well at least in my eyes.

No worries. If nobody would make suggestions, there were no progression. I like feedback!  :-+

As opamp circuits aren't voltage dividers I would suggest to make them a separate item in the tree view. By doing so you'd remove the type drop-down menu. You don't need to have that small example picture on the top right if your output window display's this already. So for the opamp versions having a separate picture indicating the locations for R1 and R2. After "Go" you can add the values as well.

Moving the opamp calculations to a seperate panel could be a possibility. I intoduced these little pictures, because the locations of Rx1 and Rx2 are different for different circuits.

Greetings,
Olli.
Jazz is not dead, it just smells funny
 

Offline Zeyneb

  • Regular Contributor
  • *
  • Posts: 233
  • Country: nl
Re: Fun with resistors
« Reply #32 on: August 29, 2015, 09:51:08 pm »
Quote
Let me try to explain.
When you type "330k" into the RSum-edit-field with the parameters given above, you get exactly the same 330k/6k8 result.
(Btw. you can actually type resistor values "the engineering way" everywhere, like 6k8, 330, 330R etc. Scientific notation, like "3.3e6" for example, is available as well)
This Rsum-parameter is not just for convenience. It's used to get the total current through the circuit. The R-values are calculated using the total current and the voltage drops across the resistors. I just have no idea how to solve that otherwise.

I don't know about the other eevblog forum members. But I my eyes getting the gain as close as possible is priority #1. The 330k and 6k8 solution is still higher than the 100k Rsum-parameter criterium.

Here is the Excel sheet I'm currently using for this.

Greetings Zeyneb
goto considered awesome!
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #33 on: August 29, 2015, 10:31:37 pm »
I don't know about the other eevblog forum members. But I my eyes getting the gain as close as possible is priority #1. The 330k and 6k8 solution is still higher than the 100k Rsum-parameter criterium.

Here is the Excel sheet I'm currently using for this.

I probably used that spreadsheet the wrong way. I have not been able to find a gain of 0.02 in that table.
As I already said, I'm just a hobbyist.
But I'm pretty sure that getting the pure gain does not represent the entire picture.
You are putting a load to your source. That means, "Rsum" matters.
Try, for example, putting a 1M0 into Rsum. You will get a gain of exactly 0.02 (with 1M0/20k)! This even closer
than 330k/6k8, resulting in a gain of 0.02060606.
In the end Rsum defines the load.
Perhaps a more "sophisticated" person could help here.
Don't get me wrong, I don't want to say that you're wrong, I'm just not sure if the problem is fully understood (on my side or on your side)  :-//

Greetings,
Olli.
Jazz is not dead, it just smells funny
 

Offline Redcat

  • Regular Contributor
  • *
  • Posts: 74
  • Country: de
  • Ask why not, not why.
    • redcatimaging
Re: Fun with resistors
« Reply #34 on: August 30, 2015, 10:48:56 pm »
I tried to play with your software. Very nice project  :-+ . And very complex task.
But either i'm too stupid or it has mayor bugs... :-\.

Here is an example: if i try to make a 10k resistor with 10 resistors and Rx min and max are 4k7 (i might have a box full of 4k7 resistors left...),
it paints 1R0. If i use 5k for Rx max it uses a 470R and a 680R resistor in addition to the 4k7s, which are not in the range of 4k7 to 5k (not to mention the computation time  ::) ).
Actually, this could be a real world example, making 10k out of 4k7s.
Do i think or using the programm the wrong way?

Painted only 1R0 and "division by 0" show up pretty often at calculations. I guess when i input stupid (not always obvious) values.

Some more ideas:
Is it a good idea, to always try to use the maximum number of given resistors? Hmmm...checkbox - "use alway max" or "use rational number" might be useful? Ok, it's getting even more complex ;).
Maybe there is a point of derivation from the optimum (or you can insert a value) where a use of more resistors is irrational.

Voltage divider does not work too when you use not the whole E-range (lets say only 1k to 10k) and r sum is bigger (in your start example 100k).
I would suggest a drop down box which you can choose only valid resistor values depending on your other inputs...just an idea ;). Or a message box like "Hey...Rsum is too big for the given values".
Or an auto correct function.

What about current sharing? You seem to try to get to the closest result to the given value, but is this always the best or wanted as resistors have tolerances anyway (like 1%, 10%..)?
The reason you use more resistors than only one may be this (current sharing). Which would require a "max current per resistor" field (like "1/2" ...) and so on... (computation reaches hell level ;)  ).
It does not include the size (like 1/4w,1/2W...) into calculation, right?

But maybe your goal really is to get to the closest result. Not practical but for fun be fine too.


Very complex computations  :o (computation time -> :palm:) and very interesting task. I would never be able to program something like this. I'm looking forward how your project will develop  :-+ .
Thank you for sharing and good luck.

Greetings, Tom
Voltcraft 630-2,Tek 2215A,Tek 475,really handy DIY microcontroller component tester (R/C/D/Q...), ZD-915, ZD-931,Voltcraft 1062D - of course hacked :)
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #35 on: August 31, 2015, 12:34:08 pm »
I tried to play with your software. Very nice project  :-+ . And very complex task.
But either i'm too stupid or it has mayor bugs... :-\.

Here is an example: if i try to make a 10k resistor with 10 resistors and Rx min and max are 4k7 (i might have a box full of 4k7 resistors left...),
it paints 1R0. If i use 5k for Rx max it uses a 470R and a 680R resistor in addition to the 4k7s, which are not in the range of 4k7 to 5k (not to mention the computation time  ::) ).
Actually, this could be a real world example, making 10k out of 4k7s.
Do i think or using the programm the wrong way?

Painted only 1R0 and "division by 0" show up pretty often at calculations. I guess when i input stupid (not always obvious) values.

Very embarassing  :palm:
That happened during translation from C++ to Delphi.
Uploaded new version: https://github.com/theageman/rfun/releases/tag/v0.21

Some more ideas:
Is it a good idea, to always try to use the maximum number of given resistors? Hmmm...checkbox - "use alway max" or "use rational number" might be useful? Ok, it's getting even more complex ;).
Maybe there is a point of derivation from the optimum (or you can insert a value) where a use of more resistors is irrational.

Possible approach would be to start with 1 resistor, calculate error, next use 2 resistors, calculate error etc. Then choose the solution with the smallest error. Sounds interesting. Give me a few days ;)

Voltage divider does not work too when you use not the whole E-range (lets say only 1k to 10k) and r sum is bigger (in your start example 100k).
I would suggest a drop down box which you can choose only valid resistor values depending on your other inputs...just an idea ;). Or a message box like "Hey...Rsum is too big for the given values".
Or an auto correct function.

Should be fixed as well. (Not 100% sure, though)
EDIT: no, still buggy
EDIT2: *NOW* it should work.  :-DD

What about current sharing? You seem to try to get to the closest result to the given value, but is this always the best or wanted as resistors have tolerances anyway (like 1%, 10%..)?
The reason you use more resistors than only one may be this (current sharing). Which would require a "max current per resistor" field (like "1/2" ...) and so on... (computation reaches hell level ;)  ).
It does not include the size (like 1/4w,1/2W...) into calculation, right?

But maybe your goal really is to get to the closest result. Not practical but for fun be fine too.


Very complex computations  :o (computation time -> :palm:) and very interesting task. I would never be able to program something like this. I'm looking forward how your project will develop  :-+ .
Thank you for sharing and good luck.

Greetings, Tom

About computation time:
Let's call the number of possible values n (for example in E12-series with Rmin=1k and Rmax=2k2, n would be 5).
Let's call the number of taps t.
Let's call the number of resistors to user per branch q.
Then the number of calculations is approx. (t+1) * 2n^q.
As you can see it gets quite large very quickly.
I am considering to incorporate multi-threading. But that's not easy. The easiest way to use multi-threading would be one thread per branch. But that would not speed up the single-value calculations.

About current sharing/power dissipation.
It's on the list. But with "not that high" priority.

Next improvements will be threading/progress feedback/start&stop calculations.


Greetings,
Olli.
« Last Edit: August 31, 2015, 01:26:26 pm by theageman »
Jazz is not dead, it just smells funny
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #36 on: August 31, 2015, 12:36:31 pm »
I've been super busy and haven't had time to check out the program since the last time I posted, but it looks from the thread like you're making good progress, awesome!

Thank you!

One other quite related possibility which might be interesting to you could be attenuator calculations perhaps with the ability to set / report the input impedance, output impedance, topology (unbalanced, balanced, PI, T, ...) and of course series / value restrictions of the components.  You might calculate power dissipation & suggest minimum ratings given the input voltage, as well as input & report the desired / realized voltage and power attenuation in dB & linear ratios. 

https://en.wikipedia.org/wiki/Attenuator_%28electronics%29

I'll investigate this.
Thanks,
Olli.
Jazz is not dead, it just smells funny
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21671
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Fun with resistors
« Reply #37 on: August 31, 2015, 03:19:25 pm »
Mmmh, exponential time implies NP-completeness; there ought to exist an algorithm (or at least heuristic) to reduce that to polynomial time (maybe N^2 or so?).

Interesting that it's a discrete-value problem, and a discrete/combinatorial problem.  So it might very well be that this seemingly simple problem is, in fact, NP-complete.

So if you idiots want to do  |O things with your enormous boxes of single value resistors, that's your problem  :box: ... :-DD

I don't think there would be any obvious way to warn the user that the computation will take a long time, but as long as it can be canceled, perhaps giving the "current best guess" but not the provably best answer, that would be fine.

Hmm, speaking of single value resistors, there should be the possible optimization that the network can be represented as a mere continued fraction, which should have O(N) or O(N^2) time.  Seems doubtful to me that such a special case is worth implementing, but it's an interesting thought.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Redcat

  • Regular Contributor
  • *
  • Posts: 74
  • Country: de
  • Ask why not, not why.
    • redcatimaging
Re: Fun with resistors
« Reply #38 on: August 31, 2015, 03:56:53 pm »
Thanks Olly for working on the program.

Quote
That happened during translation from C++ to Delphi.
Uploaded new version: https://github.com/theageman/rfun/releases/tag/v0.21
Now it works fine :). Fantastic.

Yes i almost expected that computation time would be exponential  :-[ , lets hope there is a way around.

I'm not sure of your algorithm, but could you - for example lets take a voltage devider with 2 tabs - cut the problem into 3 pieces...and computate each at it's own?
For example: R sum is 10K. You want a division (arg..my english is not that great, but i hope you can understand what i mean) of 1/4,1/4,1/2. You could computate each at it's own (in the given example 2,5k/2,5K/5K) and as the first and second value are the same you would not have to computate the second one again...Might save time.
I'm not into mathmatics and it's even hard to understand by myself..but this would be a quick Idea... (maybe you are already doning so ;)..).

Quote
Possible approach would be to start with 1 resistor, calculate error, next use 2 resistors, calculate error etc. Then choose the solution with the smallest error. Sounds interesting. Give me a few days ;)
I'm happy looking forward :). Thats what i meant. Of course only up to the maximum Number of Resistors you want to use and maybe as few as possible at a given/acceptable tolerance (user input field).
This were just some ideas. Thought it may be interesting additions.

I will be back for testing  :).

Thanks for your time and happy programming, Tom

Voltcraft 630-2,Tek 2215A,Tek 475,really handy DIY microcontroller component tester (R/C/D/Q...), ZD-915, ZD-931,Voltcraft 1062D - of course hacked :)
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #39 on: August 31, 2015, 03:58:10 pm »
Mmmh, exponential time implies NP-completeness; there ought to exist an algorithm (or at least heuristic) to reduce that to polynomial time (maybe N^2 or so?).

Interesting that it's a discrete-value problem, and a discrete/combinatorial problem.  So it might very well be that this seemingly simple problem is, in fact, NP-complete.

Now we are talking!  8)
The fact that this is a discrete-value problem is because I limited the search-tree to countable values (the E-series). Otherwise this wouldn't be possible. As this algorithm is a search with a finite search-tree in the end, it's probably NP-equivalent. But I'm not 100% sure.

So if you idiots want to do  |O things with your enormous boxes of single value resistors, that's your problem  :box: ... :-DD

To be honest, I started this project to see what it looks like having 10 4k7 resistors to build one 1k resistor. (See first picture...)  :-DD

I don't think there would be any obvious way to warn the user that the computation will take a long time, but as long as it can be canceled, perhaps giving the "current best guess" but not the provably best answer, that would be fine.

In fact, I have been able to pre-calculate the number of computations. That way i was also able to update the progress-bar accordingly.
I will re-implement this feature. Takes a while because it also needs an own thread to do so.

Hmm, speaking of single value resistors, there should be the possible optimization that the network can be represented as a mere continued fraction, which should have O(N) or O(N^2) time.  Seems doubtful to me that such a special case is worth implementing, but it's an interesting thought.

Tim

It sometimes finds these continued fractions (second picture - if this is what you mean by continued fractions) ;)

Olli.
Jazz is not dead, it just smells funny
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #40 on: August 31, 2015, 04:09:44 pm »
Thanks Olly for working on the program.

Quote
That happened during translation from C++ to Delphi.
Uploaded new version: https://github.com/theageman/rfun/releases/tag/v0.21
Now it works fine :). Fantastic.

Great!

Yes i almost expected that computation time would be exponential  :-[ , lets hope there is a way around.

I'm not sure of your algorithm, but could you - for example lets take a voltage devider with 2 tabs - cut the problem into 3 pieces...and computate each at it's own?
For example: R sum is 10K. You want a division (arg..my english is not that great, but i hope you can understand what i mean) of 1/4,1/4,1/2. You could computate each at it's own (in the given example 2,5k/2,5K/5K) and as the first and second value are the same you would not have to computate the second one again...Might save time.
I'm not into mathmatics and it's even hard to understand by myself..but this would be a quick Idea... (maybe you are already doning so ;)..).

This is actually a good idea! It's on my list now ;)

Quote
Possible approach would be to start with 1 resistor, calculate error, next use 2 resistors, calculate error etc. Then choose the solution with the smallest error. Sounds interesting. Give me a few days ;)
I'm happy looking forward :). Thats what i meant. Of course only up to the maximum Number of Resistors you want to use and maybe as few as possible at a given/acceptable tolerance (user input field).
This were just some ideas. Thought it may be interesting additions.

I will be back for testing  :).

Thanks for your time and happy programming, Tom

Thanks!,
Olli.
Jazz is not dead, it just smells funny
 

Offline Redcat

  • Regular Contributor
  • *
  • Posts: 74
  • Country: de
  • Ask why not, not why.
    • redcatimaging
Re: Fun with resistors
« Reply #41 on: August 31, 2015, 05:32:16 pm »
More ideas to come ;), be prepared haha :).

And you are right, the picture alone of seeing an 10k made of many 4k7s is worth gold. Hmm..maybe a new T-shirt idea ::), i would want one  ;D. Calculated with your software...

As i just saw in the tree on the left side in the program, you are planning -in a far far future- a custom set(s) of resistors next to the E-sets, right?
This will be absolute awsome for people like me, who have a box with millions of resistors, but never (nah, but often) the right value and no complete E series.
You are always short on "the one" resistor value when you need it ;). How many times i have bodged resistors togeter to get a special value.
Your software will be so handy.

No, bodged resistors don't look nice , but when you need it now...And actually, i have seen stacked caps and stacked SMD resistors on PCBs sometimes (for current and voltage reasons)...

Hmm..you could do some pretty nice artwork with SMDs witch is also usable...stop..no more ideas today  ::).

Haha..have a nice evening
Voltcraft 630-2,Tek 2215A,Tek 475,really handy DIY microcontroller component tester (R/C/D/Q...), ZD-915, ZD-931,Voltcraft 1062D - of course hacked :)
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #42 on: August 31, 2015, 05:43:10 pm »
More ideas to come ;), be prepared haha :).

I am, no problem  :)

And you are right, the picture alone of seeing an 10k made of many 4k7s is worth gold. Hmm..maybe a new T-shirt idea ::), i would want one  ;D. Calculated with your software...

You just have to buy 100.000 4k7s from digikey and you could build your own decade-resistor-box  :popcorn:

As i just saw in the tree on the left side in the program, you are planning -in a far far future- a custom set(s) of resistors next to the E-sets, right?
This will be absolute awsome for people like me, who have a box with millions of resistors, but never (nah, but often) the right value and no complete E series.
You are always short on "the one" resistor value when you need it ;). How many times i have bodged resistors togeter to get a special value.
Your software will be so handy.

No, bodged resistors don't look nice , but when you need it now...And actually, i have seen stacked caps and stacked SMD resistors on PCBs sometimes (for current and voltage reasons)...

Yes I'm thinking of 4 user sets.

Hmm..you could do some pretty nice artwork with SMDs witch is also usable...stop..no more ideas today  ::).

Haha..have a nice evening


Ebenso.
Jazz is not dead, it just smells funny
 

Offline Redcat

  • Regular Contributor
  • *
  • Posts: 74
  • Country: de
  • Ask why not, not why.
    • redcatimaging
Re: Fun with resistors
« Reply #43 on: August 31, 2015, 06:01:47 pm »
Quote
You just have to buy 100.000 4k7s from digikey and you could build your own decade-resistor-box  :popcorn:
I see, we understand ;).
But who the hell will be soldering them for me together :o.
Voltcraft 630-2,Tek 2215A,Tek 475,really handy DIY microcontroller component tester (R/C/D/Q...), ZD-915, ZD-931,Voltcraft 1062D - of course hacked :)
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #44 on: September 01, 2015, 12:36:58 am »
Just a little update (v0.22) https://github.com/theageman/rfun/releases/tag/0.22.

added features:
  • worker-thread (you can start and stop computations now)
  • feedback displays number of already checked combinations
missing features:
  • progress bar
  • user sets
  • gaussian distributions

Olli.
Jazz is not dead, it just smells funny
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Fun with resistors
« Reply #45 on: September 01, 2015, 01:54:56 am »
I think the next enhancement is to throw a box of trash resistors at it and come up with the best kelvin-varley divider stages possible.
 

Offline theagemanTopic starter

  • Contributor
  • Posts: 39
  • Country: de
    • My Blog
Re: Fun with resistors
« Reply #46 on: September 01, 2015, 02:35:56 pm »
V0.23 https://github.com/theageman/rfun/releases/tag/0.23

added features:
  • added the capability to automatically use the smallest number of resistors (thanks, Redcat)

missing features:
  • user sets
  • gaussian distributions

Greetings,
Olli.
Jazz is not dead, it just smells funny
 

Offline Redcat

  • Regular Contributor
  • *
  • Posts: 74
  • Country: de
  • Ask why not, not why.
    • redcatimaging
Re: Fun with resistors
« Reply #47 on: September 01, 2015, 05:20:18 pm »
You are really fast working on your program  :-+ and make good progress.

Quote
added the capability to automatically use the smallest number of resistors (thanks, Redcat)
Thanks Olli.
I would definitely make it only an "option" (checkbox or so) and change the text to something like "Utilize up to...resistors (per branch)". And tell the user the number you have used, so that he hasn't to count all the resistors ;). There may be many and he may want to know the number on one look (i know this is absolute easy for you to put in the message box).
You may want to use the smallest possible number, but you may also not always want to. This could be important later for current sharing calculation and i wouldn't take all options away.
Ah..I'm stupid ;). Just found the option checkbox in the Settings...
So..well done  :-+. Thats it.

Start/stop works good - that was really missing - and it shows the number of combinations at the bottom. Wow, really many combinations.

I managed to get the program crash when i calculated a resistor divider with a too small band of resistor values  >:D. But I could not reproduce it.

Also the gain error can get pretty high, but that is normal if I use too few resistors and a small band of min max. That is absolutely right - the user has to use the brain too ;). I noticed gain is precise when u use a wider band and more resistors. So that part of the software is working good too.
Maybe you could output a message like "please use a higher number of resistors or a wider band to obtain a more precise gain"...(maybe shorter) in you message box, when the deviation from the gain is too high.

And it would be nice if the user can set "tolerances" of the calculation results (optional).
And of course try to include as much feedback to the user as possible and at the same time is useful (so also not too much).

Useful feedback is a key in software. Short story from my work: On one of our Photo Roll to Roll laser "printers" (i work in Photo industry) the backprint fails from time to time. Gives out an error message like "error 1234". Even a friend, the engineer who was part of the development team and chief trainer for the machine, does not kow what that means  |O . I have changed out every part of the machine which has to do the smallest amount with the backprint system and the error is still there because i actually don't know what the error message precisely means. And he said to me "I would not like to have your problem". Can be a small screw, but i might never find out.
If i ever meet the software engineer (nah, not really, but mentally)... :box:.

On the "Analyse" Tab..sorry i don't understand the smallest amount and can't test. I'm not an electronics engineer  :-//.

Can't wait to see the next development steps of your program.  :-+

Have a nice evening, Tom


Voltcraft 630-2,Tek 2215A,Tek 475,really handy DIY microcontroller component tester (R/C/D/Q...), ZD-915, ZD-931,Voltcraft 1062D - of course hacked :)
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: Fun with resistors
« Reply #48 on: September 02, 2015, 12:00:58 pm »
I just made use of your program :) gave you a star on github as well. If I ever feel I should add something I'll give you a pull request.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Fun with resistors
« Reply #49 on: September 03, 2015, 04:25:32 am »
It's a neat little program. I used it too, so shoutout to theageman! thanks!

I just made use of your program :) gave you a star on github as well. If I ever feel I should add something I'll give you a pull request.

I would like to contribute as well, but the github code is not the correct code, so no pull requests from the current codebase there.  The actual code is in the zip file and is Delphi Pascal.  I haven't used any form of Pascal since 1980, and if I started again I would not know Delphi or what's been added by Borland.

to theageman: Will you be putting the pascal code up on github too so pull requests can be made, in case I feel like an adventure ? :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf