Do-able probably. You would need to specify what sort of error is permissable before I said it was easy. The problem is that the gain needs to be be able to change. This can be done in a number of ways but often needs temperature compensation etc. Changing the gain of an amplifier is normally done by either adjusting the resistors in the feedback network or operating at fixed gain and having a variable amount of attenuation - again changing the value of fixed resistors. To make the gain dynamic, you need an element you can adjust by changing a voltage or current. It can be done with fets &/or bipolars but device charecteristic variations mean you get a wide spread in results & you may need to calibrate it & possibly temperature compensate it at well. A LED/LDR pair can be used, again with device variation concerns You may be able to use an audio volume control or a multiplier chip. Or convert the signals to logs, add and then antilog. Or use an ADC/DAC pair!. There are other methods as well, with a bit more info on the accuracy required we may be able to come up with some more ideas. Richard P On 10/06/05, Todd Bailey wrote: > Mike, > > The equation you suggested is absolutely right -- that's exactly the > function I want, although the circuit doesn't have to be single supply. > > Further, to clear things up w/r/t an earlier suggested solution: > Vout isn't necessarily going into an ADC -- it might very well stay analog, > so the output has to be linear. Seems like it'd be totally doable with a > few op amps -- is that true? > > Thanks again, > > Todd > > ------------------------------------------------- > > Mike Hord wrote: > > To clarify: > > Given Va, Vb, and Vc, with output Vout and single-rail supply Vdd: > Vout = [(Vb-Vc)/(Va-Vc)]*Vdd > where Va > Vb > Vc, right? > > Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist