What frequency response do you need?
An instrumentation amplifier does this as it's bread and butter job. This can be as little as one op amp, as Chris suggests, or the higher performance 3 or 2 opamp versions. Th e3 amp version is probably best - a quad of good enough amplifiers is cheap, the 2 amp circuit is less than ideal and the single resistor gain adjustment makes it very attractive. The diagram below is the superstandard 3 amplifier circuit, this version from
Wikipedia's differential amplifier page.
Gain is given by:
Or, possibly more usefully
Gain = (Rgain + 2R1)/Rgain x R3/R2.
Rgain = 2 x R1/((Gain x R2/R3) -1)
- In this application, Connect floating input to V1, V2.
- Adjust gain to suit.
eg if ADC range is 5V and your input range is 10V to 12.5V = 2/5V then overall gain = 5/2.5 = 2.
If you set R2=R3 then output stage gain = 1.
To set iput stage gain to 2 you need Rgain = 2R1, then.
Rgain = 2R1, R2=R3.
Gain = (Rgain+2R1)/Rgain x R3/R2 = 2 x 1 = 2
Adjusting Rgain trims overall result.
Common mode input range of the input amplifiers has to be at least equal to the highest input voltage encountered. It is " a bit naughty" but you can use a simple resistive divider to lower the input common mode voltage by a factor of "K" and then increase gain by a factor of K to compensate. With only 8 bit accuracy required relatively cheap opamps will allow you to do this with essentially no added error. Doing it at say 16 bits would be more challenging.
Example only - Say Vmax = 12.5V and say input op amps are rail-rail, run of 5V and have 5V as their upper common mode voltage. Dividing input by a factor of 12.5/5 = 2.5 will reduce Vin max to 5V. Gain has to be increased from 2 to 2 x 2.5 = 5.
A single opamp will work, but is harder to trim and inputs are not buffered.
Gain for each input left as an exercise for the student :-).
Note that the commin mode voltage seen by this circuit can be reduced by replacing R1 & R2 with a 2 resistor divider - in this case say a 2.5:1 divider.
[[Ignore this :-) : Back of brain says you can do this even more easily but care needed when powered down etc.