Low-cost Waste Management System with Multi-node Application Using Simple LoRa Protocol

ABSTRACT


INTRODUCTION
Human activities to support their daily lives inevitably generate waste.Based on data from the Indonesian Ministry of Environment, in 2022, 17.8 million tons of waste were generated in Indonesia.However, with this large amount of waste, only 77.27% is managed, while 22.73% is unmanaged.Indonesia still manages waste in a traditional way.Traditional waste management systems often need efficiency, cost-effectiveness, and environmental impact optimization.The leading waste management problem is seen in the transportation system [1].Transportation times that are often inaccurate cause waste to become overloaded, which can cause various issues such as the emergence of unpleasant odors and pollute the surrounding environment and even have the potential to become a breeding ground for the Aedes aegypti mosquito [2].Besides that, operational costs for waste collection are relatively high for each haul.
An intelligent waste management system is needed by utilizing Internet of Things (IoT) technology to optimize waste management processes while minimizing negative environmental consequences.Previous studies have been conducted with multiple implementation techniques, such as research [3] using the ATmega 328, which can monitor the level and humidity of waste and the location of waste bins.Then, the system sends the monitoring results via SMS.In [4] uses ATmega328, ultrasonic sensor, and LoRa module to monitor the filling level, and the result is displayed on LCD I2C in the gateway.In [5], a waste level and humidity monitoring system is accessed through the Blynk App platform.Then, In [6] using ATmega328p to monitor waste level, humidity, weight, temperature, and fire detection in a waste bin.
Based on previous studies, researchers predominantly only focus on monitoring one trash can, which is incapable of large-scale waste management.This study develops a waste management system to monitor many trash cans in large-scale suburban areas.It uses LoRa as a communication platform considered more reliable to be implemented in an outdoor environment where trash cans are located [7].
LoRa, which stands for Long Range, is owned by Semtech, is a long-range communication system with low power consumption, low-cost design, and supports large-scale implementation called LoRaWAN [8].However, applying LoRaWAN in real-time monitoring systems is unsuitable because of the high probability of data collisions [9].Study [10] provides a solution by developing the LoRaWAN protocol into Simple Lora Protocol (SLP), specifically designed to monitor systems with multi-sensor applications that use master and slave communication models.The gateway, acting as the master, directs the flow of communication with the end nodes, which act as the slaves.The data obtained by the gateway will be forwarded to the Firebase real-time database via an internet connection.Then the data will be displayed in the Trash Monitor App application.Overall, this low-cost waste management system aims to do real-time monitoring of the filling level of bins, humidity level, and the bins' location to overcome the waste processing problem still needs to be more effective and efficient.The entire waste management system is shown in Figure 1.The waste management system generally comprises two devices distinguished by their functions: gateways and end nodes.This system aims to detect the condition of four bins using a multi-node application that implements a star topology.This topology centralizes the communication system at the gateway, where the gateway acts as a receiver of all sensor data and forwards it to Firebase via WiFi.Then, the data will be displayed in the application.

End Nodes
End nodes are integrated systems that act as data sources consisting of ultrasonic sensors, DHT22, GPS, LoRa RFM95, and Arduino Uno, as shown in Figure 2. Rechargeable Lithium Battery powers each end node with a capacity of 5000 mAh.

Sensors
Sensors need functionality programs to work according to their respective data collection functions and interfacing the required pin out to connect it to Arduino Uno, as shown in Figure 3.In this case, the ultrasonic sensor plays a role in reading the height of the waste.The Hc-Sr04 ultrasonic sensor was used in this work.The ultrasonic sensor's working concept involves directing sound pulses toward the target and capturing reflected echoes [11].It reads the distance from the sensor to the top waste surface in cm units.This prototype uses a trash bin with a 25 cm height, while the end nodes prototype places 100 cm above the trash bin.The height of waste represents the filling level of waste converted into percentage units in the Trash Monitor App.To convert the exact height of waste into percentage units, use the following formula:  = (100 -x) × 4 (1) Description: H: Height of waste x: Captured value of the ultrasonic sensor GPS module is a marker of the location point of the waste can by using latitude and longitude data.The GPS receiver determines its location by analyzing satellite signals, and the results of this calculation are the latitude and longitude coordinates.DHT22 serves to read the humidity of the air around the waste.Humidity value is needed to detect the presence of wet waste that must be prioritized for transport.

LoRa RFM95 Configuration
This prototype uses the LoRa RFM95 communication module for transmitting sensor data in the string data form.The parameter configuration required is as follows: Indonesia is categorized as AS923-2 channel plan according to regional parameter regulation of LoRa Alliance which is 920-923 MHz channel frequency [12].The RFM95 LoRa transceiver module has a maximum transmit power of 20dBm or 100mW [13].The optimal spreading factor for nodes less than 10 is SF7, and the coding rate is 4/5 [14].

Gateway
The gateway integrates LoRa RFM95 and NodeMCU (ESP8266), as shown in Figure 3.The gateway acts as a wireless sensor network manager, differentiates each end node, and controls the data flow the end node captures using Simple LoRa Protocol.In addition, the gateway acts as a bridge to connect the sensing box to the application using WiFi.

Data Communication System
Data communication system is managed by the gateway.The gateway implements Simple Lora Protocol (SLP) that considers suitable to prevent data collision in multi-sensor implementation [10].It controls how messages are sent between the end nodes and the gateway.Each end node is given an identifier of node 1, node 2, node 3, and node 4, so the gateway differentiates each to collect data correctly.The communication sequence in SLP is divided into two modes: setup mode and polling mode.In this study, the communication sequence is shortened to simplify bulk data collection processing time.The intended data communication flowchart is shown in Figure 4. Gateway begins communication by broadcasting messages to nodes 1 through 4 in sequence.The gateway will check the end node identifier code after the end nodes have successfully received the message, and if it matches, the nodes will send the data sensor.If the gateway has successfully received the data, it will send an ACK (Acknowledgement) message to the end nodes.Otherwise, the gateway will begin to send broadcast messages again.
After successfully collecting all data sent by end nodes, the gateway performs data parsing so that the values captured by each sensor can be distinguished based on their respective tag lists before being forwarded to Firebase, as shown in Figure 1.Firebase, a cloud-hosted database, was initially founded by James Starlin, which Google later acquired has a wide range of cloud services such as instant messaging, user authentication, real-time database, storage, hosting, and so on [15].User authentication and real-time database functions are mainly used in this study.

Trash Monitor App Design
The data changes, including the level of waste, humidity, and the prototype's location, will be displayed on the Trash Monitor application, built using the Kodular Creator, which uses the drag-anddrop feature without writing a single line of code.Kodular Creator is an upgraded version of the MIT App Inventor with additional sensor features.Then an apk file for the app can be exported on Kodular, which may then be downloaded to a mobile device.[16].
The Trash Monitor App has an authentication system with a signup and login page that uses email, username, and password information to enter the system.This monitoring application has a home page with sub-menus such as trash level, humidity level, and track bin location.The trash level menu displays the filling level of the trash can on a percentage level, where the raw data from the ultrasonic sensor is converted first using (1).The flowchart of the data display mechanism on this page is shown in Figure 5(a).While Figure 5(b) shows how humidity data from DHT22 will be displayed on the humidity level page.Lastly, Figure 5(c) shows how latitude and longitude data from GPS will be displayed on the track bin location page.

RESULTS AND DISCUSSION
This study has two types of testing: LoRa RFM95 testing and waste management system testing.LoRa RFM95 testing was done to observe the performance of the communication module, LoRa RFM95, especially to know the maximum distance of LoRa RFM95 in the suburban area based on RSSI, Packet Loss, and Delay parameters.Then the waste management system that has been designed and manufactured will be tested for functionality in monitoring the condition of the waste.Initially, the test scenario was carried out at 10 points from a distance of 100 m to 1 km, as shown in Figure 6 but the signal loss at a distance of 700 m.This testing used non-line-of-sight (NLOS) propagation in suburban areas.The node sends 30 data in each distance [17].The tests were carried out in a suburban area where the surrounding buildings are typically 4 meters tall.The end node antenna, in this instance, was fixed on a pole and was approximately 3 meters high.In comparison, the gateway antenna was positioned at a height of 9 meters above ground level.

