## 2 Materials and Methods
### System's Design and Construction
#### 2.1.3 Hardware: Sensors, Auxiliary Electronics, and Raspberry Pi  
Two SPDT momentary microswitches (model KV4-Z5F150, YueQing Daier Electron Co., Ltd., Yueqing City, Zhejiang, China [47]) with roller levers were used as limit switches (Figure 6a). They were attached at the far left and right of the carriage, so that the carriage could detect the origin and the end points of the line, respectively. When the carriage reached the end of the route, the corresponding microswitch contacted the tripod. In this way, the system determines the start (\"home\" position) and end positions of the route on the beam. An Arducam synchronized stereo USB camera [48] was used to capture the  
Figure 5: In (**a**), a view of the stepper motor, GT2 Timing Pulley-12T and GT2-type timing belt along with the V-Slot wheels and the carriage platform (V-slot Gantry Plate). The platform is secured to a piece of marine plywood in (**b**), and the TMC2209 stepper motor driver with its dedicated heatsink is shown mounted on a custom PCB Raspberry Pi shield (described in Section 2.1.3). images (Figure 6e) in the current design. This module consists of two fixed focus cameras integrating OV2710 OmniVision (Santa Clara, CA 95054, USA) CMOS sensors [49] with the same resolution of 2 MP and sensitivity to both visible light (RGB) and infrared light (IR). In this work, the RGB camera was mainly used for the plant recognition task. The eight LEDs installed on the module board are infrared LEDs and are automatically turned on when the IR camera is used. This stereo USB camera was chosen based on its synchronization capabilities, as well as its similar characteristics and features to both RGB and IR cameras. If images corresponding to the same scene are captured by the two cameras, they can be further combined with a previous image registration processing method to obtain the relevant Normalized Difference Vegetation Index (NDVI) images of the plants, thus obtaining useful data on the health the plant itself. However, the NDVI-related calculations are reserved for future work. To ensure the sufficient illumination of the plants during image capture also in the infrared spectrum, two additional infrared LED boards (3 W high power 850 infrared LED, 100\({}^{\circ}\) FOV, [50]) were used (Figure 6d). The built-in, adjustable resistor was adjusted to allow the LED to turn on in all ambient lighting conditions. A 1 m long LED strip (60 white LED 3528/m, input voltage 5 V DC) with the USB plug removed was also used complementarily to ensure the sufficient illumination of the plants in the visible spectrum. In this study, two different low-cost distance sensors were used to provide complementary distance measurements during image capture and as the carriage moved linearly over the plants. The first was a VL53L0X sensor module [51], which contains a 940 nm laser source and a matching sensor that can detect the \"time of flight\" (ToF) of the light bouncing back to the sensor (Figure 6b). This distance sensor supports two modes of operation: _normal mode_, where the maximum measurable range is about 1200 mm, and _long-range mode_, where the maximum measurable range is 2100 mm. The results are noisier in the latter case [51]. Both modes provide the same output data precision, that is, 1 mm. In the present study, this distance sensor was programmed to operate in _normal mode_ and demonstrated its accuracy, particularly for distance measurements within the range of approximately 600 mm (Figure 7a,c). The detection angle was 25 degrees. Figure 6: View of the sensors and the main auxiliary electronics: (**a**) terminal limit switch; (**b**) distance ToF sensor; (**c**) ultrasonic distance sensor; (**d**) infrared LED board; and (**e**) stereo USB camera module. An additional inexpensive sensor with a slightly wider detection angle of 30 degrees was also employed to obtain distance measurements by combining the readings from both sensors.