Smoothing Capacitor for Voltage Sensor
Using too big value for the voltage divider will affect the accuracy and what voltage your arduino "see" 

Arduino adc has " impedance " :


The datasheet of ATMEGA328 says :"The ADC is optimized for analog signals with an output impedance of approximately 10 kohm or less.", so you shouldn't use too big value for the voltage divider.

In your schematic, your smoothing capacitors are too big. A few microfarads is okand I think a ceramic bypass capacitor should be included to prevent voltage spike cause by the motor.

Because you are interested in 0 - 20 V range, the schematic should be something like this: 







simulate this circuit &ndash; Schematic created using CircuitLab