Trash Basket Sensor Notification Using Arduino with Android Application

ABSTRACT


INTRODUCTION
The Due to market saturation and intense competition, achieving success cannot be maintained by product portfolio and prices alone. Thus, telecom operators must search for other levels for positioning and differentiation. The Internet and its widespread adoption give users more independent, more flexible, and more demanding. Zooming in on product or service purchase and management, consumers freedom in deciding when and how to communicate with a company, or even whether to communicate with it at all, is growing. Depending on the geographical location and across all devices and channels, Real-time self-service is becoming an essential expectation.
Communication methods have been changed significantly within the last 20 years. Methods of receiving and displaying information have passed through a great revolution. The Internet origins belong to 1960s, and by reaching 1990s, the Internet usage was established in a wide range with a continuous growth of web access [1].
In the other hand, the mobile Internet accessing has increased significantly. There are 3.5 billion global mobile Internet users as at August 2017 [HostingFacts].
Mobile applications can load information that is available and necessary for doing and achieving the desired tasks. Minified functions and layouts can be introduced to a mobile application which may not be achievable on a mobile website. This will result in a faster loading and provide a more user-friendly approach to complete processes required [1].

PROBLEM DESCRIPTION
The problem of trash/waste is aggravating, which an impact effect us and the environment. As a result of our continued use of natural resources and continuous production of waste, the pollution in our world increases rapidly.
Garbage usually emits stench odours, and every normal person can recognize the stink. On a hot and humid summer day, meat or diapers omitted in the garbage can give a clear picture about the mischiefmaking powers of bacteria and microbes. Clarifying the reason for such smell is very simple, as it contains decaying, putrescible materials such as meat or vegetables or diapers. The decaying process attracts bacteria and fungus that feast on the amino acids in the meat's proteins. As microbes attack the vegetables' cell structure, it causes the rot of the vegetables. This slowly liquefies the vegetables, and the fermenting liquids warm up the garbage bag. The bag may rupture due to the increase of liquids and gases production. Although it sounds gross, this what a small garbage could do. Cleaning companies want to know when the garbage box is empty, half, or fully. Also, industrial factories want a method to know when the trash is full to avoid any problems.
As a result of a problem solving the Trash Sensor Android application focus on finding a solution for management of garbage companies to control trash levels through a notification system. The application focus on: a) Easy detect for trash level. b) Determine trash levels through a sensor at three points empty, half, and full. c) Receive a notification when a level came to its point. d) Control receiving notification. e) Using a suitable and comfortable interface. f) Founding a proper design methodology for database and application interface.

RELATED WORK
We live in a world full of goods and no wonder that the trash and recyclables are included. Regrettably, no one knows how it is managed or how it disappears. All this might change because researchers are focusing on the removable chain to economize landfill space. In addition, trash tracking is a big topic and has many research in many countries, mainly on designing and developing a smart trash management system to control garbage processing and trash detection [2]. Various studies have been conducting on comparing the different smart garbage systems [3]. However, we will introduce some of the related works in this field.
The location and reports data fed to the server via the cellular network is being measured periodically by the trash tag. The 1st generation of trash tags was a GSM-based cellular phone technology that estimates the tag position by measuring the signal strength from each cell tower in range of the device and comparing it to a map of cell phone towers. The accuracy of the location is not as good as GPS. However, it tends to be more durable as cellular signals can be picked up from inside buildings and within piles of trash. Without the necessity of having a sky view. The second generation of tracking tags used the best of both technologies; that is GPS and CDMA cell-tower trilateration based on Qualcomm's GPS One technology providing excellent accuracy and availability for position tracking applications [4].
These trends support the development of Smart City concepts, which are intended to improve living in urban areas by using innovative technologies. The "Internet of Things" provides new opportunities for making cities smarter. The internet of things (IOT) services was able to attract researchers in a various field, and waste management system has become one of the interested application of IOT services [5]. In AHER and et al. article, a trash management system based on IOT was discussed. It is a webpage based application to detect trash level and alert cleaning coordinator by SMS [6]. An intelligent web-based bin system for management of waste was presented by Kokila et al. it is an IoT based system integrated with (RFID), Sensors, Arduino, and GSM. The system keeps track of the bin status to manage bin cleaning strategies [4].
Shiju presented a smart alert structure for a common web server, which was implemented by using Arduino UNO with an ultrasonic sensor. The system detects the waste level of the dustbin and sends an alert in case it is filled to the common web server [7]. Another designed system based on Arduino Nano board with an ultrasonic sensor was proposed by Fadel. The system detects the level of the waste bin and sends SMS warning when it is full [8]. A smart system was built by Gayathri et al. to monitor hospitals garbage. The system using Arduino UNO with an ultrasonic sensor to alert the responsible authority when the dustbin is filled with garbage [9].
Hannan et al. designed a new approach to detect wastebin level using a Gabor wavelet filter as a feature extractor. RFID, GPS tracking, and a low-cost camera were integrated to develop a system that is capable of collecting solid waste efficiency [10]. Robot Trash Can is a smart trash can that is implemented by embedded algorithms of artificial intelligence. The can was designed to capture and clean up trash. In Padang Tunggal et al. paper, a pursuit algorithm based on fuzzy algorithm was presented to help the can in finding the shortest path to the destination point where the garbage exist [11].
Kalpana and Jayachitra proposed the use of a smartphone in designing an intelligent trash management system. Their design put the users in charge of informing the concerned authorities about the trash level by sending the information to the system server, and the concern authorities will take the appropriate action [12]. Suganya and et al. represented the same idea. However, the system uses UV Sensor combined with WIFI system [13]. Nevertheless, the implementation of smart trash system using smartphone application is the primary goal of this paper.

