Understanding solar batteries