Iot Based Garbage Monitoring System
Iot Based Garbage Monitoring System
ARDUINO ”
A Minor Project Report
In partial fulfillment for the award of the degree
of
BACHELOR OF ENGINEERING
in
ELECTRONICS & COMMUNICATION ENGINEERING
Submitted to
RAJIV GANDHI PRODHYOGIKI VISHWVIDHYALAYA
by
STUDENT NAMES- Akshat Jain(0608EC181002)
Anubhav jain(0608EC181004)
Vandana Sahu(0608EC181025)
Rakhi Patel(0608EC181013)
Neelu saini(0608EC181011)
SAGAR (M.P.)
Jan-2021
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
AND TECHNOLOGY,
SAGAR (M.P)
DECLARATION
I declare that the project work entitled “IOT BASED GARBAGE MONITORING SYSTEM
USING ARDUINO” is my own work conducted under the supervision of Guide Name at
Babulal Tarabai Institute of Research and Technology, Sagar. I further declare that to the best of
my knowledge, this project report does not contain any part of any work which has been
submitted for the award of any degree either in this University or in any other University without
proper citation.
Student Name Enrollment No.
Date:
Place
2
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
TECHNOLOGY,
SAGAR (M.P)
CERTIFICATE
This is to certify that the “MINOR PROJECT REPORT” Submitted by AKSHAT JAIN
project work carried out by her under my supervision during the year 2020.
PRINCIPAL
3
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
AND TECHNOLOGY,
SAGAR (M.P)
ACKNOWLEDGEMENT
It gives me immense pleasure to express my deepest sense of gratitude and sincere thanks
to my highly respected and esteemed guide Ms Megha Soni HOD, Electronics &
Communication Department for their valuable guidance, encouragement and help for
completing this work. Their useful suggestions for this whole work and co-operative
behavior are sincerely acknowledged. I would like to express my sincere thank to Dr.
Sujit Singh (Principal, BTIRT, Sagar) and for giving me this opportunity to undertake
this project.
At the end I would like to express my sincere thanks to all my friends and others
who helped me directly or indirectly during this dissertation work.
4
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
Table of contents 6
Table of figures 6
List of tables 6
Introduction 7
Hardware Requirements 8
Design And Modelling 16
Implementation
System Testing 22
Conclusion 24
Experiment Results 25
References 25
6
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
1. INTRODUCTION
We are living in an age where tasks and systems are fusing together with the power of IOT to
have a more efficient system of working and to execute jobs quickly! With all the power at our
finger tips this is what we have come up with.The Internet of Things (IoT) shall be able to
incorporate transparently and seamlessly a large number of different systems, while providing
data for millions of people to use and capitalize. Building a general architecture for the IoT is
hence a very complex task, mainly because of the extremely large variety of devices, link layer
technologies, and services that may be involved in such a system. One of the main concerns
with our environment has been solid waste management which impacts the health and
environment of our society. The detection, monitoring and management of wastes is one of the
primary problems of the present era. The traditional way of manually monitoring the wastes in
waste bins is a cumbersome process and utilizes more human effort, time and cost which can
easily be avoided with our present technologies. This is our solution, a method in which waste
management is automated. This is our IoT Garbage Monitoring system, an innovative way that
will help to keep the cities clean and healthy.
Nowadays, there are tons of flats and apartments which have been built in the rapid urbanization
area. In order to accommodate the growing population in the urban area, the government has
also constructed more apartment complexes. There are several issues faced by the residents of
the flats. One of them is disposal of solid waste. Unlike private houses, the residents of all the
apartments use a common dustbin, which tends to fill up very quickly. This overflowing of
garbage is a sanitary issue which might cause many diseases . Moreover it is a waste of fuel to
travel around a complex or an area to find that some of the garbage are filled and some are not.
Also, on rare days, problems might arise that there is so much garbage that the truck doesn’t
have enough capacity. The idea struck us when we observed that the garbage truck use to go
around the town to collect solid waste twice a day. Although this system was thorough it was
very inefficient. For example let's say street A is a busy street and we see that the garbage fills
up really fast whereas maybe street B even after two days the bin isn't even half full.
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
What our system does is it gives a real time indicator of the garbage level in a trashcan at any
given time. Using that data we can then optimize waste collection routes and ultimately reduce
fuel consumption. It allows trash collectors to plan their daily/weekly pick up schedule. An
Ultrasonic Sensor is used for detecting whether the trash can is filled with garbage or not.
Here Ultrasonic Sensor is installed at the top of Trash Can and will measure the distance of
garbage from the top of Trash can and we can set a threshold value according to the size of
trash can.
If the distance will be less than this threshold value, means that the Trash can is full of garbage
and we will print the message “Basket is Full” on the message and if the distance will be more
than this threshold value, then we will print the distance remaining for the garbage vat to be full.
2. HARDWARE REQUIREMENTS
We have used the following hardware to accomplish our project.
1. HC-SR04 ultrasonic sensor.
2. Arduino Uno.
3. GSM module
4. Connecting wires.
8
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
• The Arduino platform has become quite popular with people just starting out with
electronics, and for good reason. Unlike most previous programmable circuit
boards, the Arduino does not need a separate piece of hardware (called a
programmer) in order to load new code onto the board – you can simply use a
USB cable. Additionally, the Arduino IDE uses a simplified version of C++,
making it easier to learn to program. Finally, Arduino provides a standard form
factor that breaks out the functions of the micro-controller into a more accessible
package. The Arduino is a microcontroller board based on the ATmega8. It has
14 digital -input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a16 MHz ceramic resonator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it
with a ACto-DC adapter or battery to get started .The Uno differs from all
preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed
as a USB-to-serial converter .Revision 2 of the Uno board has a resistor pulling
the 8U2HWB line to ground, making it easier to put into DFU mode. Revision of
the board has the following new features:
• Pin out: added SDA and SCL pins that are near to the AREF pin and two other
new pins placed near to the RESET pin, the IOREF that allow the shields to adapt
to the voltage provided from the board. In future, shields will be compatible with
both the board that uses the AVR, which operates with 5V and with the Arduino
Due that operates with 3.3V. The second one is a not connected pin that is
reserved for future purposes.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino
platform.
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16MHz
Length 68.6 mm
Width 53.4 mm
Weight 53gm
Table 1. Specifications of Arduino
10
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
HC-SR04 is an ultrasonic sensor which is used for measuring the distance between the
top of the lid to the top of the garbage.
3. Echo Echo pin is an Output pin. This pin goes high for aperiod
of time which will be equal to the time taken for the US
wave to return back to the sensor.
The HC-SR04 Ultrasonic (US) sensor is a 4 pin module, whose pin names are Vcc, Trigger,
Echo and Ground respectively. This sensor is a very popular sensor used in many applications
where measuring distance or sensing objects are required. The module has two eyes like projects
in the front which forms the Ultrasonic transmitter and Receiver. The sensor works with the
simple high school formula that
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when it gets
objected by any material it gets reflected back toward the sensor this reflected wave is observed
by the Ultrasonic receiver module.Now, to calculate the distance using the above formulae, we
should know the Speed and time. Since we are using the Ultrasonic wave we know the universal
speed of US wave at room conditions which is 330m/s. The circuitry inbuilt on the module will
calculate the time taken for the US wave to come back and turns on the echo pin high for that
same particular amount of time, this way we can also know the time taken. Now simply calculate
the distance using a microcontroller or microprocessor.
12
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
The MODEM needs AT commands, for interacting with processor or controller, which are
controller/processor. The MODEM sends back a result after it receives a command. Different
A GSM modem is a wireless modem that works with a GSM wireless network. A wireless
modem behaves like a dial-up modem. The main difference between them is that a dial-up
modem sends and receives data through a fixed telephone line while a wireless modem sends
and receives data through radio waves.
A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external
PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into
one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM mobile phone, a
GSM modem requires a SIM card from a wireless carrier in order to operate.
2.4.DHT11 sensor:
DHT11 is a Humidity and Temperature Sensor, which generates calibrated digital output.
DHT11 can be interface with any microcontroller like Arduino, Raspberry Pi, etc. and get
instantaneous results. DHT11 is a low cost humidity and temperature sensor which provides
high reliability and long term stability. The DHT11 Humidity and Temperature Sensor consists
of 3 main components. A resistive type humidity sensor, an NTC (negative temperature
coefficient) thermistor (to measure the temperature) and an 8-bit microcontroller, which
converts the analog signals from both the sensors and sends out single digital signal. This digital
signal can be read by any microcontroller or microprocessor for further analysis.DHT11
Humidity Sensor consists of 4 pins: VCC, Data Out, Not Connected (NC) and GND. The range
of voltage for VCC pin is 3.5V to 5.5V. A 5V supply would do fine. The data from the Data
Out pin is a serial digital data. DHT11 Sensor can measure a humidity value in the range of 20
– 90% of Relative Humidity (RH) and a temperature in the range of 0 – 500C. The sampling
period of the sensor is 1 second.
All the DHT11 Sensors are accurately calibrated in the laboratory and the results are stored in
the memory. A single wire communication can be established between any microcontroller like
Arduino and the DHT11 Sensor. Also, the length of the cable can be as long as 20 meters. The
data from the sensor consists of integral and decimal parts for both Relative Humidity (RH) and
temperature.
14
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
NodeMCU is an open source IoT platform. It includes firmware which runs on the
ESP8266WiFi SoC from Espressif Systems, and hardware which is based on the ESP-12
module. The term "NodeMCU" by default refers to the firmware rather than the development
kits. The firmware uses the Lua scripting language. It is based on the eLua project, and built on
the Espress-if NonOS SDK for ESP8266. It uses many open source projects, such as lua-cjson,
and spiffs.
Node MCU provides a way to connect different sensors to their controllers wirelessly via wifi.
Since, it is an improved version of the ESP8266 it has better and easier programming, with
better voltage stability and more reliability.
In this project we put the ultrasonic sensor on top of the garbage bin/ dump. The output of the
ultrasonic sensor is processed by the Arduino and the output is then sent to the GSM module which
sends a text message to the concerned person. We have a threshold value of 5cm.Which means that
if the distance of the sensor from the top of the garbage is less than 5cm, the output will come with
a message that the basket is full. Also, a buzzer will ring if output is less than 5cm. The DHT11
sensor will show the temperature and the humidity.
Figure 8:
project diagram
9
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
Figure 10: circuit diagram of node MCU with DHT11 and HCSR04
#include <SoftwareSerial.h>
#include <DHT.h>
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
#define DHTPIN 2
SoftwareSerialmySerial(9, 10);
inttrigPin = 12; constintechoPin =
11; intchk; float hum; //Stores
humidity value
delay(100);
}
void loop() { // Clears the
trigPin digitalWrite(trigPin,
LOW);
delayMicroseconds(2);
18
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
delay(1000); Serial.print("Distance:
");
Serial.println(distance);
Serial.print(" cm");
hum = dht.readHumidity();
temp= dht.readTemperature();
delay(2000);
}
}
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and the likes
over the Internet.It's a digital dashboard where you can build a graphic interface for your project
by simply dragging and dropping widgets.Blynk is not tied to some specific board or shield.
Instead, it's supporting hardware of your choice. Whether your Arduino or Raspberry Pi is
linked to the Internet over Wi-Fi, Ethernet or this new ESP8266 chip, Blynk will get you online
and ready for the Internet Of Your Things. Blynk was designed for the Internet of Things. It can
control hardware remotely, it can display sensor data, it can store data, visualize it and do many
other cool things.
There are three major components in the platform:
• Blynk App - allows to you create amazing interfaces for your projects using various
widgets we provide.
• Blynk Server - responsible for all the communications between the smart phone and
hardware. You can use our Blynk Cloud or run your private Blynk server locally. It’s
open-source, could easily handle thousands of devices and can even be launched on a
Raspberry Pi.
• Blynk Libraries - for all the popular hardware platforms - enable communication with
the server and process all the incoming and out coming commands.
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "DHT.h" // including the library of DHT11 temperature and humidity sensor
#include <SimpleTimer.h> //including the library of SimpleTimer
#define DHTTYPE DHT11 // DHT 11
#define dht_dpin 14
DHT dht(dht_dpin, DHTTYPE); SimpleTimer timer; charauth[] = "Your Auth.
Key"; // You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
20
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
charssid[] = "Your Wifi Network name"; // Your WiFi credentials. char pass[] =
"Password of your network"; // Set password to "" for open networks. float t;
// Declare the variables float h;
void setup()
{
Serial.begin(9600);// Debug console
Blynk.begin(auth, ssid, pass);
dht.begin();
timer.setInterval(2000, sendUptime);
}
voidsendUptime()
{
void loop() {
Blynk.run();
timer.run();
}
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
Figure 11: screenshot of output in Blynk Figure 12: circuit of hcsr04 with NodeMCU
5.SYSTEM TESTING
5.1 Test approach
We will test the project in two stages: software and hardware. The software part is to be tested via
the Arduino IDE, whereas the hardware part has to be tested physically. It is necessary to check
whether the system is working properly or not. To check whether the readings are accurate, we will
check the distance pointed out by the sensor by a meter tape.
• The ultrasonic sensor should give proper output. To check whether the output is accurate or
not, the output of the sensor will be checked against a meter tape.
• The arduino board should show the distance in the serial monitor. So should the NodeMCU.
• The GSM module should send messages after the specified delay. If the text messages are
reaching the phone, that means the GSM module is working. It should make a small ringing
sound, when it sends messages.
• The DHT11 sensor should work properly and show its output in the serial monitor.
• The blynk app should be checked.
22
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
The NodeMCU should connect to the Blynk app and the app should show the output. For this
,theNodeMCU must connect first to the wifi hotspot.
2. We can also power these circuits via two 9v batteries using a circuit divider.Distance,
The distance will be the input of the Arduino circuit and will be gotten from the
ultrasonic sensor.
For testing first connect the circuit to the power supply is given to the Arduino using computer
and it can be done by using battery. In this way the whole testing circuit is built. Now we give
input to the HC-SR04 by changing the level of solid garbage.. Change in garbage levels should be
messaged using GSM Module.
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
6. CONCLUSION.
We built an efficient garbage monitoring system which can be used to monitor the level of
garbage in the dump. This data can be further used to plan garbage collection trips more
efficiently, ultimately reducing overflowing bins and helping have better public sanitation.
Advantages:
• Very simple circuit.
• The HCSR04 sensor is very rugged.
• Helps monitor garbage levels.
• Uses very small amount of electricity.
• Ultimately helps in better planning of garbage pickups.
• Can help in reducing overflowing bins.
• Reduces trips to areas where the bins still have a lot of capacity.
Disadvantages:
• Cannot detect liquid waste.
• Only detects the top of the garbage level. It wouldn’t realize if there is space left.
• GSM module needs a 12v source.
The output of this project should have been the values of the distance, temperature and
humidity, which we were supposed to get via a text message. For, the GSM Module to send
data, the sensors must be working perfectly which can be seen in figure 13. This brings us to
figure 14 in which we see the text messages sent from the GSM Module. Also, the output in
Blynk app is shown in figure 11, which shows the real time data on the app, via WIFI.
REFERENCES
24
IOT BASED GARBAGE MONITORING SYSTEM USING ARDUINO
• Navghane S S, Killedar M S and Rohokale D V 2016 IoT Based Smart Garbage and
waste collection, International Journal of Advanced Research in Electronics And
Communication.
• Monika K A, Rao N, Prapulla S B and Shobha G 2016 Smart Dustbin-An
EfficientGarbage Monitoring System International Journal of Engineering Science
andComputing 6 7113-16.
• Medvedev A, Fedchenkov P, Zaslavsky A, Anagnostopoulos T and Khoruzhnikov
S,2015 Waste management as an IoT-enabled service in smart cities In Conference on
Smart Spaces Springer International Publishing 104-15.
• www.buildofy.in/smart_home_designs
• https://create.arduino.cc/projecthub/Technovation/smart-garbage-monitoring-
systemusing-arduino-101-3b813c
• https://github.com/sourabhdeshmukh/Smart-Dustbin
• http://invent.module143.com/temperature-and-humidity-using-nodemcu-blynk/
• http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-
basics/whatis-virtual-pins
• http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-
basics/howto-display-any-sensor-data-in-blynk-app
• http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/esp8266/nodemcu