## 8 Calibration of Sensors  
Figure 7 shows the connection of the soil moisture sensor to the microcontroller (connected to Pin ANo). The soil moisture sensor is connected to a 10 K\(\Omega\) resistance as a voltage divider, as shown in Figure 7. The middle point (i.e., \(V_{out}\)) between the soil moisture sensor and the resistor is used for sensing variations in output voltage from the changes in moisture value. The output voltage (\(V_{out}\)) is altered between 5 and 0 depending on the moisture of soil. The moisture corresponds to the analog-to-digital converter of the Arduino microcontroller 0-1023 (10 bit resolution). The output voltage of the voltage divider can be translated into moisture in percentage through the microcontroller algorithm. The resistance of the soil moisture value decreases with increasing soil moisture. Therefore, the output voltage decreases. By contrast, the resistance of the soil moisture value increases when soil is dry, thereby increasing output voltage. The soil moisture sensor is calibrated in-field, as shown in Figure 8. The calibration of the soil moisture sensor (Figure 8) is achieved through an experimental test of three cases: (i) wet soil, (ii) field capacity soil moisture, and (iii) dry soil for soil mixture (clay and sandy soil). This calibration can be used in all seasons. The figure shows that the output voltage values of the soil moisture sensor are plotted on the left \(y\)-axis, whereas the moisture values in percentage are  
\begin{table}
\begin{tabular}{l c} \hline
**Parameter** & **Value** \\ \hline Output voltage & 12 V \\ Load voltage & 11.1 V \\ Maximum current & 416 mA \\ Maximum output power (\(P_{max}\)) & 5 W \\ Dimension (L \(\times\) W \(\times\) T) & 185 \(\times\) 285 \(\times\) 3.2 mm\({}^{3}\) \\ Surface area (S) & 527.25 cm\({}^{2}\) \\ \hline \end{tabular}
\end{table}
Table 3: Characteristics of the adopted solar cell.  
plotted on the right \(y\)-axis with respect to the depth of the soil moisture sensor. However, the values of the moisture percentages that are presented in Figure 8 are used in the microcontroller algorithm to determine the threshold level between dry soil and wet soil. From these values, the soil moisture sensor achieves self-calibration before each new measure based on the stored data in the algorithm of the microcontroller to reduce measurement errors.  
The temperature and humidity sensor (i.e., DHT11) was calibrated to be extremely precise by the manufacturer in a laboratory [54]. The calibration coefficients of the sensor are stored as a program in the one-time programmable (OTP) memory. When the OTP memory is programmed, the contents cannot be changed and are retained after power is turned off. This sensor contains a negative temperature coefficient component for temperature measurement and a resistive component for humidity measurement. DHT11 is a digital sensor that can be connected to an 8 bit microcontroller using a single wire serial interface. It provides fast response, and exhibits high-quality, cost-effective, and anti-interference ability. Consequently, the DHT11 sensor does not require a calibration process and can work accurately to provide air temperature and humidity readings in any seasons.