Monitoring voltage from a power supply

The analog pins can take only 5V (well... 5.5V but you should shoot for 5V max). So, you need a voltage divider circuit to step the incoming 13.8V down to 5. For ease of calculation lets say the input is a max of 14V and you want to step that down to 5V. 14/5 = 2.8 so you need a 2.8 to 1 step down. 1K and 2K is close enough. Then 2/3 of the voltage bleeds to ground and one third goes to the arduino pin. If you are worried about too much amperage getting through then use bigger resistors. So long as one is twice the size of the other. You could probably get away with 10k and 5.1K.

The analog in values can range from 0 - 1023. But 1023 is the value when the input matches the voltage of the arduino reference voltage. That should normally be 5V. The easiest thing to do is to create the voltage divider and then hook up a known voltage (test with a multimeter). See what value you get out of the arduino. Maybe do that a time or two more with a couple of other voltages in range. Find out how many values per incoming volt you get and use that as a linear reference. For instance, if you have 13V incoming and you used a perfect third divider then the voltage at the arduino pin would be four and a third volts. The reading would be 886 approximately. 886 / 13 = 68 values per original volt. Use that to figure out how many volts the original input was. If the reading is 680 then the original voltage was 10v. The arduino could then sent a human readable text string over it's Serial->USB connection.