Arduino Negative Voltage Reading with Positive Ground
If you want measure input voltages that may be both negative and positive, using an Arduino ADC where the analog input pins can't read negative voltages, then you might consider the following style of three-resistor divider shown on the left side (the right side we will get towards):







simulate this circuit &ndash; Schematic created using CircuitLab

The \$V_i\$ terminal goes to what you want to measure and the \$V_o\$ pin goes to your ADC input (or to a buffer amplifier, if you prefer.)

Your Arduino ADC needs to see an input impedance that is less than \$10\:\textrm{k}\Omega\$, total. With the above divider arrangement, this is \$R_{IN}=R_i+R_p\vert\vert R_g\$. Roughly speaking, since \$R_p\$ or \$R_g\$ will be larger than \$R_p\vert\vert R_g\$, we just need to make \$R_i+R_p\lt 10\:\textrm{k}\Omega\$.

But taking into account your worst case \$V_i=-17\:\textrm{V}\$ and power supply of \$V_{CC}=5\:\textrm{V}\$, it must also be the case that \$R_p \lt \tfrac{5}{17} R_i\$. Another consideration that comes from a separate equation solving for \$R_g\$ suggests that \$R_p \lt \tfrac{2}{9} R_i\$. So \$R_i \lt \tfrac{10\:\textrm{k}\Omega}{1+\tfrac{2}{9}}\$. So that is our more important constraint. \$R_i \le 8.2\:\textrm{k}\Omega\$. That's a standard value of \$R_i =8.2\:\textrm{k}\Omega\$ and I then just picked \$R_p=1.8\:\textrm{k}\Omega\$ as an appropriate standard value, as well.

From this, you can compute \$R_g=V_o\frac{R_i R_p}{\left(V_{CC}-V_o\right) R_i - \left(17+V_o\right) R_p}\$, where you get to pick \$V_o\$ when \$V_i=-17\:\textrm{V}\$. It's not linear, though. Looking at the curve, I think \$R_g=2.7\:\textrm{k}\Omega\$ looks good.

The input impedance is now \$9.3\:\textrm{k}\Omega\$, which meets the needed criteria for the ADC. And at \$V_i=-17\:\textrm{V}\$ you will get \$V_o=670\:\textrm{mV}\$ and at \$V_i=-10\:\textrm{V}\$ you will get \$V_o=1490\:\textrm{mV}\$ and at \$V_i=0\:\textrm{V}\$ you will get \$V_o=2650\:\textrm{mV}\$.

In the above case, I'm assuming you can share grounds, of course.