# HydroLab: A Module for the Investigation of Fertigation Strategies in Hydroponics
## 3 HydroLab
### HydroLab Architecture
* _Pyranometer_: A Hukseflux SR05-D1A3 ([[https://www.hukseflux.com/products/pyranometers-solar-radiation-sensors/pyranometers/sr05-d1a3-pyranometer](https://www.hukseflux.com/products/pyranometers-solar-radiation-sensors/pyranometers/sr05-d1a3-pyranometer)]([https://www.hukseflux.com/products/pyranometers-solar-radiation-sensors/pyranometers/sr05-d1a3-pyranometer](https://www.hukseflux.com/products/pyranometers-solar-radiation-sensors/pyranometers/sr05-d1a3-pyranometer)) (accessed on 18 July 2023)) pyranometer is utilized to measures solar radiation and temperature. The acquired values are transmitted to the Raspberry Pi using the Modbus protocol;
* _Programmable logic controller (PLC)_: The Beckhoff CX7000 ([[https://www.beckhoff.com/en-en/products/ipc/embedded-pcs/cx7000-arm-cortex-m7/cx7000.html](https://www.beckhoff.com/en-en/products/ipc/embedded-pcs/cx7000-arm-cortex-m7/cx7000.html)]([https://www.beckhoff.com/en-en/products/ipc/embedded-pcs/cx7000-arm-cortex-m7/cx7000.html](https://www.beckhoff.com/en-en/products/ipc/embedded-pcs/cx7000-arm-cortex-m7/cx7000.html)) (accessed on 18 July 2023)) PLC controls the HydroLab sensors and actuators. It transmits the acquired sensor data to the gateway through the OPC UA protocol;  
Figure 3: Gutter structure with lateral drain channels, adjustable suspensions, drip emitters, spaghetti tubes, and stakes. Figure 2: Configuration of each distribution line of HydroLab. * _Router:_ The ADSL2+ HG5316 ([[https://etb.com/mejorainternet/info/docs/HG531](https://etb.com/mejorainternet/info/docs/HG531)]([https://etb.com/mejorainternet/info/docs/HG531](https://etb.com/mejorainternet/info/docs/HG531)) V1.pdf (accessed on 18 July 2023)) router facilitates the establishment of a closed communication network between the gateway and the PLC. It also generates a wireless network with internet access, enabling remote control of the system;
* _Gateway:_ As the utilized PLC does not have wireless communication capabilities, a Raspberry Pi is used as the gateway. The Raspberry Pi utilizes the Node-RED ([[https://nodered.org/](https://nodered.org/)]([https://nodered.org/](https://nodered.org/)) (accessed on 18 July 2023)) programming tool to facilitate communication with the PLC and the HMI (Human-Machine Interface). Additionally, the Raspberry Pi processes the solar radiation and temperature data and initiates fertigation when a specified threshold is reached. The fertigation command is sent to the PLC, which is responsible for its implementation;
* _Camera:_ The camera model Tapo C200 ([[https://www.tp-link.com/co/home-networki](https://www.tp-link.com/co/home-networki)]([https://www.tp-link.com/co/home-networki](https://www.tp-link.com/co/home-networki)) ng/cloud-camera/tapo-c200/ (accessed on 18 July 2023)) enables remote audiovisual monitoring of the crops. The camera can be operated through its dedicated smartphone application. It can also be adapted for viewing on any computer using emulators. Researchers and practitioners can monitor the development of their crops without the need for physical presence on-site;
* _HMI:_ The system's control panel is implemented using the Node-RED interface, enabling the reading and writing of the system's state from a personal computer. Finally, a breakdown decomposition of the cost for implementing the module is represented in Table 2. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Component** & **Units** & **Cost [USD]** \\ \hline \hline \begin{tabular}{c} Gutter structure \\ Solenoid valve \\ \end{tabular} & 2 & 636 \\ \begin{tabular}{c} Compressor \\ Router \\ \end{tabular} & 2 & 14 \\ \
\begin{tabular}{c} Compressor \\ Router \\ \end{tabular} & 1 & 241 \\
\begin{tabular}{c} Route \\ Video camera \\ \end{tabular} & 1 & 33 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Cost breakdown analysis of HydroLab. Figure 4: HydroLab sensors and control architecture.