Designing Low-Cost Open-Hardware Electromechanical Scientific Equipment: A Geological Analogue Modeling Sandbox

Scientific experimentation often requires building custom apparatus. However, published results usually focus on the experiment, disregarding technical details of the scientific equipment. Lacking enough information about these custom devices prevents their accurate replication, hindering the experiment reproducibility, which is a fundamental requirement for Open Science. In the field of Geology, custom electromechanical devices with low-speed moving elements are required to analyze scaled-down models of the tectonic deformation processes. In these experiments, the earth crust is modeled with materials whose properties and setup are scrupulously specified to comply with the scale model theory and to have standard and reproducible procedures. Notwithstanding this rigorous characterization, we believe that the moving apparatus has received little attention, implicitly assuming an ideal behavior despite the difficulties of moving uniformly at such slow speeds, which could produce disparities with the natural model. In this paper we address this issue by presenting a device for scientific analogue modeling of contractional and extensional tectonics. We analyze the challenges and implications of moving at such low speeds, demonstrate its satisfactory performance and provide suggestions for improvement. In addition, the proposed apparatus is not only affordable and relatively easy to build, but also is an open-hardware project that can be replicated, improved or customized, even in other research fields. We hope that this contribution will be beneficial for the scientific and educational community, facilitating the reliability of experiments, the exchange of ideas, and thereby the promotion of Open Science.


I. INTRODUCTION
The study of the geodynamic processes that govern the structure of the Earth is challenging because these phenomena occur at geological timescales of millions of years. Moreover, there is a wide variety of geological structures and deformation histories covering different scales. Analogue and The associate editor coordinating the review of this manuscript and approving it for publication was Bo Pu . numerical modeling techniques enable to reproduce aspects of geological processes and link them with a real structure in nature.
Numerical models use computer simulation to solve the complex mathematical equations that describe the geodynamical processes. The increasing computational power and the advancement of numerical algorithms have boosted the performance of numerical methods in Geodynamics, as in all areas of Science and Technology [1]. These computational models have become essential to understand and predict the geodynamic processes [2], [3], [4], [5].
Numerical models are a powerful tool because they allow an easy quantification of the results, relative freedom in material properties and changing the strain during the experiment. However, models with high 3D resolution and large scale deformations cannot be easily developed [2].
On the other hand, analogue models are properly scaled physical models that represent an approximation of natural prototypes [6], [7], [8], [9]. They are appropriate for studying the evolution of 3D structures, providing higher resolution than the numerical models. Although they are experiments with inherent simplifications and restrictions, which are important to consider in the interpretation of the results [2], [10], analogue models enable the understanding of tectonic processes.
Although analogue models have been used to study the geodynamic processes for more than two centuries, it was after the application of scale model theory by Hubbert [11] in 1937 when they changed from being a qualitative tool to a quantitative technique.
Over the last decades analogue models have experienced a revolution due to the incorporation of new materials, systematic rheology testing, digital image processing and stress measurements [8], [12].
Having both the numerical and analogue models is crucial since they provide complementary approximations of the same geological process. Furthermore, analogue models can be used to calibrate numerical models and it is common to implement both models for the same geodynamic process to compare and refine their outcomes [2], [3], [4], [13], [14], [15].
Geoscientists have accomplished an impressive rigorous endeavor in the characterization and benchmarking of the analogue models. In this sense, the rheological properties of the materials have been exhaustively characterized to properly scale the geodynamic processes [6], [8], [12], [16]. Additionally, benchmark experiments have been replicated in different research laboratories to analyze the variations in the results [17], [18].
In the most recent literature, model parameters (material and setup) have been meticulously specified with the aim of standardizing procedures and methods; and thus, reducing variations in experiment replications. These experimental setups and materials have been thoroughly analyzed and compared [6], [8], [19], [20].
In the first reported benchmark, Schreurs et al. [17] tested the reproducibility of two experiments among ten laboratories in order to assess the influence of the material properties, boundary conditions and experimental set-up. The benchmark results showed a large variability in the quantitative parameters. The authors concluded that the variability could be related to differences in the apparatus set-up and dimensions, location of observation, materials, and human factor.
In an attempt to better understand the observed variability, Schreurs et al. [18] performed three new experiments in another benchmark with fifteen laboratories. In order to reduce the variability, the proposed benchmark involved simpler experimental designs and used the same materials; besides, they followed stringent model-building and observation techniques. Nevertheless, the resulting variability was still considerable; therefore, the authors concluded that the variations of the basal friction and the way that materials were deposited in the flatten surface were responsible for the heterogeneities. This is supported by the fact that there were variations even when one researcher repeated the same experiment.
Since these observations show the limitations of the quantitative analogue model results, Schreurs et al suggested that a possible approach could be to build statistical descriptions of the measured parameters along with adhering to a standard for experimental descriptions, such as the physical and mechanical characteristics of the analogue materials, the model construction technique, and the laboratory climatic conditions.
In addition to these fundamental recommendations, we consider that the modeling apparatus should also be characterized. To the best of our knowledge, no other authors have addressed this issue properly, since we have not found detailed specifications of the internal operation and technology of the research apparatus. We believe that the use of different design approaches involving the device's mechanical, electronic, and control subsystems could be responsible for a fraction of the variability in the benchmark outcomes. This is a common problem in scientific disciplines in which custom apparatus are created for experimental research. In many cases the published results are focused on the experiment but not on the device; therefore, the description does not allow for a faithful replication of the device, preventing the whole experiment from being reproduced [21]. In the light of this situation, the scientific community is starting to advocate for the adoption of Open Source Hardware (OSH) in scientific research [21], [22], [23], [24], [25].
Open Source Hardware, or just Open Hardware, is hardware for which the design is made publicly available so it can be studied, modified, distributed, replicated and sold [26]. For this purpose, the design files, documentation and source code should be available with an adequate open license.
Consequently, to address the lack of characterization of the modeling apparatus and its possible influence in the experiment outcomes, in this paper we describe an OSH device for scientific geological analogue modeling.
The aim of the present work is threefold. First, to build a low-cost laboratory device for modeling extensional and contractional tectonics.
Secondly, to describe and characterize the modeling apparatus to assess its limitations and possible influence in the experiment outcomes; and to include suggestions on how to improve its performance, along with their cost implications. VOLUME 11, 2023 Thirdly, to release the design as open-hardware, providing the necessary files and documentation, so it can be replicated at any scientific or educational institution, thereby facilitating the reproducibility of experiments. In summary, since the presented device is open hardware, it could be studied, modified, customized and further improved, thus hopefully promoting Open Science by sharing ideas and leading to collaborative and interdisciplinary research.
The paper is structured as follows: Section II surveys the works describing modeling devices for contractional and extensional tectonics. Section III outlines the required characteristics of this kind of device. Section IV details the design challenges and describes the proposed solution. The experimental validation and results are exposed in Section V. Section VI discusses the proposed device, its performance and limitations, and provides suggestions for improvements. In the final section we draw the conclusions.

II. SURVEY ON TECTONIC MODELING DEVICES
There are a large variety of apparatus to physically model the diverse geodynamic processes. However, in this paper we are only going to focus on one of the simplest and more widespread apparatus, devised to model extensional and contractional tectonics.
A schematic representation of this kind of device is shown in Fig. 1. This apparatus consists of a fixed flat surface where the modeling materials (sand, clay, and silicone mainly) are deposited, and a movable wall that can either compress or move away from the materials, simulating contractional or extensional deformation behavior, respectively.
The materials may be confined by three other fixed walls (box). Since originally it was usually the case and the materials were sand, the apparatus is also known as a sandbox. To simplify, throughout this paper we will use the term ''sand'' to refer to the materials used to model the earth crust, and we will use the term ''sandbox'' to refer to the apparatus for performing the contractional and extensional deformations.
In order to shift the mobile wall back and forth, the wall is usually attached to a piston that is actioned by a lead screw. The end of the leadscrew can be either connected to a hand crank in the case of manually operated sandboxes or it can be actioned by a motor in automated sandboxes.
There are no scientific sandboxes available for sale on the market; therefore, when geoscientists want to equip their labs with one, they have to either request an ad-hoc project or build the sandbox themselves. Any of these solutions could be inconvenient because ad-hoc projects are expensive, and building a scientific sandbox requires time and knowledge in mechanics, electronics and control.
As far as we are aware, only Castello and Cooke [27] have disclosed a detailed procedure on how to build a sandbox. However, since the proposed sandbox is manually operated, its outcomes are only qualitative; and hence, it is an educational device unsuitable for research. In any case, the proposed sandbox is simple and affordable. Moreover, with some modifications, such as substituting the hand crank for a motor, it could be transformed into an automated sandbox.
In the literature there is generally very vague information about the technical characteristics of the sandboxes used for the analogue modeling experiments. Usually, these descriptions include a drawing of the sandbox in which the movable wall is said to be actioned by a precise controlled motor through a leadscrew or a piston.
But it is rare to find more information about the technical characteristics of the motors, the leadscrew, the control system and the construction of the sandbox.
The most detailed information of a scientific sandbox we have found is the work of Acevedo et al. [34] which have been further described in the thesis of Villarroel [35]. These contributions unveil the model of the servomotor and the software that controls it; and also include mechanical drawings, the materials and characteristics of the leadscrew and sandbox. This information is very valuable to get an idea of the construction and internal operation of the sandbox; however, there are some facts we were not able to get, such as the lead of the screw. Besides, since the servomotor is controlled using closed-source commercial software, it is difficult to know how it behaves at such low speeds.

