Calculating the Voltage of a Battery