## 4 Results and Discussion
### Results of the Water Quality Sensors  
In this subsection, the results of the calibration of the employed sensors for water quality monitoring are shown. In some cases, as turbidity or temperature sensors, calibrations have already been carried out that relate the environmental parameter and the resistance of the electronic component. Nevertheless, for operation in the system, it is necessary to obtain the data as the output voltage (_Vout_) that arrives at the node. Moreover, it may be needed to include a voltage divisor to ensure that current in the node is not too high. Thus, it will be necessary to transform the data and to obtain a new calibration equation for the temperature and turbidity sensor. In the case of the conductivity sensor, the same calibration and equations con code that has been used in [38] are employed. Finally, for the oil layer sensor, the calibration shown in [42] is used, the code is presented below. First, for the temperature sensor, based on the data offered by the manufacturer [36] it is possible to extract the expected resistances at different temperatures. A voltage divisor must be used to maximize the difference of _Vout_ between the minimum and maximum values of resistance of the NTC. An \(R2\) of 12 K\(\Omega\) must be used and the NTC is used as \(R1\). We can calculate the _Vout_ of the temperature sensor at different temperatures. The data and the mathematical model that follows this data are presented in Figure 10a. The relation between _Vout_ and Temperature can be seen in Equation (1). The correlation coefficient of Equation (1) is 0.9995. Considering that the resolution of the node is 10 bits and the maximum Vout that can be registered is 3.3 V, the minimum difference of _Vout_ that the node is able to detect is 3.2 mV. Thus, the minimum temperature variation that can be detected by our system is 0.1 \({}^{\circ}\)C. The resolution of the temperature sensor is enough for the aquaculture monitoring. In Figure 10b we can see the code used in the node to read the value of the temperature sensor. The formula that relates the temperature and the voltTemp value is extracted from Equation (1). Following, for the turbidity sensor we use the data shown in [49], where a calibration was already performed. Nonetheless, the data obtained in this calibration must be transformed from the resistance of the IR photodetector to _Vout_. Once more, a voltage divisor must be used. Using the _Vin_ of 3.3 V the IR photodetector as \(R1\) and an \(R2\) of 6 M\(\Omega\) we maximize the difference between the maximum and minimum _Vout_. The data after applying the voltage divisor and the mathematical model that adjust to this data are presented in Figure 11a. The correlation coefficient of the mathematical model, Equation (2), is 0.9977. Considering the resolution of the node, the minimum variation of turbidity that can be detected by the turbidity sensor goes from 1.8 NTU in low turbidity conditions to 4 NTU in high turbidity conditions. In Figure 11b, the code introduced in the node to read the _Vout_ from the turbidity sensor and transform this voltage into turbidity value is shown. The formula that relates the turbidity and the voltTurb value is obtained from relating the data shown in Figure 11a being the voltage as the independent variable and the turbidity as the dependent variable. The correlation coefficient of this formula is 0.9993. The calibration of the oil layer sensor is shown now. The data from the oil sensor can be seen in Figure 12a. In this case, we only pretend to differentiate the absence to the presence of oil layer. On the one hand, it is possible to see that when there is no oil layer the average _Vout_ is 0.018 V, the minimum value is 0.015 V. On the other hand, when the oil layer is present the average _Vout_ is 0.010 V, with a maximum value of 0.011 V. Thus, the threshold value to detect the presence of oil layer is 0.011 V. The code for reading the _Vout_ from the oil layer sensor is presented in Figure 12b. Figure 10: (**a**) Data and (**b**) code of the temperature sensor.