Internet of things (IoT) based Smart Garbage monitoring system

Received Jan 15, 2020 Revised Apr 18, 2020 Accepted May 6, 2020 Garbage waste monitoring, collection and management is one of the primary concerns of the present era due to its detrimental effects on environment. The traditional way of manually monitoring and collecting the garbage is a cumbersome process as it requires considerable human effort and time leading to higher cost. In this paper, an IoT based garbage monitoring system using Thingspeak, an open IoT platform is presented. The system consists of an Arduino microcontroller, an ultrasonic sensor, a load cell and a Wi-Fi module. The Arduino microcontroller receives data from the ultrasonic sensor and load cell. The depth of the garbage in the bin is measured using ultrasonic sensor and the weight of the bin with garbage is measured from the load cell. The LCD screen is used to display the data. The Wi-Fi module transmits the above data to the internet. An open IoT platform Thingspeak is used to monitor the garbage system. With this system, the administrator can monitor and schedule garbage collection more efficiently. A prototype has been developed and tested. It has been found to work satisfactorily. The details are presented in this paper.


INTRODUCTION
Garbage pollution has a big impact on the environment [1]. The garbage lying around the sides of the street could quickly harbour rats and fleas that carry harmful diseases if collection and disposal are not done appropriately. The piling up of garbage could lead to epidemics which may cause deaths. In order to preserve the environment, the pollution rate must reduce as much as possible. Thus, a garbage monitoring system is needed to accomplish this task.
The usual way of manually monitoring and collecting the garbage is a cumbersome and inefficient process as it requires considerable human effort and time leading to higher cost. Internet is rapidly growing and has played an important role in today's human lifestyle. As of today, the so called Internet of Things is taking over the internet because of its capability of sending and receiving real time data as long as the embedded devices are connected to the internet while monitoring the data at real time through the internet. Municipal solid waste management (MSWM) in the Arabian Gulf is discussed in [2]. Waste disposal techniques like Landfill and composting along with recycling and reuse strategies are analyzed.
IoT history, technology and fields of deployment etc. are reviewed in [3] since all the daily life activity can be monitored using IoT. In recent years, a number of researchers have attempted different ways of IoT based applications for garbage monitoring. Navghane et al. proposed smart collection bins which works by combining IR sensors and load cell sensors [4]. IoT based smart dustbin proposed in [5] where a smart dustbin system can reduce environment pollution using GSM modem to alert the concerned authority until the garbage is removed. Ref [6] proposed the waste collection in the restaurants using RFID communication  [7] discussed the city waste management by scheduling the garbage collection time depends on the level of the bin using RF transmission and reception based IoT system. In Ref [8] a review on solid waste management analysis was carried out in urban areas of Pakistan. A detailed study on the solid waste generated, collected and disposal in five cities of Pakistan were presented. According to Ref [9], municipal firm squander production displayed divergent fashion and a beneficial parallel with monetary development in expression of firm waste production. In Mysore city,a case study on solid waste management is reported in [10]. An investigation on the collection of waste, followed by the treatment of disposal and explained the the methods of data collection involved. In Ref [11] Zigbee and Global System for Mobile Communication (GSM) combination along with ARM 7 processor for waste monitoring is proposed. An IoT Garbage Monitoring system using Raspberry Pi is proposed in [12].
In [13] A novel method for waste collection management system with the optimized routing is proposed using IoT. The remote monitoring system is based on SMS and GSM technologies, the GSM network is a medium for transmitting the signal [14], and GPS is to track the filled garbage bins. With this facility, the registered mobile number will receive the message within 10 minutes about the bins that are filled. In [15], an IoT-based shrewd junk framework (SGS) is proposed to decrease the measure of nourishment squander.The proposed SGS had been worked as a pilot project in Korea for a year and it is demonstrated that the measure of nourishment waste could be lessened by 33%.
Vikrant Bhor et al. proposed smart garbage management system using GSM system [16]. Ref [17] used zigbee for IoT based garbage monitoring system. Ref [18][19] discussed various wireless technologies available for IoT. Ref [20] proposed IoT based multiple sensing and monitoring system. It demonstrates the features of Thingspeak platform and Matlab facilities incorporated. A solar based garbage monitoring system using IoT is proposed in [21]. It emphasizes on using clean and renewal energy as its main power source. It also uses android application to display the status of garbage bin. Ref [22] proposed IoT Based Industrial Automation using Raspberry Pi. It monitors and control the industrialenvironment based on the only data received by the industrial site sensors. IoT is achieved with HTML and CCS. In [23] IoT based Garbage monitoring system is proposed. It monitors the garbage bins levels, status of toxic gas inside the bin and the weight of the bin via a web page. In Ref [24 ], IoT Garbage Monitoring system via a web page is proposed. The web page gives a graphical view of the bins and highlights the garbage collected in colour in order to show the level of garbage collectedand trigger instruction to vehiclesin the collection centre.
In [25] the authors address the issues on guiding policies created for municipal solid waste management. It is based on substitution modelling in life cycle assessment since it is gaining importance worldwide. In this work the authors critically evaluate the modelling of substitution in LCAs of recovered material from municipal solid waste management systems.
From the literature review, it is clear that the garbage monitoring system is an important that needs immediate attention all over the world and requires a smart solution as well. ThingSpeak is a platform aiming for building IoT applications. It is capable of real-time data collection for collaborating with web services and other application programming interface. In this paper, an IoT based garbage monitoring system using Thingspeak platform is presented. This paper is organised as follows. The design methodology is explained in Section 2. The experimental results are tabulated and discussed in Section 3. The conclusion and further extension of the work are explained in Section 4.

METHODOLOGY
The block diagram of the design methodology is depicted in Figure 1. The garbage bin is equipped with ultrasonic sensor and load cell. These sensors are connected to the microcontroller. The data sent by the sensors will be displayed in the LCD screen and also sent to the internet through Wi-Fi module. The ultrasonic sensor sends out a high frequency sound wave and waits for the wave to return after colliding into an obstacle. The distance is measured by the time taken for the wave to travel forth and back. Once it received the reflected wave, the distance is measured and will be displayed on the LCD screen. At the same time, the data is sent to webpage via ESP8266-01 Wi-Fi connection. The load cell sensor sense the weight of garbage in the garbage bin and send to arduino. Then, the weight is displayed on the LCD screen. At the same time, the data is sent to webpage via ESP8266-01Wi-Fi connection. The Thingspeak IoT platform receives the ultrasonic sensor data and weight sensor (load cell) and updates the channel. If the data is over loaded or over weighed, then it will trigger the alert via the twitter. Data from ultrasonic sensor and load cell are being constantly transmitted to the webpage through Wi-Fi for monitoring the data. Based on the twitter alerts, scheduling of the garbage collection can be planned and it really helps the people to live in healthy environment.
Arduino Mega 2560 board has been chosen for this work as shown in Figure 2. It is a microcontroller board based on ATmega2560. The board could supply either 5V or 3.3V to suit the application usage. Ultrasonic sensor, load cell sensor, LCD screen is supplied with 5V while ESP8266 Wi-Fi module is supplied with 3.3V. Sensors are implemented in the garbage monitoring system are ultrasonic sensor for garbage bin level and load cell sensor for garbage bin weight. The sensitivity of the resistance changes of the load cell sensor are too small for the arduino to detect. Thus, an amplifier module is used to amplify the signal of changes in resistance of the load cell sensor. The electronic components are soldered onto donut board to realize the schematic design. Each component is slotted into their designated socket as shown in Figure 3.  Thingspeak is an open IoT platform is chosen as the IoT platform for this work because it is compatible with arduino and also the features such as data collection, graphs plot, social network and much more. Thingspeak platform used as IoT platform as shown in Figure 4. Figure5 shows the channel of the IoT project. Two graphs were made with the title of Ultrasonic Sensor and Load Cell Sensor. The data sent by arduino will be updated in this page through Wi-Fi connection. It is also possible to show the current location of the garbage bin by inputting the latitude and longitude.  Table 1 shows the result of ultrasonic sensor measuring the distance of the garbage bin. The actual distance is measured by a ruler. Items are randomly placed into the bin and then the distance is measured from the top of the bin to the obstacle. The data acquisition starts with an empty garbage bin. The distance is measured by using a ruler first and ultrasonic sensor is used afterwards. Five readingsare taken for every count of 3 seconds from the ultrasonic sensor. This is done to observe the changes of the distance in a time period of 3 seconds. The average of the five readings is compared with the manual(ruler) readings. For instance, the first reading, the distance measured by the ultrasonic sensor when the garbage bin is empty, the average of (24+23+22+24+25) is 23.6 and is compared with the manual reading and the percentage accuracy is calculated. Hence 23.6/27*100=87% of accuracy. The accuracy increases as the gap between the ultrasonic sensor and obstacle gets closer. The reason why the percentage is above 100 in some cases is because the sensor reading is larger than the manual reading. For instance, the last reading from the sensor is 4.6 whereas the manual reading is 4. So (4.6/4)*100 is equal to 115%.  Table 2 shows the result of load cell sensor measuring the weight of 20 cent Malaysia coin. One Malaysian 20 cent coin is equivalent to approximately 5.65g. The weight shown in the LCD screen is 0.7g when there is no force applied on it. Figure 6 shows a stack of 20 cent coin placed on the load cell sensor. The result showed that the measured weight's gap continues to move away from the actual weight as the weight increases as shown in Figure 7.  The experiment is conducted using Thingspeak as the IoT medium. Figure8 and Figure9 shows the graph updated in real-time while the data is stored in the webpage. Three case studies are performed and the results are discussed in this section. By using matlab visualization, the graphs are generated for the above mentioned three cases.

