Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 28

Acknowledgement

We are grateful to project guide Asso.Prof. P.K Jain who laid the time bound
program for the successful completion of the project. He initiated our thoughts
and extended timely suggestions and for his technical support and valuable
suggestions for which we are deeply indebted to him. We are grateful to him for
his comments and insights in the preparation of this report without which this
report would not have been completed.

We thank sincerely and profusely to all the staff members of our department of
our institute for their valuable help and guidance.

We also express our gratitude to the institute management to all those who have
indirectly helped us in successful completion of the project. Last but not the
least, we are deeply indebted to our parents for what we are today, because this
project report would not have a reality without their love and support.

Yours Sincerely

Chaitanya Kaskar

Jitendra Kumar Jat


INDEX

* Introduction

* Review

* Hardware description

:- List of components

:- Component description

1. Ultrasonic Sensor module


2. Arduino Uno Board
3. 6V Battery

* Project Working

* Software Description

* Problem Definition

* Result

* Conclusion and Future work


Introduction

This project IOT Garbage Monitoring system is a very innovative system which
will help to keep the cities clean. This system monitors the garbage bins and
informs about the level of garbage collected in the garbage bins via an app. For
this the system uses ultrasonic sensors placed over the bins to detect the
garbage level and compare it with the garbage bins depth. The system makes
use of AVR family microcontroller.The system is powered by a 6V Battery.
The Application is used to display the status of the level of garbage collected in
the bins. Whereas it show the status to the user monitoring it.It gives a graphical
view of the garbage bins and highlights the garbage collected in color in order
to show the level of garbage collected. The system uses messaging,when the
level of garbage collected crosses the set limit.Thus this system helps to keep
the city clean by informing about the garbage levels of the bins by providing
graphical image of the bins via IOT platform.
Review

India faces major environmental challenges associated with waste generation


and inadequate waste collection, transport, treatment and disposal. Current
systems in India cannot cope with the volumes of waste generated by an
increasing urban population, and this impacts on the environment and public
health. The challenges and barriers are significant, but so are the opportunities.
This paper reports on an international seminar on Sustainable solid waste
management for cities: opportunities in South Asian Association for Regional
Cooperation (SAARC) countries organized by the Council of Scientific and
Industrial Research-National Environmental Engineering Research Institute and
the Royal Society. A priority is to move from reliance on waste dumps that
offer no environmental protection, to waste management systems that retain
useful resources within the economy. Waste segregation at source and use of
specialized waste processing facilities to separate recyclable materials has a key
role. Disposal of residual waste after extraction of material resources needs
engineered landfill sites and/or investment in waste-to-energy facilities. The
potential for energy generation from landfill via methane extraction or thermal
treatment is a major opportunity, but a key barrier is the shortage of qualified
engineers and environmental professionals with the experience to deliver
improved waste management systems in India.

Solid waste management (SWM) is a major problem for many urban local
bodies (ULBs) in India, where urbanization, industrialization and economic
growth have resulted in increased municipal solid waste (MSW) generation per
person. Effective SWM is a major challenge in cities with high population
density. Achieving sustainable development within a country experiencing
rapid population growth and improvements in living standards is made more
difficult in India because it is a diverse country with many different religious
groups, cultures and traditions.
Despite significant development in social, economic and environmental areas,
SWM systems in India have remained relatively unchanged. The informal
sector has a key role in extracting value from waste, with approximately 90% of
residual waste currently dumped rather than properly landfilled. There is an
urgent need to move to more sustainable SWM, and this requires new
management systems and waste management facilities. Current SWM systems
are inefficient, with waste having a negative impact on public health, the
environment and the economy. The waste Management and Handling Rules in
India were introduced by the Ministry of Environment and Forests (MoEF),
although compliance is variable and limited.

population total waste generated in waste generation (kg


City (2011)106 tonnes per day per capita per day)
Ahmedabad 6.3 2300 0.36
Hyderabad 7.7 4200 0.54
Bangalore 8.4 3700 0.44
Chennai 8.6 4500 0.52
Kolkata 14.1 3670 0.26
Delhi 16.3 5800 0.41
Mumbai 18.4 6500 0.35

Hardware
Arduino UNO

Arduino/Genuino Uno is a microcontroller board based on the ATmega328P


(datasheet). 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 contains everything needed to
support the microcontroller; simply connect it to a computer with a USB cable
or power it with a AC-to-DC adapter or battery to get started.. You can tinker
with your UNO without worring too much about doing something wrong, worst
case scenario you can replace the chip for a few dollars and start over again.
"Uno" means one in Italian and was
chosen to mark the release of Arduino Software (IDE) 1.0. The Uno board and
version 1.0 of Arduino Software (IDE) were the reference versions of Arduino,
now evolved to newer releases. The Uno board is the first in a series of USB
Arduino boards, and the reference model for the Arduino platform; for an
extensive list of current, past or outdated boards see the Arduino index of
boards.