III. SANDBOX REQUIREMENTS
The sandbox should reproduce the scaled down models of the massive and extremely slow geodynamic processes subject to study. The physical quantities of the natural example are scaled down following the well-founded scaling theory developed by Geoscientists, which include geometric, kinematic and dynamic similarity [8], [19], [27].
The main physical quantities to consider when building a sandbox are the model dimensions (distance: d) and the deformation rate (velocity: v). The required geometric similarity imposes that all the lengths have to be scaled with the same scaling ratio. This scaling ratio is defined by where d r is the scaling ratio of length, d mod is the scaled length in the analogue model, and d nat is the original length in nature that is being modeled. Each analogue model experiment has its specific dimensions and scaling ratios; nevertheless, usually the model dimensions range from a few decimeters up to a meter (length and width), which in the natural example would correspond from ten to a hundred kilometers [19]. The most common scaling ratio for distance that we have observed in the literature is d r = 10 −5 , in which a centimeter in the model corresponds to a kilometer in the natural example [13], [17], [30], [31], [33], [36], [37], [38], [39].
The other key parameter is the deformation rate. The required kinematic similarity imposes that the time taken to change the shape of the analogue model should be proportional to its natural counterpart.
This scaling ratio is defined by where t r is the scaling ratio of time, t mod is the scaled time in the analogue model, and t nat is the time that the geodynamic process would take in nature.
We can obtain the velocity ratio from the length and time scaling ratios, since v = d/t: Accordingly, v r is the scaling ratio of the velocity, v mod is the scaled velocity in the analogue model, and v nat is the velocity (deformation rate) of the real geodynamic process.
From the literature, deformation rates in nature that have been used for analogue models span from 0.1 to around 15 millimeters per year (except for Jara et al. [31] that used 0.016 mm/a). Besides, in the corresponding downscaled analogue models the speed ranges from one to some hundreds of millimeters per hour (only in [13] and [36] used 1 mm/h, the others we have found start at 5 mm/h). The downscaled speed of 25 mm/h for the model will be also considered throughout this paper. This is the speed chosen to perform a benchmark between fifteen analogue modeling laboratories [18]. We will use the term ''benchmark speed'' or v B to refer to this speed.
As a summary, the sandbox should accommodate an area of sand of at least various decimeters and the mobile wall should be able to push the sand at speeds varying from a few millimeters per hour up to a hundred millimeters per hour. Table 1 shows a summary of the correspondence for length, time and speed between the reviewed analogue models and their natural counterpart. These values were obtained from the following references [6], [19], [28], [30], [31], [33], [38], and [39].
The columns of Table 1 are numbered as items to better  identify them. Item 1 of Table 1 shows different values for length, time and speed for the analogue models. These values are upscaled to nature in items two, four and six. Item 2 shows the minimum value found among the experiments from the literature, and item six shows the maximum values. Next to these values are their corresponding scaling ratios. Item four shows data from an hypothetical case that will be taken as an example throughout this paper. This example takes the most common scaling ratio for distance (d r = 10 −5 ) and an intermediate value for t r .
To illustrate this example, a length of 10 mm in the model (length in item 1) corresponds to one kilometer in nature (item 4). One hour in the model (time in item 1) is 1.44 millions of years in nature (item 4). Likewise, five milliseconds in the model would take two years in nature. We chose 5 ms to exemplify a case that will be used throughout the paper.
Usually, the speed of the experiments is constant, thus the minimum and maximum nature values have been included only for the particular speed values of the experiment. For example, Jara et al. [31] uses a 40 mm/h model speed, which is upscaled to a 0.016 mm/a in nature. This is the lowest nature speed we have found. On the other hand, the model of Santolaria et al. [33] runs at 5 mm/h, which corresponds to 13.5 mm/a in nature. Note that although Jara's model runs faster than Santolaria's, it is the opposite for their corresponding natural deformation rates.
Using the scaling ratio of the example (item 5 Table 1), the model speed (v mod ) of 1 mm/h would be up-scaled to a nature speed (v nat ) of 0.07 mm/a, which is smaller than most of the deformation rates reported in the literature (v nat ≥ 0.1 mm/a). Only [31] models a smaller deformation rate (v nat = 0.016 mm/a); however, they use a significantly larger speed scaling ratio (v r = 2.2·10 7 ) that allows them to use a considerable faster motor (v mod = 40 mm/h). Therefore, it would not be strictly necessary to resort to such a low speed for this scaling ratio. As we have said, only [13], [36] use such a low model speed, the other models we have found use speeds starting from 5 mm/h [33] or 8 mm/h [6].

IV. OVERVIEW OF THE PROPOSED SANDBOX
An outline of our proposed sandbox (the Sandbox hereafter) is shown in Fig. 2. The main difference with the typical sandbox represented in Fig. 1 lies in the location of the mechanical elements that drive the mobile wall. In Fig. 1 these elements are outside the flat surface, whereas our proposal locates them under the flat surface, making the apparatus more compact. Nonetheless, both configurations have the same working principle, and hence, they can be considered equivalent.
Our Sandbox is derived from the computer numerical control (CNC) do-it-yourself (DIY) machines. There are several DIY CNC examples available online and also books [40], [41], [42]. In the Sandbox, instead of supporting the tool, the gantry now has the function of actioning the Sandbox's mobile wall; thus, the mechanical system has to be adapted TABLE 1. Correspondence between quantities of different analogue models with nature, rounded data taken from [6], [19], [28], [30], [31], [33], [38], and [39]. The table includes an item number to identify the columns. Item 1 shows different example values for length, time and speed of the analogue models. The upscaled nature values depend on the scaling ratios of each experiment, thus the next six columns show three cases: item 2 shows the minimum nature value that would result from the larger scaling ratio found in the cited bibliography; item 4 shows a particular example value used throughout this paper; and item 6 shows the maximum nature value that would be obtained from the lowest scaling ratio of the cited bibliography. Note that since the natural values are in the denominator of (1), (2) and (3), the larger the scaling ratio, the smaller the nature value is. These scaling ratios are in items 3, 5 and 7 for the minimum, example and maximum natural values, respectively. Only in the example scaling ratio (item 5), the scaling ratio of velocity has been calculated according to (3). This is because it is a particular example, but for the minimum and maximum scaling ratios the equation is not used because these values do not correspond to a particular experiment, i.e. the experiment with the highest scaling ratio for length may not have the highest scaling ratio for time. The four rows for speed have been elaborated differently because the experiments are performed at constant speed, and this speed is not the same from experiment to experiment. The second model speed (5 mm/h) corresponds to the experiment with the highest nature speed [33], therefore its corresponding nature speed is represented in item six. The third model speed (40 mm/h) corresponds to the lowest nature speed [31], thus it is represented in item 2. Finally, the first (1 mm/h) and fourth model speed (100 mm/h) do not correspond to any particular experiment, but they can be considered the lower and upper limits of most of the experiments of the bibliography. Note that all the rows of the nature speed (item 4) have been calculated since it is not a particular experiment of the bibliography. for the ultra low speeds of the sandbox. Besides, the sandbox gantry is simpler because it does need the additional motors and transmission systems of the CNC, although they could be added in the future to increase the degrees of freedom of the wall. Henceforth, the terms gantry and mobile/movable wall will be used interchangeably.
The next subsections elaborate the different subsystems of the Sandbox, which can be organized as: Additionally, to end this chapter, a basic description of the Sandbox operation and a summary of its characteristics is included.

A. STRUCTURE
The structure of the Sandbox is made of extruded aluminum profiles. Numerous suppliers offer cut-to-length aluminum profiles, along fasteners and connectors. Building a frame with these readily-available components requires no special tools or knowledge.
Nevertheless, those parts that have been specifically created for the Sandbox were designed with FreeCAD, which is a Free and Open Source Software (FOSS) for mechanical design. FreeCAD allows designing with either its graphical user interface (GUI) or Python scripts [43].
We used the latter to design these specific parts, resulting in a parametric design that facilitates customization. Both the code and the resulting standard CAD files are available at the project's repository [44] to allow 3D-printing, modifying and customizing the design using either a graphical interface CAD tool or Python scripts. Therefore, the Sandbox design can be easily customized to change its dimensions, to add functionality or even to use it for other purposes.
Alternatively, the frame could also be built using other materials. For instance a steel frame would be cheaper and sturdier; however, the frame would be heavier and above all it would require having machinery and expertise for working with steel [41]. As an example, a steel sandbox is outlined by Acevedo et al. [34]. Fig. 3 shows a CAD drawing of the actual profile assembly of the Sandbox structure, which is composed of two parts: the fixed frame and the gantry. In the figure, the profiles colored in gray constitute the fixed frame. The fixed frame has a board on top where the sand is placed (the fixed flat surface of Fig. 2). This board can be plywood, medium density fiberboard (MDF), melamine or any other kind. Depending on the experiment, another board of a different material can be set on top.
On the other hand, the profiles colored in blue compose the gantry. Another board is attached to the gantry, making the mobile wall, so it can push the sand evenly. The gantry moves along the axis of the Sandbox, having its zero at the border of the Sandbox.
Since aluminum profiles can be easily mounted and changed, they provide flexibility to the Sandbox, enabling modifications such as confining the sand inside a box of different sizes. As an example, Fig. 4 shows two different configurations of the gantry that allow either pushing the sand inside a box or pushing an unconstrained amount of sand.
All the electronic and the mechanical power transmission systems are placed inside the fixed frame under the board (fixed flat surface). This arrangement has the advantage of protecting these components from dust and sand, and also makes the sandbox more compact. The mobile wall of most of the sandboxes from the literature is driven by a piston placed outside of the sandbox (Fig. 1), as we inferred in view of their drawings [15], [28], [29], [30], [31], [34], [35], [37], [38], [39], [45]. Although, it is basically the same mechanical principle, having the mechanical components under the base reduces the size of the ensemble.

B. MECHANICAL SYSTEM
The mechanical system is in charge of the displacement of the gantry. It can be subdivided into the guide system and the power transmission system. Following, these subsystems will be described, which are also shown in Fig. 5.  Drawing of the mechanical system. Elements colored in green compose the guide system and elements in red form the transmission system. The four linear bearing housings and the leadscrew nut are joined by four profiles that compose the base of the gantry. Only one of the profiles (colored in blue) is included to permit the visualization of these mechanical elements. The linear bearings are inside their housings, but the top part of the rightmost housing has not been drawn to show its linear bearing inside.

1) GUIDE SYSTEM
The guide system allows the gantry to slide along its axis of movement. This kind of guide system is a prismatic joint or slider: a mechanism that only permits a linear motion. It should be stiff and resistant enough to support the gantry VOLUME 11, 2023 weight and also the forces and torques resulting from pushing the sand.
There are different alternatives for building sliders, such as round rails or profile rails. We chose end-supported round rails; which are made out of precision rods (also called shafts) and linear bearings. As the name suggest, the shafts are only supported at the ends. This is the most economical solution we found; nevertheless, since it is only supported at the ends, the rod deflection will be larger. To counterbalance the deflection, we chose a rod diameter of 20 mm, although we believe that a smaller diameter could be acceptable, we selected a larger one to allow adding elements to the gantry in the future. A lager rod diameter makes the slider heavier; however, we consider it not to be a problem because it is a static weight.
In Fig. 5 the guide system is colored in green. It is composed by two precision rods, four linear bearings and their housings, and four shaft supports. The slider also includes four profiles that join the four linear bearing housings together, making the arrangement to slide. These four profiles are the lower part of the gantry. All these components are commercially available except for the linear bearing housings, which have specific dimensions, and therefore, they have to be 3D printed. All the CAD files are available with an open license at the project's public repository [44].

2) POWER TRANSMISSION SYSTEM
The power transmission system converts the rotary motion of the motor into the linear motion of the gantry. There are several methods to accomplish this task, but due to the low speeds of the mobile wall (see Section III) we chose a leadscrew, also called power screw.
Alternatively, ballscrews could also be considered, since they have several advantages over the leadscrews, such as efficiency, precision, load capacity, and durability [41], [46]. However, since their cost is considerable higher we opted for the leadscrew. In any case, both options should be regarded as valid and their performance versus cost trade-offs pondered.
Leadscrews usually have trapezoidal threads, which are easy to manufacture and offer high strength. Among the trapezoidal threads, the most common is the ACME thread.
A nut is threaded onto the screw and attached to the gantry so its rotation is restrained. Therefore, when the screw rotates, the nut translates through the screw, and thus driving the gantry along the linear guide ( §IV-B1).
The load that a leadscrew can drive is determined by the material of the nut, and the diameter and lead of the screw. The lead of a screw is the linear distance that the nut travels per revolution. Since the mobile wall should travel extremely slowly, the smaller the lead, the better.
The leadscrew can be mounted with fixed or simple supports at any of its ends. A fixed support requires the leadscrew to be machined at the corresponding end. It is not necessary to machine the ends for simple supports, although it is convenient and the type of machining is simpler than for the fixed supports. The maximum speed of a leadscrew is determined by the length and the diameter of the screw, and the kind of support at each end. Since our screw rotates at very low speeds, in order to lower the cost, we chose inexpensive simple supports (pillow blocks) and no end machining.
The selected leadscrew is TR12×3, where TR designates a trapezoidal thread, 12 is the nominal diameter in millimeters, and 3 is the lead in millimeters. There are TR12×2 and TR12×1 leadscrews, but they are not so common and we could not find them on stock at our habitual suppliers when we placed the order. Another alternative could have been choosing a TR10×2, which is more common, though the load they can drive is smaller. Fig. 5 also includes the transmission system, which is colored in red. It is composed by the leadscrew, two supports (pillow blocks), the nut, and the flexible motor coupling. The nut is attached to the base of the gantry (four profiles) using a 3D printed part, which is available in the project repository. It has not been included in the drawing because it would hide the nut.
In Section III we saw that the wall should move at a speed spanning from 1 mm/h to 100 mm/h. Having a lead of 3 mm means that the screw should rotate at an angular speed ranging from 0.333 to 33.3 revolutions per hour (r/h). The rotational speed of a motor is usually given by revolutions per minute (r/min); therefore, the motor speed of the Sandbox would range from 5.56·10 −3 r/min to 0.556 r/min. As we will discuss in the next section, these values are unusually low for a motor. Table 2 shows a summary of the required linear and angular speeds. Due to the atypical low speeds, they have been represented in different units for clarification.

