Measure voltage of motorcycle battery which varying voltage
Yes this voltage divider will still work when the input voltage changes to 13.5v. You will then get 2.85V on the input to the microcontroller. I would also suggest using a voltage follower going into the microcontroller. The output of the voltage divider is going to be a fairly high impedance. You want to have a fairly low impedance in order to quickly charge the ADC sampling capacitor inside the microcontroller.
D1 and D2 are optional. These are to protect the microcontroller from over voltage on the ADC pin.



simulate this circuit &ndash; Schematic created using CircuitLab