Potential difference in batteries