In contrast with other kinds of atmospheric pollutants, light pollution does not present highly-variable patterns in short time periods. Hence, the cost of a monitoring network can be avoided, under the assumption that light pollution is almost constant from one day to the next, by using a portable monitoring device. In addition, with an adequate design, such device could be used to acquire measurements in a wide set of of angles providing a full-picture of the sky pollution, such devices are named as sky scanners. In this article, we propose to automatically synthesize dimensions of a four-bar linkage mechanism that best fits the scanning task via an optimization problem, solved via a version of the Boltzmann univariate marginal distribution algorithm (BUMDA). The BUMDA proposes configurations with different lengths and reference positions of four-bar linkage mechanisms; to minimize the distance between points in the actual and desired paths for each candidate configuration. The objective function value is the sum of such distances subject to Grashof constraints; thus, the optimal design produces the minimum distance to the desired path. This proposal for automated design reduces the working time and experience requirements of a human designer, and trial-and-error design intends, by determining adequate dimensions for the mechatronic system. A CAD model and a simulation demonstrate the design feasibility and the high accuracy of the resulting device.