# Multiplex based autoscale, question on simple circuit

I was looking for a clever way to automatically scale voltages from, say, 0-50V with a mux to an ADC (0-5V) without worry of damaging my inputs.

My thought a simple amplifier with selectable gains would work: Select the lowest gain ratio first (i.e. 0.1x), and then raising that to eventually have the voltage fall nicely within my desired range, and of course I know which ratio is selected on the mux.

I stumbled across this clever circuit when looking for a solution, but it is confusing to me: I gather that this is more or less what I am sort of looking for: I assume the DC offset of 2.5 is to allow negative voltages to be scaled (with protections diodes in place before that point) and read as a multimeter would do maybe, of which is my intended project.

The formulas given do not lay up very well however:

i.e. 0.1x gain, Rf/Rin (100k:10k), with Vin of 10 = 1V (or 3.5V I suppose with the offset?) - this is nice, however in the formula provided:

$2.5V - (10 - 2.5V) * \frac{10k}{100k} = 1.75$

And to me of course that does not make sense!

Will ignoring the formula and simply assuming it divides evenly and I know by how much work? (if it is just some strange "on paper" formula, and not something meant to be done on the processor, since $V_{out}-2.5gain$ or whatnot is a looot easier..) What is that given formula and how does it work if it does? Will the mux add any downsides (leakage current?) and should I choose lower resistors in that case to swamp that? Can you suggest any alternative circuits that simplify what I am trying to do if this is just a bad idea in general?

Vref is the new 0V and this is where you are getting confused.

With 1V going in with a gain of unity (Rf = Rin), the voltage out is: -

$V_{OUT} = V_{REF}-(V_{IN}-V_{REF})\cdot\dfrac{R_F}{R_{IN}} = 2.5 - (-1.5) = 4 volts$

This is an offset from 2.5V of +1.5 volts and remember your input voltage of 1V (relative to ground) is actually -1.5V relative to 2.5V (the new 0V) i.e. the gain is -1

With 10V going in, relative to the "new 0V" the actual input is +7.5V (bear this in mind) so, when you do the math with Rf/Rin = 0.1 you get an output voltage of 1.75V or -0.75 below the "new 0V" of +2.5V.

So, relative to 2.5V you put in: -

• -1.5V at a gain of unity and got out +1.5V and
• +7.5V at a gain of 0.1 and you got out -0.75V

Does this now make sense?

• Ah-hah! This makes total sense, I had not thought of the offset affecting the inputs making them relative to that, of course. I now know what I need to continue learning. Thank you. – Alexander Mar 18 '14 at 11:18