Looking for some math...is this even possible?
Bobb Fwed
Posts: 1,119
I am creating a four resistor digital rheostat. With a combination of the four resistors, I can create up to 15 different resistance values (or 16, if you include no connectivity -- infinite resistance).
So the math I am looking for, is to create a somewhat linear line of values between the 15 different resistances. It doesn't have to be perfect, but somewhat close. I would like to specify a minimum resistance value (always above 0), a maximum value (always the value of the highest single resistor), and the 13 values in between, I'd like somewhat evenly spaced between. Is this even possible?
An example: if the four resistors are: 4500,3400,2300,1200; we get these resistances: 560,640,671,741,789,887,947,1051,1200,1372,1522,1937,2300,3400,4500. Not very linear, but somewhat logarithmic, which might work anyway.
Any help would be awesome.
So the math I am looking for, is to create a somewhat linear line of values between the 15 different resistances. It doesn't have to be perfect, but somewhat close. I would like to specify a minimum resistance value (always above 0), a maximum value (always the value of the highest single resistor), and the 13 values in between, I'd like somewhat evenly spaced between. Is this even possible?
An example: if the four resistors are: 4500,3400,2300,1200; we get these resistances: 560,640,671,741,789,887,947,1051,1200,1372,1522,1937,2300,3400,4500. Not very linear, but somewhat logarithmic, which might work anyway.
Any help would be awesome.
Comments
If the resistors are in parallel you would be summing up the conductances instead. The resistance would be the inverse, and you wouldn't be able to get a linear progression of resistances.
The next thing would be to iterate over the array and find the closest match to 3400 and 2300, save the close match index and replaced.
Or is this series and parallel calcs?
Edit: after looking at the 560 value it looks like you want parallel calculations? It that case you just drop the 4 values in an array the execute the various calculation combinations. Store each value in an array. Then execute a bubble sort of you need the values in order.
The design I have is simpler (I think). There are only 4 transistors, and they are wired in series to resistors. The resistor/transistor pairs are wired in parallel to the other pairs.
I'm going to write a program to brute force a solution, it won't be elegant or fast, but I think it can get me a reasonable result.
Like David said four resistors in series that could be shorted individually would give you 16 values, one being very low. Think through 1, 2, 4, and 8 ohms in series with each resistor being able to be shorted.
All shorted but the 1 ohm, you have 1 ohm.
All shorted but the 2 ohm, you have 2 ohms.
All shorted but 1 and 2, you have 3 ohms.
All shorted but 4 ohms, you have 4 ohms, and so on.
C.W.
Another thought: there might be a variation of the R-2R ladder network that would work here, too.
-Phil
-Phil
A FET can be a variable resistor, true it’s non-linear, but may be worth a look over. I have used multiple FETs to increase resolution and bring additional linear qualities to the design.
I've done the MOSFET-as-a-resistor method before, as well, but I only needed one, and it didn't need to maintain a constant resistance.
-Phil
-Phil
-Phil
I kind of mentioned this in the other thread, but in less detail: one side of the rheostat is a pulsing source (of sorts) at up to 9.5V (with respect to ground). The other side is referencing ground, but not directly, so it could be as high as 1.5V (with respect to ground) but will likely be closer to 0.5V.
I don't think you have mentioned what the actual load will be, maybe you can't say, but it would be easier to suggest solutions if we had more info.
C.W.
I want it to be able to handle up to 500mA, but more likely it will be about half that.
Is this (or this) related to such a thing?