100% found this document useful (1 vote)
181 views26 pages

Alaa Hasan Saad - Smart Dustbin Report

The document describes a smart dustbin system that uses ultrasonic sensors and a NodeMCU ESP8266 microcontroller. The system has two parts: 1) Automatically opening the dustbin lid when a person is detected, to limit physical contact during COVID-19. 2) Alerting staff when the dustbin is nearly full to prevent overflow. The system was tested and functioned properly but had some issues accurately detecting waste levels at times. The document provides background on the need for improved waste management in urban areas and introduces the smart dustbin as a solution.

Uploaded by

Aalaa Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
181 views26 pages

Alaa Hasan Saad - Smart Dustbin Report

The document describes a smart dustbin system that uses ultrasonic sensors and a NodeMCU ESP8266 microcontroller. The system has two parts: 1) Automatically opening the dustbin lid when a person is detected, to limit physical contact during COVID-19. 2) Alerting staff when the dustbin is nearly full to prevent overflow. The system was tested and functioned properly but had some issues accurately detecting waste levels at times. The document provides background on the need for improved waste management in urban areas and introduces the smart dustbin as a solution.

Uploaded by

Aalaa Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Tishk International university

Faculty of Engineering
Computer Engineering Department

“ Smart Dustbin Report ”

Course Name: Computer Networks l.


Course Code: CMPE 354.
Student name: Alaa Hasan Saad.
Class : 3rd grade.
Submission Date: 10 / 12 / 2021.
Table of Contents

• 1.Abstract  

• 2. Introduction  

1.1 Scope of Project ....................................................................................... 4

2.2 Problem Statement ...................................................................................... 5

2.3 Objective ...................................................................................................... 6

• 3. Background  

3.1Equipments................................................................................................... 7

• 4. Methodology  

• 5. Set up and Implementation  

5.1 Hardware Part .......................................................................................... 14

5.2 Software Part............................................................................................. 18

• 6. FUTURE ENHANCEMENT  

• 7. Conclusion and Result  

• 8. References  

• 9. Appendix 

1
Table Of Figures

Figure 1: Basic Block Diagram ............................................................................ 10

Figure 2: Circuit Diagram .................................................................................... 10

Figure 3: The Circuit Diagram for the first part.................................................... 15

Figure 4: circuit diagram for second part.............................................................. 16

Figure 5:The cycle of the first part of the dustbin ................................................. 18

Figure 6: The Cycle of the second part of the dustbin. ......................................... 19

Figure 7:The dustbin lid is open after the detection of waste ................................ 19

Figure 8: indicates the dustbin is empty or contains low level of waste ............. 20

Figure 9: this indicates the dustbin is half full but still more waste can be added

inside it. ............................................................................................................... 20

Figure 10: this indicates that the dustbin is full, and no more waste can be added

inside the dustbin ................................................................................................. 21

Figure 11: Concept of Smart Waste Monitoring System ...................................... 22

2
1.Abstract

❖ With a development of technology , two components of hardware (Ultrasonic

Sensor and NodeMCU ESP8266 ) have been used in smart dustbin system which

can detect level the of the trash that inside the dustbin and can automatically open

the lid when it detects the people who want to throw out their trash.

❖ The smart waste management system consists of two parts:

I. Part One: It is the automatic opening of a dustbin when there is something

close to it like a human hand, and this part is very important at this time due

to the prevalence of COVID-19. World Health Organization (WHO) declared

that one of the means of spreading the corona virus is physical contact, and

this part of the system limits physical contact to prevent the spread of the

disease.

II. Part Two: which alarms and tells the approved individual when the garbage

bin is about to be filled, preventing dustbin overflow. By reducing garbage bin

overflow, this device can aid in keeping the area safe and sanitary.

❖ This system has been tested, and it was properly functioning but some defects in

readings the garbage level was detected attributed to little delay in sensing the

reflected waves which lead to a reading ‘ zero’ despite the garbage presence.

3
2. Introduction

❖ In today’s age as the population is increasing day by day, in many towns,