The Board
The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-
wart) or battery. The adapter can be connected by plugging a 2.1mm center-
positive plug into the board's power jack. Leads from a battery can be inserted
in the Gnd and Vin pin headers of the POWER connector. The board can
operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be
unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:


Vin. The input voltage to the Arduino/Genuino board when it's using an
external power source (as opposed to 5 volts from the USB connection or
other regulated power source). You can supply voltage through this pin,
or, if supplying voltage via the power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 -
12V), the USB connector (5V), or the VIN pin of the board (7-12V).
Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and
can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
GND. Ground pins.
IOREF. This pin on the Arduino/Genuino board provides the voltage
reference with which the microcontroller operates. A properly configured
shield can read the IOREF pin voltage and select the appropriate power
source or enable voltage translators on the outputs to work with the 5V or
3.3V.

Memory

The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also


has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with
the EEPROM library).

Communication

The Arduino Uno has a number of facilities for communicating with a


computer, another Arduino, or other microcontrollers. The ATmega328
provides UART TTL (5V) serial communication, which is available on digital
pins 0 (RX) and 1 (TX). An ATmega8U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the
computer. The '8U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, an *.inf file is required..
The Arduino software includes a serial monitor which allows simple textual
data to be sent to and from the Arduino board. The RX and TX LEDs on the
board will flash when data is being transmitted via the USB-to- serial chip and
USB connection to the computer (but not for serial communication on pins 0
and 1). A SoftwareSerial library allows for serial communication on any of the
Uno's digital pins.

The ATmega328 also support I2C (TWI) and SPI communication. The Arduino
software includes a Wire library to simplify use of the I2C bus; see the
documentation for details.

Programming

The Arduino Uno can be programmed with the Arduino software (download).
Select "Arduino Uno w/ ATmega328" from the Tools > Board menu (according
to the microcontroller on your board). For details, see the reference and
tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that
allows you to upload new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol (reference, C
header files).
You can also bypass the bootloader and program the microcontroller through
the ICSP (In-Circuit Serial Programming) header; see these instructions for
details.
The ATmega8U2 firmware source code is available . The ATmega8U2 is
loaded with a DFU bootloader, which can be activated by connecting the solder
jumper on the back of the board (near the map of Italy) and then resetting the
8U2. You can then use Atmel's FLIP software (Windows) or the DFU
programmer (Mac OS X and Linux) to load a new firmware. Or you can use the
ISP header with an external programmer (overwriting the DFU bootloader).

Automatic (Software) Reset

Rather than requiring a physical press of the reset button before an upload, the
Arduino Uno is designed in a way that allows it to be reset by software running
on a connected computer. One of the hardware flow control lines (DTR) of the
ATmega8U2 is connected to the reset line of the ATmega328 via a 100
nanofarad capacitor. When this line is asserted (taken low), the reset line drops
long enough to reset the chip. The Arduino software uses this capability to
allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the
lowering of DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a
computer running Mac OS X or Linux, it resets each time a connection is made
to it from software (via USB). For the following half-second or so, the
bootloader is running on the Uno. While it is programmed to ignore malformed
data (i.e. anything besides an upload of new code), it will intercept the first few
bytes of data sent to the board after a connection is opened. If a sketch running
on the board receives one-time configuration or other data when it first starts,
make sure that the software with which it communicates waits a second after
opening the connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on
either side of the trace can be soldered together to re-enable it. It's labeled
"RESET-EN". You may also be able to disable the auto-reset by connecting a
110 ohm resistor from 5V to the reset line.

USB Overcurrent Protection :-

The Arduino Uno has a resettable polyfuse that protects your computer's USB
ports from shorts and overcurrent. Although most computers provide their own
internal protection, the fuse provides an extra layer of protection. If more than
500 mA is applied to the USB port, the fuse will automatically break the
connection until the short or overload is removed.

Physical Characteristics :-

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches
respectively, with the USB connector and power jack extending beyond the
former dimension. Three screw holes allow the board to be attached to a surface
or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"),
not an even multiple of the 100 mil spacing of the other pins.

How to use Arduino :-

Arduino can sense the environment by receiving input from a variety of sensors
and can affect its surroundings by controlling lights, motors, and other
actuators. The microcontroller on the board is programmed using the Arduino
programming language (based on Wiring) and the Arduino development
environment (based on Processing). Arduino projects can be stand-alone or they
can communicate with software on running on a computer (e.g. Flash,
Processing, MaxMSP). Arduino is a cross-platoform program. Youll have to
follow different instructions for your personal OS.
Check on the Arduino site for the latest instructions.
http://arduino.cc/en/Guide/HomePage.

