Sei sulla pagina 1di 55

CHAPTER 1

INTRODUCTION

We are living in an era where jobs 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.

IoT or Internet Things refers to the system of associated physical items that can exchange and
communicate information among themselves without the objective of any human intervention.
It has been officially characterized as a "Infrastructure of Information Society" in light of the
fact that IoT sanctions us to store up data from all sort of mediums, for example, people,
creatures, transports, kitchen apparatuses. Therefore, any item in the physical world which can
be given an IP address to empower information transmission over a system can be made piece
of IoT framework by implanting them with electronic equipment, for example, sensors,
programming and systems administration gear.

IoT is different than Internet as in a way it transcends Internet connectivity by enabling


everyday objects that utilizes embedded circuits to interact and communicate with each other
utilizing the current Internet infrastructure Since then the scope of IoT has grown tremendously
as currently it consists of more than 12 billion connected devices and according to the experts
it will increase to 50 billion by the end of 2020.

With the advent of IoT both manufacturers and consumers have benefited. Manufacturers have
gained insight into how their products are used. In this project, we are going to propose a system
for the immediate cleaning of the dustbins. As dustbin is considered as a basic need to maintain
the level of cleanliness in the city, so it is very important to clean all the dustbins as soon as
they get filled. We will use ultrasonic sensors for this system. The sensor will be placed on top
of bin which will help in sending the information to the office that the level of garbage has
reached its maximum level. After this the bin should be emptied as soon as possible. The
concept of IoT when used in this field will result in a better environment for the people to live
in. No more unsanitary conditions will be formed in the city. With the help of this system
minimal number of smart bins can be used around the whole city and the city will still be much

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 1


cleaner. There has been an unprecedented growth in the number of devices being connected to
the Internet since past few years.

The IoT network consists of embedded electronics, sensors and software that allows these
devices to send and receive data among each other. This is why it is beneficial to use such an
existing infrastructure for designing the proposed security system.

The disadvantages of the existing system is that there are systems which take data from bins
regarding garbage level, but the smell remains a problem. If the level is not filled it will not
bother about the smell. Smell raised from waste bin can cause pollution as well as spread
diseases. The people have to go and check the bins daily whether they are filled or not, it results
in high cost. If the bin doesn’t get emptied on time then the environment becomes unhygienic
and illness could be spread.

The proposed system will help in removing all these disadvantages. In this proposed system
along with the ultrasonic sensor an odor sensor, MQ136 is used to detect the H2S gas of the
waste and the bin can be removed whenever there is a foul smell, even though the bin is not
full. This is the main advantage of the proposed system when compared to the existing system.
The real-time information can be gained regarding the level of the dustbin filled on the system
itself. This will also help in resource optimization and if the bins will be emptied at time then
the environment will remain safe and free from all kinds of diseases. The cities will become
cleaner than before and the smells of the garbage will be much less.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 2


1.1 MOTIVATION

Our motivation behind this project is to keep the urban communities clean by introducing trash
cans and know whether the dumpsters are vacant or full and will detect the harmful gases
which are released from the bins. We can get the message from anyplace on the planet and it
will be anything but difficult to know the status of the waste bins.

SCOPE:

Our scope is to discover whether the trash can is vacant or full through the cloud server and
you can know the status of your 'Waste Can' or 'Dumpsters' from anyplace on the planet over
the Internet. It will be extremely valuable and can be introduced in the Trash Cans at open
places just as at home.

PROBLEM:

The issue with the conventional ‘method for physically observing the wastes in trash bins is a
bulky procedure and uses increasingly human efforts, time and cost which can be avoided with
our present technologies.

SOLUTION:

What our system does is it gives a continuous monitoring of the trash level in a trashcan at any
given time. So, the garbage which is on the road or land is degrading itself and emits a bad
smell. And also in the garbage collectors, it’s not cleaned properly, it emits a bad smell and
causes the different diseases like cholera, skin diseases etc. The proper utilization of garbage
can help us to get some gases. Some may harm and some are useful. The useful gases which
are emitting from the garbage can be utilized for commercial purpose also. The gases which
are emitting from the garbage can cause various diseases and harm the environment. So to
know what is the concentration of the garbage in various places and in the main container, this
project is designed and implemented in various places and tested the same. The system sends
message to the client through the cloud server.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 3


1.2 PROBLEM DEFINITION

Several environmental problems and cost issues have been faced by the government because
of the inefficient waste management. For the effective management, our system gives a
solution to this problem for the welfare of the society. IOT technologies have been proposed
through our work for the easy communication between the bin and the admin office. The
system consists of an Arduino Uno microcontroller, a garbage bin loaded with sensors and
they are monitored continuously through a monitoring panel.

1.3 OBJECTIVE

Our project’s main aim is to stop overflow of garbage in bins. This system helps to make smart
cities. The system informs about the level of garbage collected in the garbage bins. The
integrated IoT system is very useful to remotely monitor the garbage levels in dustbins in
cities and the gases which are emitting from the garbage can cause various diseases and harm
the environment. So to know what is the concentration of the garbage in various places and in
the main container, this project is designed.

1.4 LIMITATIONS

We are monitoring the garbage system but is doesn’t separate wet waste and dry waste. There
is no location tracking system so it may become complex if we have more number of bins.

1.5 ORGANIZATION OF CHAPTERS

Chapter 1 describes motivation, scope, objective and problem definition are discussed.
Chapter 2 explains literature survey and basic concepts and terms. Chapter 3 discusses about
user requirements, software and hardware requirements. Chapter 4 discusses about module
design and UML diagrams. Chapter 5 discusses about system implementation like method of
implementation and experimental results. Chapter 6 discusses about testing and validation.
Chapter 7 discusses about conclusion and future enhancements of the project. Chapter 8
provides references.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 4


