Using solar panels for optimum efficiency