Abstract
Wireless Sensor Networks (WSNs) play a crucial role in data collection from distributed and resource-constrained environments. However, the limited energy capacity of sensor nodes remains a significant challenge to sustaining long-term operations. To address this, a novel Energy-Aware Routing Protocol using Mayfly Optimization (ERPMO) integrated with K-means clustering and TDMA-based scheduling is proposed. The model employs K-means for spatially efficient cluster formation, while the Mayfly Optimization Algorithm (MOA) selects optimal cluster heads (CHs) based on key parameters such as residual energy, distance to base station, energy consumption rate, and node density. Additionally, sub-clusters are dynamically formed to balance transmission load, and TDMA allocates time slots to minimize interference and collisions. Simulation results show that ERPMO achieves a network lifetime of 1285 rounds, packet delivery ratio of 96.3%, residual energy of 0.32 J, cluster head selection accuracy of 91.2%, and a fairness index of 0.79, outperforming existing LEACH, PSO, and GA-based protocols. The proposed ERPMO model provides a compact, energy-efficient, and collision-free routing framework for sustainable WSN operation.