CHAPTER 2

LITERATURE SURVEY

“International Journal of Scientific & Engineering Research”

The characteristics and composition of the urban waste i.e. sewage and municipal solid waste
was studied by various workers in the world. Literature shows evidences of the work carried
out on the health risk assessment due to urban waste. The impact of urbanization on the water
quality as well as soil quality was also studied by various researchers in the different parts of
the world.

At International level, there are various organizations including private and government which
are working in the field of environment and are engaged in research and development in the
field of waste management. The international agencies like World Health Organization
(WHO), Environmental Protection Agency (EPA) and United Nations Environment Program
(UNEP) are engaged in developing new technologies for waste management and its disposal
including its characterization.

Management of Municipal Solid Waste for various cities and towns has been widely studied
throughout the world. As the huge quantities of solid waste generated in the urban areas is the
major problem, majority of researchers concentrated on this issue. Numbers of researchers
have tried to find out new techniques for solid waste management. Mahar et.al., 2007[1]
reported the review and analysis of solid waste management situation in urban areas of
Pakistan. According to him poor solid waste management is one of the major causes for
environmental degradation in Pakistan. According to Rajput et.al., 2009[2], municipal firm
squander production displayed divergent fashion and a beneficial parallel with monetary
development in expression of kg/capita/day firm waste production at humanity weighing
machine.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 5


“International Journal Of Engineering And Computer Science”

The garbage management in cities has to be effectively and efficiently implemented. The
various proposals were put forward and some of them already implemented. But it cannot be
considered as an effective one. So a survey was done among different proposals and this
survey paper includes survey among different methods for smart garbage management in cities
using IoT.

The paper [1] Smart Garbage Management in Smart Cities using IoT proposed a method as
follows. The level of garbage in the dustbins is detected with the help of ultrasonic sensors
system, and communicated to the authorized control room through GSM system. Arduino
microcontroller is used to interface the sensor system with GSM system. A GUI is also
developed to monitor the desired information related to the garbage for different selected
locations. This will help to manage the garbage collection efficiently. Level detector consists
of IR sensors which is used to detect the level of the garbage in the dustbin. The output of
level detector is given to microcontroller.

Another method for garbage management is introduced [2] as follows. A dustbin is interfaced
with micro controller based system having IR wireless systems along with central system
showing current status of garbage, on mobile web browser with html page by Wi-Fi. Hence
the status will be updated on to the html page. There by to reduce human resources and efforts
along with the enhancement of a smart city vision. Considering the need of modern
technology, the smart garbage bin can expensive but considering the amount of dustbin needed
in India, there for they used based sensors to reduce its cost and also make it efficient in
applications. And at the sender side they used only a Wi-Fi module to send and receive data.
But because of the use of weight sensor for detection of amount of garbage in dustbin. It will
only detect the weight of waste; not how much level it is of. The message can be sent directly
to the cleaning vehicle instead of the contractor’s office. Thus garbage bins are managed.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 6


The system proposed by Vishesh Kumar Kurrel [8] assures the cleaning of dustbins soon when
the garbage level reaches its maximum. In this management system IOT as the working in the
field for networked radio-frequency identification (RFID), tracking the collection vehicle,
Dustbin monitoring and other emerging sensing technologies. The IR sensor is act as level
detector. The assures a low budget by changing all light traffic servers into Raspberry Pi. The
sensor senses the content of the dustbin and sends the signals or the data to the ARM
microcontroller then the microcontroller reads the data from the sensor and process the data
received from sensor, and the same data will send to Dashboard section and this section send
mail/message to respective Municipal / Government authority person or collection vehicle. If
the dustbin is not cleaned in specific time, then the record is sent to the higher authority who
can take appropriate action against the concerned contractor.

“International Research Journal of Engineering and Technology ”

Solid waste management is one amongst the major side that needs to be thought of in terms of
constructing a geographical region atmosphere healthier. The common dustbins placed by the
municipal corporation and leading no. of health, environmental and social issues. Various
causes are there like improper trash can placement in town, the improper system of aggregation
waste by town Corporation, and additional specifically folks don't seem to be aware enough
to use dustbins in a proper way. Up until currently, analysis has been applied by developing a
software package Applications for indicating trash can standing, another by Shortest path
technique for garbage aggregation vehicles by desegregation RFID, GSM, GIS system;
however no any active efforts have been taken being attentive towards managing such waste
in the atomized method. Considering of these major factors, a sensible solid waste
management system is intended that may check to stand and provides an alert of trash can
fullness and additional considerable system incorporates a feature to literate folks to use a
trash can properly and to mechanically sense and clean garbage gift outside the trash can. Thus
given resolution achieves sensible solid waste management satisfying goal of constructing
Indian cities clean, healthy and hygienical.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 7


2.1 EXISTING SYSTEM

The existing system has the limitations as time consuming, trucks go and empty the containers,
even they are empty. The cost is high with unhygienic environment. Even the bad odour causes
the unhealthy environment. It is very ineffective due to its poor placement, collection
scheduling, dump yard allocation and management, ever increasing transport cost and
resulting health issues.

2.2 DISADVANTAGES OF EXISTING SYSTEM

Although the existing system has its advantages, there are major disadvantages too. It is time
consuming and less effective, high costs. It creates unhygienic environment and look of the
city, bad smell spreads and may cause illness to human beings.

2.3 PROPOSED SYSTEM

Proposed system of our smart eco-friendly garbage management system is a very innovative
system which helps to keep the cities clean. This system monitors the garbage bins and informs
about the level of garbage collected in the garbage bins via web pages. we use ultrasonic sensor
for this system placed over the bins to detect the garbage level and compare it with the garbage
bins depth. In this proposed system along with the ultrasonic sensor an odor sensor, MQ136
is used to detect the H2S gas of the waste and the bin can be removed whenever there is a foul
smell, even though the bin is not full. This is the main advantage of the proposed system when
compared to the existing system. We use minimal equipment such as Arduino microcontroller,
an ultrasonic sensor, a gas sensor, a buzzer, Wifi-module. The notifications regarding can be
conveyed through a buzzer in no time and the person can take necessary actions very quickly.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 8


2.3 ADVANTAGES OF PROPOSED SYSTEM

Real time information on the fill level of the dustbin, development of the dustbin based on the
actual needs, cost reduction and resource optimization, effective usage of dustbins. It saves
time and money by using smart waste collection bins and systems equipped with fill level
sensors. It keeps our surroundings clean and green and free from bad odour of wastes,
emphasizes on healthy environment and keep cities more beautiful. It further reduces
manpower requirements to handle the garbage collection process. Applying smart waste
management process to the city optimizes management, resources and costs which make it a
“smart city”.

2.4 CONCLUSION

The existing system and proposed system has been explained above. Through this project we
can ensure you that this system pays a lot towards clean and disinfected pollution less
environment in building a smart city. There should be appropriate consciousness and alertness
among the public before the operation of this technology. It is an automatic dustbin monitoring
system in order to sense the full condition of the garbage bins. This provides the authorized
users appropriate updates of the location of the garbage bins and thus eliminates the need of
intermittent manual checks and overflowing garbage bins. This method finally helps in
keeping the environment clean. Thus, the garbage collection is made more efficient, effective
and operative.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 9


CHAPTER 3

ANALYSIS

3.1 INTRODUCTION

This overview document is designed to help the Internet Society community navigate the
dialogue surrounding the Internet of Things in light of the competing predictions about its
promises and perils. The Internet of Things engages a broad set of ideas that are complex and
intertwined from different perspectives. Key concepts serve as a foundation for exploring the
opportunities and challenges of IoT.

The term Internet of Things generally refers to scenarios where network connectivity and
computing capability extends to objects, sensors and everyday items not normally considered
computers, allowing these devices to generate exchange and consume data with minimal
human intervention. There is, however, no single, universal definition.

The concept of combining computers, sensors, and networks to monitor and control devices
has existed for decades. The recent confluence of several technology market trends, however,
is bringing the Internet of Things closer to widespread reality. These include Ubiquitous
connectivity, Widespread Adoption of IP-based networking.

3.2 SOFTWARE REQUIREMENT SPECIFICATION

Functional requirement is a description of activities and services a system must provide. These
requirements describe the interactions between the system and its environment independent of
its implementation. The environment includes the user and any other external system with
which the system interacts. Each is a statement of exactly what the system must do. Functional
requirements that must be included in the system are listed below:

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 10


3.2.1 SOFTWARE REQUIREMENTS

S.NO COMPONENTS SPECIFICATIONS

1 Micro Controller Arduino ATMEGA Uno

2 Programming languages EMBEDDED C

3 Software Arduino IDE

Table 3.1: Software requirements.

Arduino IDE:

The open-source Arduino Software (IDE) makes it easy to write code and upload it to the
board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and
based on Processing and other open-source software. This software can be used with any
Arduino board. The Arduino development environment contains a text editor for writing code,
a message area, a text console, a toolbar with buttons for common functions, and a series of
menus. It connects to the Arduino hardware to upload programs and communicate with them.
Software written using Arduino are called sketches. These sketches are written in the text
editor. Sketches are saved with the file extension.ino. It has features for cutting/pasting and
for searching/replacing text. The message area gives feedback while saving and exporting and
also displays errors. The console displays text output by the Arduino environment including
complete error messages and other information. The bottom right-hand corner of the window
displays the current board and serial port. The toolbar buttons allow you to verify and upload
programs, create, open, and save sketches, and open the serial monitor.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 11


3.2.2 HARDWARE REQUIREMENTS

The basic and important hardware requirements are listed below:

S.NO COMPONENTS SPECIFICATIONS


1 Micro controller Arduino ATMEGA 328P (UNO)
2 Connection Jumper wires and Bread board

3 Communication ESP8266 Wi-Fi Module


4 Sensor Ultrasonic sensor and Gas sensor
5 Notification Message

6 Notification Buzzer and LED’s


7 Power supply +5V, 750mA Regulated Power Supply

Table 3.2: Hardware components

1. Arduino Uno micro controller:

Arduino, fig 3.1, is an architecture that combines Atmel microcontroller family with standard
hardware into a board with inbuilt boot loader for plug and play embedded
programming. Arduino Software comes with an IDE that helps writing, debugging and
burning program into Arduino. The IDE also comes with a Serial Communication window
through which you can easily get the serial data from the board. This board has everything
starting from ADC to USB controller to PWM ports. So you can now control relays or connect
LCD into the digital ports on the top and directly connect the output pin of the sensors to
analog ports in the bottom. 5v or 3v power required to drive different sensors can be directly
taken from the power port on the bottom left side. The board can be powered either by USB
or by connecting 9v battery in pin Vin. You can also drive the board with a standard 9v
adapter.The pins are such that you can actually connect several hardware without any
soldering just by inserting the wire or inserting sensor/device pins into Arduino pin holes.
Arduino can communicate with PC using USB cable and it is configured as slave device.
Multiple Arduino can be interfaced together by making them connect through serial
communication.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 12


Fig 3.1: Arduino ATMEGA 328 Uno

2. Ultrasonic sensor

The Ultrasonic Sensor is used to measure the distance with high accuracy and stable readings.
It can measure distance from 2cm to 400cm or from 1 inch to 13 feet. It emits an ultrasound
wave at the frequency of 40KHz in the air and if the object will come in its way then it will
bounce back to the sensor. By using that time which it takes to strike the object and comes
back, you can calculate the distance.

Distance can be measured by equation 1. Distance = Time * sound speed /2. (1) Where Time
= the time between an ultrasonic wave is received and transmitted It has four pins. Two are
VCC and GND which will be connected to the 5V and the GND of the Arduino while the other
two pins are Trig and Echo pins which will be connected to any digital pins of the Arduino.
To generate an ultrasound signal, you will have to make the Trig pin high for about 10us which
will send a 8 cycle sonic burst at the speed of sound and after striking the object, it will be
received by the Echo pin. Ultra sonic sensor as shown in figure 3.2.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 13


• Operating Voltage of 5V
• Range - 2 cm to 700 cm
• Accuracy: 3 mm
• Beam Angle: 15 Degrees
• Small size
• Sensor size: Approx. 45 x 20 x 1.6mm
• No need of any external circuit for using this sensor. Learning Resources

Fig 3.2: Ultrasonic sensor

3. Ethernet shield

Ethernet Shield allows internet connectivity to Arduino board by using its Ethernet library.
We can use this Ethernet library to write sketches (Arduino program written in IDE) that will
help us to configure this shield to connect to internet. This shield is compatible with almost all
versions of Arduino boards. It enables our board to receive and send data worldwide by
providing it internet connection. SD card option is also available in it and we can write and
read this card by using SD library. This shield relies on Wiznet W5100 chip Ethernet with
internal buffer space of 16 KB. It can support up to 4 simultaneous socket connections. This
chip provides a network IP stack which is capable of both transport layer protocol of internet

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 14


i.e. TCP (transmission control protocol) and UDP (user datagram protocol). The newer version
of this shield relies on W5500 Ethernet chip having 32 KB buffer size, supports auto
negotiation and supports I2C , UART interface.

The shield contains a number of informational LEDs:

● PWR: indicates that the board and shield are powered


● LINK: indicates the presence of a network link and flashes when the shield transmits
or receives data
● FULLD: indicates that the network connection is full duplex
● 100M: indicates the presence of a 100 Mb/s network connection (as opposed to 10
Mb/s)
● RX: flashes when the shield receives data
● TX: flashes when the shield sends data
● COLL: flashes when network collisions are detected

Fig 3.3: Ethernet shield Module

4. Buzzer

A Buzzer is an audio signaling device be mechanical, electromechanical, or piezoelectric.


Typical uses of buzzers and beepers include alarm devices, timers, and confirmation of user
input such as a mouse click or keystroke.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 15


Fig3.4: Buzzer

FEATURES

• The PB series are high-performance buzzers with a unimorph piezoelectric ceramic


element and an integral self-excitation oscillator circuit.
• They exhibit extremely low power consumption in comparison to electromagnetic
units.
• They are constructed without switching contacts to ensure long life and no electrical
noise.
• Compact, yet produces high acoustic output with minimal voltage.

Mechanical

A joy buzzer is an example of a purely mechanical buzzer.

Electromechanical

Early devices were based on an electromechanical system identical to an electric bell without
the metal gong. Similarly, a relay may be connected to interrupt its own actuating current,
causing the contacts to buzz. Often these units were anchored to a wall or ceiling to use it as a
sounding board. The word "buzzer" comes from the rasping noise that electromechanical
buzzers made.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 16


Electronic Circuit

A piezoelectric element may be driven by an oscillating electronic circuit or other audio signal
source. Sounds commonly used to indicate that a button has been pressed are a click, a ring or
a beep. Electronic buzzers find many applications in modern days.

Uses

• Annunciator panels
• Electronic metronomes
• Game shows
• Microwave ovens and other household appliances
• Sporting events such as basketball games

5. Bread board and Jump Wires

A modern solder less breadboard consists of a perforated block of plastic with numerous tin
plated phosphor bronze or nickel silver alloy spring clips under the perforations. The clips are
often called tie points or contact points. The number of tie points is often given in the
specification of the breadboard. The spacing between the clips (lead pitch) is typically 0.1 in
straddle the centerline of the block. Interconnecting wires and the leads of discrete components
(such as capacitors, resistors, and inductors) can be inserted into the remaining free holes to
complete the circuit. Where ICs are not used, discrete components and connecting wires may
use any of the holes.

A breadboard is utilized to build and test circuits expeditiously afore finalizing any circuit
design. The breadboard has many apertures into which route components like ICs and resistors
can be connected. A typical breadboard that includes top and bottom power distribution rails
is shown below figure 3.5. Jump wires are generally used to establish connectivity with bread
board as shown in figure 3.6.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 17


Fig 3.5: Breadboard

Fig 3.6: Jumper wires

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 18


6. MQ-136 Gas sensor

MQ-136 is a gas sensor used to detect the H2S. The sensitive material of MQ-136 is SnO2. It
has 6 pins namely H pin, A pins and B pins. The enveloped MQ-136 which is shown in figure
2 have 6 pins, 4 of them are used to fetch signals and other 2 are used for providing heating
current. They are most commonly used as air quality control equipment for buildings.

The resistance value of MQ-136 is different from various kind and concentration gases so
when using these components sensitivity adjustment is very necessary. It has a long lifespan
and fast response. It possess to a simple drive circuit with low cost

Fig3.7: Gas sensor

3. 3 MODULE DESIGN

The system architecture is explained in the below diagram. The components and the
connections which the other devices are also figured out in detail. The figure is the architecture
diagram which consists of Arduino UNO, Ultrasonic sensor, Gas sensor, ESP8266 Wi-Fi
module, Buzzer. The ultrasonic sensor is important as the whole working depends on it. The
buzzer and Wi-Fi modules are connected to microcontroller.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 19


Gas Sensor

Fig 3.8: Architecture of connections


Dustbin

The system is evaluated by testing the emptiness and fullness of the garbage bin. If the bin is
empty then the level of garbage in the bin is empty. Then a message is sent to the user that the
garbage is empty. If the garbage is filled then data will then display the percentage of the
fullness of the bin to alert the users.

Buzzer
Depending on the data processed the status of the garbage in the garbage bin is informed to
the user. The buzzer gives an alarm when data is received. As soon as the data is displayed
the control room send the SMS to the mobile of driver to collect the bin quickly.

Cloud Database
The data in the Think Speak will shows the percentage for each bins to make sure the waste
management can monitor it. If the bin is full, the waste management can inform to the collector
to collect the garbage. So, garbage collector can do their duty without any problem.
Arduino micro controller

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 20


We get information from sensors and process on it. It compares the received data with the
threshold level set and accordingly output is generated. The LPC2131/32/34//38
microcontrollers are based on a 16/32-bit ARM7TDMI-S CPU with real-time emulation and
embedded trace support, that combine the microcontroller with 32 kB, 64 kB, 128 kB, 256 kB
and 512 kB of embedded high-speed flash memory.A128-bit wide memory interface and
unique accelerator architecture enable 32-bit code execution at maximum clock rate. The
Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 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 AC-to-DC adapter or battery to get started.

Fig 3.9: Arduino Micro controller

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 21


3.3.1 Features

1.0 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 both with the board that uses
the AVR, which operate with 5V and with the Arduino Due, which operate with 3.3V.

3.3.2 Summary

Microcontroller : ATmega328

Operating Voltage : 5V

Input Voltage (recommended) : 7-12V

Input Voltage (limits) : 6-20V

Digital I/O Pins : 14 (of which 6 provide PWM output)

Analog Input Pins : 6

DC Current per I/O Pin : 40 mA

DC Current for 3.3V Pin : 50 mA

Flash Memory : 32 KB (ATmega328) of 0.5 KB used by boot


loader

SRAM : 2 KB (ATmega328)

EEPROM : 1 KB (ATmega328)

Clock Speed : 16 MHz

Table 3.3: Summary of Arduino

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 22


3.3.3 Pin diagram of Arduino UNO

Fig 3.10: Pin diagram of Arduino UNO

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 23


3.3.4 Power

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.

3.3.5 Memory

The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).

3.3.6 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 ATmega16U2 on
the board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .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).

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 24


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/16U2 is connected to the
reset line of the ATmega328 via a 100 nano farad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip.

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; see
this forum thread for details.

3.5 CONCLUSION

The equipment used in hardware and software can be changed as per requirements. The detail
description about the modules and their working behavior along with the connections which
we make to develop the implementation design is discussed in this chapter. Raspberry pi can
also be used as a micro controller in place of Arduino. We preferred Arduino as it is compact
and easy to use.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 25


CHAPTER 4

DESIGN

4.1 INTRODUCTION

Design plays an important role in understanding the construction, procedure and working of
a project in detail and it makes it easier for others to understand it easily. We are using XML
diagrams to explain the working here.

Purpose:

System design focuses on decomposing the system into manageable parts. During system
design, we focus on the processes, data structures, and software and hardware components
necessary to implement it. The challenge of system design is that many conflicting criteria and
constraints need to be met when decomposing the system.

The purposes of object–oriented design document is to provide an overview as to how the


proposed system will be used to obtain the information needed to derive the actual
implementation of our system.

Design Goals:

The objectives of Designing are to model a system with high quality and show what the system
will look like after the coding is done. Which allows the programmer to do his job as a
programmer and develop good and error-free system; these also give the developer, the ability
to develop easily maintainable system. These way maintenance programmers can make
changes to the system after it has been put into operation easily.

The field of structured design contains a number of guidelines that help designer determine
which modules, and which interconnections between the modules will best implement the
requirements specified in the system analysis /Requirement gathering phase. Then, within
each process, the designer must decide how to allocate processes and data to different tasks.
Finally, we must organize the processes within each task into a hierarchy of modules, using
modeling tool. The goal of system design is to manage complexity by dividing the system into
smaller, manageable pieces.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 26


Embedded board is the main system which controls and connects to all other modules in the
project, this module will contain a microcontroller(Arduino) and microcontroller related
circuit which is used to run it and interface to it. A software named as Arduino IDE is used to
enter relatives/friend mobile no who get your location updates, and this IDE is used to upload
coding part to the micro controller. Microcontroller controls the remaining modules like
Arduino Setup module, Think Speak cloud for storage, scalability and performance concerns.

4.2 SYSTEM MODELS

System model helps the analysts to understand the functionality of the system and models are
used to communicate with the system. The system model is composed of three individual
models:-

 The Functional model.


 The System object model.
 The Dynamic model.