Load cell sensor
Case: 1 Items were slowly added into the bottle over a period of time. Figure 10 shows the bin is filled with items. Figure 11 shows the graph of the data sent by the sensors. Orange line represents load cell sensor's weight while blue line represents ultrasonic sensor's distance. The time of the data acquired is recorded as well. As seen in the graph, the weight increases whenever an item is added into the bin and maintains a close to constant while the distance is having a spike from time to time. The spike from distance might be caused by gap between the items. Another possibility is that there are waves lingering around and as soon as the ultrasonic sensor activates and sends out wave, it immediately receives the lingering wave and thus the distance is 0cm. Case:2 The experiment follows the same step as the previous one. A couple more items were added into the bottle to further verify the distance measurement. It is similar to the previous case. Ultrasonic sensor's measurement still spikes randomly.

Case:3
The objective of case 3 is to fill up the entire gap as much as possible. To achieve this, only old used paper is used is shown in Figure 12. Few of them are added into the bottle at once and the changes of data are observed for a period of time. As shown in Figure 13, the spike happens for the distance measurement at the beginning of the experiment might be caused by the emptiness of the bottle as it has a huge area for the wave reflection. Afterwards, both the distance and weight is closed to being stable. The spikes are negligible as the changes are not too large. From the centre towards the end, the change of distancefrom 5cm to 0cm and back to 5cm again but it doesn't happen as frequent as in first and second cases. When the garbage bin is overload or overweighed, Thingspeak React Apps will automatically post an update in Twitter stating the general location, channel ID, date, time and the level value or weight value as shown in Figure 14. Other times, it will periodically update the channel with its latest level and weight. Figure 14. Garbage bin overload tweet from react app

CONCLUSION
In this paper, an IoT based garbage monitoring system using Thingspeak, is presented. A prototype has been developed using an ultrasonic sensor to detect the level of the garbage in the bin and a load cell to detect the weight of the garbage bin. It has been tested and found to work satisfactorily. Thingspeak (a public channel which can be viewed by everyone) is used to monitor the garbage bin online. A social network webpage called Twitter is used to give live updates of the garbage bin status periodically every day. Garbage bin which is overflow or overload would result in an update of status in twitter and actions can be taken by the authorized personnel. Sharing the information to the public can increase the awarenessof public towards waste management and waste pollution. With this system, the administrator can monitor andschedule garbage collection more efficiently. This system would help to make the cities cleaner, improve environment hygiene and contribute to intelligent waste management.