Ardruino Auto battery charger

You need to look up Voltage Divider circuits.

However, I have to say, this does not need a microcontroller to turn the relay on and off. You can do that by feeding the output of an appropriately scaled voltage divider to the base of a transistor, which would in turn close the relay contacts when the battery voltage is too low.

Good luck.

Mark