A novel solution for energy-saving and lifetime-maximizing of LoRa wireless mesh networks

ABSTRACT This paper presents an energy-saving and lifetime-maximizing solution for the LoRa wireless mesh network (WMN). Energy dissipation is a crucial factor affecting the usability of the LoRa WMN. In the worst cases, in systems without electric mains, the life of a sensor node battery may last for only a few hours. Two proposed solutions are characterized as energy-saving due to the use of deep sleep in the ESP8266-12F microcontroller. This allows the optimization of duty cycling, which refers to the ratio between active and inactive periods of sensor nodes power-gating the node, i.e. turning off all circuitries. This solution benefits applications using active power-hungry sensors sampled many times daily. Notably, reducing power consumption during idle time increases the optimal battery life by up to hundreds of times. As a result, the automatic uptime of a LoRa WMN can increase from days to months or even years, depending on usage. Therefore, energy-saving must be optimized if the node is to be installed in locations without a grid or renewable energy source. Experimental results show that the proposed energy-saving solution is more effective than those introduced by previous studies.


Introduction
Wireless sensor networks (WSN) have recently been widely used in many fields.Indeed, WSN has been applied to multiple application scenarios Khan et al. (2016), including environmental monitoring (Andreadis et al., 2023;Madeo et al., 2020), industrial monitoring Kumar et al. (2014), healthcare monitoring Dey et al. (2017), agriculture (Andreadis et al., 2022;Khoa et al., 2019), and smart city context monitoring (Anh Khoa et al., 2020;Cerchecci et al., 2018).The most significant advantages are that the devices are tiny, include sensor nodes, and can be deployed in large quantities to collect data over large areas wirelessly.However, each sensor node's final cost significantly impacts the monitoring infrastructure's effective implementation.Low-end cost sensor nodes can be easily replicated in large quantities and then commonly deployed in real scenarios where monitoring is required.Furthermore, WSN is deployed in many systems located in areas without an available grid connection.In these cases, energy-efficient solutions must be found to power the sensor nodes (Anh Khoa et al., 2020;Cañete-Carmona et al., 2020;Cerchecci et al., 2018).Alongside cost, energy consumption constitutes the second major factor affecting the usability of surveillance infrastructure, especially when deployed in remote areas (Andreadis et al., 2022;Cañete-Carmona et al., 2020).In this case, the sensor buttons should be placed in hard-to-reach locations.They can only be powered by batteries or through energy harvesting solutions.In both cases, energy efficiency is essential to ensure the long-term operation of the monitoring infrastructure.In Andreadis et al. (2022), the authors design an extensive IoT network deployed in vast areas, covering everywhere, especially places where Internet connectivity is impossible.IoT devices use sensors to continuously monitor ground data for smart agriculture and environmental purposes by connecting these sensors to the Internet through a Machine-based aerial system uncrewed aerial vehicle (UAV), High Altitude Platform Station (HAPS) or CubeSat.Indeed, this solution is perfect, but the cost of building the system is prohibitive with extremely high prices and consumes a lot of energy.Another study in Cañete-Carmona et al. (2020) very innovative solution using a low-cost IoT device to monitor in real-time in combination with different types of sensors for automatic monitoring of carbon dioxide (CO2).This system has been tested and evaluated in the laboratory in real-time to monitor and evaluate the fermentation of wine instead of having to monitor with traditional methods and analyze by physical and chemical learning.That pushes us to find a suitable, economical and economical solution.
The LoRa WSN framework is a recently proposed solution to improve devices' communication performance and low power in real-world environmental situations.This method allows all LoRa devices to act as routers and forward data from other devices (Hayashikoshi et al., 2018;Henkel et al., 2017;Jiang et al., 2020;Radfar et al., 2020;Shafiee et al., 2017;Tsai et al., 2018).However, the studies mentioned need help managing and deploying mesh networks across large areas.The paper in Tsai et al. (2018) presents a low-power consumption communication scheme for the LoRaWan, which can improve the security level and simplify the process to lower the power consumption of the Advanced Encryption Standard (AES) encryption process.Meanwhile, the authors in Hayashikoshi et al. (2018) analyze two crucial factors, useful network lifetime and battery energy in WSN as packet size and transmission power level, by designing an optimal model, termed Mixed Integer Programming (MIP).Other low-power systems for IoT applications are proposed in Henkel et al. (2017) and achieve power consumption of almost zero standby power in the microcontroller's no-operation modes.Recently, the authors of Radfar et al. (2020) summarized and discussed the paradigm of IoT with a particular focus on energy consumption and methodologies used for its depreciation.A study in Shafiee et al. (2017) presents a solution to manage a battery that significantly increases the battery lifetime, predominantly by using standby mode without requiring offor on-chip large power switches.The proposed technique works based on removing the wake-up receiver (WUR) low drop-out (LDO) unit.The authors in the paper Jiang et al. (2020) introduce this type of circuit through an intense intervention.The circuit-specific feature featured in this paper can improve energy use in an IoT device by providing improvements at critical points of the harvest energy flow.WSN provide a feasible solution to improve the communication performance of devices over a larger area.This enables all LoRa devices on the network to act as routers and relay data from other devices.A wide-area network (LPWAN) structure with a hybrid and low-power was proposed in Lee and Ke (2018), where the system can achieve wide-area communication coverage and low-power consumption for IoT devices.Moreover, radio communication is used for both the long and short range.The authors also built a low-power mesh network with LoRa.This physical-layer standard can provide long-range communication.
Another study in Bouguera et al. (2018) is also interested in maximizing the life of sensor nodes because sensor nodes are often provided with limited battery power, which is challenging to use for a long time.Therefore, the issue of optimizing battery power adjustment is an issue of great interest to many researchers.In this study, the power consumption model is based on LoRa and LoRaWAN, allowing their to estimate the power consumption of each sensor node element.A full-power model for the communicating sensors is proposed.This model can compare different LoRaWAN modes to find the best sensor node design to achieve power autonomy.
Recently, several studies have begun to present practical solutions that have evaluated and optimized the energy efficiency of a sensor node based on ESP8266, in Telicko and Jakovics (2022).As a result of this study, we rely on detailed energy profile measurements on different variables, such as other sleep mode profiles and communication approaches.Measurements show that, with a specific configuration, ESP8266 microcontroller can work independently for up to ten years on 18650-25R batteries.However, this study still evaluates a narrow range in wooden houses and buildings and uses the Wi-Fi data transmission method instead of using it in a large area.Another study in Preucil and Novotný (2022) also proposes power-saving ways for Wi-Fi Message Queuing Telemetry Transport (MQTT) modules using ESP8266 microcontroller by adjusting different sleep modes of printed circuit board (PCB).However, like the previous study, the evaluation of the effectiveness of this solution is still only tested in a narrow range when using the Wi-Fi data transmission method, and the maximum usage time is about two years in different cases when using AA batteries at 2500 mAh.
However, there are still shortcomings for existing systems such as those presented in this section: . energy consumption, due to the use of real-time monitoring during data transmission and the lack of an energy-saving solution in the LoRa mesh network, .the integration of many sensors in one circuit, which leads to high energy consumption, .the non-application of deep sleep mode on a microcontroller, as this may drastically reduce a sensor node's lifetime, some studies have deep sleep mode applied, but it is only deployed in a small area and uses a Wi-Fi data transmission method, .other less significant elements may hurt the node's overall power consumption, such as voltage regulators.Once all these factors are summarized, the circuit's energy distribution may be so high as to reduce the node lifetime to just a few hours.
This paper aims to address these four critical parameters relating to lifetime and energy consumption in the LoRa WMN: . First, we design an energy-saving gating node prototype and propose two solutions for the power control problem to plan the sensing tasks using an ESP8266-12F microcontroller.This paper is one of the multiple studies to increase energy efficiency by optimizing duty cycling in the LoRa WMN. .Second, we design and implement a LoRa WMN over a large area with 14 energysaving sensor nodes.The evaluation performances of LoRa signals with varying distances may be attenuated or blocked by buildings and other obstacles.The proposed solution could mitigate this issue by using the network to reduce time delay and packet loss without deploying an additional gateway (GW). .Finally, the advanced LoRa WMN module design suggested in this article could be integrated with other IoT applications to collect data from distributed sensors, bypass problematic data transmission, and manage issues over a large area.
The rest of the paper is organized as follows.Section 2 provides a system overview.Section 3 describes the architecture and design, and Section 4 presents the operation tests.Finally, the paper is concluded in Section 5. line shows the nodes that do not use the power-saving feature in the network.The nodes use energy from the available power sources.Simultaneously, the green line indicates nodes using energy-saving features situated far from the gateway area, where energy sources such as batteries, accumulators, and solar energy can be easily used.The yellow lines represent the links between the nodes that can use energy from the grid.The most important feature of this study is that the network is customizable so that each node can be a gateway and can freely use energy-saving features.The model in Figure 1 displays an example in which data collected by node 5 are relayed by nodes 4, 3, and 2 before finally arriving at the GW (node 1).Note that the network topology is determined automatically and may change due to environmental variations.Each node locally selects which node is the best to help relay its data.Using this procedure, a node that cannot directly communicate with the GW (node 1) may find other nodes to transfer data to the GW (node 1), thereby raising the packet delivery performance and reducing time delay and packet loss node.