C. ELECTRICAL MOTOR
The electrical motor is the link between the electronic and the mechanical systems, since it is in charge of converting the electrical energy into the rotary motion of the leadscrew.
The motors typically used in CNCs are either servomotors or stepper motors, what has also been reported for the sandboxes ( §II). However, sandboxes are a singular case compared to CNCs or 3D printers due to their low speeds ( §IV-B2 and Table 2).
A stepper motor (or just a stepper) is a distinctive type of motor because it rotates at defined angular steps. Therefore, its position can be easily controlled without feedback, provided that the motor is properly sized regarding torque and speed. Steppers have maximum torque at low speeds, which is an asset given the low speeds of sandboxes. However, steppers have drawbacks such as vibration, noise and low efficiency.
On the other hand, servomotors are motors that include feedback to control their position and speed. Servomotors usually contain a rotary encoder to let the controller know the actual position, enabling the controller to adjust the position or speed according to the target values. Servomotors are considerably more expensive and their control is much more complex than stepper motors; thus, it is not uncommon for servomotors to be sold jointly with their servo drive and control software.
Although servomotors are more accurate and have better performance than stepper motors, we opted for the latter because servos are substantially more expensive. As an example, the servomotor and drive used in [34] and [35] would be more expensive than the total cost of the all the components of the proposed Sandbox.
Since stepper motors have been selected for the Sandbox, their characteristics and control will be explained next because they have a dramatic influence on the Sandbox performance and behavior.
The discrete angular intervals of a stepper are defined by its number of poles. Steppers used in CNCs and 3D printers usually have 200 poles, leading to an angular resolution of 1.8 • per step (360 • /200). Since the power screw used in the Sandbox has a lead of 3 mm (see Section IV-B2), for each step the gantry travels 15 µm, as shown in (4): where d fs represents the linear distance that the gantry travels per motor step. The symbol fs stands for full step, because, as we will see, fractions of steps can be taken. Table 3 summarizes the symbols and nomenclature related to the stepper motor and the generated linear displacement that will be used throughout this paper. The rotation of an isolated step takes a few milliseconds. The specific time depends on the motor size, step angle and load [48], [49]. This step rotation is imperfect because the motor overshoots and oscillates until it reaches the final position. Fig. 6 shows an example of the angle-time response of an isolated step. Although the shape will vary depending on the aforementioned conditions, it is important to note that there are oscillations that lead to overshoot, mechanical vibration, torque ripple and noise [50], [51].
The previous description explains the motor behavior when left to rest between steps. However, if the step frequency is raised, the motor will not stop at each angular interval and the rotation will be fairly smooth. For example, if the motor is running at 2000 steps per second, it will take 0.5 ms per step, which is around ten times shorter than the duration of an isolated step. A stepper operating at high speeds is referred as slewing, and to reach this state the motor needs to be TABLE 3. Description of symbols and nomenclature used in this paper related to the stepper motor and the displacement it produces on the gantry assuming that there are not missed steps.
gradually accelerated because it cannot start running at these high speeds from rest [48].
There is a limit for the maximum speed of a motor, which depends on the motor characteristics, the load and the driver; nevertheless, generally it is not recommended to exceed a few thousands of steps per second.
Nonetheless, having the unusual low speeds of the gantry, a typical 1.8 • stepper motor with a 3-mm leadscrew would never be slewing, since at the Sandbox's fastest speed (v F = 100 mm/h) each step should theoretically take 540 ms, as shown in (5), which is around a hundred times longer than VOLUME 11, 2023 FIGURE 6. Example of the time response of the shaft angle for an isolated full step (fso) of a 1.8 • stepper motor. The actual oscillation and response time will depend on the motor size, step angle and load [48], [49]. To simplify, we will approximate the response considering that takes 5 ms [48]. TABLE 4. Sandbox displacement, time and speed quantities related to a 1.8 • stepper motor in full-stepping mode and a 3-mm leadscrew, for the slowest and fastest velocities. In these conditions the motor will not be slewing (T fs > t fso ). For each speed, there are two columns: one for the model and another for the nature quantities, which have been up-scaled using the scaling ratios from item 5 of Table 1. The symbols are described in Table 3.
the time of an isolated step (t fso ≈ 5 ms).  (5) where d fs is the linear distance resulting from a full-step, v F is the fastest linear speed of the gantry, and hence T fs is the step period, or the time from step to step at the Sandbox's highest speed. Therefore, assuming that an isolated step takes around 5 ms, this Sandbox arrangement (3 mm lead, 1.8 • stepper) makes the gantry movement highly discontinuous. Table 4 shows that even at the Sandbox's fastest speed, the motor finishes a step in a very short time (5 ms) compared to the total time that a step should take (540 ms). Hence, more than 99% of the time the motor will be idle, and only a small fraction of the time the motor will be rotating.
Performing the same calculation of (5) for the lowest speed (v L = 1 mm/h), the time of a step should take 54 seconds, FIGURE 7. Time response of the displacement due to one isolated full-step (fso) using a 1.8 • stepper motor and a 3-mm leadscrew. Model axis are at the bottom and left. Nature axis are on top and right. The displacement considering the average speed v fso of the isolated step is included, and also an approximation of the displacement at its peak speed v peak . This is an hypothetical curve since the oscillation and response time depend on the motor size and load [48], [49]. Scaling ratios taken from item 5 of Table 1.
of which only 5 ms would correspond to the actual displacement of the gantry due to the step, and during the rest of the time the motor would be idle (Table 4).
If we scale up the model to its natural counterpart, taking the example values of item 4 of Table 1, it would mean that there would be a deformation of 1.5 meters (d mod fs = 15 µm) that takes place for two years (t mod fs = 5 ms) and then the process would be halted for either 21 598 years (t mod id ≈ 54 s) or 214 years (t mod id = 535 ms), for the low and fast speeds, respectively. This would mean that the deformation rate during the two-year movement period is v nat fso = 750 mm/a, which is at least fifty times greater than the values found in the literature. The geological deformation rates that we found to be modeled range from 0.016 to 13.5 millimeters per year, as shown in Table 1 for the minimum (item 2) and maximum nature speed (item 6), respectively.
Moreover, this average speed of the isolated step (v nat fso = 750 mm/a) is an over-optimistic representation of the process, in fact, initially the speed would be much higher until the first peak of the overshoot is reached. The actual values and the shape of the time response will depend on the system and the load, which will vary throughout the experiment if the gantry is compressing the sand or moving away from it. Nevertheless, to get an idea of the possible consequences of the oscillatory response of the motor, Fig. 7 shows the original time response example curve of Fig. 6, but instead of the motor angle response, it plots both the displacement in the model (left axis) and nature (right axis). It also plots how would the displacement be for the average speed of the isolated step v fso , and also an approximation of the displacement at its peak speed v peak . This figure has to be interpreted with caution, since it is just an hypothetical situation; nonetheless, it highlights that the already unfavorable theoretical analysis (v nat fso = 750 mm/a) can get even worse in the real implementation of the experiment.
As the example curve of Fig. 7 shows for nature, in the first months the deformation would be larger than two meters. Hence, the peak velocity (v nat peak ) would be around five meters per year, what is more than six times the average speed of the step (v nat fso = 750 mm/a). To help clarify the whole experiment, Fig. 8 shows a schematic view of the distance evolution with time for the fastest speed. Note that the time axis is cut to make the isolated step time (t fso ) visible. The situation is even worse for the slowest speed because the idle time is more than a hundred times larger.
This resulting irregular movement pattern, with abrupt and oscillating deformations occurring in very short periods, followed by extremely long periods of inactivity, may compromise the robust scaling theory behind the analogue modeling.
To address these irregularities and oscillations, we are going to explore the use of microstepping for driving the motor, and the inclusion of a gearbox to reduce the angular rotation of each step.