SYSTEM DESIGN 4.1. Software Design
The outputs should include a project plan that could form the basis of an application for research and development or other relevant funding. The programming language that is used in the application is explained as follows: a) Java for Android: a programming language to develop Android code. b) IDE (Integrated Development Environment): used to develop the Android Studio coding. c) MySQL 5.5: it is a database to store the data of the user. d) Toad for MySQL: it is an IDE that deals with the database; tables and relations creating. e) Java J2EE to enable us to develop APIs (Application programming interface) which used to send notifications. f) Eclipse IDE to enable us to develop our java APIs code. g) Tomcat application server to host our web application to handle APIs transactions.

Hardware Design
The Hardware design comprises three main components: a) Arduino Mega 2560: Arduino Mega 2560 is considered as microcontroller board which is based on Arduino ATmega2560. The board consists of 54 digital pins for input and output connections (the pulse width modulation uses 15 output pins, universal serial bus connection, reset button, 16 analog inputs, electrical connector and four universal asynchronous receivers and transmitters. It includes everything that will be needed for maintaining the microcontroller. By using a USB cable, the board can be easily connected to the computer or can be turned on by using external power source. Also, Arduino Mega 2560 is suitable to use for most of the Arduino shields. [7] b) ArduinoWifi Shield: The Arduino can be connected to the internet wirelessly by using the Arduino WIFI shield. It can be connected to any wireless network just by following some simple steps to control the world by using the internet. The Arduino software and hardware can be easily found due to its availability as an open source platform, which means that Arduino users can learn exactly about Arduino startup circuits design and how it can be connected. [14] The shield contains a pushbutton which is responsible for resetting the Arduino board and HDG204. The shield contains a mini USB port which is used for updating the AT32UC3 by using Atmel device firmware upgrade protocol. It also contains a programming jumper which is close to the power jack. On the other hand, Input pins must be unconnected for typical use; it can be only used in programming mode [15]. An FTDI connection provides serial communication with the 32U used for debugging purposes. Arduino WIFI shield was used with Arduino Mega 2560 to enable us to connect to the server to send a notification to users. c) Infrared Distance Sensor Type E18-D80NK: This is an Infrared Transmitter and receiver which together make up a photoelectric sensor. The sensor has a long detection distance and has less interference by visible light because it uses modulated Infrared light. The sensor contains an adjustable screwdriver that can set the measured distance. Then it gives a digital feedback when the sensor senses anything within the range. However, it cannot return a distance value.
As per the Trash Sensor Android Application, the grove infrared proximity sensor was used to detect the trash level and send a signal to the Arduino mega then to the server through the WIFI shield [14].  b) The sensor will send a signal to Arduino Mega 2560 with level detected (Empty, Half, and Full). c) Arduino Mega 2560 will connect to the internet by ArduinoWIFI Shield. d) Arduino WIFI shield will connect to the server and call web service to send a notification to all users. e) Trash Sensor Application will receive notification and save it in SQLite internal database.

System Result
The trash sensor application screens are designed to have a friendly user interface and clarity resolution view (see Figure 8 and 9). During the design, we follow some steps including:

