How to make batteries in photovoltaic systems