unhygienic environment resulted due to the overflowed bins which further

increases different types of unknown illnesses and degrades the standard of

living. One of the main issues in the urban cities is waste management thus , as

the pace of the urbanization is growing rapidly hence it is essential to have

supportable development plans. Smart cities success cannot be done without a

smart waste management system, implementation of the smart dustbin is

therefore major requirement for eliminating this problem or at least bring this

issue to minimum point.

1.1 Scope of Project

• In this project is to design and build a dustbin that can automatically open the

lid when it detects the people who want to throw out their trash.

• It also can detect the level of the trash that inside the dustbin.

• If the dustbin is full of trash at the certain level, the lid will not open even when

there are people who want to throw out their trash.

• Dustbins are provided with a sensor which helps in tracking the level of the

garbage bins and a unique ID will be provided for every dustbin in the city so

that it is easy to identify which garbage bin is full.[2]

4
2.2 Problem Statement

• There are millions of public dustbins out there that people use and are emptied

in a few days by the public authorities.

• Now the problem is not all dustbins are filled at the same rate and the dump

vehicle waste time checking each and every dustbin.

• This leads to more fuel usage, labor, and cost. The solution is a smart dustbin.

• IOT of smart dustbin can solve this issue by tracking the amount of garbage

inside the bins and thus can be easily geotagged and the dump vehicle can plan

its path around the city in a more optimized way to save time and fuel cost.

• The dump vehicle can decide which smart dustbins to clear first and whom to

clear next time.

• The project involved an Arduino Uno with ESP8266 to talk to the internet and

an Ultrasonic sensor to measure the depth of the garbage in the smart dustbin.

• The system updates the server every 3 seconds, and the user can track the

quantity of garbage in the bins.[3]

5
2.3 Objective

• The main objective is to maintain the level of cleanliness in the city and form an

environment which is better for living.

• By using this system, constantly check the level of the garbage in the dustbins

which are placed in various parts of the city. If particular dustbin has reached

the maximum level, then the employees can be informed, and they can

immediately take certain actions to empty it as soon as possible.

• The employees can check the status of these bins anytime on their mobile

phones. This can prove to be a very useful system if used properly.

• The system can be used as a benchmark by the people who are willing to take

one step further for increasing the cleanliness in their urban areas.[4]

6
3. Background

3.1Equipments

1. Arduino Uno: is the brain of SDN and is responsible for transmitting all
the signals from the code fed into it and
also collects feedback from the ultrasonic
sensor to process the values. Arduino
Uno is a microcontroller board based on
the ATmega328P. It has 14 digital
input/output pins (of which 6 can be used
as PWM outputs), 6 analog inputs, a 16
MHz quartz crystal, a USB
connection, a power jack, an ICSP header and a reset button. It also processes
the signal exchange between the Bluetooth receiver and the android
application.
2. Ultrasonic sensor: provides precise distance values of the obstacles thus
facilitating varied application requirements. It uses a sound transmitter and a
receiver. Sound transmitter generates
an ultrasonic pulse also called ‘ping’
and then detects the reflections from
the obstacles. The pulse is
electronically created using a sonar
projector which consists of a signal
generator, power amplifier and
electro-acoustic transducer. SDN uses two independent HC-SR04 ultrasonic
sensors for garbage level detection and proximity sensing.[5]

7
3. Servo motor: allows precise angular movement of
the automatic lid incorporated in SDN. Servo used is
SG 90 model with operating voltage of 4.8V and stall
torque of 1.8 kgf.cm. It is customizable to control the
amount of lid opening according to particular needs. [5]

4. Breadboard: is a solderless device for temporary


prototype with electronics and test circuit designs.
Most electronic components in electronic circuits can
be interconnected by inserting their leads or terminals
into the holes and then making connections through
wires where appropriate.[6]

5. NodeMCU ESP8266: is an open-source


