## 9 Results and Discussion  
### Current Consumption Measurements  
The power consumption of the WAS is a combination of several hardware components, namely, air temperature and humidity (DHT11) sensor, soil moisture sensor, a standalone Atmega 328p microcontroller, and the XBee S2C module. The router and main router consist only of the standalone Atmega 328p microcontroller and the XBee S2C module. The current consumption of the sensor, router, and main router nodes is measured on the basis of three cases, namely, (i) traditional operation (without any power reduction technique), (ii) sleep/wake scheme, and (iii) the _SWORD_ algorithm, by using a digital multimeter (MCP Lab Electronics/MT8045) and a storage oscilloscope (MCP Lab Electronics/DQ7042C). The DHT11 and soil moisture sensors consume 1.85 mA and 0.1 mA in active mode, respectively, and 0.01 mA in idle mode (i.e., no measurement value) at a supply voltage of 3.3 V.  
The Atmega 328p was practically implemented under standalone condition to reduce the power consumption of the battery of the network nodes. The selection of the oscillator frequency value is crucial in the power consumption of the microcontroller, as presented in [42], where the Atmega  
Figure 8: Calibration of the soil moisture sensor.  
Figure 7: Circuit diagram of the soil moisture sensor.  
328p microcontroller consumed 6.25 mA at 16 MHz. A trade-off between power consumption and processing speed is necessary. Therefore, an operating frequency of 16 MHz is selected in the current experiment to minimize measurement time. In such case, the microcontroller Atmega 328p consumes 6.25 mA in active mode and 0.09 mA in power-saving mode [55].  
Our test bed measurements show that an active current consumption of 6 mA (Figure 9) is recorded for the microcontroller (Figure 10a). The active current drain of the Atmega 328p microcontroller is measured using an oscilloscope, whereas the power-saving mode is measured using a digital multimeter because a low current consumption value cannot be captured by an oscilloscope. In the test bed measurement, a 10 \(\Omega\) shunt resistor is connected between the supply pin of the microcontroller and the voltage source (battery: 3.3 V). A small shunt resistor value is selected to reduce voltage loss in the supply line of the microcontroller. The drained current is obtained in milliamperes by dividing the measured voltage across the shunt resistor by the shunt resistor value of 10 \(\Omega\) (I = V/R). Therefore, the active current consumption of Atmega 328p during the transmission process is 60 mV/10 \(\Omega\) = 6 mA in active mode, as shown in Figure 10a.  
In the WSN hardware, the main power is consumed by the RF module during data transmission and reception [56]. Therefore, the same procedure as that in the microcontroller measurements of active current consumption for XBee S2C can be applied. An active current consumption of 11.4 mA is measured during the transmission process, as shown in Figure 10b. However, the sleep current consumption of XBee S2C is measured to be 0.58 mA using the digital multimeter. The parameters in Equations (2)-(11) with and without the sleep/wake scheme for the sensor node are presented in Table 4. Furthermore, the parameters in Equations (12)-(15) for the router and main router nodes are provided in Table 4. The values in Table 4 are measured for active time, sleep time, DC, and active and sleep current consumption with and without the sleep/wake scheme.  
Figure 10: Active current consumption using a storage oscilloscope (DQ7042C) for (**a**) the Atmega328p microcontroller and (**b**) XBee S2C.  
Figure 9: Test bed current consumption measurements of Atmega 328p and XBee S2C.  
\begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Components of Sensor Node**} & \multicolumn{4}{c}{**Components of Router Node**} & \multicolumn{4}{c}{**Components of Main Router Node**} \\ \hline
**Parameters** & **Soil Moisture** & **DHT11**