1.3 Architecture of wireless sensor networks 
The architecture of sensor networks is influenced by factors such as scalability, fault tolerance and power consumption. The Two basic types of sensor network architecture are layered architecture and clustered architecture.
These two architectures can be explained as follow:
Figure1.1 Types of architecture in wireless sensor networks 
1.3.1 Layered Architecture :
In a layered architecture, there is a single powerful base station (BS) and there are layers of nodes around the base station. These layers have the same hop count to the base station (BS).
Layered architectures have been used with in-building wireless backbones and in military sensor-based infrastructure such as multi-hop infrastructure network (MINA). In the building scenario, the BS acts as an access point to a wired network and the small nodes form a wireless backbone to provide wireless communication medium. The users of the network have hand-held devices such as PDAs which communicate via the small nodes to the BS. Similarly in a military operation, the BS is data gathering and processing entity with a communication link to a larger network. A set of wireless sensor nodes is accessed by the hand held devices of the soldiers.
Figure1.2 Layered Architecture in wireless sensor networks 
The advantage of layered architecture is that each sensor in the network is involved only in short distance and low power transmission to the neighboring nodes.
1.3.2 Clustered Architecture :
In cluster based architecture, all the nodes of network are arranged in clusters and each cluster has a cluster head which is the controller of its particular cluster. These nodes have a function to exchange messages from one place to other. The sender first send the message to his cluster head and the cluster head further send the message to the base station. The clustered architecture is shown in the following figure:
Figure1.3: Clustered architecture of sensor networks 
Thus here in clustered architecture any message can reach BS in at most two hops. The cluster architecture has a feature of data fusion which ensures that the node first sends the data to the cluster head and only the needed information is further send to the base station . This is achieved through the network layer protocols such as low energy adaptive clustering hierarchy.
1.4 Architecture of Sensor node
Wireless sensor networks are comprised of a number of spatially distributed sensor nodes which cooperate to monitor the physical qualities of a given environment.
Figure 1.4: architecture of a sensor node 
As shown in the figure 4, a sensor node consists of four basic units:
These four units can be explained as follow:
Sensing Unit :
A sensor is a device that measures some physical quantity and converts it into a signal which is processed by the microcontroller. A wide range of sensor types exist including seismic, thermal, acoustic, visual, infrared and magnetic. Sensors may be passive (active manipulation of the environment) or active (using active manipulation/probing of the environment to sense data, e.g. radar) and may be directional or Omni-directional. A wireless sensor node may include multiple sensors providing complimentary data. The sensing of a physical quantity results in the production of a continuous analogue signal, for this reason, a sensing unit is typically composed of a number of sensors and an analogue to digital convertor (ADC) which digitizes the signal.