1) HALF STEPPING AND MICROSTEPPING
The motor we selected for the Sandbox is a 2-phase bipolar hybrid stepper motor, which is widely available and it is the typical motor used in CNCs and 3D-printers.
In order to explain how steppers are driven we are going to model them in a very simple way. For this task, we are not going into great details on how stepper motors are constructed and their principles of operation, as there are a plethora of books and articles devoted to this topic [48], [49], [50], [52], [53].
A representation of the internal structure of a bipolar stepper motor is shown in Fig 9. The rotor is the inner part of the motor that rotates, and in this example it has just one permanent magnet; therefore, the rotor has two poles: north (N) and south (S). The stator is stationary and surrounds the rotor. The stator of this simplified example has four projecting poles, each of them carrying an electromagnetic coil. The opposite coils are connected in series, forming two electromagnets (A-A' and B-B'), which are called phases; thus, it is a 2-phase stepper motor that has four terminals (A, A', B, B'). Figure 10 describes the simplest way to rotate a 2-phase bipolar stepper motor. When a positive voltage is applied to terminal A while having the other end (A') at ground, current will flow from A to A' through the windings. Thereby, a magnetic field proportional to the current will be generated, making A to be the north pole and A' the south pole. If the other two terminals (B, B') are left to ground, this other electromagnet will be off. Consequently, the magnetic poles of the rotor will rotate until they are aligned with their corresponding opposite stator poles A-A'. This is done due to the torque generated by the attraction of opposite poles and repulsion of same poles. As a result, the south pole of the rotor will face up (0 • ), as shown in Fig. 10(a).
From the position at 0 • ( Fig. 10(a)), if a positive voltage is applied to terminal B at the same time that terminal A is grounded, the rotor will turn 90 • counterclockwise, as shown in Fig. 10(b). Fig. 10 shows the four steps of a rotation, thus this is a 90 • stepper motor. The sequence of active terminals shown in the figure is: A-B-A'-B'-A. . ., making the motor to rotate counterclockwise. The opposite sequence (A-B'-A'-B-A. . .) generates a clockwise rotation. This mode of operation is known as single-step rotation, full-step mode, or one-phase-on.
In the previous sequence, only a phase was active at a time, making the rotor to always face one of the stator poles. However, if the two phases are excited simultaneously, the rotor will face the middle point between two stator poles. By alternatively energizing one or two phases we can double the resolution because the rotor will move in half-steps. Fig. 11 shows half of the sequence that would make the motor to rotate counterclockwise in half-steps.
Half-stepping not only doubles the resolution, but also generates a smoother shaft rotation because the oscillatory response and the overshoot is reduced, since the response damps more quickly [48], [49].
An example of the oscillatory response of an isolated fullstep was shown in Fig. 6 and 7. Now in the same graph, Fig. 12 visually compares the response of two half-steps with one full-step. For the sandbox, the second half-step would be more distant in time, but it has been set closer to better illustrate the improvements of half-stepping over single-stepping. From the figure it is evident that the total overshoot would be considerable shorter in half-stepping.
Half-stepping results in improved performance; however, we still need to further reduce the oscillation and increase the resolution. Table 5 shows the updated quantities for halfstepping. When compared to Table 4 we can observe that the resolution has doubled since the minimum displacement is the half of a full-step (d hs = d fs /2). The time to take an isolated halfstep is slightly smaller than the half of a fullstep (t hs < t fs /2). The idle time (t id ) is also approximately the half; nevertheless, it is still very large, especially when compared to the time taken to perform a half-step (t hso ). The average speed of a half-step (v hso ) can be misleading when compared to a full-step because it is smaller for a full-step. However, this is not caused by a supposedly slower speed of full-steps, but rather by their wider oscillations with longer settling time. If the peak velocities (v peak ) are compared, halfsteps are slower, although still high. Note that these values are just illustrative, actual values should consider specific experimental conditions. By fully energizing both phases, half-stepping creates an intermediate rest position between two poles, such as in Fig. 11(b) and 11(d). However, if the phases are energized differently, the rotor will stop closer to the most energized pole. This is the basic principle of microstepping: the controller provides different current intensities to the phases, thus each winding generates a magnetic field proportional to its current. As a result, the rotor equilibrium position is determined by the current supplied to the motor terminals.   . Schematic representation of a 2-phase stepper motor, with four stator poles, two rotor poles and four terminals. Rotors do not have an arrow shape, it has been drawn like this to help identify its north pole. The wiring diagram is also included.
Theoretically, if the controller is capable of providing any current intensity, the rotor could be located at any angle. However, commercial stepper drivers provide limited microstepping resolutions, usually in powers of two up to 256 microsteps per full step. Throughout this paper, a microstep in a resolution of 2 microsteps per full step will be denoted by µstep 2 , and similarly for the microsteps of the other resolutions (e.g. µstep 4 , µstep 8 ).
Despite these large resolutions, motor mechanical tolerances and friction limit the smallest attainable microstep size [50], [51], [52], [54]. The incremental torque for a single microstep is considerably diminished as the microstep resolution is increased. According to [51], one µstep 2 has a 70.7% of the motor rated holding torque, but it decreases almost to the half with each resolution increment. For example, one µstep 4 has less than 40% of the torque; a µstep 8 has less than a 20% and a µstep 16 less than ten percent of the torque. As a consequence, for high microstepping resolutions several TABLE 5. Sandbox displacement, time and speed quantities for a 1.8 • stepper motor in half-stepping mode and a 3-mm leadscrew, for the slowest and fastest velocities. In these conditions the motor will not be slewing (T hs > t hso ). For each speed, there are two columns: one for the model and another for the nature quantities, which have been up-scaled using the example scaling ratios of item 5 of Table 1. The symbols are described in Table 3.
microsteps are needed in order to have enough torque to start moving the rotor.
Therefore, unless the motor is over dimensioned, micro stepping could not notably increase the positional resolution. Nevertheless, micro stepping has yet an important advantage. As we have explained, both single-stepping (Fig. 10) and half-stepping (Fig. 11) drive the motor by applying a sequence of voltage pulses to its terminals. Therefore, the voltages of the motor coils are abruptly changed from zero to a constant voltage (+V) and vice versa. For example, when we want to move the motor from 0 • to 90 •     Fig. 10(a) and 10(b)), we simultaneously set terminal A to ground and terminal B to +V. As a result, the current through the windings B-B' rises exponentially and thus a sudden torque attracts the rotor to the poles B-B'. During all the trajectory from poles A-A' to B-B' the torque will accelerate the rotor until it reaches B-B'. Once the rotor reaches B-B' it will overshoot because of the gained speed. After it has passed B-B' it will experience a torque in the opposite direction that will make the rotor oscillate back and forth (Fig. 6). This oscillation will be reduced if the next pulse of the sequence is activated upon arrival to the destination pole, thus the motor will slew, but not for isolated steps, as is our case due to the low speeds of the sandbox.
An alternative for the full and half-step control modes, which relay on applying abrupt voltage pulses to the motor windings, is to gradually control the current of the windings in order to generate a low ripple torque by creating intermediate rest positions or microsteps [50], [54]. That is, instead of suddenly pulling the rotor to B, the controller will gently guide the rotor by gradually decreasing the current through AA' and increasing it in BB', as shown in Fig. 13 for 1/4 microstepping. Ideally, this process will have infinite rest positions by making the currents close to sine waves, thus the torque experienced by the rotor will be smooth, and will reach an almost constant value at steady speed. As a consequence, the overshoot and the oscillatory response is greatly improved. Fig. 14 shows a qualitative example of the response of two sets of 16 µstep 32 compared with a fullstep and two separated halfsteps. The main advantage is that microstepping reduces the oscillation and overshoot. But also the speed of the steps can be reduced, since terminal currents are gradually changed, the rotor movement can be slower.
Although the torque per microstep decreases with the microstepping resolution [51], the reduced oscillation of microstepping offers invaluable benefits for a sandbox. Therefore, we are going to use 1/32 microstepping but always in at least a sequence of sixteen microsteps, which would have a torque around the 70% of the motor's rated torque and the rotation per each of the sixteen µstep 32 sequence would be VOLUME 11, 2023 FIGURE 13. Schematic representation of the microstepping rotation mode of a 2-phase bipolar stepper motor using a resolution of four microsteps per full step (µstep 4 ).

FIGURE 14.
Comparison of the time curves for displacement among an isolated full-step (blue), two separated half-steps (red), and two groups of 16 µstep 32 (green). The curves are qualitative and they will vary depending on the load and motor characteristics [48], [49], [50]. TABLE 6. Sandbox displacement, time and speed quantities for a 1.8 • stepper motor in microstepping mode and a 3-mm leadscrew, for the slowest and fastest velocities. In these conditions the motor will not be slewing (T hs > t hso ). For each speed, there are two columns: one for the model and another for the nature quantities, which have been scaled up using the example scaling ratios of Table 1. The symbols are described in Table 3. equivalent to a halfstep. Table 6 shows the basic quantities of this configuration. In order to avoid adding more symbols to Table 3, a sixteen µstep 32 sequence will be also denoted by the halfstep symbol hs. Moreover, since the stepper is going to be controlled with microstepping, hereafter the symbol hs will implicitly refer to a sequence of sixteen µstep 32 .
Comparing the quantities of Table 6 with those of Table 5, we can observe that the resolution is the same, since both advance in half steps. The main benefit of microstepping is the reduction of oscillations, thereby making the peak velocity almost the same as the average velocity when the motor is on. In these conditions, up-scaling the model to nature, the peak velocity would be around 300 mm per year, which is still out of the nature's range of the experiments of the literature (see maximum nature speed at item 6 of Table 1), but at least we have been able to reduce it an order of magnitude (Tables 4 and 5). A secondary theoretical benefit is that we have been able to reduce the speed of each halfstep, making the movement slightly more homogeneous. Now, an advance 750 mm in nature would take about 2.5 years, instead of less than a year when halfstepping. Nonetheless, these are theoretical figures, and the actual values will depend on the experiment and its scaling ratios. Besides, although these are significant enhancements we need to further improve the performance in order to provide a reliable device. For that purpose, following we are going to explore the use of gearboxes.

2) GEARBOXES
A gearbox (or gearhead) can be added to a motor's shaft to reduce its speed and increase its output torque. Although they can be acquired separately, vendors conveniently offer steppers with gearboxes already mounted.
For a sandbox, the benefits of adding a reductor gearbox are twofold. First, a reductor gearbox reduces the output speed, which is our main purpose. We have just seen that the Sandbox's ultralow speeds make the movement patterns highly irregular, in which the motor is active during a very short time, whereas for more than 97% of the time the motor is idle. Therefore, the sandbox could not replicate a steady deformation with a constant speed. Since gearboxes reduce the output speed, they will certainly improve this situation by increasing the percentage of the time that the motor is active and reducing the peak speed.
Secondly, increasing the torque enables reducing the motor size and simplifying the power electronics, as we will see in the electronics section ( §IV-D).
The gear ratio or gear reduction (G r ) defines the relation between the input and output angular velocities (ω): A reductor gearbox reduces the output speed (ω out < ω in ), hence its gear reduction will be greater than one (G r > 1).
An ideal gearbox would transmit to the output the same power that it receives (P out ideal = P in ). The mechanical power (P) of a motor is given by where τ is the torque. Consequently, for an ideal gearbox we would have that Hence, the output torque of a reductor gearbox is greater than the input torque: Nonetheless, real gears have friction, which reduces the power transmitted. The efficiency of the gear (η g ) is defined by the ratio of the power transmitted: Therefore, the ideal output torque (9) will be greater than the real output torque: Common reduction ratios for stepper motor gears span from 3 to 100, but higher ratios are increasingly available for sale. We have initially chosen a reduction ratio of 50.9. Combining this reduction ratio with the microstepping control we described previously we get the quantities for our Sandbox summarized in Table 7. Using this gear ratio, the fastest speeds of the Sandbox result from the stepper moving continuously. The minimum speed from which the motor is not idle at any moment (t id = 0) will be named ''threshold speed'' (v T ). As a consequence, from this speed and upwards, the speed due to each halfstep coincides with the speed of the gantry, and also, the halfstep period is the same as the duration of the halfstep (T hs = t hs ).
To illustrate the quantities of Table 7, Fig 15 shows three of the speeds of the table. The threshold speed (v T = 82.9 mm/h in red) is the slowest velocity from which the motor starts moving continuously (slewing). It can be observed that the motor is not idle at any time (t id = 0). Every halfstep is taken each 6.4 ms (T Threshold = 6.4 ms; T T in the figure), which is the same time that an isolated halfstep takes (t hso = T T ).
For faster speeds, such as v F = 100 mm/h shown in blue, the motor continues slewing. The halfstep frequency increases, thereby decreasing its period (T Fast = 5.3 ms; T F to simplify). As we said, when the motor slews, the duration of each halfstep decreases with the period, therefore, for velocities higher than the threshold speed, the duration of a halfstep is the same as the halfstep period (t hs = T F ). This will be valid as long as the maximum speed of the motor is not exceeded.
The benchmark speed (v B = 25 mm/h in purple) shows the case when the motor speed cannot be further reduced. Thus, a discontinuous movement such as those we have been resorting to is still needed (see Fig. 14). However, the situation has improved due to the absence of large oscillations and also the motor's idle time has been reduced to 70% of the time of the halfstep period. Scaling up to nature ( Table 7) would mean that the deformation would take place for two and a half years at a rate of less than 6 mm per year and then it would halt for a period of 8.5 years. This still might not correspond to a natural phenomena, but at least the deformation rate of 6 mm/a is within the boundaries of the experiments from the literature (see maximum speed in item 6 of Table 1).
In summary, this sandbox could not provide a continuous speed of 25 mm/h, but it provides a continuous speed from 82.9 mm/h. Nonetheless, it is not difficult to achieve lower continuous speeds, and Section VI will address different alternatives for this purpose.
Finally, another aspect to consider is the size of the motor. Stepper motors are commonly available in different NEMA sizes. NEMA stands for the National Electrical Manufacturers Association, which has defined standard frame sizes and mounting holes for the motors. Having standard dimensions is very convenient because motors with a specific NEMA size will fit into the same mount. For example, a NEMA 17 stepper, which is typically used in 3D printers, stands for a motor with a 1.7 in squared mounting flange, that is a 42 mm × 42 mm frame. The NEMA size does not define the length or the power of the motor, thus steppers with the same NEMA size may have different lengths, which usually implies diverse powers. The length, power, torque and other characteristics have to be consulted in the motor datasheet. Nevertheless, a NEMA 23 motor (57 mm × 57 mm) could have a torque around ten times higher than a similar NEMA 17. Usually NEMA 23 stepper motors are installed in CNC machines because they require greater torques than 3D printers. Since a sandbox has to compress different amounts of sand, it would be sensible to choose a NEMA 23 stepper motor; however, if a reductor gearbox is added, the output torque will be multiplied according to (11). Therefore, instead of a NEMA 23 stepper, we could select a geared NEMA 17 stepper, which could have greater output torque and, at the same time, less power consumption, and thus, simpler control electronics, as we will see in subsection IV-D2.