Architecture of the proposed energy-saving gating node prototype
The fundamental purpose of the LWM network module is described and shown in Figure 2 with an ESP8266-12F microprocessor, LoRa E32 TTL-100 414 MHz transceiver with the settings (baud rate: 115,200; frequency: 414 MHz; channel: 3; address: 2; air data rate: 19.2 bps; and power: 20 dB) and the other components of an ultrasonic sensor SRF-05, and HX711 loadcell module integrated into the node.According to the low-power requirements, all nodes and the GWs are walls powered via 5V.The microprocessor communicates with the LoRa transceiver through a universal asynchronous receiver/transmitter (UART) to send and receive data wirelessly.The nodes and GWs use the same hardware platform.All mesh networking protocols are run on the ESP8266-12F microprocessor, and a low-power control is integrated into this structure between the power source (accumulator, batteries, etc.) and these components.Its straightforward system comprises the following features, characterized by meagre costs, and the sensor node prototype is designed with a two-layer circuit as shown in Figure 2.
The proposed power gating control circuit is designed using the following components: . A switch (e.g.charge energy or accumulator), .Resistors R 1 (10K) and R 2 (varying from 16.4K to 47.6K), as shown in Table 1, .An XL4015 DC-DC converter module buck with constant onboard voltage and regular current control feature, which is useful for common design power supply and battery charger applications in XL4015 (2015).This converter helps to convert a higher to lower voltage from solar energy, .LM2596 regulators, which are monolithic integrated circuits that provide all of the active functions for a step-down buck switching regulator and are capable of driving a 3-A load with excellent line and load regulation in LM2596 (2022), .An AMS1117, which is an adjustable and fixed voltage regulator in AMS1117 (2022).
The central part of the solution proposed in this paper is an ESP8266-12F.