Clarity (user-friendly) is job #1
Clarity (friendly user) can be classified as one of the most considerable jobs of any interface. Recognizing and knowing the interface job is very important to people because it helps them to understand what they are interacting with. Also predicting what may happen while using it which will help the user to interact with the interface successfully. While there is a mystery room in interfaces, a room for confusion will not exist, which will help the user to understand how to use the interface. It also e contains one hundred screen which makes it preferable to a single crowd and unclear screen.

Interfaces Exist to Enable Interaction
The interfaces job is to make humans and the world react and interact together as one part. It can bring people together and shows their relationships. Also, interfaces can manage people expectations to have more access to many types of services.

Conserve any attention
As we are living in an interrupted world, reading without being distracted is almost hard to be found.

Keeps the user in control
Users can be more comfortable, by making them feel that they have a full control of themselves and be able to control their own environment.

Direct Manipulation
The interfaces can help to manipulate and interact with physical objects since it is not possible to interact with them as they are more informational.
-Single primary action for each screen which gives every designed screen ability to support real value for the user. -Each primary action can contain multiple secondary. -It only shows the necessary items on each screen which allows the user to choose widely from a variety of information.
Trash sensor Android application home page contains two functions as shown in Figure 4. Notification Status (ON/OFF), and Notification Listing.
By clicking on the notification, the status will turn on/off receiving notification as shown in Figure 5 and 6.
By clicking on "Notification Listing" button, a list of received notification for current day will be loaded with details like Sent Date, Sent Time, and Trash Level.
By the end of the day, all notifications will be removed from the database as shown in Figure 7.

Data Flow Diagram
Creating data flow diagrams helps to clarify how data is being processed by any system in terms of inputs and outputs. Also, it focuses on the information flow and indicates the track of data in the system.  If user set receiving notifications to "ON" will start to receive notifications, otherwise, if he set to off will stopping to receive any notifications from trash sensor. All received notifications for current day will be displayed with received date and time.

SYSTEM IMPLEMENTATION, DIFFICULTIES, AND TESTING 5.1. System Implementation
All projects must go through a life cycle beginning with a feasibility study, system and business analysis (requirements), physical and logical design, running testing and verification, through the end point of the projecta successful and effective implementation, and, and the cycle will compete with the system maintenance and developments. However, we have two types of implementations: A. Hardware Implementation 1) Arduino Mega 2560 to be burned with code through Arduino IDE.
2) Arduino WIFI Shield to be integrated with Arduino Mega 2560 and configured to connect to WIFI network. 3) D-80 PIR Sensor to be connected and configured to Arduino 2560 input and output ports.
B. Software Implementation 1) Java API web service to be exported as WAR file and deployed on Tomcat server.
2) Android application to be exported from Android studio IDE as an APK file.
3) Install the application on Android device.

Difficulties
During the development of our project, we faced many difficulties in both hardware and software including -Determine which sensor will be suitable for our project's target.
-While writing our Arduino code, we faced a problem to send the trash level as a parameter in the API.
-Determine the level of the trash, while trashes fall down in the same trash box and cut the three sensors at the same time.
-Also, we take more time to set the Arduino baud rate. Finally, we know from Arduino datasheet to be set to 9600.

System Testing
The Trash Sensor Android mobile application has been tested on the Samsung Note4, and Sony Xperia mobile phones and it was running successfully with all functionalities well. There are no resolution issues, no performance problems, and no screen issues.

CONCLUSION
Trash Sensor Android application focus on finding a solution for waste management companies to control trash levels through a notification system. The following are the most distinctive features of the Trash Sensor application: 127 a) Trash sensor mobile application has the ability to introduce an online solution to detect the trash level. b) The application will send notifications to all users with the level indicator. c) The sensor will connect to an Arduino Wi-Fi shield to send a notification containing the trash level to all users. d) History for all received notification will be available for one day. e) The sensor will detect the trash levels at three points are empty, half, and full. f) The user can turn on/off receiving notifications.

FUTURE WORK
We finished to program, implement and design Trash sensor android application using an Arduino Mega 2560 and we have a future work which includes: a) Add track to each trash with its location by Google maps. b) Identified each trash with an identification number. c) Classified application to track trashes by the government like Hawaaly, Mubarak Al-AlKabeer, and Kuwait City. d) Work on adding administration to control on notifications and adding or removing trashes from the system. e) Work on adding rules and credentials by username and password for every user to be responsible for his location.