D. ELECTRONIC SYSTEM
The electronic system is in charge of driving the motor, assuring that the experiment is operating correctly, and interfacing with the user.
The electronic system is composed of the following subsystems: • Control unit • Power electronics • Endstops • Linear position sensor (optional) VOLUME 11, 2023 TABLE 7. Sandbox displacement, time and speed quantities for a 1.8 • stepper motor with a 50.9:1 reduction gearbox in 32-microstepping mode using halfsteps and a 3-mm leadscrew. The quantities correspond to the slowest (v L = 1 mm/h), fastest (v F = 100 mm/h), and benchmark (v B = 25 mm/h) speeds, and also for the threshold speed in which the displacement starts to be continuous (v T = 82.9 mm/h). From this speed and upwards the motor will slew (T hs < t hso ). For each speed, there are two columns: one for the model and another for the nature quantities, which have been scaled up using the example scaling ratios of item 5 of Table 1. The symbols are described in Table 3.  Table 7 for more information about these speeds.
• User interface • Power supply Fig. 16 shows an schematic view of the electronic system of the Sandbox, which will be expanded in the following subsections.

1) CONTROL UNIT
The control unit is the central component of the electronic system. It receives and processes the information from the user interface and the sensors, and sends the adequate signals to the motor driver in order to operate the sandbox as commanded by the user.
There are multiple options and technologies to implement a control unit. Nowadays, a microcontroller board is one of the easiest way to control a system like a sandbox, and Arduino is one of the most prominent microcontroller boards among hobbyists and makers. We chose the Arduino Mega 2560 board [55] for the following reasons. First, Arduino is an open source project. Secondly, its developing environment is relatively easy to use for beginners and hobbyists. Third, there are a plethora of libraries and examples, which can be very helpful for implementing particular functionalities or for learning. Last, many open source 3D printers use this board, thus there are shields specifically designed to easily connect motor drivers and sensors. Shields are modular boards that can be plugged onto the Arduino board.
The fact that many OSH 3D printers use the Arduino Mega 2560 board is convenient because their software could be adapted for a sandbox. Moreover, many of these 3D printers use the RAMPS shield [56], which is an electronic board specifically designed to host the drivers and sensors of a 3D printer. The RAMPS board has more connectors than the sandbox needs, such as the electronics for heating the bed and the extruder, and even five sockets for controlling different stepper motors. However, since the RAMPS shield is very affordable, it may be more convenient to use it even if not all its functionality is required, rather than designing a specific electronic board for the sandbox. Besides, being able to heat and control the temperature of the sandbox or having additional motors to move another wall or include rotation, could be desired characteristics to consider in the future.
Nevertheless, as we have said, many other microcontroller alternatives could be perfectly valid. For example, we could have chosen the Arduino Uno board, which is cheaper and, in conjunction with specific CNC shields is used to control some OSH CNCs. Shields used in CNC do not include electronics for heating; however, we consider that the characteristics of the Arduino Mega 2560 board, such as having more input/output ports (I/O ports) and interrupt ports tips the balance in its favor. In any case, the microcontroller board can be switched for any other that the developer feels more comfortable with, provided that it fulfills the basic requirements.

2) POWER ELECTRONICS
In subsection IV-C1 we saw that controlling the current of the stepper allows for microstepping, which has considerable benefits in terms of reducing oscillations and overshoot. Although driving the stepper by current is more complex than by voltage, there are many affordable drivers commercially available that simplify microstepping. These drivers are supplied in a integrated circuit that has to be soldered onto a printed circuit board. Fortunately, there are breakout boards on the market that have these integrated circuits already soldered. These carrier boards have pins that can be plugged into Arduino shields such as the RAMPS or the CNC shields, which have just been outlined in the previous subsection (IV-D1).
These shields include jumpers to set the microstepping resolution. Once these jumpers are on to set the driver to its maximum resolution, we only have to plug the carrier board and limit current of the driver using the carrier board trimmer. The driver maximum current has to be limited according to the motor electrical characteristics.
We chose the Pololu DRV8825 [57] stepper motor driver carrier because it includes the Texas Instruments DRV8825 integrated circuit [58], which allows 32-microstepping resolution and can deliver a current up to 2.2 A per coil, which is usually enough for NEMA 17 steppers. Fig. 17 shows a representation of the RAMPS 1.4 mounted on top of the Arduino. Note that in the drawing the RAMPS includes the Pololu carrier board for the DRV8825 motor driver.
If we used a larger motor, such as a NEMA 23 stepper, we would probably need a more powerful driver. Thus, this is another benefit of gearboxes, because they allow using smaller and easier to control motors (see subsection IV-C2). The DRV8825 driver is used in many 3D printers, another alternative is the Allegro 4988 [59], which has also a similar breakout board. Although the Allegro 4988 is cheaper, its maximum resolution is 16 microsteps and the maximum current it can deliver is slightly smaller. Nevertheless, any of these drivers, or other similar ones, provide the necessary control for the sandbox.
These carrier boards are pin-compatible, thus they can be plugged into the RAMPS regardless of the integrated circuit they host. To control the motor we only need to manage six of the pins of these carrier boards. Three of them (M0, M1, M2) are set with the jumpers located in the RAMPS driver socket. These three jumpers should be on to set the microstepping at its maximum resolution (32-microstepping for DRV8825 or 16-microstepping for Allegro 4988). The other three pins are ENABLE, STEP and DIR, which are connected to the microcontroller board. Thus, the control unit just needs to drive these three pins to control the stepper motor. These VOLUME 11, 2023 signals are digital, that is, they can only be low ('0') or high ('1').
The ENABLE pin has to be low to enable the driver. This signal should be left at low once the experiment starts.
The DIR signal defines the direction of rotation of the motor. Depending on the motor wire connection to the RAMPS and how the mechanical system is arranged, a low would compress the sand and a high would move the wall away from the sand, or vice versa.
Each rising edge of the STEP signal drives the motor one microstep. The fraction of a step taken depends on the microstepping pins (M0, M1, M2). Therefore, if all the jumpers are on, as suggested, each pulse of the STEP signal will be a 1/32 of a step for the DRV8825 (or a sixteenth of a step for the Allegro 4988).
To get the speeds of Table 7, which have been graphed in Fig. 15, we need to differentiate between the speeds above and below the threshold speed (v Threshold or just v T ). For the threshold speed or above (such as the fast speed v Fast or v F ) the halfstep period (T ) is equal to the time to take a halfstep (t hs ). Therefore, in 32-microstepping mode, we have to equally divide the halfstep period into the 16 microsteps of a halfstep. For example, for the threshold speed we have that the time of a µstep 32 is During this time of 400 µs, half of the time the STEP signal will be low, and the other half will be high. Hence, for the threshold speed this halft time of the microstep is 200 µs. The timing diagrams of Fig. 18(a) and 18(b) are calculated in this manner. Note that for v F the result is different, as shown in Fig. 18(a). For these two cases, at no time the motor is idle, and therefore t id = 0.
On the other hand, for speeds lower than the threshold speed, such as the benchmark speed (v Benchmark or just v B ), we have to perform a halfstep at the threshold speed and then maintain the motor idle until its halfstep period is over. As shown in Fig. 18(c) after a halfstep is taken (t hs = 6.4 ms) the motor has to remain idle for 14.8 ms (t id ), adding these two periods of time results in the total time of the halfstep period at the benchmark speed (T B = 21.2 ms).
In conclusion, one of the main tasks of the microcontroller is to control the gantry speed, by generating the correct timing for the STEP signal, such as those shown in Fig. 18 for v Fast , v Threshold and v Benchmark .

3) ENDSTOPS
We have just seen how the microcontroller has to command the motor driver for moving the gantry at the desired speed. Besides driving the motor, the controller also needs to know other key system parameters, such as the travel range of the gantry and its position, to avoid taking the gantry out of bounds. For this purpose, the Sandbox has one sensor at the start and another at the end of the travel range. These sensors are known as endstops and are activated when the gantry reaches the initial or final positions, letting the controller know if the gantry is getting out of bounds. When an endstop is activated, the controller should stop the motor moving in that direction.
At powering up, if none of the endstops are pushed, the controller may not know the position of the gantry. Therefore the controller should move the gantry towards the initial position until the corresponding endstop is reached. This process is called homing. From this point the controller should keep track of every halfstep commanded to the motor, and thus it will be able to know the position of the gantry at any time. As a consequence, the endstop at the final position is not strictly necessary. However, we recommend including it for safety, because in the case there were missed steps, the controller would miscalculate the position of the gantry.
There are several types of endstops, we installed mechanical endstops, which are simple and affordable, but other types of endstops could be used. There also are several ways to connect an endstop to the microcontroller. Endstops usually have three terminals: Common (C), Normally Open (NO) and Normally Closed (NC). We connected the endstops with two wires: the common terminal is connected to the Arduino input port, and the NC is tied to ground. With this configuration the common terminal has to be connected to a pull-up resistor, but to simplify the connections, the Arduino input port is configured to use its internal pull-up resistor. Fig. 19 shows a schematic diagram of the wiring. The endstop wires are connected to the Arduino through the RAMPS, simplifying the wiring.
With this configuration the endstop signal is active-high, that is, when the endstop lever is not pressed the controller receives a low and, conversely, when the endstop lever is pressed by the gantry, the controller receives a high. This connection has two main benefits. Fist, it uses only two wires, wit no additional components. Secondly, it provides safety because in case that an endstop is not connected or a wire is broken, the pull-up resistor will indicate that the endstop is active, and thus the controller will not continue moving in that direction.