The functional model:

It is represented by use case and Scenario.

The system object model:

It is represented by classes and objects diagrams

The dynamic model:

It is represented by state chart and sequence diagram based on the proposed system. In this
section we try to analyze the overall activity of the proposed system by using use case,
sequence diagrams, activity diagrams and class diagram scenarios.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 27


4.2.2 Class Diagram

Class diagram depicts the system’s object structure. They show object classes that the system
is composed of as well as the relationships between those object classes. The UML class
diagram below shows the classes of the system, their inter-relationships, and the operations
and attributes of the classes.

Fig 4.1: Class diagram

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 28


4.2.1 Use cases and Actors

Use Cases:

Use case modeling identifies and describes the system functions by using a tool called use
cases. Use cases describe the system functions from the perspective of external users and in a
manner and terminology they understand. To accurately and thoroughly accomplish this
demands a high level of user involvement and a subject matter expert who is knowledgeable
about the business process or event.

Use cases describe the behavior of the system as seen from an actor’s point of view. Behavior
described by the use case model is external behavior. Which mean a use case describes a
function provided by the system as a set of events that yields a visible result for the actors.

Use cases:

• Power supply module


• Ultrasonic Sensor
• Buzzer
• Ethernet shield Module
• Arduino Controller
• Gas Sensor

Actors:

Actors are external entities that interact with the system. Use cases are initiated or triggered
by actors. An actor initiates system activities for the purpose of completing some task. An
actor is a person, or external system that place a role in one or more interactions with yours
system. A relationship between actors and another actor of the classes are indicated in use case
diagram, a relationship exists where ever an actor is involved with an interaction described by
a use case a relationship can also exist between use cases. Associations are modeled as line
connecting use cases and actors to one another, with an optional arrowhead on one end of the
line indicating the direction of the initial invocation of the relationship.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 29


Actors:

 User.

Fig 4.2: Use case diagram

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 30


4.2.3 Sequence Diagram

Sequence diagrams are used to depict graphically how objects interact with each other via
messages in the execution of a use case or operation. They illustrate how the operations are
performed between objects and in what sequence.

4.2.4 Activity diagram

Activity Diagrams are used to Document the logic of a single operation /methods, a single use
case, or the flow of logic of a business operation. In many ways, Activity Diagrams are the
object_ oriented Equivalent of flow charts and Dataflow Diagrams (DFD) from structure
development. Activity is a particular operation of the system. Activity diagrams are not only
used for visualizing the dynamic nature of a system, but they are also used to construct the
executable system by using forward and reverse engineering techniques. The only missing
thing in the activity diagram is the message part. It does not show any message flow from one
activity to another.

4.2.5 Component diagram

Component diagrams are used to visualize the organization and relationships among
components in a system. These diagrams are also used to make executable systems.
Component diagrams can also be described as a static implementation view of a system. Static
implementation represents the organization of the components at a particular moment. A
single component diagram cannot represent the entire system but a collection of diagrams is
used to represent the whole.

4.2.6 State chart diagram

It describes different states of a component in a system. The states are specific to a


component/object of a system. A State chart diagram describes a state machine. State machine
can be defined as a machine which defines different states of an object and these states are
controlled by external or internal events.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 31


Fig 4.3: State chart diagram

4.2.7 Collaboration diagram

A collaboration diagram is a type of visual presentation that shows how various software
objects interact with each other within an overall IT architecture and how users can benefit
from this collaboration. A collaboration diagram often comes in the form of a visual chart that
resembles a flow chart.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 32


4.2.8 Deployment diagram

Deployment diagrams are used to visualize the topology of the physical components of a
system, where the software components are deployed. Deployment diagrams are used to
describe the static deployment view of a system. Deployment diagrams consist of nodes and
their relationships.

Fig 4.4: Deployment diagram

4.3 CONCLUSION

The view of the Design is depicted in the form of UML diagrams and the Module division is
done. The detail description about the modules and their working behavior along with the
connections which we make to develop the implementation design is discussed in this chapter.
If any modifications are done then the design phase is effected and changed accordingly.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 33


CHAPTER 5

IMPLEMENTATION AND RESULT

5.1 INTRODUCTION

The information regarding the domain area and system requirements are mentioned
below. The preferred programming language for Arduino ATMEGA (UNO) based
projects is Embedded C.

Fig 5.1: Block diagram of System

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 34


Fig 5.2: System architecture

Fig 5.3: State diagram

5.2 CIRCUIT DIAGRAM AND EXPLANATION

First of all we will connect the ESP8266 with the Arduino. ESP8266 runs on 3.3V and if you
will give it 5V from the Arduino then it won’t work properly and it may get damage. Connect
the VCC and the CH_PD to the 3.3V pin of Arduino. The entire Ethernet shield should be
pushed into the Arduino and the similar voltage Arduino which is 5v is common for both
ethernet shield and Arduino and the pin configuration over the Ethernet shield is similar to
that of Arduino so pin installations are done on Ethernet shield.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 35


Now it’s time to connect the HC-SR04 ultrasonic sensor with the Arduino. Connections of the
ultrasonic sensor with the Arduino are very simple. Connect the VCC and the ground of the
ultrasonic sensor to the 5V and the ground of the Arduino. Then connect the TRIG and ECHO
pin of ultrasonic sensor to the pin 8 and 9 of the Arduino respectively.

Fig 5.4: Circuit Diagram

5.3 CODE AND EXPLANATION