Lua based firmware and development board
specially targeted for IoT based
Applications. It includes firmware that runs
on the ESP8266 Wi-Fi SoC from Espresso
Systems, and hardware which is based on the
ESP-12 module. [5]
6. Micro USB: is a miniaturized version of the
USB (Universal Serial Bus) interface
developed for connecting compact and mobile
devices such as your smartphones, MP3
players, GPS devices, photo printers, and
digital cameras.[7]

8
7. Jumper wires: are simply wires that have
connector pins at each end, allowing them to be
used to connect two points to each other without
soldering. Jumper wires are typically used with
breadboards and other prototyping tools in order to
make it easy to change a circuit as needed.[8]

8. Battery Connector: The connector is a device


that joins electric circuits together. Most battery
packs require more than one connector. The main
battery connector is both the mechanical and
electrical part that interfaces the battery to the
PDA or other electronic device.

9. The 9-volt battery: is a common size of battery that


was introduced for the early transistor radios. It has a
rectangular prism shape with rounded edges and a
polarized snap connector at the top. This type is
commonly used in smoke detectors, gas detectors, clocks,
walkie-talkies, electric guitars, and effects units.[9]

10. Dustbin: is a large container with a lid which


people put their rubbish in, and which is usually kept
outside their house.

9
4. Methodology

• The proposed method for this smart dustbin is use of Wi-Fi module which is

more beneficious than using GSM module.

Figure 1 Basic Block Diagram

Figure 2 Circuit Diagram

10
• The hardware components used in this method are Arduino UNO,

NODEMCU, Ultrasonic sensor, Servo Motor.

➢ Now I am going to see each and every hardware component in detail.

• Arduino UNO: It is a microcontroller board which has fourteen digital

input/output pins, six analog inputs, USB connection, power jack, 16MHz

quartz crystal, ICSP header, and a reset button.

• The components such as Servo Motor and Ultrasonic Sensor are connected to

this board and the first part code is dumped into this board. After the dumping

of the code, the sensors start working according to the code written.

• When the sensors do not work as expected then the reset button should be

pressed so that the code and the microcontroller restart and the sensors

start working.

• NodeMCU: is an open source IoT platform. This is used for making the

things work using Wi-Fi. This board includes firmware which runs on

ESP8266 Wi-Fi SoC Express Systems and the hardware is based on ESP-12

module. The second ultrasonic sensor is connected to this board and the second

part code is dumped into this board. Before dumping the code, in the Arduino

IDE the correct board should be selected. This uses many open-source

projects such as lua-cjson and SPIFFS.

11
• Ultrasonic Sensor: is an instrument which measures the distance to the

waste using ultrasonic sound waves. It has a transducer that helps to send and

receive ultrasonic pulses based on the object’s proximity. It detects the objects

and the waste materials.

• Servo Motor: helps in opening the lid of the dustbin. The Arduino is

programmed in such a way that after detecting the waste using ultrasonic

sensor the lid should open automatically and this is done using this servo

motor.

❖ The software requirements for this project are Arduino IDE and

Blynk app.

• Arduino IDE: The Arduino Integrated Development Environment is a cross

platform application that is used to upload programs into Arduino Compatible

boards. The Arduino IDE supports C and C++ using special rules of code

structuring.

• The Arduino IDE employs the program AVRDUDE to convert the

executable code into a text file in hexadecimal encoding that is loaded into the

Arduino Board by a loader program in the board’s firmware.

12
• This IDE when selected opens a default sketch

file where the part of the code is divided into two

parts the void setup ( ) and the void loop ( ).

Above these two statements the header files and

the variable declarations should be done so that

the actual code logic and be mentioned in those

methods.

• The setup method has the different variables that are needed to perform

the specific operation and the loop method consists of the actual logic code.

• After the code has been written it should be verified and should be

compatible to the board that the code needs to be uploaded.

• Blynk App: Blynk is a Platform with IOS and

Android apps to control Arduino, Raspberry Pi,

and the likes over the Internet.

• It is a digital dashboard where you can build a

graphic interface for your project by simply dragging and dropping widgets.

13
5. Set up and Implementation

5.1 Hardware Part

• The prototype is constructed as follows: Taking a plastic