4) LINEAR POSITION SENSOR
We added a linear position sensor to the Sandbox. This sensor is optional because its original purpose was to check that the gantry was moving as expected and there were no errors in the system. Once the tests proved that the Sandbox is working correctly, this linear sensor is no longer required, however it can be installed for monitoring the correct operation of the Sandbox. For this purpose we salvaged an optical linear sensor from a old printer. These sensors are common in printers, but they are also commercially available.
These optical sensors are composed by an emitter/detector C-shaped electronic module coupled with a codestrip. A section of the codestrip is located inside the module opening, thereby being between the emitter and the detector of the electronic module. Fig. 20 shows a schematic representation of the optical sensor. ) has been cut to make the microsteps pulses clearer. The sandbox configuration is a 1.8 • stepper motor with a 50.9:1 reduction gearbox in 32-microstepping mode advancing in halfsteps (16 µstep 32 ) and a 3-mm leadscrew. All quantities are model quantities, they are not upscaled to nature. The resulting time response of the gantry displacement was shown in Fig. 15. Table 7 describes the nomenclature.  The codestrip is fixed in the Sandbox's structure and the electronic module is attached to the gantry. As the gantry moves, the electronic module traverses the codestrip. Since the codestrip has a pattern of transparent spaces and opaque bars (also called lines), the light pass through the spaces but not the bars. Therefore, as the gantry moves, the module detects these light interruptions and generates an output indicating if the detector is under a space or a bar. Upon this information the controller is able to know if the gantry has moved. However, with only one detector it is not possible to determine in which direction the gantry is moving. If a second detector is located next to the other, the sensor generates two quadrature digital outputs that can be used to know the direction of the gantry. Fig 21 shows an example of the resulting sequence depending on whether the sensor is moving right or left. Since the sequence is different depending on the moving direction, the controller can infer the direction of the gantry.
This kind of sensor is incremental, that is, the sensor does not provide an absolute position, but information regarding the discrete increments. Consequently, the microcontroller has to keep track of the absolute position, and thus, in the case that the controller loses track of the position, by a power failure or when starting up, the gantry has to be taken to a known position, i.e. homing to the initial endstop.
Therefore the controller has to simultaneously track two gantry positions. First, the theoretical position given by the number of motor halfsteps taken. Secondly, the position given by the increments of sensor lines. In both cases, the controller has also to consider the direction of the halfsteps and line increments, respectively. The controller can check if both positions are consistent taking into account the resolution of the sensor and the linear distance of a halfstep.
These codestrips are usually defined by the number of lines per inch (LPI), or counts per inch (CPI). The codestrip installed has 150 LPI, but higher resolutions are available, FIGURE 21. The sequence of the sensor outputs is different depending on the sensor direction. If the sensor is moving from left to right, the timing sequence is drawn from top (t R0 ) to bottom (t R4 ) and for this case, the outputs will be: 11→10→00→01→11. On the other hand, when the sensor is moving from right to left, the timing sequence is drawn from bottom (t L0 ) to top (t L4 ), and the output sequence will be: 11→01→00→10→11.
e.g., 180, 300, 360 and 480. There are other sensors, such as magnetic encoders, that provide higher resolutions. Table 8 shows the resolution of different optical encoders and includes a column showing how many halfsteps of the motor Sandbox are needed to jump from line to line of the codestrip. For example, for the 150-LPI sensor, more than a thousands halfsteps are needed. This means that the resolution of the Sandbox is considerable higher than the resolution of the sensor. This is certainly a limitation, however the sensor is measuring increments of 169 micrometers, which could be considered enough to check the general Sandbox operation. Scaling up this distance of 169 µm to nature using the example scaling ratios (item 5 of Table 1) would result in around 17 meters, which is a substantial amount.
To minimize this low resolution, a higher LPI sensor could be selected. For example, a 480 LPI sensor would decrease the halfsteps between lines to less than 360, and the distance is around 50 micrometers.
Another strategy is to make use of the quadrature outputs of the sensor, so instead of counting lines, the controller could count every discontinuity. As a result, it would be as if the LPI is multiplied by four. For example, in Fig. 21, to go from t R0 to t R4 instead of counting one line, the controller could count each of the four intervals. The drawback is that the measurement will lose some accuracy because the lines and the spaces do not always have the same width. Table 8 also includes the resolution values when using this strategy. This is indicated with the number four in the second column (Counts per line). With this approach, the resolution for the 150-LPI  (Halfsteps per increment) shows the number of halfsteps needed go from a line to the next. The Sandbox uses a 1.8 • stepper motor with a 50.9:1 reduction gearbox and a 3-mm leadscrew. The last row shows the resolution of a high resolution magnetic linear sensor whose resolution is larger than its magnetic pole separation. sensor reaches 42.3 µm, and 13.3 µm using the 480-LPI sensor.
Another approach to increase the resolution is to have a rotary encoder attached to the motor shaft. On the one hand, the shaft encoder reduces the need of such high resolutions because the rotation of the motor shaft is not reduced by the gearbox, therefore the resolution would be increased by the reduction ratio (×50.9 in our Sandbox). But on the other hand, this is an indirect measurement because it is not directly measuring the gantry displacement.
Finally, if higher measurement resolutions are desired, a high-resolution magnetic encoder could be used. Nonetheless, using such high resolution sensors may require changing the microcontroller for another with higher performance, or even resorting to field programmable gate arrays (FPGA). Subsection V-B details the use of this sensor for testing purposes.

5) USER INTERFACE
The interface of the Sandbox consists of a 20 character by four lines liquid crystal display (LCD) and a incremental rotary encoder with push button. This is a typical interface of 3D printers, and actually, we used a commercially available board that integrates these components and includes the cables to connect it to the RAMPS board. This board also includes another push button and a buzzer [60]. Fig. 16 included a drawing of the interface.
Interfacing with this hardware is simple. On the one hand, the LiquidCrystal Arduino library simplifies the control of the LCD display because it provides functions for printing text and positioning a cursor. On the other hand, the incremental rotary encoder generates two square outputs in quadrature, similar to the outputs of the linear position sensor. Therefore, the procedure for knowing the direction of rotation is the same as in the linear position sensor ( §IV-D4).

6) POWER SUPPLY
Having the RAMPS board simplifies the power supply because it just needs a 12 V power supply and it distributes the voltages required for each of the components. Any power supply used for 3D printers could be used for the Sandbox. We used an ATX power supply, which is the typical power supply of desktop computers. To make these power supplies work, the green cable has to be tied to ground (any black wire of the power source). Then, any of the yellow cables, which are the 12 V, has to be connected to the 12 V input of the RAMPS, and any of the ground wires to the GND input of the RAMPS. The connection of the RAMPS to the power supply is included in Fig. 16 and Fig. 17.

E. BASIC OPERATION
Once the mechanical and electronic systems of the Sandbox have been arranged, the control unit can be programmed to operate the Sandbox. The software has to be compiled and loaded into the control unit, which is he Arduino Mega 2560 board ( §IV-D1). This software is available with an open source license at the public repository of the project [44], and provides a basic operation for the Sandbox. Moreover, since the source code is provided, this program can be customized to suit the needs of each experiment.
This software has two main functions. First, sending the appropriate signals to the motor driver to move the gantry at the commanded speed and distance, and also assuring that the data from the sensors confirm the correct operation of the Sandbox. In summary, making sure that the gantry is moving as it should.
The second function of the software is related to the characteristics of the available experiments and the user interface with the human operator. That is, what kind of experiments are available, how these experiments are presented in the interface, and how the researcher has to interact with the interface to operate the Sandbox. This second task is more open to customization because the characteristics of each experiments may vary considerably. Therefore, at this moment, the Sandbox comes with a simple user interface that allows for the most basic type of experiment.
The available functionality includes an absolute and a relative movement. In the absolute movement, the gantry is taken to position zero, i.e. homing; whereas in the relative movement, the gantry is displaced a certain distance. This distance is defined by the user through the user interface and can be either positive or negative.
In both cases, the user also defines the gantry speed, which can be selected from 1 mm/s up to 100 mm/s, in integer increments. The characteristics of these speeds have been explained in Section IV-C.
Once that the movement and the speed have been defined, the user can command the start of the experiment. During the experiment, the LCD shows the distance that has been traversed and the elapsed time since the start of the experiment. The covered length is calculated from the number of halfsteps taken and the linear distance of a halfstep. Besides, if the linear position sensor is installed ( §IV-D4), its measurement is also displayed, so the calculated distance can be compared with the measured distance.
At the end of the experiment, the LCD displays the actual position and a report of the experiment that includes the calculated distance, total time, speed and measured distance. This information is kept in the non-volatile memory of the microcontroller; consequently, provided that the Sandbox is properly switched off, the Sandbox will remember its position even if it is turned off. Therefore, in this case there is no need to perform the homing procedure at booting.
As an example, an outline of the Sandbox operation would be the following: • Check if the absolute position is tracked, if not, take the gantry home at maximum speed.
• Move the gantry to the initial position of the experiment.
To save time, set the maximum speed for this path.
• Once the gantry is at the desired position for starting the experiment, set up the experiment: place the sand and all the necessary arrangements (this could be done having the Sandbox turned off).
• Set the distance and speed of the experiment. The distance should not take the gantry out of boundaries.
• Run the experiment It can be observed that it is a very basic experiment; however, as it has been said, having the source code allows for modifications in the experiment setup. Additional information about the user interface can be found at the project's public repository [44]. In the first experiment, the gantry displaces a 10-kg sand pile to validate the Sandbox load pushing capacity.
Then, a repeatability experiment has been conducted in order to verify that successive gantry displacement commands result in the same distance and speed.
In the third experiment a high resolution linear sensor has been attached to the Sandbox to measure the displacement of the gantry and check if it is consistent with the calculated distance.
Finally, the fourth experiment performs a basic geological sandbox experiment.
The following subsections expand these experiments.

A. LOAD-PUSHING CAPACITY EXPERIMENT
The main objective of this experiment is to test the capability of the Sandbox to push a 10-kg sand pile throughout its displacement range. Additionally, the experiment checks if the distance, speed and time calculations of the system are correct.
The experimental setup was the following. First, the mobile wall was homed (x = 0) and then a 10-kg sand pile was set against it. Fig. 22(a) shows a picture of the sand pile at the initial position, and Fig. 22(c) shows its top view.
Then, the Sandbox was commanded to move the gantry throughout its whole displacement range, which is 270 mm, at a speed of 72 mm/h. At this speed, the experiment should take 225 minutes (3 h 45 m 00 s ) to move 270 mm. Fig. 22(b) shows the sand pile at its final position. Fig. 22(d) shows the final position from the top.
The experiment took 3 h 45 m 06 s , which is six seconds more than the theoretical time. We consider that this error of 0.04% is not significant and it is probably caused by the limited computational capacity of the microcontroller, since it is an eight-bit microcontroller with no multiplication unit working at 16 MHz.
The total distance was controlled by the linear position sensor ( §IV-D4) and also hand-measured with a ruler. The ruler measure gave the 270 mm distance but this measure is approximate since it is difficult to differentiate less than half of a millimeter.
On the other hand, since the sensor has 150 lines per inch (5.91 lines per mm), the distance from line to line is 169.33 µm; hence, there are 1594.5 lines along the 270 mm traveled distance. However, the linear sensor counted 1592 lines, which corresponds to a distance of 269.58 mm. Therefore, missing 2.5 lines is an error of 0.16%, which could be considered acceptable. Nevertheless, the fact that the lines are not aligned with the zero position and the sensor can only count an integer number of lines makes that the measure may go up or down by less than a line; therefore the line count should have been between 1593 and 1595. Consequently, in the best case, the experiment would have missed one line. Regardless of this error, this experiment proves that the Sandbox has the capability to displace a 10-kg sand pile along its travel range.