Once you have downloaded/unzipped the arduino IDE, you can Plug the
Arduino to your PC via USB cable.

Blink LED :-

Now youre actually ready to burn your first program on the arduino board.
To
select blink led, the physical translation of the well known programming
hello
world, select
File>Sketchbook>
Arduino-0017>Examples>
Digital>Blink
Once you have your skecth youll see something very close to the screenshot on
the right.
In Tools>Board select
Now you have to go to
Tools>SerialPort
and select the right serial port, the one arduino is attached to.
Dimensional Drawing :-
Ultrasonic Sensor :-

An Ultrasonic sensor is a device that can measure the distance to an object by


using sound waves. It measures distance by sending out a sound wave at a
specific frequency and listening for that sound wave to bounce back. By
recording the elapsed time between the sound wave being generated and the
sound wave bouncing back, it is possible to calculate the distance between the
sonar sensor and the object.

Since it is known that sound travels through air at about 344 m/s (1129 ft/s),
you can take the time for the sound wave to return and multiply it by 344
meters (or 1129 feet) to find the total round-trip distance of the sound wave.
Round-trip means that the sound wave traveled 2 times the distance to the
object before it was detected by the sensor; it includes the 'trip' from the sonar
sensor to the object AND the 'trip' from the object to the Ultrasonic sensor
(after the sound wave bounced off the object). To find the distance to the object,
simply divide the round-trip distance in half.

It is important to understand that some objects might not be detected by


ultrasonic sensors. This is because some objects are shaped or positioned in
such a way that the sound wave bounces off the object, but are deflected away
from the Ultrasonic sensor. It is also possible for the object to be too small to
reflect enough of the sound wave back to the sensor to be detected. Other
objects can absorb the sound wave all together (cloth, carpeting, etc), which
means that there is no way for the sensor to detect them accurately. These are
important factors to consider when designing and programming a robot using
an ultrasonic sensor.

Battery :- We are using a 6V battery to supply input dc voltage to the arduino


board.

Working
In this dumpster/garbage Monitoring System which will tell us that whether
the trash can is empty or full through the application,you can know the status of
your Trash Can or 'Dumpsters' from anywhere in the world over the Internet.
It will be very useful and can be installed in the Trash Cans at public places as
well as at home.
In this project,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 webpage and if the distance will be more than this threshold value,
then we will print the message Basket is Empty
Here we have used LAN cable to connect Arduino to Internet.
Software

ethernet_on_off.ino

/*
Web client

This sketch connects to a website (http://www.google.com)


using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13

created 18 Dec 2009


by David A. Mellis
modified 9 Apr 2012
by Tom Igoe, based on work by Adrian McEwen

*/

#include <SPI.h>
#include <Ethernet.h>

#include <NewPing.h>

#define TRIGGER_PIN 8 // Arduino pin tied to trigger pin on the ultrasonic


sensor.
#define ECHO_PIN 9 // Arduino pin tied to echo pin on the ultrasonic
sensor.
#define MAX_DISTANCE 50
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128); // numeric IP for Google (no DNS)
char server[] = "www.pitstall.in"; // name address for Google (using DNS)

// Set the static IP address to use if the DHCP fails to assign


IPAddress ip(192, 168, 0, 177);

// Initialize the Ethernet client library


// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
int a = 1;
String s= "";
int b=0;
char junk;
String inputString="";

void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);

while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only

// start the Ethernet connection:


if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, ip);
}
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");

// if you get a connection, report back via serial:

void loop() {
// if there are incoming bytes available
// from the server, read them and print them:

delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms


should be the shortest delay between pings.
unsigned int uS = sonar.ping();
if (client.available()) {

char c = client.read();
s = s + c;
Serial.print(c);

// if the server's disconnected, stop the client:


if (!client.connected()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();

Serial.println(uS / US_ROUNDTRIP_CM);
if(uS / US_ROUNDTRIP_CM !=0)
{
connectclient(uS / US_ROUNDTRIP_CM);
}
// do nothing forevermore:

}
}

void connectclient(int analogvalue){

if (client.connect(server, 80)) {
Serial.println("connected");
// Make a HTTP request:

client.print("GET /arduino.php?value=");
client.print(analogvalue);

client.println(" HTTP/1.1");
client.println("Host: www.pitstall.in");
client.println("Connection: close");
client.println();
} else {
// if you didn't get a connection to the server:
Serial.println("connection failed");
}
}

App code

<?php

require_once 'header.php';

$myfil = fopen("value.txt", "r") or die("Unable to open file!");

$status = fgets($myfil);

if (isset($_POST['name']))
{
queryMysql("UPDATE majorproject SET Isfull ='empty' WHERE Type =
'bin' ");
$status='Bin is Set To Empty';
}

fclose($myfil);
echo "<center>";

if($status == 'This Dustinbin is full')


{
echo "<img class='percentage' src='100.jpg' height='250' > <br><a
href='majorappmain2.php'><img class='bin' src='dustbin icon.jpg'></a>";
//shows image of 100% full
}

if($status == 'This Dustbin is 70% full')


{
echo "<img class='percentage' src='70.jpg' height='250' > <br><a
href='majorappmain2.php'><img class='bin' src='dustbin
icon.jpg'></a>";//shows image of 70% full
}

if($status == 'This Dustbin is about 40% full')


{
echo "<img class='percentage' src='40.jpg' height='250' > <br><a
href='majorappmain2.php'><img class='bin' src='dustbin
icon.jpg'></a>";//shows image of 40% full
}

if($status == 'Bin is Set To Empty' || $status == 'This Dustbin is empty')


{
echo "<img class='percentage' src='0.jpg' height='250' > <br><a
href='majorappmain2.php'><img class='bin' src='dustbin
icon.jpg'></a>";//shows image of 0% full
}

echo <<<_END
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'
type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=500, initial-scale=1">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<style>
body
{

width:95%;
overflow:hidden;
font-family: 'Roboto' ,sans-serif;

}
.bin{

position:relative;
left:10px;
}

#submitbutton
{
color:white;
font-family: 'Roboto' ,sans-serif;
background:#a2b7d9;
border:0px;
padding:10px;
border-radius:5px;

}
</style>

<br>$status<br><br>
<form action= 'majorappmain2.php' method='post' >
<input name='name' value='123456' type='hidden'>
<input class='bin' id='submitbutton' type='submit' value='Empty Bin'><br>
</form>
</center>

_END;

Arduino

<?php

require_once 'header.php';

$q = $_GET["value"];
$myfil = fopen("value.txt", "w") or die("Unable to open file!");

$q = (int)$q;

if($q < 7)
{

$q='This Dustinbin is full';


}
else{
if($q < 15)
{
$q='This Dustbin is 70% full';
}
else
{
if($q < 22)
{
$q='This Dustbin is about 40% full';
}
else
{

$q='This Dustbin is empty';

}
Problem Definition

As we have seen number of times the dustbins are getting overflown and
concern person dont get the informationwithin a time and due to
whichunsanitary condition formed in the surroundings, at the same time bad
smell spread out due to waste, bad look of the city which paves the way for air
pollution and to some harmful diseases around the locality which is easily
spreadable.

i. Disadvantages of the existing system

* Time consuming and less effective: trucks go and empty containers whether
they are full or not.
* High costs.
* Unhygienic Environment and look of the city.
* Bad smell spreads and may cause illness to human beings.
* More traffic and Noise.

ii. Advantages of the proposed system

* Real time information on the fill level of the dustbin.


* Deployment of dustbin based on the actual needs.
* Cost Reduction and resource optimization.
* Improves Environment quality
* Fewer smells
* Cleaner cities
* Intelligent management of the services in the city.
* Effective usage of dustbins.
Result

The following are the results which obtained from this work,

* Waste Level detection inside the dustbin


* Transmit the information wirelessly to concerned
* The data can be accessed anytime and from anywhere
* The real-time data transmission and access
* Avoids the overflows of Dustbins

This IoT based waste management is very useful for smart cities in different
aspects. We have seen that, in cities there are different dustbins located in the
different areas and dustbins get over flown many times and the concerned
people do not get information about this. Our system is designed to solve this
issue and will provide complete details of the dustbin located in the different
areas throughout the city. The concerned authority can access the information
from anywhere and anytime to get the details. Accordingly they can take the
decision on this immediately.
Conclusion and Future Work

We have implemented real time waste management system by using smart


dustbins to check the fill level of smart dustbins whether the dustbin are full or
not.In this system the information of all smart dustbins can be accessed from
anywhere and anytime by the concern person and he/she can take a decision
accordingly. By implementing this
proposed system the cost reduction, resource optimization, effective usage of
smart dustbins can be done.This system indirectly reducing traffic in the city. In
major cities the garbage collection vehicle visit the areas everyday twice or
thrice depends on the population of the particular area and sometimes these
dustbins may not be full. Our System will inform the status of each and every
dust bin in real time so that the concerned authority can send the garbage
collection vehicle only when the dustbin is full.

The scope for the future work is this system can be implemented with time
stamp in which real-time clock shown to the concern person at what time dust
bin is full and at what time the waste is collected from the smart dustbins.

You might also like