Car battery monitor

P.S.
If this is for a real battery charger and not just something you are playing with, I have a couple more suggestions:

You'll want to add some hysteresis. Something like this - If the voltage drops below 13.8V, turn the charger on. Leave the charger on 'till the voltage gets-up to 14.2V. Then shut it off, 'till it drops to 13.8 again. (Thermostats work this way.)

If you don't do that, you get "chatter" (a mechanical relay would make a "chattering" noise). Basically, the charge goes up to 14.0001V and the charger shuts-off. Then, a millisecond or so later the voltage drops to 13.9999V and it turns-on for a millisecond or so, and the cycle repeats... There is also noise in the ADC reading that can cause chatter.

Also, you don't really need a microcontroller to make one simple "decision" (is the voltage above or below a preset level?). An op-amp can be used as a [u]comparator[/u]. For hysteresis, you'll have to look-up how to use positive-feedback, or you can use two comparators and some simple logic circuitry (AND gates, OR gates, etc.).