B. REPEATABILITY EXPERIMENT
The aim of this experiment is to asses the repeatability of the system by moving the gantry back and forth with no load at five different speeds.
To accurately measure the distance we used the AS5311 high-resolution magnetic linear sensor [61], which has a maximum resolution of 488 nm. To prevent interfering with the Sandbox's microcontroller operation, we have used an independent electronic board for interfacing and controlling the linear sensor. This board is based on FPGA [62], which are programmed using hardware description languages such as Verilog or VHDL [63]. Alternatively, the magnetic sensor could be also controlled by a high performance microcontroller board.
The arrangement of the magnetic sensor is in some way similar to the optical linear sensor described in subsection IV-D4, but substituting the optical codestrip and sensor by magnetic ones. The task of the FPGA board is to request the sensor its position every 250 µs, and then, send this information to a computer via USB. Each measurement is a 12-bit absolute position over a 2-mm length. Once all the data have been received, the computer saves them into a binary file. Finally, a Python script processes the binary file, saves it into a readable file format and plots the results.
As described in the magnetic sensor datasheet [61], its output may jitter when the magnetic strip is stationary over the sensor. This is also the case for the Sandbox due to its very slow speed. The datasheet recommends filtering the data applying a moving average filter [64]; thereby, the Python script also includes a two-pass moving average filter.
Both the VHDL design of the FPGA and the Python scripts for processing the data are available with an open source license at the project repository [44]. In addition, the experimental data are available in [65].
This experiment was conducted using five speeds: the Sandbox fastest speed (v F = 100 mm/h); the truncated threshold speed (⌊v T ⌋ = 82 mm/h); an intermediate speed (v = 50 mm/h); the benchmark speed (v B = 25 mm/h); and a low speed of 10 mm/h. Fig. 23 plots the data from the experiment at the fastest speed (v F = 100 mm/h). It can be observed that in all cases the traveled distance is smaller than the commanded distance (1 mm), which can be attributed to the backlash of the power transmission system ( §IV-B2). The backlash is a nonlinear positional error caused by the existence of clearance between two mechanical elements, hindering the position and speed control of mechanical systems [66], [67], [68], [69], [70]. The backlash can be reduced by using precision components, which would increment the cost of the system. In our case, the play between the leadscrew and its nut could be the main cause of backlash, but also the gearbox and all the low-cost mechanical components used contribute to the backlash.
The backlash is prominent in motion reversals or at start of the movement because is when the motor side (leadscrew) is not engaged with the gantry side (nut). Once the gap between the powerscrew and its nut has been traversed, the motor will drive the gantry again. This is represented in Fig. 24.
To demonstrate the effect of motion reversals on the backlash, one of the experiments was slightly modified by not reversing the direction after two of the stops. The plot of this experiment is shown in Fig. 25, which was performed at v B = 25 mm/h.
As it can be observed from Fig. 25, the distance traversed when the same direction is kept (d 4 and d 6 ) are the closest to commanded distance (1 mm). Table 9 details the data resulting from the experiments at the five speeds. The absolute and relative errors are included at the bottom of the table. The maximum absolute error is 63 µm, which is a 6.3% of the commanded distance (1 mm). Although it is a high percentage value, it is due to the small distance of the experiment (1 mm). Since the error is more pronounced at direction reversals or at speed changes, the error does not increase considerably at normal operation when traveling larger distances, as it can be observed from Fig. 25 and also in the experiments of the next subsection. Fig. 26 simultaneously plots the experiments for v = 50 mm/h and ⌊v T ⌋ = 82 mm/h. We included this graph to have a closer look at the transitions when directions are changed. Fig. 26(a) selects an area corresponding to one of these direction changes, which is enlarged in Fig. 26(b). As it can be observed, after a command to move in the opposite direction, the gantry continues traveling in the previous direction for less than ten micrometers, and then starts moving as commanded. This circumstance has been observed for all the experiments. Fig. 27 shows the no-load experiment at v = 10 mm/h (2.78 µm/s). In addition to the same phenomenon described in Fig. 26(b), it can be observed that there can be oscillations after the gantry has reached its destination, as shown in Fig. 27(a), which has been enlarged in Fig. 27(c) and framed in Fig. 27(e). These oscillations have been observed in other experiments. We hypothesize that they could be caused by vibrations generated when introducing the next movement commands through the Sandbox interface. If that were the case, it would be advisable to have the interface detached from the Sandbox structure. In addition, the sandbox could be placed on top of a vibration isolation table .   TABLE 9. Results from the no-load repeatability experiment in which the gantry was displaced one millimeter consecutively at different speeds. Distances were measured with the AS5311 high-resolution magnetic sensor. Negative distances and speeds are shown in red to facilitate identification of the direction. Note that at v T = 25 mm/h the experiment was conducted as shown in Fig. 25. The other experiments are like the one shown in Fig. 23, except for the experiment at 10 mm/h, in which the last command was not taken. Average speeds have been approximated from their graphs.
On the other hand, throughout the experiments with the AS5311 sensor, we observed infrequent cases of small changes in distance without oscillations. One of these cases is highlighted in Fig. 27(b), which is enlarged in Fig. 27(d) and framed in Fig. 27(f). In this case there is a leap of length around 25 µm without oscillation. The analysis of the raw data before applying to the moving average filter does not show any oscillation other than the normal jitter of the sensor. Therefore, we speculate that it could be caused by an error from the sensor, but more research should be done. Future work could include two AS5311 sensors independently monitoring the displacement, therefore, if both sensors simultaneously detect this kind of sudden and nonoscillatory distance leap, it would mean that it is not an error of the sensor. It is worthwhile mentioning that we configured the sensor to provide an absolute position within a 2-mm distance, therefore it is not the case that just a single measure was wrong, but the following measurements after this sudden distance change were also giving a similar absolute distance. VOLUME 11, 2023 FIGURE 23. Measured gantry displacement over time for six consecutive 1-mm alternate move commands at 100 mm/h (27.8 µm/s). The experiment was carried out with no load. The measurement was performed with the AS5311 high-resolution magnetic sensor. For each of the six commands, the graph shows the distance traveled (d i ) and its approximate average speed (v i ). Position zero is not the absolute zero position of the gantry, but the lowest position of the experiment. A two-pass moving average filter was used to process the raw data from the sensor. Finally, is worthwhile noting that since we are using a geared motor, the gantry advances around 147 nm each halfstep. On the other hand, the magnetic sensor has a maximum resolution of 488 nm. Therefore, as shown in the last row of Table 8, the sensor can only detect changes when more than three halfsteps have been performed. As a consequence, the sensor could not detect the theoretical discontinuity of the benchmark speed (v B ) of Fig. 15 or the ripple due to the microsteps that are also shown in that graph.

C. LOAD PUSHING WITH HIGH RESOLUTION MEASUREMENT
In this experiment the Sandbox pushed a 5-kg sand load limited within a box. The Sandbox pushed the load different distances at three speeds, which are: at the fastest speed v F = 100 mm/h; at v = 75 mm/h, which is slightly below the threshold speed; and at the benchmark speed v B = 25 mm/h. The displacement was continuously monitored by the AS5311 high-resolution magnetic sensor described in the previous subsection, and also by the optical linear sensor of the Sandbox ( §IV-D4). The magnetic sensor is also controlled by an FPGA, as described in previous subsection. Fig. 28(a) shows a lateral picture of the experiment arrangement and Fig. 28(b) shows the top view. The figure shows the three-walled box that confines the sand and how the mobile wall pushes the 5-kg sand pile. Table 10 details the results from the experiment. Note that in the second row the columns are enumerated in items to facilitate their identification. Likewise, each experiment is enumerated in the first column. Data in items one to four show the commanded parameters: speed, distance and the theoretical experiment time resulting from dividing distance by speed. The speed is given both in millimeters per hour (item 1) and micrometers per second (item 2).
Results from items five to nine show measurements obtained by the optical sensor of the Sandbox, and the time measurement by the control unit. Item five shows the number of optical lines counted by the sensor. Since it is a 150-LPI codestrip, lines are 169 µm apart; therefore, all the differences lower than the sensor's resolution are measurement limitations. Item 8 of the table shows these differences, which all of them are lower than the sensor's resolution; thereby, we could conclude that the Sandbox accuracy is larger than the optical sensor.
Items ten to sixteen show information provided by the magnetic sensor, which can measure changes below a micrometer. Item 13 shows the difference between the measured and commanded distances. All the distances are below the optical sensor resolution, which is coherent with item 8; nonetheless, since the magnetic sensor has higher resolution, now the measurement variations are due to the limited Sandbox accuracy. These results suggest that the Sandbox resolution  The experiments were carried out with no load. The measurements were performed with the AS5311 high-resolution magnetic sensor. Position zero is not the absolute zero position of the gantry, but the lowest position of the experiment. A two-pass moving average filter was used to process the raw data from the sensor. (a) Selects an area at a change in direction for both the experiments. This area is enlarged in (b) to better appreciate the shape of these transitions. Once the gantry has stopped, it can be observed that when the gantry changes direction, there is a first advance of less than ten micrometers in the previous direction, as shown in (c) and (d). This phenomenon has been observed in all the cases that involve a change in direction.
would be around 150 µm. In addition, we can also observe that the relative error (item 14) is smaller with larger distances (exp. 5 and 7), which supports the idea that the error is mainly due to the backlash ( §V-B) and it is not accumulative in a steady speed.
The time that each experiment took is shown in items 7 and 11 of Table 10, measured by the control unit and the magnetic sensor, respectively. On the other hand, the theoretical time is shown in item four. It can be observed that the difference is not significant; nevertheless, at the fastest speed (v F = 100 mm/h, exp. 6 and 7), the time that the experiment takes (item 7 and 11) is lower than the theoretical time (item 4). For experiment seven is four seconds (item 9 and 15) lower that the 1800 s (30 min) the experiment should have taken, which is around a 0.22% of error. Although this error is small, it was caused by truncating the duration of half of a microstep. At speeds higher than the threshold speed (v T = 82.9 mm/h), the control is different, as shown in Fig. 18. For these speeds, the time of a half of a microstep depends on the commanded speed. For example, for v F = 100 mm/h this time should have been 165.6 µs. However, in the Arduino code we truncated this time to 165 µs. It would have been slightly better to round this value to 166 µs. Alternatively, if more accurate timing is desired, a high performance microcontroller or even an FPGA could be used. Fig. 29(a) plots distance over time of the three 20-mm distance experiments, which correspond to experiments 3, 4, and 6 of Table 10. A closer observation of Fig. 29(a) shows FIGURE 27. Measured gantry displacement over time for five consecutive 1-mm alternate movements at v = 10 mm/h (2.78 µm/s). The experiment was carried out with no load. The measurement was performed using the AS5311 high-resolution magnetic sensor. Position zero is not the absolute zero position of the gantry, but the lowest position of the experiment. A two-pass moving average filter was used to process the raw data from the sensor. Areas (a) and (b) of the main graph have been selected to analyze the transitions. (a) Selects an area at a change in direction which is enlarged in (c). In (c) the same phenomenon described in Fig. 26(b) can be observed. Additionally, it can be also observed in (e) that there are some oscillations after the gantry has reached the destination and before starting to move again. On the other hand, the selected area (b), which has been enlarged in (d), shows a distance leap of about 25 µm but without oscillation. This leap is signaled by (f).

