The Internet of Things (IoT) is rapidly becoming an integral part of everyday life. LPWANs have been introduced to support the billions of internet-connected devices and the data they produce. LPWANs are capable of providing reliable connectivity even in low-density areas and devices consuming a low amount of energy. The exponential increase in the use of IoT applications across the globe will continue to generate more and more data traffic within the IoT network. Hence, it will increase device battery usage that may reduce the battery life expectancy limits. Thus, End Devices (EDs) within the IoT network in the near future will rise up to billions of devices operating in public, industry, and personal networks, generating a necessity for more correct and reliable energy conservation technology. This prompted the research work on an optimized low-powered wide area network within IoT. This paper focuses on three different strategies: LoRa power consumption model design, simulation of IoT wireless sensor networks, and implementation of SF allocation across the wireless sensor network and results analysis. The experiment has been carried out in various stages: firstly running a simulation over a wireless sensor network without optimization using MATLAB Simulink and obtaining the following result of 6.3997e-17 joules power consumption. Secondly, the authors test the network with power optimization using particle swarm optimization algorithms and obtained a better result of 2.5230e-17 joules. The LoRa energy consumption is reduced by 60%. Lastly, different simulation tests of LoRaWAN protocols with respect to throughput, packet loss, delay, data transmission, buffer size, and network density. The results presented on the graph showed that the proposed model outperforms the existing models. Hence, appropriate spreading factor allocation has increased the power efficiency of LoRa end device battery.