Photovoltaic and lithium iron phosphate batteries