Todd Bailey wrote: > Friends, > > So I have this sticky analog design problem which I don't think should > be that complicated, but I just can't find a good reference for it. I > suspect the circuit I'm looking for is related to a diff amp with some > kind of level shifting, and I know this list is about microcontrollers, > but I thought maybe someone would know the answer to this question just > offhand. > It's especially annoying because I can't think of what the appropriate > name of this circuit would be. > > Here goes: > > The input to this mystery circuit has three slow-moving positive > voltages (essentially DC) which are all linear and floating. Voltage > A, although floating, will always be the highest of the three. Voltage > B will always be the lowest, and Voltage C will move around between the > two over time. I know somewhere out there is a circuit which takes > those three inputs and gives an output voltage which is proportional to > the floating input voltage, but over a fixed range (like a rail-to-rail > supply). For example: Voltage A is 1.5V, Voltage B is 1.0V, and Voltage C > is > 1.25V. If the rails on the circuit are 5V and ground, the output would > be 2.5V. It would have exactly the same output (2.5V) if A, B, and C > were, say, 1.2V, 0.8V, and 1.0V, respectively. > > Another way to think about the inputs would be like the Vref inputs on > an A/D converter -- there are positive and negative reference voltages > which are used to set the scale for the input signal. I guess this was a very long winded tedious way of saying you want a circuit that does: 5V * (C - B) OUT = ------------ A - B It would really help if you learned to communicate technical concepts clearly. Terms like "slow-moving" are meaningless without numbers. I can't even imagine why you meant by the input voltages are "linear". Linear with respect to what? Floating, but over what range? At what impedence? Anyway, this is not at all easy to do with analog electronics since the divide in the equation can't be made to go away. However, this is what microcontrollers are good at. Since the signals are "slow" and you didn't specify accuracy, run the three signals into a PIC, do the math, and control a PWM output with the result. What will the final signal be used for? It would be better to perform the math in the PIC then use the digital value from there on. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist