An internet of things based smart waste system

ABSTRACT


INTRODUCTION
The waste is a different set of residual materials from domestic, agricultural, industrial and productive human activities, and includes all waste placed somewhere, and its accumulation or misuse has caused negative impacts on public health, safety and the environment. Waste heaps motivate the proliferation of bacteria, viruses, and germs, which cuase the spread of diseases and epidemics.
Through the developed of modern technology in our life, many smart systems have helped to make the life easier and simpler especially in the garbage field and the possibility of its disposal. This development is still ongoing until now and throughout the times, where a lot of scientific discussions and researches have been conducted to develop this field. Nowadays, IoT based several solutions for garbage management which can be accomplished to get better garbage collection which would ensure healthy environment for the life [1][2][3][4]. The IoT technique can be adopted to create connection of normal physical items through the internet using Wi-Fi cloud. Accordingly, any object within the world can be supplied with an internet protocol address can be labeled portion of IoT devices by means of integrating them with an electronic hardware including sensors  [5]. IoT is easly a modern version of the web network that provides communication between several devices that are connected to each other adopting the internet protocols [6][7][8]. The internetworking of sensors and corporealed world are known as IoT. As a result, IoT technique performs the functions of data collection and sorting, sensing, and processing by linking all the physical gadgets with the internet [9]. Through the adoption of the technology of IoT, there is a lot of scientific research on smart garbage systems in this context, in [10], A. Joshi and other proposed a management system of waste with sensor devices and cloud. The sensors are adopted to measure the waste level in the basket and if the basket is full, the driver of truck will receive notifications by Wi-Fi. The driver works to collect the waste and transmit to the garbage storage. In [11], D. Poornakumar and other presented a system composed of an Arduino board, a garbage basket supplied with several sensors. The sensors data are monitored periodically at the office using GPS module and GSM/GPRS. In [12], Sirisha Yerraboina and other developed a garbage bin using Arduino, GSM module and ultrasonic sensor as a main components. The adopted basket permits us to monitor the waste level and send the information of waste filling status as empty or 0%, medium or 50%, nearly full or 90% and full or 100%. In [13] Mayuri Dongre and other proposed a system wherein the basket level is checked periodically and additionally real time analysis may be executed on web page from every time and anywhere inside the world. As soon as the bin receives crammed, it notify the rubbish collector through sending a message to him stating that the basket is complete using GSM with ESP8266 Wi-Fi microcontroller. In [14] B. Saranraj and other proposed a system with IOT technology for waste management and clean which detects the level of waste over the baskets using sensor. Once it checked, the system through RF module altered to concern authorized. In [15] Chitluri Sai Srikanth and other proposed a sharp waste structure based on IoT. It is adopted to check the waste estimation in the baskets and later sends the information through Internet to a server for any point. In [16], S. I. Shirke and other presented a system to monitor garbage using IOT technology. This system helps to maintain the cities clean. It monitors the garbage baskets information such as garbage level using android application. Through the system, the worker can receive a message when the garbage level reaches to a certain threshold. In [17], Amit Kumar Sinha and other proposed a system with multiple waste baskets distributed in different areas in the cities where are connected via IOT technology. Each basket is supplied with embedded components and it senses the waste level of basket using ultrasonic sensor, thus the information is sent to the officer of municipality who will send these information to the driver of truck to remove the waste. In [18], C. S. Patil and D. C. Bansode proposed a system for waste clearance by providing an attentive signal to the web server of municipal for cleaning of waste basket based on the garbage level. This system adopted ultrasonic sensor has been interfaced with Arduino board to check the garbage level in the dust basket. In [19], K. S. Mamatha and S. A. K. Jilani presented an IoT based smart monitoring system for garbage by sending the sensors data using node MCU Wi-Fi. In this work, free web server is adopted as a host acquires information of variety of several sensors and helps to visualize actual status, manage garbage and monitor from city waste baskets using GPS module enabled trucks.
In the our proposed work, the smart waste system based on IoT technique has been designed and implemented using two garbage baskets. This system is different from the previous works where the garbage baskets are emptied automatically using a conveyor belt that transports the garbage to the landfill (i.e. each basket can administer itself automatically without requiring any human being). Also through the system, garbage baskets are monitored via the internet with designing an application in the mobile phone. The monitoring includes information on the level of garbage in baskets and percentage of moisture in addition to the temperature in each basket.

PROPOSED SYSTEM
The structure representation of the proposed smart waste system is illustrated in Figure 1. This system composed from the following hardware components such as ESP32 Wi-Fi microcontroller, Conveyor belt, brushless DC motor with driver circuit, four servo motors, four ultrasonic sensor, two DHT22 sensors, LCD with I2C board. Also, the system software is executed using C++ language and Blynk mobile application.

Wi-Fi microcontroller
The ESP-WROOM-32 contains a dual-core LX6 processor that has two CPU cores (can be controlled individually), and operates at an adjustable clock frequency from 80 to 240 MHz. ESP32 integrates the HT40 802.11b/g/n wireless transceiver. It supports both Wi-Fi and Bluetooth communications. The operating voltage range for ESP32 board from 2.2 to 3.6 volt. It can provide up to 600mAh reliably. Through this microcontroller, the sensors data are displayed on the display screen as well as using an application designed in a mobile phone; also the data are processed and the commands are applied to actuators as:  If the ultrasonic waste level sensor measures the waste level in the any basket more than or equal to 80% full, the basket base is opened automatically by servo motor to empty the waste on the conveyor belt to transfer the garbage to the landfill.  If the ultrasonic distance sensor measure the distance between the person and the garbage basket less than or equal to 30 cm, the basket cover is opened automatically by servo motor to be prepared to receive garbage from the person.  If the DHT22 waste moisture sensor measures the waste moisture in the any basket more than or equal to 40% full, the basket base is opened automatically by servo motor to empty the waste on the conveyor belt to transfer the garbage to the landfill. Figure 1. Block diagram of the adopted smart waste system

Ultrasonic sensor
The ultrasonic sensor measures the distance between it and the obstacle. Where it launches highfrequency sound waves and when these waves collide with an object or any obstacle, they resonate in the form of an echo. The distance is computed according to (1) where the distance depends on the time of departure and return of sound waves time in addition to the speed of sound.
where D= distance, T=time and N= sound speed In this work, two ultrasonic sensors have been used in each waste bin. The first sensor to calculate the distance between a person and the basket when he approaches to throw garbage; and if the measured distance becomes 30 centimeters or less, the basket cover opens. Another sensor is adopted to detect the garbage level in the basket by calculating the distance between it (which is attached to the inner cover of the basket) and the surface of the garbage. If the second sensor measures a distance of 20 centimeters, this indicates that the trash level is 80% full. Figure 2 shows the mechanism of the first and second ultrasonic sensors.

DHT22 sensor
This sensor has been used to measure the moisture and temperature of the waste baskets. DHT22 has a humidity measurement range from 0 to 100% with a 2-5% accuracy error ratio. In the temperature measurement range DHT22 ranges from -40 to +125 °C with a 0.5 °C error rate. As the increasing of the air temperature, it holds extra dampness, consequently, the associated humidity varies with the temperature [20,21]. The electrical operating voltage for each of the sensors is 5-3 volts, while the maximum current used when measuring is 2.5 mA.

Servo motor
A special subcategory of continuing motors is the servo motors, which in normal cases integrates a DC motor with an electronic feedback to make sure the accurate motor positioning [22]. The servo motor is a motor that comes with a gearbox and Shaft which give the movement greater torque and accuracy, and this motor can circumvent 180 degrees. In this work, two servo motors have been used in every waste basket. The first motor to open the basket cover when the person approaches to throw the garbage when the distance between it and the basket becomes 30 cm or less. The other motor is used to open the base of the basket to empty the contents of the basket into the conveyor belt when the garbage level reaches 80% full.

DC motor and drive circuit
A brushless DC motor with 12-volt high-torque is used to drive the conveyor belt to transport the garbage to the landfill. The motor is driven and controlled by an H-bridge. The H-bridge is adopted here to control the speed of the DC motor of conveyor belt. Also it's used to control the direction of the motor (manually control by using simple switch). Figure 3 shows the brush less DC motor with H-bridge module.
The speed of the DC motor is controlled by varying the amount of the supplied power voltage of the motor (from zero to 12 volts), as this range allows the motor to rotate from the minimum speed to the maximum. This can be accomplished using H-bridge circuit that consists of four transistors as shown in Figure 4. This circuit takes the control voltage signal from microcontroller as a pulse width modulation (PWM) signal. The PWM signal is a square wave that fluctuates between high and low voltage at high frequency. The voltage value of the PWM signal can be adjusted depending on the width of the time ON shown in Figure 4 according to the equation voltage=time ON/Time period (T). When the time ON period is maximum (equal to time period), the voltage is maximum and vice versa.
As for controlling the direction of rotation of the motor, it is done through the H-bridge circuit itself, when the transistors S1 and S3 are turned on, the motor rotates in the forward direction, being in this case the positive and negative terminals of the motor connected to the positive and negative terminals of the power source respectively. As for the reverse direction of rotation, the transistors S1 and S2 are turned off and the other (S2 and S4) turned on, as the polarity reverses in this case [23].

LCD with I2C circuit
The used liquid crystal display (LDC) has two rows and 16 columns with 16 ports to interface with microcontroller. It is designed to display numbers, letters and symbols in a raster manner [24]. In this work, the I2C board has been used to connect the display screen to the microcontroller through four ports instead of 16 ports. The I2C communication protocol is a short-distance chain link interface that requires only two-line bus for data transmission. A serial data line (SDA) and serial clock line (SCL). Any data sent from one device to the other device passes through the SDA line, while the serial clock line provides the synchronization clock necessary to transfer the data [25]. This 2X16 LCD has been adopted here to display the garbage level, moisture and temperature of each basket.
The ultimate purpose of the proposed system is to implement a controlling and monitoring system for correct waste management and it can be adopted by a municipal authority to monitor the waste status on real time based IoT cloud. This can be satisfied by programming the Wi-Fi microcontroller (ESP32) as per requirements to read the sensors data firstly and then compare them with threshold values for the correct operation of the system. Where a comparison is made as: If the value of the distance measured by the first ultrasonic sensor is less or equal to 30 cm, the bin cover will be opened automatically in preparation for receiving the waste from the person coming to throw it; Also, if the measured distance by the second ultrasonic sensor is less or equal to 20 cm (the level of garbage is greater or equal to 80 cm) or the percentage of moisture measured by the moisture sensor is greater or equal to 40%, then the base of the waste bin will be opened to empty it on the conveyor belt to transfer it to the landfill. The C++ language has been adopted to write the system software code and the logic of used program can be described from a flowchart shown in Figure 5 (see in Appendix).

Implementation waste control system
The system shown in Figure 6 has been implemented to control the waste management by emptying the waste baskets automatically depending on the garbage level and the percentage of humidity inside the basket. The figure shows two types of ultrasonic sensor. Where the first one on the inner cover of the basket works to measure the garbage level inside the basket and when the level in any basket become more than or equal to 80% full, the basket base is opened automatically by the first servo motor shown in the same figure to remove the garbage on the conveyor belt to transfer it to the landfill. While another sensor works to measure the distance between the basket wall and the person who throws the waste and when the distance become less than or equal to 30 cm, the basket cover is opened automatically by the second servo motor to be prepared to receive garbage.
Also, through the system, it is possible to empty the waste basket, not only depending on the level of garbage, but also depending on the moisture content inside the basket, because the excess moisture causes air pollution and an unpleasant smell. So the DHT22 moisture sensor has been adopted in each basket for this purpose and when the moisture reaches to or more than 40%, the basket is empty.  Table 1 shows the details of the system work. The fourth column in the table shows the state of the top cover of any garbage bin depending on the distance in which the person approaches to throw garbage (the second column) and the cover is open by a servo motor rotating at an angle of 180 degrees if the distance becomes less or equal to 30 cm. As for the fifth column, it shows that the base of the garbage bin is opened by servo motor depending on the level of garbage shown in the third column (if it decreases below 20 cm (garbage level greater or equal to 80 cm)) or the humidity percentage indicated in the first column (if it is higher than 40%). The sixth column in the table shows the states in which the motor of conveyor belt is turned on (always the belt motor is turned on if and only if one or all garbage baskets are emptied, i.e. when the base of the basket(s) is/are opened) to transport the garbage to the landfill.

Implementation waste monitoring system using LCD and mobile application
In the proposed system, sensors' information such as garbage level, humidity and temperature are monitored in two methods. The first one is where the sensors information are monitored through LCD placed near the waste basket as shown in Figure 7. This method requires the waste worker to be present at the garbage site to monitor the system information. The figure shows the sensor values for the first and second basket. The sensor values for the first basket are 31 cm, 37.9 °C and 30% for garbage level, temperature inside the basket and humidity percentage respectively. The sensors data of the second basket are shown in the left of same figure. The garbage level is 28 cm, the garbage humidity is 25.4% and the temperature is 37.8 °C. The other method is based on IoT technology and sends the system information to a mobile application using a Wi-Fi signal where the waste worker can monitor the system from any point as shown in Figure 4. The figure indicates the designed blynk application, garbage levels of each basket and also the garbage humidity where the humidity 1 of the first basket and humidity 2 of the second basket in blynk mobile application where the adopted Wi-Fi microcontroller sent them wirelessly through IoT cloud.

CONCLUSION
The proposed IoT based smart waste system has been implemented to provide a clean, litter-free environment in cites with effective ways. Where the approved system gets rid of waste and prevents waste scattering during its transportation by collecting it on a conveyor belt when garbage baskets reach a certain level and then transporting them directly to the landfill, the system also prevents unpleasant odors due to wet waste because it contains a sensor to measure the percentage of waste moisture. In addition, the system prevents human intervention to get rid of the garbage in the baskets, and thus the system has a positive effect on human health. The system is dependable and it can be adopted for both dry and wet waste. This system is economical (the total cost of the system is 120$). This proposed combination uses sensing and communication techniques where waste data is collected from the smart container (basket) and then transferred to an online application where the workers can access and verify the garbage containers deployed in the city. The system adopts an automatic process for emptying the baskets by designing a conveyor belt located under the extension of the baskets to transfer the waste to the landfill when the waste level in any basket exceeds rubbish 80% or garbage moisture exceeds 40% to avoid the accumulation of waste and unpleasant odors from it. Where this proposal works to reduce the effort on garbage workers and rely on the electronic effort, and thus a healthy and clean environment free from pollutants can be provided.