# Smart Hydroponic Cultivation System for Lettuce
## 2 Materials and Methods
### Monitoring and Control System
The presented system demonstrates effective integration of sensors and actuators in an indoor hydroponic environment, using an ATmega2560 microcontroller and the MODBUS RS-485 communication protocol. This configuration enabled real-time monitoring and control of environmental conditions, maintaining stable key variables for plant development such as air temperature, RH, PPF and photoperiod, thereby promoting uniform plant growth. Additionally, the proposed architecture supports expansion of up to 31 slave devices, including sensors and control mechanisms, providing high adaptability for deployment in scenarios that require a greater number of variables to be monitored and controlled. The implementation of the smart agriculture system enabled the evaluation, through an experimental design using 50%, 75% and 100% nutrient concentration treatments of the phenotypic and nutritional development of lettuce under controlled conditions. The finding of few significant differences between treatments suggests that controlled environmental variables contribute to crop uniformity, regardless of variations in the applied nutrient solution. The integration of the smart agriculture system not only ensured efficient control of environmental conditions, maintaining stability over 26 days without technical failures, but also enabled continuous access to crop data via electronic means and offered opportunities for improvement, such as the integration of alarm systems. The inclusion of a responsive web application and a mobile app for environmental monitoring and control represents a substantial improvement over local or limited-access solutions. This design facilitates remote interaction, interface customization and efficient management of crop parameters, providing a user-centered approach that is key for adoption in diverse contexts. The presented system is scalable and adaptable with potential applications in both commercial production and educational and research environments. Furthermore, its implementation promotes sustainable agricultural practices by reducing environmental impact, as hydroponic systems can save up to 90% of water compared to traditional farming methods [49] and contributes to the technological advancement of the agricultural sector. However, it is important to note that the proposed system does not yet incorporate an automated control loop for adjusting nutrient solution variables such as pH, EC and TDS. This limitation represents a key aspect to be considered in future research. Future WorkAlthough the development board based on the ATmega2560 microcontroller proved to be suitable for managing various sensors and control mechanisms, and for maintaining communication with the IoT module to send and receive data from the cloud server, the proposed architecture has been designed with scalability and adaptability in mind. This design allows for easy migration to more robust microcontrollers such as the STM32 in future implementations. This capability will be crucial for integrating artificial intelligence modules that require greater processing power. As future work, it is planned to expand the system's implementation toward different leafy crops such as spinach and Swiss chard to evaluate its effectiveness. Parallel to this, automated monitoring and control sub-systems for the nutrient solution will be integrated to ensure homogeneity at all crop stages. To address the need for intelligent management highlighted by current research, the integration of low-complexity supervised machine learning models, such as decision trees or logistic regression, is proposed. These models will enable the identification of patterns in historical data and the generation of alerts regarding crop conditions, such as deviations in pH or EC ranges [50], thereby reducing agronomic risks and improving the final product's quality.