Re: resistor divider output
vbhupendra, IanP is right,
if VRef=+5V and Vr=-2.5V, then the required circuit in "resnw.pdf" for the stated i/o conditions a), b), cannot be realized:
a) Vout1 = 4.95V if Vin1 = 0V
b) Vout2 = 0.02V if Vin2 = -40V
because (Kirchhoff's Current Law):
(1) \[\frac{VRef-Vout1}{R2} + \frac{Vin1-Vout1}{R1} + \frac{Vr-Vout1}{R3} = 0\]
(2) \[\frac{VRef-Vout2}{R2} + \frac{Vin2-Vout2}{R1} + \frac{Vr-Vout2}{R3} = 0\]
Solving the above equations the following ratios for R1, R2 and R3 can be derived:
\[\frac{R3}{R1} = \frac{(VRef-Vr)(Vout1-Vout2)}{VRef(Vout2-Vout1+Vin1-Vin2)+Vout1Vin2-Vout2Vin1}\]
\[\frac{R2}{R1} = \frac{(VRef-Vr)(Vout1-Vout2)}{Vr(Vout1-Vout2+Vin2-Vin1)+Vout2Vin1-Vout1Vin2}\]
substituting Vin1, Vin2, Vout1 and Vout2 from a), b) we obtain:
\[\frac{R3}{R1} = \frac{4.93(VRef-Vr)}{35.07VRef-198}\]
\[\frac{R2}{R1} = \frac{4.93(VRef-Vr)}{-35.07Vr+198}\]
both these ratios must be positive! for the circuit to be realizable, so that
if VRef > Vr (numerator > 0), denominators must also be positive:
VRef > \[\frac{198}{35.07}\] = 5.64585...[V]
Vr < \[\frac{198}{35.07}\] = 5.64585...[V]
(or the second solution: VRef and Vr can change places ;-))
Conclusion:
For instance, if VRef=+5V, then Vr can be, say, +6V (min.~5.7V) or conversely (see an example in the enclosure).
These voltages have to be chosen first and then the above ratios can be calculated and finally resistors R1, R2, R3 chosen (so that the mentioned max. consumption is reached).
Best Regards,
Eric