RSSI
The Received Signal Strength Indicator (RSSI) displays the total receiving power of all signals in the active channel frequency band [18].The strength of the signal increases as the RSSI value approaches zero.The RSSI value is a negative number in the dBm unit.

Packet Loss
The number of packets lost during packet transmission is known as packet loss.If the packet fails to be sent, then the packet will not be sent again, or in other words, the packet is lost [18].The formula to obtain packet loss value is as follows:

Delay
Delay is the time it takes for a packet to travel from source to destination.Together with delay, it defines speed and capacity in the network [18].The formula to obtain the delay value is as follows: According to the testing results, the performance of the LoRa RFM95 module is found to decrease as the distance increases.The leading cause is the suburban environment of the testing region, which is full of high-rise buildings that obstruct the signal and lower its strength before it reaches the gateway.

Waste Management System Testing
The four end nodes are placed in line to test the entire waste management system functionality, as shown in Figure 7(a).Then the gateway performs data parsing before sending the value of each data to Firebase according to its respective tag list, as shown in Figure 9. Periodically, the condition of bins is checked by all associated sensors.The system will wait the predetermined period of time before checking again to provide an update to the Firebase server.

HC-SR04 Accuracy Testing
To test the HC-SR04's accuracy in measuring distance compared to the actual measurements, use the scenario in Figure 7(a).The end node box is placed 100 cm from the floor's bottom.Then set a 25 cm-tall waste basket there, with each filled with different heights of waste using solid waste as samples.Figure 9 compares the HC-SR04 raw data result and the actual measurement result.Based on Figure 9, the HC-SR04 ultrasonic sensor's accuracy in this investigation exhibits good results despite a difference value of 9 cm at node 2. That error might have been due to a sensor malfunction during data capturing.

Trash Monitor App Testing
The Trash Monitor App successfully shows changes in sensor data.Specifically for the trash level, (1) converts the sensor reading data to represent the filling level to percentage.The latitude longitude data from the GPS is displayed on the Open Street Map in the form of markers, while the humidity data from the DHT22 sensor remains in its original form (text), as shown in Figures 10 (a

CONCLUSION
The proposed waste management system offers an intelligent way to monitor trash conditions.This system has the main advantage of monitoring many trash bins in a large area by implementing the Simple LoRa Protocol.LoRa implementation in the suburban area with non-line-of-sight (NLOS) propagation has been observed by testing the Quality of Service (QoS) characteristics RSSI (Received Signal Strength Indicator), packet loss, and delay.The statistics from the testing indicate that the LoRa RFM95 can operate over a maximum distance of 650 m, even if the packet loss percentage is exceptionally high at nearly 90% and there is a 162 ms delay.This waste management system can function across a sufficiently vast area.
This prototype successfully checks the overall condition of the four trash bins with multi-node applications, such as the trash bin's position, humidity, and fill level.sensor HC-SR04 shows good accuracy based on the comparison result between the actual measurement and HC-SR04 measurement.Besides that, the data collision issue is successfully solved by implementing the Simple Lora protocol in data communication, enabling the gateway to recognize each piece of data sent by each end node.This prototype makes the traditional waste collection process more effective by real-time filling status monitoring, humidity level, and tracking the position of the prototype through the Trash Monitor App so that it can help to avoid environmental harm from excess waste.

Figure 1 .
Figure 1.The entire waste management system

Figure 7 .
Figure 7. (a) Waste management system prototype, (b) The interior of end node, (c) The interior of gateway 1.Data Communication TestingData communication testing is done to observe Simple LoRa Protocol performance under the scenario that the four end nodes are turned on and ready to transmit sensor data simultaneously, as shown in Figure7(a).The results of capturing data values by the gateway with the application of the Simple Lora Protocol show compatibility between the data sent by specific nodes and the actual condition of solid waste.In other words, the gateway successfully recognizes node 1, node 2, node 3, and node 4. Then the gateway performs data parsing before sending the value of each data to Firebase according to its respective tag list, as shown in Figure9.Periodically, the condition of bins is checked by all associated sensors.The system will wait the predetermined period of time before checking again to provide an update to the Firebase server.

Figure 9 .
Figure 9. Data storage in Firebase Database

Table 3 .
Packet Loss Testing Result

Table 4 .
Delay Testing Result