container or a dustbin, placing an ultrasonic sensor at the front part of the

dustbin. As shown in the figure below:

• The lid of the dustbin is taken, and a servo motor is placed on the lid.

• Another ultrasonic sensor is placed inside the dustbin.


14
• The code of this project is divided into two parts. The first part code

indicates the working of the dustbin i.e. mainly opening the lid of the

dustbin. The second part code indicates the notification part which is received

on the mobile using the Blynk app.

• The first part is constructed as follows: The ultrasonic sensor placed at the

front part has four pins named Vcc, GND, ECHO and TRIG. The pin

TRIG, pin ECHO is connected to digital pin numbers two and three on the

Arduino Board. As shown in the circuit diagram below:

Figure 3 The Circuit Diagram for the first part.

15
• The servo motor has three pins named Vcc, GND, and servo pin. The servo

pin of Servo motor is connected to digital pin number nine on the Arduino

board. The Vcc of ultrasonic sensor is connected to 5V of Arduino board and

the Vcc of servo motor is connected to 3.3V of Arduino board. The GND

pins are connected to ground on the Arduino board.

Figure 4 circuit diagram for second part

• After the connections are made, the Arduino is connected to the system and

using the Arduino IDE the code is dumped inside the Arduino. This ends

the connection and code dump for the first part.

16
• The second part is constructed as follows: The ultrasonic sensor which is

placed inside the dustbin also has the same four pins named Vcc, GND, ECHO

and TRIG.

• In the Arduino IDE the board has to be changed from Arduino UNO to

NodeMCU, if the board is not available in the list, then we need to install the

board from the Boards Manager.

• In this part the TRIG and ECHO pins of ultrasonic sensor is connected to

digital pins D5 and D6 of NodeMCU.

• The Vcc is connected to Vin of NodeMCU and GND to ground of NodeMCU.

• This is the connection that is required and now the code should be

dumped into NodeMCU.

17
5.2 Software Part

• The waste is first placed in front of the ultrasonic sensor. The sensor detects the

waste and makes the lid of the dustbin to open, and the waste is disposed

inside the dustbin. This process repeats and goes on like a cycle.

Figure 5.The cycle of the first part of the dustbin

• Now the waste is collected inside the bin. The NodeMCU is connected to a

Wi-Fi hotspot or a connection that is known by giving its SSID and

PASSWORD which are required to connect to a particular network

connection. The ultrasonic sensor detects the level of distance of waste inside

the bin and is indicated through Distance label in the Blynk app. The

Distance label indication happens in real time and also very fast.

18
Figure 6. The Cycle of the second part of the dustbin.

❖ ANALYSIS: After observing the working of the prototype, the analysis or the

outputs that can be seen are as follows:

➢ In the fig 7, the lid of the dustbin is automatically open when waste is placed
on the front part of the dustbin.

Figure 7 The dustbin lid is open after the detection of waste

19
➢ In the fig 8 the screenshot is shown the value of the
label it is 31.5 cm , this indicates the dustbin is empty

or contains low level of waste and more waste can be

added inside it. This will remain as it is when the level

of the waste dose not increases.

Figure 8 indicates the dustbin is


empty or contains low level of waste

➢ the fig 9, the screenshot is shown the value of the


label it is 16.81 cm , this indicates the dustbin is half

full but still more waste can be added inside it.

Figure 9 this indicates the dustbin


is half full but still more waste can
be added inside it.

20
➢ when the employees receive a notification as show in the fig 10 , this indicates
that the dustbin is full and the waste from the dustbin is needed to be emptied

in it and no more waste can be added inside the dustbin.

➢ More information about the code can be found at Appendix section.

Figure 10 this indicates that the dustbin is full, and no more waste can be added inside the dustbin

21
6. FUTURE ENHANCEMENT

❖ There can be many enhancements done for this prototype which can be a

revolutionary change in maintaining our environment clean and healthy.

❖ The few enhancements can be done are: The implementation of more

collective bins placed side by side where it automatically detects the type and

