## 4 Sensor Network Design
### Hardware Design  
(1) Sensor NodesWe are using Waspmote WSN which is an open source wireless sensor platform the speciality of which is implementing sensor nodes having low power consumption capability [31]. Hence, our sensor nodes can work autonomously, working on battery power and having a maximum lifetime of 7-8 years [35] based on the cycle of operation, communication protocol and the communication module used. The architecture of Waspmote is based on the Atmel ATMEGA 1281 microcontroller. The Atmega1281 microprocessor is based on the high-performance group of Atmel 8-bit AVR RISC based microcontrollers [34]. Its advantages are low power, high performance and advanced architecture based on RISC which has a maximum of 20 MIPS throughput and 23 \(I/O\) lines. The technique used by Waspmote to save energy is called blocking in which the program is blocked in sleep mode, until an event occurs which causes interrupts and then the program is executed. This way when an interrupt occurs, only then are the associated functions executed, thus saving energy. As shown in Figure 3, Waspmote has a mechanism to set an absolute time by using real time clock (RTC) which runs at 32 KHz. We have total control over when the more wakes up from sleep or hibernate mode to record values and perform other programming actions. This RTC also allows the Waspmote to work in the maximum energy saving modes when in Deep Sleep and the Hibernate modes and to wake up right at the correct moment. We are using the XBee-802.15.4 RF communication modules which have a firmware (DigiMesh). With the help of this firmware they create mesh networks instead of the usual Star topology networks. This RF module has a long range of 7000 m but lower power consumption than Wi-Fi (802.11). It operates at a very low data rate of 250 kbps at 2.4 GHz [36; 37]. These modules have mechanism to extend battery life by using sleep modes. _(2) Soil Moisture Sensor._ The Soil Moisture Sensor [38] is one of the most important component in our research on which the efficiency of our study heavily relies. There were many soil moisture sensors available and each had its advantages based on accuracy, and soil texture, cost and reliability, and we chose, the Watermark 200 SS [38] developed by Irrometer since it satisfied most of the above criteria. It has very satisfactory features like stable calibration, a measurement range from 0 to 239 cb (kPa), it has no soil dissolvability, can withstand freezing temperatures, and is low cost and low maintenance [38]. The WATERMARK sensor as shown in upper part of Figure 5, uses a resistance device that measures response to changes in soil moisture. After it is planted in the soil it works by exchanging water in the soil to stay in equilibrium using the electrical conductivity of water. When there is more moisture then the water increases in the sensor, thereby decreasing resistance and when the soil is dry, water in the sensor becomes low, thereby increasing resistance measurement. This features enables the sensor to have a stable and consistent calibration and it does not require recalibration for every installation. Figure 4 also shows the soil moisture sensor used in this study. _(3) Rainfall Sensor._ The rainfall sensor is a part of the Weather Station WS-3000, shown in Figure 5, which comprises of an anemometer, a wind vane, and a pluviometer [39]. The Weather Station is placed above ground on a pole and connected to the WSN sensor node. Our study is only concerned about pluviometer readings which provides a digital signal whose frequency is directly proportional  
Figure 4: XBee RF Module and USB PC Gateway. Figure 3: Waspmote Sensor Node. to the intensity of rainfall. We use the rainfall intensity in our research to control the operation of the WSN. The pluviometer has a small bucket that, starts to fill when the rainfall starts, it has a capacity of approximately 0.28 mm of water. When it is completely filled, its switch is closed and it is automatically emptied.