Design internet of things for smart waste bin management with wemos based and firebase application

ABSTRACT


INTRODUCTION
The issue of waste poses a significant challenge for all segments of society, particularly in urban areas.The daily escalation of waste generation is closely linked to population growth and evolving lifestyles.This surge in waste production gives rise to various health concerns and environmental pollution.The accumulation of waste, particularly from households, is influenced by multiple factors, including the absence of direct monitoring by waste collectors.The waste collection process follows a routine schedule, leading to situations where collectors might arrive even when bins are not filled or fail to show up when bins are at capacity.This discrepancy arises from a lack of information about which bins require immediate attention.To safeguard public health and maintain a hygienic environment, there is a pressing need for efficient waste collection management.

METHOD
In this section, we will explain the general architecture, flowchart of design waste-bin hardware and software design.
Our Method smart waste-bin system: a.In the automatic trash can opening lid, when the proximity sensor HC-SR04 reacts to human hand movements, the sensor will send a signal to the Wemos microcontroller to drive the servo motor as the main mover for the trash can lid b.Every certain period of time the garbage pressing DC motor will move forward for a few seconds, then automatically moves in the opposite direction until it touches the limit switch which will send a signal to the Wemos microcontroller to stop the DC motor movement c.When the garbage is at full level, the HC-SR04 proximity sensor will send a signal to the wemos to provide notification to the android application with the help of the Firebase Webserver From figure 1 can be explained: a. Ultrasonic sensor HC-SR04.The PING HC-SR04 proximity sensor is a sensor that uses ultrasonic waves for the amount of distance you want to know.This sensor is capable of measuring object distances from 2 cm to 4 meters with an accuracy of 3mm.There are 4 pins to support them, including the vcc, Gnd, Trigger, and Echo pins.Vcc pin for positive electricity and Gnd for ground.Trigger pin to trigger the signal from the sensor and Echo pin to capture the reflected signal from objects.b.Sevro motor.A servo motor is a device or rotary actuator (motor) designed with a closed-loop (servo) feedback control system so that it can be set-up or adjusted to determine and ensure the angular position of the motor output shaft.A servo motor is a device consisting of a DC motor, a series of gears, a control circuit, and a potentiometer.A series of gears attached to the DC motor shaft will slow down the rotation of the shaft and increase the torque of the servo motor, while the potentiometer with the change in resistance when the motor rotates functions as a determinant of the angular position of the rotation of the servo motor shaft.The angle of the servo motor axis is adjusted based on the pulse width sent through the signal leg of the motor cable.The wider the OFF pulse, the greater the axis movement clockwise and the smaller the OFF pulse, the greater the axis movement in a counter-clockwise direction c.Wemos D1.Wemos is a board module that can function with Arduino, especially for projects that carry the IOT concept.Wemos can run stand-alone without the need to be connected to a microcontroller, in contrast to other wifi modules that still need a microcontroller as a controller or the brain of the circuit, Wemos can run stand-alone because there is already a CPU in it that can program via serial port or OTA and transfer programs wirelessly.d.DC motor.stationary part (stator) is where the field coil is placed which functions to produce magnetic flux, while the rotating part (rotor) is occupied by a series of anchors such as the anchor coil, commutator, and brush.Direct current motors work on the principle of the interaction between two magnetic fluxes.
Where the field coil will produce a magnetic flux in the direction from the North Pole to the South Pole and the anchor coil will produce a circular magnetic flux.The interaction between these two magnetic fluxes creates a force.
e. Arduini IDE.Arduino IDE software is a software used to create programs to give commands to Arduino.IDE itself stands for Integrated Development Environment or simply an integrated environment used for development.This software can be programmed using the C ++ language developed by Arduino.f.
MIT app inventor.This web application was originally developed by Google and is currently managed by the Massachusetts Institute of Technology (MIT).App Inventor is a drag/drop based tool and visual blocks programming for developing applications that run on the Android Operating System.Visual Blocks Programming features can transform the coding of a text-based programming language into a visual language in the form of program codes.MIT App Inventors are often chosen by those who want to create Android applications online and offline.g.Firebase.Firebase is a service for database storage created by Google.Firebase can make it easier for application developers to develop their applications so that applications created can have high quality and can generate more profits.With a variety of interesting features, Firebase is the right choice for users who are serious about developing their application.

