# Smart Hydroponic Cultivation System for Lettuce
## 2 Materials and Methods
### Monitoring and Control System
As a closed system capable of controlling its internal environmental variables, it offers the advantage of programming an artificial photoperiod that is offset from the natural light cycle. This allows the full-spectrum LED lamps to operate during non-working hours, providing greater convenience to the user in case access is required to perform adjustments or measurements. Furthermore, scheduling them at night represents an additional advantage, as in many regions, electricity rates are typically higher during daylight hours than at night [37]. The network layer is implemented using an IoT module (G in Figure 4), which transmits environmental measurements every five minutes via HyperText Transfer Protocol

Figure 5: Recorded behavior on 21 June 2024 of the environmental variables inside the plant growth chamber: air temperature (**top left**), RH (**top right**), \(CO_{2}\) (**bottom left**) and PPF (**bottom right**). The graphs show the control actions carried out by the system. (HTTP) protocols to the Service Layer. In this layer, the ThingSpeak platform is used for storing and analyzing the collected data. The user experience layer employs a responsive web application that displays real-time graphs of environmental variables (air temperature, RH, \(CO_{2}\) and PPF) within the growth chamber. Likewise, the use of a mobile application for the same purpose is of utmost importance for users' accessibility to information. An alert system notifies users via email in the event of a failure that prevents data transmission to the web server for periods exceeding 30 min. For video surveillance, a Wi-Fi video camera, model HDC10_wimozu-gj (WJMOZU, Shenzhen, China), with an integrated microphone was used. This device is compatible with the Tuya Smart mobile application [38], enabling users to view the crop status in real time, monitor the operation of full-spectrum LED lamps and, through the microphone, verify whether the pumps in the NFT hydroponic systems are functioning properly. On the other hand, in order to obtain a precise estimate of the electrical energy consumption of the main devices in the proposed system, measurements were conducted using PZEM-004T v3.0 energy sensors (Peacefair, Shenzhen, China) during 24 h of continuous system operation. These sensors were temporarily connected to the main energy-consuming devices: the mini split air conditioner, full-spectrum LED lamps, recirculation pumps and ultrasonic humidifiers. This setup allowed us to record energy consumption, facilitating an evaluation of the system's energy cost. ### Case Study: Validation of the Proposed System Through Lettuce Cultivation

To validate the correct operation of the proposed system, a case study was conducted under controlled conditions using the NFT hydroponic technique. The hydroponic lettuce experiment was conducted from 3 June (transplanting day) to 29 June 2024 (harvest day), in a controlled-environment growth chamber located at the Tecnologico Nacional de Mexico in Celaya with the coordinates 20\({}^{\circ}\)32\({}^{\prime}\)15.427\({}^{\prime\prime}\) N, 100\({}^{\circ}\)48\({}^{\prime}\)54.604\({}^{\prime\prime}\) O. The experiment was divided into five stages, as illustrated in Figure 6.

During the germination stage (Figure 6A), lettuce seeds (_Lactuca sativa_ cultivar 'Rodhenas') were placed in hydroponic net pots filled with peat moss and germinated for two days. In the root growth stage (Figure 6B), seedlings remained for 28 days in a greenhouse until they reached a height of approximately 8 cm. For the transplanting into the hydroponic systems (Figure 6C), seedlings were inserted into fo

Figure 6: Stages of the hydroponic lettuce cultivation experiment. The process is divided into five phases: (**A**) seed germination in substrate; (**B**) root development prior to transplanting; (**C**) transplanting into the NFT hydroponic system; (**D**) vegetative growth under controlled conditions of light, air temperature, RH and nutrients; and (**E**) plant maturity and harvesting.