Improving battery charging with solar panels