How to properly charge batteries with solar energy