TABLE 10.
Results from the 5-kg load pushing experiment. Distances were measured with both the optical linear sensor ( §IV-D4) and the high-resolution magnetic sensor ( §V-B). The table is divided into four set of columns: the experiment number, the commanded information, the measured data from the optical sensor of the Sandbox, and the data from the magnetic sensor. The second row of the table indicates the item number, which has been added to facilitate the identification of each quantity. Similarly, the first column shows the experiment number.
that the plots are not straight lines, thus velocities are not completely constant. To better appreciate this phenomenon, a selected region of the graph (Fig. 29(b)) is enlarged in Fig. 29(c). This region corresponds to a displacement of 3 mm, which would theoretically match with a whole leadscrew revolution ( §IV-B2).
It can be observed from Fig. 29(c) that the velocity is slightly undulated, which can be better noticed by selecting two areas with the same displacement. For example, the areas (d) and (e) of Fig. 29 correspond to a displacement of 500 µm. At the experiment speed (6.94 µm/s or 25 mm/h), a distance of 500 µm should have taken 72 s; however (d) takes 81.0 s, whereas (e) takes 66.7 s. Which is an error around 8% and -11% of the theoretical time, respectively. Taking into account that the Sandbox has a gearbox, to advance 500 µm the motor should take almost 3400 halfsteps, which is around 8.5 motor revolutions, and 60 • turn of the leadscrew. Therefore, these undulations are not related to the theoretical ripple and discontinuity shown in Fig. 15, which are at the scale of microsteps and halfsteps, respectively. Observe that the scale of Fig. 15 is in milliseconds and nanoseconds, whereas Fig. 29(c) is in seconds and micrometers.
If the regions (d) or (e) are further enlarged, a different ripple can be observed. For example, Fig. 30 shows the enlargement of Fig. 29(e). It can be observed from Fig. 30 that there is a ripple whose period is slightly smaller than a revolution of the motor (around 310 • ), which is transformed in a 6 • leadscrew turn by the gearbox. Therefore, presumably it could be caused by the gears of the gearbox.
To analyze these ripples, the area of Fig. 30(b) is further enlarged in Fig. 31. In the initial section of the graph the average speed is almost ten times higher than the commanded speed, taking place during a very short time. Then, in the second section, the speed gets closer to the commanded step for the rest of the time. If we up-scale the quantities to nature with the scaling ratios of item 5 of Table 1, as we have done in section IV, the first section would be equivalent to a displacement of about one meter during 64 years, and then, the second section would correspond to a displacement of around four meters during almost 3000 years. These ripples vary in length, but they remain within a range of 290 • and 330 • of the motor.
This variation in speed is significant, nevertheless, since these variations compensate over time and the overall errors are small (Table 10), we believe that they are caused by using economic mechanical components, and that they can be largely improved with precision components in case that less variations are required and a larger budget is available.

D. THRUST WEDGE EXPERIMENT
To check the suitability of the Sandbox to perform scientific experiments, we performed a thrust wedge experiment comparing it with the results of Schreurs [18].
The experimental set-up is similar to Fig. 2 and Fig. 4(a), in which alternating horizontal layers are placed inside a 450 mm (length) × 300 mm (width) box. The layers have an initial thickness of 30 mm and are composed by a mixed sand quartz with gypsum in a volume ratio 4:1 of different colors with cohesions of approximately 100 Pa. As this study focuses on the application of the Sandbox and not on the physical meaning of the experiments we do not develop and discuss the scaling model processes.
The deformation is imposed by a wooden board attached to the gantry, which pushes the horizontal layers with a constant speed of 25 mm/h. The total shortening of the model by inward displacement of a mobile wall was 100 mm. The monitoring of the structure was carried out with a Nikon 3500 reflex camera taking one image every 30 seconds during the four hours of the experiment, making a total of 480 RGB images. Fig. 32 shows the analogue model evolution at four different times: at the beginning of the experiment (Fig. 32(a)); at 3 hours of operation in Fig. 32(b); at 3 h 30 m of operation (Fig. 32(c)); and at the end of the experiment in Fig. 32(d).
The result shows a sequence of imbricate thrust system where the initial thrust, located at the front of the sequence, as it moves forward, tilted the new reverse faults formed behind it to more vertical orientations (Fig. 33). The geometry obtained is a normal sequence of imbricate hanging wall thrusts fan system [71].
Therefore, the final geometry of the model is similar to those performed in other laboratories, as shown in Fig. 17 of Schreurs' contribution [18], verifying the suitability of the proposed sandbox developed in this article.

VI. DISCUSSION
Our aim was to develop a sandbox for scientific research, since we did not have prior experience in building this kind of apparatus, our approach was to create an affordable prototype and learn from the process. As far as we know, no other authors have disclosed their apparatus performance; therefore, we have not been able to compare our prototype with other solutions. Nevertheless, we believe that its performance is fully satisfactory since the experimental validation ( §V) shows a positional accuracy around 150 µm, demonstrating that it can be used for scientific research.
As a future attempt aiming to assess the Sandbox performance in a real geologic analogue experiment, we are currently in the process of replicating the benchmark experiments proposed Schreurs et al. [18]. In this case we would not   Table 10).  Table 10). The plot can be divided into two sections. The first section in which the speed (v 1 = 229 mm/h) is almost ten times higher than the commanded speed (25 mm/h), and the second section that has a speed (v 2 = 20.1 mm/h) lower than the commanded speed. The plot includes the nature up-scaled quantities taking the example scaling ratios of item 5 of Table 1. only take into account the scaling of the Sandbox, but also the scaling of the materials simulating a real geological process.
The total cost of the materials is around e500 at 2022, thus it can be considered affordable, and since it is an openhardware project, the CAD files, source code, the bill of materials, and documentation is available with an open license at the project's repository [44].
The fact that the prototype has been built using lowcost components, shows that there is a wide margin for improvement if a more expensive device can be beared. In addition, being an open-hardware device facilitates researchers to improve and tailor the characteristics and quality of the components to their particular research or educational purposes.
The experimental validation suggests that mechanical backlash is responsible of the limited positional accuracy (around 150 µm). In addition, although the error of the average speed of the experiment is lower than one percent for distances larger than five millimeters, there are ripples that make instant velocities ten times larger than the commanded speed. The behavior of these errors suggest they are mainly caused by the use of economical mechanical components. Therefore, the main improvements on the sandbox performance could target the precision of the mechanical components. We have used components designed for the DIY and maker community, which are much more affordable but lower in quality. If these components were acquired from precision industrial suppliers, it would lead to a more robust system with less mechanical tolerances.
As we have seen in subsection IV-B2 the leadscrew could be substituted by a ballscrew with both ends machined and fixed supports. A precision ballscrew would reduce friction, vibration, and backlash; thus, minimizing the error we have measured in the experimental validation. Besides, the guide system ( §IV-B1) could be made of precision linear guides. Obviously, these components would considerably increment the total price of the Sandbox. For example, this kind of ballscrew could cost more than fifty times the price of the economical leadscrew we have used. In addition, the gearbox of the motor could also be substituted by a precision grade gearbox, instead of the most basic one we chose.
Another modification that was discussed in subsection IV-C could be to substitute the stepper motor by a servomotor, which would also substantially increase the cost, but also the whole electronic system would need to be redesigned; therefore, we would not recommend this substitution for those with little experience with this type of motor.  The modifications discussed above involve considerable higher costs; however, there are some changes that would maintain a similar budget. For example, in order to make the lower speeds continuous, the idle time of the motor can be reduced by substituting the gearbox by another with a higher gear ratio. Gearboxes with a reduction ratio of 100 are commonly available, which would lead to a threshold speed of 42.2 mm/h instead of the 82.9 mm/h of the actual Sandbox (see Table 7). Gear ratios higher than 200 are also available, but since they are not so common, they entail a higher price.
Stepper motors with 400 poles are available and although they are more expensive than a 200-pole stepper, their price is still affordable. Using this kind of motor would double the resolution of each motor step.
Finally, the lead of the leadscrew could be lowered to 2, 1.5 or even 1 mm. Reducing the lead would also reduce the load the screw can drive; thereby, this modification should be analyzed or tested more carefully. Alternatively, a second leadscrew could be added to share the load; however, this solution would double the cost of the transmission system, and complicate the electronics since a second motor would also be needed. Nevertheless, many 3D printers have two leadscrews for their Z-axis, and even the RAMPS board has a connector for the second motor, hence, it is not an unreasonable option.
Adding all these improvements, i.e. using a 256:1 reduction gearbox, a 400-pole stepper and a 1-mm leadscrew, would increase the resolution around 30 times (5×2×3) decreasing the threshold speed to less than 3 mm/h, which is a speed lower than most of the sandboxes from the literature use ( §II).
In addition to these improvements, there are a plethora of possibilities to increment the functionality of the Sandbox. As an example, we are in the process of including a second degree of freedom by which a rotation would be added on top of the gantry. This will allow modeling more complex displacement patterns.
In conclusion, since it is an open-hardware project, we are confident that it will serve as a base for future developments and collaborations within the scientific community.

VII. CONCLUSION
We have presented a low-cost open-hardware apparatus for modeling compressional and tensional tectonic stresses that can be made from readily available components and standard processes, allowing scientists and educational institutions to build affordable scientific equipment.
We have characterized the device and validated its performance using a high-resolution linear sensor. Although the developed equipment has some limitations, we have suggested modifications and improvements in order to reduce the mechanical tolerances, at the cost of a more expensive device.
Its performance has not been compared with other similar devices because, to the best of our knowledge, it is the first open-hardware scientific geological sandbox and also the first time that the technical characteristics have been fully disclosed. Since the technical characteristics of the modeling device could play a role in the experimental outcomes; we suggest including them in the description of every analogue modeling experiment.
Furthermore, we encourage releasing custom scientific equipment as open-hardware to promote Open Science, allowing other researchers to replicate the experiments, enabling the exchange of ideas, improvements and customization.
RUBÉN NIETO (Member, IEEE) received the Ph.D. degree from the University of Alcalá (UAH), Spain, in 2020. He was a Postdoctoral Researcher with the Department of Electronics, UAH. He is currently an Assistant Professor of electronic design with the Department of Electronics, Universidad Rey Juan Carlos. His current research interests include robotics, cloud computing, FPGAs, and system-on-chip.
CRISTINA FERNÁNDEZ-GARCÍA received the degree in industrial engineering from Universidad Rey Juan Carlos, in 2021, where she is currently pursuing the master's degree in industrial engineering. She has been with the Department of Automation in pharmaceutical companies, for two years.
MARTA RINCÓN RAMOS has been a part of the Remote Sensing and Planetary Exploration Laboratory (LABTEP), since 2011. She collaborated in the creation of the Model Analogue Laboratory (LABMOA), Universidad Rey Juan Carlos, in 2013. Since October 2017, she has been an Assistant Professor with Área de Geología, Universidad Rey Juan Carlos, parallel to her work as an Active Scientist. She is currently a Scientist focused on the study of deformation instability of volcanic structures, being this the central theme of her thesis developed by analogous models. Her future research focuses on the study of tectonovolcanic analogue models with the TECVOLRISK Research Group.
SANDRA GONZÁLEZ-MUÑOZ received the degree in geology from the Complutense University of Madrid, in 2019. She is currently pursuing the Ph.D. degree in intraplate fault system with the Northwest of the Iberian Peninsula, Rey Juan Carlos University being part of the Tecvolrisk Research Group. The research focuses on the evolution of faults from their formation to the present day, using numerical and analog modeling. In order to improve her knowledge in analog modeling, she is collaborating with the Tectonic Modelling Laboratory, Institute of Geological Sciences, University of Bern, Switzerland, where she recently spent three months.