Architecture of the proposed energy-saving LoRa WMN solution
As mentioned in the previous subsection, we propose a solution to determine how long and when the sensor node will work through the appropriate connections between the components shown in Figure 3.A switch must first be integrated to change/not change the input power to the entire circuit.Solar energy, batteries, or other energy sources can flexibly use the power source.To power the whole system, we use an XL4015 voltage converter to convert the voltage down to a level within 20-12V by applying the ability to adjust the output level voltage according to the voltage level of the XL4015 converter.We change the resistance value R 2 to suit the application's needs, while R 1 remains the same.By taking advantage of the characteristics of the XL4015, the aim is to achieve the voltage variation to charge for different types of sources.We use an efficient and straightforward feature by varying the resistance values R 2 and R 1 .
The ability to adjust the output voltage level is then provided according to Equation (1).
Subsequently, to optimize the use of the resistor, we use a resistor with a value of 503 from 10K to 50K, according to the computation of the resistor values shown in Table 1.
After going through the switch, the power source is stored in the accumulator to ensure that the power is stored/charged for long-term use.The mesh network transmits information between the nodes capable of self-finding new routes in sheltered areas.Accordingly, the system is maintained continuously in the case of misbehaving nodes or inadequate connection quality.The power supply to support the entire mesh network operation is lowered to 12-3.3V using the AMS1117 converter.IC AMS1117 is a low-voltage IC to 3.3V with a maximum current of 800 mA and the primary purpose of providing continuous power for the microcontroller to operate in normal mode and deep sleep mode.After switching the power supply using the AMS117, power is supplied to the circuit's central microcontroller to the ESP8266-12F.This paper uses the microcontroller's in-depth sleep feature to control the entire mesh network's power supply to optimize energy usage throughout the system.Deep sleep works by disabling all features programmatically except in real time.The standard time to activate the microcontroller to wake up and operate can be set to a short interval before continuing to use deep sleep to save energy.The deep sleep mode can be used continuously for approximately 71 minutes.Still, up to 60 minutes is needed for a data transmission line.Finally, once again, we use an LM2596 transducer for power conversion that matches the significant consumption of the custom sensor for each purpose and LoRa.Like the XL4015, the LM2596 is a dedicated IC for low voltage but with a unique feature that a microcontroller can automatically switch on.The LM2596 with compact design voltage is adjustable from 1.5-35 VDC, with the energy-saving logic wiring diagram shown in Figure 4.The circuit then has a conversion efficiency of up to 92%.In this study, we use the ON/ OFF pin of the IC LM2596 to turn on or turn off the power and use the microcontroller to control the display, where level 1 is OFF, and 0 is ON.In our research, we use two types of sensors: ultrasonic and weight sensors.Two standard sensor types used in innovative trash bin applications are already deployed over large areas of the Ton Duc Thang University campus Anh Khoa et al. (2020).
where V out is an output voltage of the low-power node, and R 2 and R 1 are the bias voltage is a feature of the feedback pin.
As mentioned in the previous subsection, the heart of the proposed solution is an ESP8266-12F microcontroller.Applying the deep sleep mode for 24 hours presents two saving and super-saving energy consumption solutions.To facilitate an explanation of the energy-saving policy, we refer to the architecture of the ESP8266-12F microcontroller.The first solution is energy-saving (ES); when using the microcontroller's deep sleep mode, all of its functional features are off, leaving only the last one, the real-time clock (RTC), remaining active.So, we assume that in 24 hours of deep sleep mode, it wakes up once every 1 hour, and each time 15 seconds are required to set the state and transmit data.Thus, each time sent, data is counted and saved to the memory, and every hour the microcontroller has to wake up due to counter overflow.However, this is not the best solution.By using the Serial Peripheral Interface Flash File System (SPIFFS) feature of the microcontroller, we propose to extend the second solution, termed energy-super saving (ESS).With this solution, we provide a flexible choice when configuring microcontrollers.Time off is included within a 24-hour day, as we do not need to use the entire system.During that break, the microcontroller wakes every hour and operates once to reset the timer.Each time this takes one second.
Considering the first ES solution, the total power of the LoRa node can be computed as in Equation ( 2): where: W is total power; W 1 is active power 1(W/s) and W 2 is active power 2 (W/s); T 1 is a total time of T 1 and T 2 ; T 1 is an active time of W 1 in (s) and T 2 is an active time of W 2 in (s).(3) and the total power for one day in Equation ( 3) is multiplied 24 times.Consider all components as presented in Subsection 3.2, and apply Equation (2).We can then calculate the total power table for the first ES solution, presented in Table 2.The overall power used for the first solution is 1.51686 mW/h.
Next, we consider the second ESS solution, by calculating the power of ESP8266-12F for one hour in Equation ( 4 We also calculate the total power values for the second ESS solution as shown in Table 3.The overall power used for the second solution is 1.1109 mW/day.By comparing the two experimental results, we see that the second solution is preferable to the first solution. Next, consider the total power of the following LoRa wireless mesh node.At this point, the total power throughout the node can be evaluated as in Equation ( 6): where: W t is the power throughout the node (W/h or W/day), W B is a input (W/h or W/day), and H is the efficiency of the source power (%).Finally, we can calculate the lifetime of the node with two solutions by applying the proposed solution in Equation ( 7): where: t is lifetime, and W is total power.

Procedure for a node joining the LWM network
Figure 5 illustrates the procedure of the proposed LWM network system.Integrating the IoT sensors with the LoRa mesh module forms the mesh network automatically.
The GW of this system sequentially collects the data accumulated in the IoT sensors.
We present an example scenario, illustrated in Figure 5, in which 14 nodes join the network.The LoRa WMN used in this paper consists of the ESP8266-12F, LoRa E32 TTL-100, SRF-05, HX711 sensors, and a node like GW. Suppose node 3 sends data to GW through node two and then forwards it to node 1.Once the data of node three has been sent to node 2, node two temporarily stores it, and node two temporarily stores node 3.After node 2 sends its data ahead, and after a 3-6 s delay, node 2 continues to send the data of node 3. Here, the method of transmitting data is referred to as sequential.The LoRa WMN is formed, and all nodes are connected to the GW based on the procedure.Therefore, in the following query round, node ten queries node 11 to gather its data using the message sequence from nodes 12, 13, and 14.Based on this sequence, all nodes can join this multi-hop wireless mesh network, and the GW can query all nodes.

Operation tests
This section evaluates the proposed energy-saving LoRa WMN to verify the design's applicability.This section covers two related characteristics of the IoT sensor node efficiency assessment: a description of the energy-saving policy, an estimation method applied to assess overall consumption, and the evaluation transmission.And then measure the response time and packet loss between nodes with different university campus distances.Moreover, we also test batteries with various capacities to compare them with each other and with previous studies.

Estimation of battery lifetime
An initial evaluation of the node consumption is performed to obtain an estimate of the batteries' lifetime.According to the relative datasheets, such consumption will be computed by accounting for the limited absorption of the node's main components.The time they spend running is calculated according to the policy by applying the two solutions introduced in section 3. Table 4 compares the results of battery lifetime from different types of batteries for two explanations.In the table of values, the battery lifetime appears to be much higher when applying the two solutions proposed in this paper than when not using the microcontroller's deep sleep.Furthermore, regarding studies (Cerchecci et al., 2018;Pinzi & Pozzebon, 2019), the lifetime of these studies reaches approximately 257 days.In comparison, our research returns one year and four days for the first solution and one year, four months, and four days for the second solution.Thus, our research results are far more helpful than those of other studies.As we introduced in the Section 1, we also introduced some new solutions in (Preucil & Novotný, 2022;Telicko & Jakovics, 2022) using ESP8266-12F microcontroller and sleep mode solution.The results show that these two solutions have a higher lifetime than the methods listed above, about ten years and two years, respectively.However, there are still disadvantages, and the consequences of our study are higher.Again, this estimate strongly confirms the effectiveness of the energy-saving policy, even though further improvements could be adopted.However, the calculated lifetime value is ideal; this factor is expected to be processed in an actual application since it depends only on the applied duty cycling procedure.

Test in a real environment
This section explains the network structure designed and implemented over 30 hectares of the campus at Ton Duc Thang University to verify and perform the reliability of the proposed LoRa WMN.This subsection tests the LoRa WMN's response times in environments with different distances.The time delay is defined as the time required for nodes to send commands to gateway devices and receive orders from their respective instruments.Figure 6 to establish the trustworthiness and enforcement of the proposed LoRA WMN, this section focuses on the delay time of nodes throughout the system by setting one or two GWs.Based on the obtained time delay results, we found that if using node 1 with GW in the whole system, the further the node is from GW, the higher the time delay rate (see green colour bar).Furthermore, if we set up a configuration of 2 GWs with GW as nodes 1 and 8 in the same system, the time delay exhibits a much lower delay rate than when using one GW (see green colour bar).Finally, we identify the good idea that each node can be considered a GW, and playing an equivalent role proposed in this paper is highly practical and responsive to practice.We observed that the packet loss rate varies with the distance between nodes in the network, as shown in Figure 7. with lengths of less than 100 m in high-rise buildings, the packet loss rate is lower, and the results are promising.The distance between the nodes increases from about 100-200 m and the packet loss rate increases due to the distance between obscured works.Similarly, the energy consumption is also more when we evaluate the corresponding 14 nodes, as shown in Figure 8.This finding is consistent in this study; we used LoRa with a 100 mW configuration, a minimum transmission distance of 50 m, and a maximum transmission distance of 200 m.We could use LoRa with 1 W of power to manage over a larger campus.In this case, the minimum transmission distance would be 100 m, and the maximum transmission distance would be 400 m.However, this would be proportional to the power supply for the entire system.Therefore, the choice of configuration and capacity of LoRa should only be selected according to the user's objectives and requirements.

Conclusions
This paper presents the design of an energy efficient LoRa WMN system by optimizing duty cycling in the LoRa WMN to collect data from IoT sensors distributed over a large geographical area.Preliminary tests on low-power computing show that the two energy-saving solutions achieve very high values compared to similar studies in the introduction and compare the research results.In addition, during the implementation of the system, we evaluated the impact of different distances on latency and packet loss.We distributed 14 LoRa nodes across 30 hectares with buildings in a university campus-scale test.Analysis of battery life data and our proposed LoRa WMN comparison shows that the system can significantly increase flexibility without installing additional GW.This is the first rediscovery study that extends a LoRa wireless network to incorporate energysaving features using the ESP8266-12F microcontroller features.It is also the first time to evaluate such a system through real-world experiments conducted over a large geographical area.This article explores the potential of deploying IoT sensors and monitoring and collecting data from them in an area that requires long-range transmission.In particular, we tested two types of sensors for application in smart trash cans.Our research will continue to expand in the future.Data transmission errors occur when deploying multiple nodes during network deployment and setup.To overcome this weakness, we would like to present a novel solution that will help advance this research.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Funding
This research is funded by University of Economics Ho Chi Minh City, Vietnam (UEH) under grant number 2023-04-23-1553.

Notes on contributors
Hoang Hai Son received a master's degree in electronics engineering at Ho Chi Minh University of Technical Education in 2013.He serves as the vice dean of the Faculty of Engineering and Technology, Nguyen Tat Thanh University.His research topics are the Internet of Things, artificial intelligence, wireless communication and signal processing.

Figure 1
Figure1shows a snapshot of the proposed LoRa WMN mesh topology on the Ton Duc Thang University campus.In the figure, GW denotes the gateway that manages the network and collects data from the IoT node sensors, indicated by numbered circles.The mesh node used in this paper is ES8-8266-12F ESP-12F (2018) and LoRa E32TTL0100LoRaWAN (2015), so each mesh node can have one GW.Fourteen node sensors were installed in different buildings across the university campus.The yellow

Figure 3 .
Figure 3. Procedure for a node joining the LWM network.

Figure 4 .
Figure 4. Diagram of the power control logic wiring.

Figure 5 .
Figure 5. Procedure for a node joining the LWM network.

Figure 6 .
Figure 6.Performance of LoRa mesh nodes in terms of response time.

Figure 8 .
Figure 8. Energy consumption measurements for the proposed two solutions.

Table 1 .
Computation of resistor values for R 1 and R 2 .

Table 2 .
Power consumption of all devices for the first ES solution.

Table 3 .
Power consumption of all devices for the second ESS solution.

Table 4 .
Comparison of the lifetime of popular batteries with the results of the other studies.