Designing wireless sensor networks (WSNs), which are new technologies with the potential to perceive, analyze, communicate, and send data, is difficult since it impacts the network's performance and longevity. The goals of this study are to enhance network longevity, mitigate power usage, and safeguard transmitted data. An energy-saving procedure was suggested as a means to accomplish this objective. Every node in the network uses the same amount of electricity according to this protocol. The restricted resources of the nodes are also taken into account while recommending an algorithm. Additionally, in order to provide optimal outcomes for assessing the system's effectiveness. The suggested model and the network's performance were evaluated using the Quality of Service (Q o S) metrics of Packet Loss Ratio (PLR), Network Energy Consumption (NEC), and Network Throughput Ratio (NTR). , this method ensures that the data remains intact. Additionally, we came up with a method to save electricity. This protocol ensures that all nodes in the network use an equal amount of electricity