ADC: Need to convert 10V-32V(from battery 0-32V) range to 0-5V
A voltage divider is needed if you have a real world signal that covers
a wider range than your ADC.  Suppose you have a signal from a
transducer that goes from 0-20 Volts, and an ADC that works from 0-5
Volts.  You need to divide the signal by 4 to get it into the range of
your ADC. You can do this by placing two resistors in series like this:

(A)----////---(B)---////----(C)

The wiggly parts are two resistors, Rab and Rbc. Connect point A to your
real world signal. Connect point (C) to ground. Connect point (B) to you
ADC input. At point (B), the voltage will be:

Vb = Va * (Rbc) / (Rab + Rbc).


If Va is 20V, and Rbc is 10K Ohms, and Rab is 30 K Ohms, then Vb will
be:

Vb = 20V * 10 / (10+30) = 5V


Thus you have converted a signal that is out of the range of your ADC to
a signal that is in range.