Figure 2. Flowchart of design waste-bin
In figure 2, it can be explained that when the hand approaches a distance of <10 cm, the waste bin door will open and when the contents of the garbage <15 cm, the system will inform the firebase that the contents in the waste bin are full.

Hardware Design
The front view of the design has an ultrasonic sensor that will open the door to the trash if an obstacle is approaching. (1) (2) (3) The opening and closing of this trash can is designed to open and close itself without touching the trash can.This can be done by utilizing proximity sensors and servo motors as the driving components.When the user's hand approaches the sensor with a certain distance, this sensor will send a signal to the microcontroller to order the servo motor to move the trash can cover so that trash can be inserted through the existing hole.The design smart trash can is designed to do the compaction or pressing of trash automatically.This waste pressing system uses several components as its constituent, including stainless shafts, linear bearings, timing belts, timing pulleys, tooth idlers, dc and acrylic motors.Figure 7 is notification reader application from the smart trash can is made in such a way that it can work properly as desired.The blocks created have been adjusted to the program and system so that they can communicate with Wemos and Firebase As a central database that can be accessed in real-time, Firebase is used for IoT communication between the microcontroller and applications that have been created in figure 8.

RESULTS AND DISCUSSIONS
In this section, the test results will be presented, such as detection distance, Level of Waste Before Compaction, Waste Level After Compaction, and Display on Firebase.

Testing of Garbage Opening and Closing Circuits
This test is carried out by bringing objects closer to the ultrasonic sensor with a specified distance of 5 samples, including 5 cm, 10 cm, 15 cm, 20 cm and 25 cm.Then, record the results on the Arduino IDE Serial Monitor for each sample tested.After the compaction process is complete with various waste level samples, the following are the results of the testing on the automatic waste compactor system.Table 2 shows the percentage data of the success of this solid waste compaction system where the space in the trash will increase so that it is still possible to accommodate other waste.Thus, referring to the table, it can be seen that this system has succeeded in reducing the volume or level of waste by up to 45% on average.

Testing IoT Systems
The IoT system in this tool is with the sending of notifications from tools made through the Firebase webserver and the application on the delivery smartphone depending on the signal and the test results get information if the waste bin is fulL see in figure 12.

CONCLUSION
After going through various stages of design and testing, finally, with several reviews carried out on the existing system, it can be concluded that: (a) The opening and closing of the trash can work properly, indicating the servo is reacting to the ping proximity sensor which detects objects with a distance of ≤ 10 cm, (b) compaction has succeeded in reducing the waste level by up to 45% on average, thereby increasing the empty space in the bin, (c) The microcontroller successfully sends notifications to the Firebase Webserver and applications on the smartphone, so that users can periodically know the condition of the trash.

Figure 1 .
Figure 1.General architecture of smart waste bin

Figure 3 .
Figure 3. Waste Bin design (1) infront (2) inside component (3) Arduino part a.The Design of The Opening and Closing of The TrashThe opening and closing of this trash can is designed to open and close itself without touching the trash can.This can be done by utilizing proximity sensors and servo motors as the driving components.When the user's hand approaches the sensor with a certain distance, this sensor will send a signal to the microcontroller to order the servo motor to move the trash can cover so that trash can be inserted through the existing hole.

Figure 4 .
Figure 4. Door open and close b.Waste Compactor DesignThe design smart trash can is designed to do the compaction or pressing of trash automatically.This waste pressing system uses several components as its constituent, including stainless shafts, linear bearings, timing belts, timing pulleys, tooth idlers, dc and acrylic motors.

Figure 5 .
Figure 5. Waste compactorSoftware DesignThe software in this design consists of several parts, namely Application Design in the App Inventor, Database Design in Firebase and Programming on the Arduino IDE.

Figure 6 .
Figure 6.App inventor b.Programming on the Arduino IDEFigure7is notification reader application from the smart trash can is made in such a way that it can work properly as desired.The blocks created have been adjusted to the program and system so that they can communicate with Wemos and FirebaseAs a central database that can be accessed in real-time, Firebase is used for IoT communication between the microcontroller and applications that have been created in figure8.

Figure 10 .
Figure 10.Level of waste before compaction It can be seen that the level of waste before compaction is at the level of 20 cm.

Table 1 .
The maximum distance obtained is 10 cm.

Testing of the Garbage Compactor Circuit This
test is carried out to find out what percentage of waste compactors.

Table 2 .
Results of the solid waste compaction test