waste and places in the correct bin color which is assigned for that type.

❖ These dustbins can be placed with a GPS tracker where the dustbins in a

particular locality can be located easily and the waste can be emptied.

❖ This method can lead to Smart Waste Monitoring System. [5]

Figure 11 Concept of Smart Waste Monitoring System

22
7. Conclusion and Result

• The main aim of this project is to reduce human resources and efforts along

with the enhancement of a smart city vision.

• I have often seen garbage spilling over from dustbins on to streets and this was

an issue that required immediate attention.

• The proverb “Cleanliness is next to god and clean city is next to heaven”

inspired me to conceptualize the project.

• Smart dustbin helps us to reduce the pollution. Many times, garbage dustbin is

overflow and many animals like dog or rat enters inside or near the dustbin.

This creates a bad scene. Also, some birds are also trying to take out garbage

from dustbin.

• This project can avoid such situations. And the message can be sent directly to

the cleaning vehicle instead of the contractor’s office.

• In this system, the Smart dustbins are connected to the internet to get the real

time information of the smart dustbins.

• In the recent years, there was a rapid growth in population which leads to more

waste disposal. So, a proper waste management system is necessary to avoid

spreading some deadly diseases.[4]

23
8. References

[1] Kavya Shree ,“IOT BASED WASTE MANAGEMENT USING SMART DUSTBIN ”
http://www.kscst.iisc.ernet.in/spp/40_series/SPP40S/01_Seminar%20Projects/053_40S_BE_
2142.pdf [Accessed 24 – Nov – 2021].
[2] Anitha Shankar. “Smart Garbage Monitoring System Using Internet of Things (IOT)”.
“instructables circuits ”. https://www.instructables.com/Smart-Garbage-Monitoring-
System-Using-Internet-of-/ [Accessed 24 – Nov – 2021].
[3] Arnab Das Ban .“IOT Smart Dustbin using Arduino Nano and ESP8266”. “Arnab
Kumar Das” https://www.arnabkumardas.com/diy-project/iot-smart-
dustbin/#:~:text=PROBLEM%20STATEMENT%20for%20Smart%20Dustbin&text=Now
%20the%20problem%20is%20not,fuel%20usage%2C%20labour%20and%20cost.
[Accessed 24 – Nov – 2021].
[4] Mamta Pandey. “ULTRASONIC DISTANCE SENSOR”, “All Electronics”
https://www.allelectronics.com/item/ust-4/ultrasonic-distance-sensor/1.html
[Accessed 24 – Nov – 2021].
[5] Telugu Mediety ,“Iot Based Smart Dustbin”. “Research Gate”.
https://www.researchgate.net/publication/339301914_Iot_Based_Smart_Dustbin
[Accessed 24 – Nov – 2021].
[6] Max Eddy ,“Breadboard”,“PCMag”
https://www.pcmag.com/encyclopedia/term/breadboard#:~:text=A%20thin%20plastic%20
board%20used,be%20reused%20for%20future%20jobs.&text=See%20printed%20circuit
%20board. [Accessed 24 – Nov – 2021].
[7] TechTarget Contributor , “micro-USB” , “WhatIs.com”
https://whatis.techtarget.com/definition/micro-
USB#:~:text=Micro%20USB%20is%20a%20miniaturized,photo%20printers%20and%20
digital%20cameras.&text=Like%20standard%20USB%2C%20the%20micro,-
play%20and%20hot-swappable. [Accessed 26 – Nov – 2021].
[8] MEGAN HEMMINGS , “What is a Jumper Wire” , “ Spark Fun Education’’
http://blog.sparkfuneducation.com/what-is-jumper-
wire#:~:text=Jumper%20wires%20are%20simply%20wires,Fairly%20simple.

[9] Ahsan Qureshi . “Nine-volt battery” , “Wikipedia” https://en.wikipedia.org/wiki/Nine-


volt_battery [Accessed 26 – Nov – 2021].

24
9. Appendix

❖ Attached below Arduino Code using C Programming Language.

25

You might also like