Summary
Wireless sensor networks are group of nodes capable enough to communicate with other nodes wherever they are deployed. The demanding need for a wireless sensor network in various fields of monitoring and tracking has gained more popularity in recent years. However, as sensor nodes have limited and dissipating battery power, energy conservation is a critical challenge in wireless sensor networks. Clustering is one of the promising methodologies to reduce the consumption of energy. This paper presents a cluster‐based routing algorithm for transferring the data to the base station. The algorithm uses the k‐means approach to select the clusters. Each cluster consists of two cluster heads, one for aggregating the data and the other for data transmission; thereby, they share the load and improve the network lifetime. The data are sent to the base station by a multi‐hop approach. For energy efficiency, a minimum cost path is chosen by considering the energy and distance. Simulations are implemented in NS2. The results obtained show that the proposed protocol is more efficient than the benchmarked algorithms in network lifetime, packet delivery ratio, throughput, total energy consumption, and end to end delay.