Resistor value calculations for measure negative and positive voltages using Arduino ADC
You can apply the formula:
Vout = (Vin/R1 + 5V/R2 + 0/R3)*R1||R2||R3 (assuming R3 is grounded).
Source impedance is R1||R2||R3. Let's set that to 10K.
Now we want Vout = 0V when Vin = -25V  and Vout = 2.5V when Vin = 0V.
So 2.5 = (5/R2)*10K =&gt; R2 = 20K
0 = -25/R1 + 5/20K =&gt; R1 = 100K
Then R3 must be 25K for R1||R2||R3 = 10K
We could  easily scale these values down a bit to reduce the source impedance.



simulate this circuit &ndash; Schematic created using CircuitLab