Before uploading the code, we should connect to the LAN of your Ethernet shield device. The
Arduino will first read the Ultrasonic Sensor. It will send an ultrasonic signal at the speed of
sound when we will make the TRIG pin high for 10us. The signal will comeback after striking
the object and we will store the travel time duration in the variable named duration. Then we
will calculate the distance of object (garbage in our case) by applying a formula and will store
it in the variable named distance.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 36


digitalWrite (trigPin, LOW);

delayMicroseconds (2);

digitalWrite (trigPin, HIGH);

delayMicroseconds (10);

digitalWrite (trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance= duration*0.034/2;

For printing the output on the webpage in cloud server, we will have to use Cloud API. So, we
have created a string named Garbage Level and stored the output in it. To tell whether the
trash can is empty or not, we have applied a condition there. If the distance will be less than
5cm then it will show “Basket is Full” on the serial monitor and if the distance will be greater
than 5cm then it will show the message “Basket is Empty” on serial monitor.

digitalWrite (trigPin, LOW);

delayMicroseconds (2);

digitalWrite (trigPin, HIGH);

delayMicroseconds (10);

digitalWrite (trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance= duration*0.034/2;

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 37


The following code will send and show the data on the webpage. The data, we stored in string
named ‘webpage’, will be saved in string named ‘command’. The ESP8266 will then read the
character one by one from the ‘command’ and will print it on the webpage.

digitalWrite (trigPin, LOW);

delayMicroseconds (2);

digitalWrite (trigPin, HIGH);

delayMicroseconds (10);

digitalWrite (trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance= duration*0.034/2;

5.4 CONCLUSION

This chapter covered every information regarding the explanation of the circuit diagram and
the code. To give the detailed information regarding the implementation, this chapter has been
included.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 38


CHAPTER 6

TESTING AND VALIDATION

6.1 INTRODUCTION

Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and code generation.

TESTING OBJECTIVES

• To make sure that system meets the user requirements during operation
• To ensure that during operation the system will perform as per specification.
• To make sure that during the operation, incorrect input, processing and output will be
detected
• A good test case is one that has a high probability of finding an as yet undiscovered
error.
• To see that when correct inputs are fed to the system the outputs are correct
• To verify that the controls incorporated in the same system as intended
• Testing is a process of executing a program with the intent of finding an error
• To see that when correct inputs are fed to the system the outputs are correct.

The software developed has been tested successfully using the following testing strategies and
any errors that are encountered are corrected and again the part of the program or the procedure
or function is put to testing until all the errors are removed. A successful test is one that
uncovers an as yet undiscovered error. Note that the result of the system testing will prove that
the system is working correctly. It will give confidence to system designer, users of the system;
prevent frustration during implementation process etc. Embedded systems software testing
shares much in common with application software testing. Thus, much of this two part article
is a summary of basic testing concepts and terminology. However, some important differences
exist between application testing and embedded systems testing.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 39


6.2 DESIGN OF TEST CASES SCENARIOS AND VALIDATION

Use Case and Actor Descriptions:

If distance is 25 cm

Use case name Equal to 25cms

Actor(s) User

Description If the bin is filled upto 25 cm then web page is updated with
basket “is full “.

Precondition All the modules should be up and running.

Post condition A long beep is caused along with a red light.

Basic course of Actions

1. If bin is filled upto 25cms then the action is performed.


2. After that the input is taken and web notification and buzzer with a red light gives
output.
3. Use case ends
Alternate of courses of Action

Alternative course A: If bin is filled more than 25 cms, then the notification will be
updated.

Alternate Course A : use case ends

Table 6.1: Obstacle at 25cms

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 40


At 15 cm Use case:

Use case name At distance of 15cms

Actor(s) User

Description If bin is filled up to 15 cm ,then no action need to be


performed.

Precondition All the modules should be up and running.

Post condition A short beep is observed.

Basic course of Actions

1. If the bin is filled up to a distance of 15 cm the system is alerted.


2. After that the system takes the input, buzzer performs action.
3. Use case ends

Alternate of courses of Action

Alternative course A: If the obstacle is at more than 15cms distance it gives long beep and
a red light.

Alternate Course A : use case ends

Table 6.2: When obstacle is at 15cms

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 41


If the distance is 10cms

Use case name If the obstacle is at 10cms distance

Actor(s) User

Description If the obstacle distance is equal to 10cms or less, the location


is sent to the concerned person.

Precondition All the modules should be up and running

Post condition The web page will be updated with “Basket is Empty “ along
with a green light near the bin.

Basic course of Actions

1. If the distance is equal to 10cms or less than 10cms then the web page is updated
with “Basket is Empty” along with a green light near the bin.
2. After that the system takes the input and updates the output.
3. Use case ends

Alternate of courses of Action

Alternative course A: The bin may be empty and doesn’t need any action to be performed.

Alternate Course A : use case ends

Table 6.3: When obstacle is at 10cms or less

6.3 CONCLUSION

These test cases or use cases help us identify the problems and solutions for different scenarios.
Here use cases included are regarding the garbage monitoring in different ranges ad results.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 42


CHAPTER 7

CONCLUSION

7.1 CONCLUSIONS

In this the new innovation is that we use the IOT (Internet of Things) from this we can monitor
our system from anywhere using internet of things. This project is implementing real time
waste management system by using sensors to check the level of garbage in the dustbin. In
this system, the information of the dustbin can have accessed from anywhere and anytime.
This system will help inform the status of each dustbins in real time. So, waste management
can send the garbage collector to pick up the garbage when the dustbin is full. If we use this
system in our home then the garbage is monitored in our houses. Further, a wireless interface
has been provided to control the system wirelessly and keep the cities clean from unhygienic
and hazardous environments. The technologies which are used in the proposed system are
good enough to ensure the practical and perfect for solid garbage collection process monitoring
and management for green environment.

7.2 FUTURE WORK

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 area’s 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.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 43


CHAPTER 8

REFERENCES

[1] 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.

[2]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.

[3] 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.

[4] www.buildofy.in/smart_home_designs

[5] IOT based garbage monitoring system Dr. K. Alice Mary1, Perreddy Monica2,
A.Apsurrunisa3, Chathala Sreekanth4, G. PavanKumar5.Professor1, UG scholars2345, EEE
Department, Gudlavalleru Engineering College, Krishna District, AP, India. International
Journal of Scientific & Engineering Research, Volume 8, Issue 4, April-2017 ISSN 2229-
5518.

[6] https://github.com/sourabhdeshmukh/Smart-Dustbin

[7] IoT Based Waste Management for Smart City Parkash1, Prabu V2 PG Diploma Student
and Dept.of Embedded System Design, NIELIT, Calicut, and Kerala, India International
Journal of Innovative Research in Computer and Communication Engineering, Vol. 4, Issue
2, February 2016.

[8] Smart Garbage Monitoring System using Internet of Things (IOT) Prof. Dr. Sandeep M.
Chaware1, Shriram Dighe2, Akshay Joshi3, Namrata Bajare4, Rohini Korke5 International
Journal of Innovative Research in Electrical, Electronics, Instrumentation and Control
Engineering ISO 3297:2007 Certified Vol. 5, Issue 1, January 2017

[9] https://create.arduino.cc/projecthub/Technovation/smart-garbage-monitoring-
systemusing-arduino-101-3b813c

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 44


[10] IOT Smart Garbage Monitoring System in Cities-An Effective Way to Promote Smart
City Palaghat Yaswanth Sai Department of Computer Science and Engineering, Narayana
Engineering College, Gudur, Andhra Pradesh, India Volume 7, Issue 2, February 2017

[11] IOT based garbage management system Akash k t, Dinesh choudhari S Y, Sandeep C U,
Prof. Rashmi P M Department of Electronics & Telecommunication Dr D.Y.School of Engg,
Pune, India Volume 6, Issue 4, April 2017, ISSN: 2278 – 1323. Smart Garbage Management
System using Internet of Things (IOT) for Urban Areas International organization of Scientific
Research.

[12] http://www.inforcecomputing.com/blog/an-introduction-to-embedded-systems-and iot/

[13] IOT based garbage management system Akash k t, Dinesh choudhari S Y, Sandeep C U,
Prof. Rashmi P M Department of Electronics & Telecommunication Dr D.Y.Shool of Engg,
Pune, India Volume 6, Issue 4, April 2017, ISSN: 2278 – 1323. Smart Garbage Management
System using Internet of Things (IOT) for Urban Areas International organization of Scientific
Research.

[14] Garbage monitoring system using IoT Anitha A School of Information Technology and
Engineering, VIT University, Vellore-632014, Tamil Nadu, India, doi:10.1088/1757-
899X/263/4/042027. [15] Journal of Advanced Research in Dynamical and Control Systems
Vol. 9. Sp– 6 / 2017 JARDCS Special Issue On Trends and Future in Engineering 133 Smart
Garbage monitoring system using sensors and RFID over internet of things Somu Dhana
Satyamanikanta1, M.Narayanan2.

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 45


APPENDIX A

ARDUINO INTSTALLATIONS

This describes the installation of the Arduino IDE Development software and drivers for the
Windows Operating System. The images and description is based on installation under
Windows XP, but the process should be similar for Vista and Windows 7.First we need to get
the latest version of the Arduino software this can be downloaded from the Arduino website.

SSA 1: Welcome to the Found New Hardware Wizard

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 46


SSA 2: Choose your search and installation option

SSA 3: Hardware Installation

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 47


SSA 4: Finish

SSA 5: Device Manager

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 48


SSA 6: Serial Port

SSA 7: Board

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 49


APPENDIX B

OUTPUT SCREENSHOTS

SSB 1: Serial Monitor

SSB 2: Output in Serial Monitor

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 50


SSB 3: Think Speak Chart

SSB 4: Final Setup

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 51


SSB 6: Garbage Monitoring App

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 52


APPENDIX C
SAMPLE CODE

#include <SPI.h>
#include <Ethernet.h>
#include "ThingSpeak.h"
const int trigPin = A2;
const int echoPin = A1;
const int buzzer = 9;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
EthernetClient client;
unsigned long myChannelNumber = 666912;
const char * myWriteAPIKey = "ROWKYDOVSAN2CS44" ;
long duration;
int distance;
IPAddress ip(192, 168, 0, 177);
void setup()
{
//Ethernet.init(10);
Serial.begin(9600); // Starts the serial communication
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);
pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output
}
// give the Ethernet shield a second to initialize:
delay(250);
Serial.println("connecting...");
ThingSpeak.begin(client);

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 53


pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
delay(250);//Delay to let system boot
delay(100);//Wait before accessing Sensor
pinMode(2, INPUT);

}
void loop()
{
delay(1000);//Wait 5 seconds before accessing sensor again.
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
if(distance<= 3){
tone(buzzer, 1000); // Send 1KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
}
//else
delay(4000);
ThingSpeak.setField(1, distance);
ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
delay(2000);
}

Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 54


Mini PROJECT REPORT (2016 - 2020 Batch) Dept. of CSE, MLRITM 55

Potrebbero piacerti anche