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

ANALYSE THE ASPECTS OF I

Assignment (2 of 2)

By ZinLinHtet
Victoria University College
Introduction
Environmental problems are raised by modern cities for waste collection and disposal.
Therefore, smart trash bin become essential for cities that aim to reduce cost and manage
resources and time. Currently, the trend is shifting towards smart devices and internet of
things (IoT) solutions to overcome common problems such as waste management issues,
pollution and have to touch the lid to open the trash bin will transfer germs and diseases to
people. Optimizing the process of trash collection is the main purpose of the smart solutions
provided by industry. The streets are cover in trash because people throw their trash
everywhere carelessly. So to keep the street clean and tide, there should be a trash bin
everywhere. And this project will help to reduce those trash on the street and keep them
clean. It also prevent physical connection between the trash bin so prevention from germs and
diseases. It also reduce time and energy because it is difficult for all the trash collectors to
find the trashes and collect them. Now with this project they can just collect them more
easily.
Existing problem and development
Street don’t have enough trash bin and people throw their trash everywhere carelessly.
To throw the trash the lid need to be open manually. There will also be a problem if the
person hands are full and can’t be able to open the lid. Overflowing waste bins are an ideal
breeding ground for bacteria, insects, vermin and germs. And it increase the risk of getting
salmonella, which causes typhoid fever, food poisoning, enteric fever, gastroenteritis, and
other major illnesses. To throw the trash people need to open the lid of the trash bin and they
might get germs and other harmful diseases into their bodies. People throw their trash
everywhere so it is also difficult for the trash collector to collect those. To solve this using
IoT I created an automatic open and close Smart Trash Bin. When the user come in front of
the trash bin the trash bin lid will open automatically and prevent the user from physically
touching the trash bin lid and prevent from germs and diseases. Another problem is if the user
hands are full of trash and he/she can’t open the trash bin lid the trash bin will automatically
open it for him/her. The smart trash bin can be controlled remotely so if it is for indoor use
people who are lazy to go near the trash bin and throw their trash they can open the trash bin
with the mobile app and throw the trash. The major need of a smart lifestyle begins with
cleanliness and cleanliness begins with trash bin. A society will get its waste dispatched
properly only if the trash bins are placed well and collected in well prepared so the street and
environment will be clean and it will reduce the pollution. (Anon, 2019)
Proposed system
The aim of my project is to produce a cost effective and affordable design of a smart
trash bin. This system is based on NodeMCU board and ultrasonic sensor to sense the user
and servo motor to open and close the lid. The system is powered by lithium battery power
bank supported by solar cell panel. The objectives are to keep the street clean, to reduce the
pollution, to make people throw their trash in a fun way, to prevent the physical connection
with the trash bin lid to prevent form germs and harmful diseases, to control the trash bin
remotely and to produce the cost effective and affordable trash bin. (Anon, 2019)
Literature Review
The most current related work is done by Zavare and his colleagues [5] on sensor
nodes connected to an Arduino board based control station that uses a GSM module to send
the sensor nodes data by SMS to the garbage collecting vehicle and to a server hosting web
application by a WiFi connection. The sensor nodes data by SMS to the garbage collecting
vehicle and to a server hosting web application by a WiFi connection. The sensor nodes of
the smart bins rely on the ultrasonic sensor to sense the fullness percentage according to pre-
calculated bin depth. Moreover, a GPS module is used to get the bin location. The GPS
module and the ultrasonic sensor are controlled by Amica R2 NodeMCU microcontroller
board which has a built in WiFi module, that is used to connect to the control station.
Another work on wireless sensor network is done by Singh, Mahajan and Bagai[6].
The bins in his work are equipped with an accelerometer sensor to sense the opening and
closing of the bin lid, a temperature and humidity sensor to check the present organic waste,
and an ultrasonic sensor to sense the fullness status of the bin. All these sensors are controlled
by Zigbee pro microcontroller board, which has a built in WiFi module that is used to send
the sensors data to a gateway. This paper also used the same type of microcontroller board in
the gateway to receive the bins data and send it to a control station that contains a server, over
GPRS. The server in the control station relies on Caspio database management system with a
web based user interface.
A paper by Navghane, Killedar and Rohokale[7] examined the use of weight sensor
and three IR sensors to check the fullness status of the smart bin and send the sensors data to
a web page over WiFi network to a mobile phone. The microcontroller board used in this
paper was ARM LPC2148.
A report was done by students of California Polytechnic state University [8],
thoroughly exploited the economic and power consumption aspects of converting a
conventional outdoor trash bin into a smart one. According to the literature, the project is
based on ublox C027-U20 microcontroller board, which has built in GPS module and cellular
module. The board is used to control HC-SR04 ultrasonic sensor, that measures the bin’s
fullness-level, and a temperature sensor for monitoring weather conditions and a fire alerts.
The setup is contained by 2x4x6 plastic box and powered by a 12V rechargeable lead-acid
battery. The report mentioned that the system generates an HTTP POST request using the
data from the sensors and send it to a web application, which is built using Python and Flask
framework on top of a SQLite database. The web application receives the HTTP request and
check if the bin is full then send SMS message using Twilio service. Moreover, Leaflet
JavaScript library is used to virtualize the collected data on a map. In summary, most of the
papers above did not focus on covering the overall cost and power consumption of the
system, which are the main issues tackled by this paper.
Architecture
IoT based solid waste management system: A conceptual approach with an
architectural solution as a smart city application
The Internet of Things (IoT) is constantly evolving and is giving unique solutions to
the everyday problems faced by man. “Smart City” is one such implementation aimed at
improving the lifestyle of human beings. One of the major hurdles in most cities is its solid
waste management, and effective management of the solid waste produced becomes an
integral part of a smart city. This paper aims at providing an IoT based architectural solution
to tackle the problems faced by the present solid waste management system. By providing a
complete IoT based system, the process of tracking, collecting, and managing the solid waste
can be easily automated and monitored efficiently. By taking the example of the solid waste
management crisis of Bengaluru city, India, we have come up with the overall system
architecture and protocol stack to give a IoT based solution to improve the reliability and
efficiency of the system. By making use of sensors, we collect data from the garbage bins and
send them to a gateway using LoRa technology. The data from various garbage bins are
collected by the gateway and sent to the cloud over the Internet using the MQTT (Message
Queue Telemetry Transport) protocol. The main advantage of the proposed system is the use
of LoRa technology for data communication which enables long distance data transmission
along with low power consumption as compared to Wi-Fi, Bluetooth or Zigbee. (Bharadwaj,
Rego and Chowdhury, 2019)

IoT Based waste management using smart dustbin


This implementation of smart garbage Bin indicator receptacle, gives a solution for
unsanitary environmental condition in a city. This implementation of Smart Garbage
collection bin using internet, IR sensor, and raspberry pi. This system assures to send mail
notification and status on dashboard of dustbins when the garbage level reaches its maximum.
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. This system also helps to
monitor the fake reports and hence can reduce the corruption in the overall management
system. This reduces the total number of trips of garbage collection vehicle and hence
reduces the overall expenditure associated with the garbage collection. It ultimate helps to
keep cleanness in the society. Therefore, the smart garbage management system makes the
garbage collection more efficient the use of solar panels in such systems may reduce the
energy consumption. Such systems are vulnerable to plundering of components in the system
in different ways which needs to be worked on. These dust bin model can be applied to any
of the smart cities around the world. A waste collecting and monitoring team which is
deployed for collection of garbage from the city can be guided in a well manner for
collection.

Frameworks
The Internet of Things Platform middleware joins different components together and
enables smooth communication between devices. The interface facilitates the interaction
between the “Internet” and the “Things”, which means hardware or applications. IoT
frameworks seem to focus on real-time data logging solutions, offering some basis to work
with many things and have them interact. Future developments might lead to specific
software-development environments to create the software to work with the hardware used in
the Internet of things. IoT framework is very beneficial for enterprises. With this enterprises
can access premises from anywhere and turn mute data into intelligence.
Some of the IoT platforms are
- Azure by Microsoft
Azure is a collection of Microsoft-managed cloud services that connect,
monitor, and control billions of IoT assets. In simpler terms, an IoT solution is made
up of one or more IoT devices and one or more back-end services running in the cloud
that communicate with each other.
- IoT Platform by Oracle
Oracle's IoT platform gives enterprises the tools and technologies to reliably
integrate, analyze, build, and deploy IoT solutions that deliver analytical insights from
real-time IoT data into your existing applications.
- Watson IoT Platform by IBM
IBM Watson IoT Platform is a managed, cloud-hosted service designed to
make it simple to derive value from your IoT devices.
- Cloud IoT by Google
Google's Internet of Things (IoT) solutions make it easy to build connected
devices. ... Cloud IoT Core is a fully managed service that allows you to easily and
securely connect, manage, and ingest data from millions of globally dispersed
devices.
- IoT Cloud Connect by Cisco –
Cisco Internet of Things (IoT) Cloud Connect is our new mobility-cloud-
based software suite. It offers a complete solution for mobile operators to provide
exceptional IoT experiences.
- Blynk
Blynk is a hardware agnostic IoT platform with customizable mobile apps,
private cloud, device management, analytics, and machine learning and I use blynk to
remotely control my smart trash bin.
Tools
Software

Arduino
The main objective of Arduino is to be able to sense and to get more control over real world
physics. This is an open source, provides prototyping platform which is easy to use either with
software or hardware. It allows developers to create interactive electronic hardware while it software
provides IDE and Arduino programming language (C/C++). And I use the Arduino to write code.
ThingSpeak
ThingSpeak can process HTTP requrests and store and process data. Key features of the open
data platform include an open API, real time data collection, geolocaiton data, data processing and
visualizations, device status messages and plugins. With ThingSpeak, the user can create sensor
logging applications, location tracking applications, and social network of things with status updates.
M2M Labs Mainspring
M2MLabs Mainspring is an open source application framework for building machine to
machine (M2M) applications such as remote monitoring, fleet management or smart grid. Its
capabilities include flexible modeling of devices, device configuration, communication between
devices and applications, validation and normalization of data, long term data storage, and data
retrieval functions. It is based on Java and the Apache Cassandra NoSQL database. M2M applications
can be prototyped in hours rather than weeks and finally transferred to a high performance execution
environment built on top of a standard J2EE server and the highly saleable Apache Cassandra
database.
Eclipse IoT project
Eclipse IoT project include application frameworks and services, open source
implementations of IoT protocols and tools for working with Lua, which Eclipse is promoting as an
ideal IoT programming language.
Kinoma
Kinoma, a Marvell Semiconductor hardware prototyping platform encompasses three
different open source projects. Kimona Create is a DIY construction kit for prototyping electronic
devices. Kimona Studio is the development environment that works with Create and the Kinoma
Platform Runtime. Kimona Connect is a free iOS and Android app that links smartphones and tables
with IoT devices.
Node-RED
A visual tool for wiring the internet of things. That is wiring together hardware devices, APIs
and online services in new and interesting ways. Built on Node.js, Node-RED describes itself as a
visual tool for wiring the internet of things. It allows developers to connect devices, services and APIs
together using a browser based flow editor. It can run on Raspberry Pi, and more than 60000 modules
are available to extend its capabilities. (Peddibhotla, 2019)
Hardware
HC- SR04 Ultrasonic Sensor Module
Ultrasonic Module HC-SR04 works on the principle of SONAR and RANDAR system. It can
be used to determine distance of an object in the range 2cm to 400cm. The module has only 4 pins,
VCC, GND, Trig and Echo. When a pulse of 10µsec or more is given to the Trig pin, 8 pulses of 40
kHz are generated. After this the Echo pin is made high by the control circuit in the module. Echo pin
remains high till it gets echo signal of the transmitted pulses back. The time for which the echo pin
remains high, i.e. the width of the Echo pin gives the time taken for generated ultrasonic sound to
travel to the object and back. Using this time and the speed of sound in air, we can find the distance of
the object using simple formula for distance using speed and time. And I use this ultrasonic sensor to
track user movement. (Electronicwings.com, 2019)

Servo Motor
A servo motor is an electric device used for precise control of angular rotation. It is used in
applications that demand precise control over motion, like in case of control of robotic arm. The
rotation angle of the servo motor is controlled by applying a PWM signal to it. By varying the width
of the PWM signal, we can change the rotation angle and direction of the motor. I use the servo motor
to open or close the trash bin lid. (Electronicwings.com, 2019)
NodeMCU eps8266
The NodeMCU (Node MicroController Unit) is an open source software and hardware
development environment that is built around a very inexpensive System-on-a-Chip (SoC) called the
ESP8266. The ESP8266, designed and manufactured by Espressif Systems, contains all crucial
elements of the modern computer: CPU, RAM, networking (wifi), and even a modern operating
system and SDK. And I use the NodeMCU esp8266 to control the servo motor wirelessly. (IBM
Developer, 2019)

API
IoT APIs are the points of interaction between an IoT device and the internet and/or other
elements within the network.
SOAP – Simple Object Access Protocol
SOAP is a protocol that defines the method of communication between the client and the
server. The transfer of data is done in a XML format. A SOAP web service publishes a definition of
its interface in a machine-readable document using web services definition language.
XML and JSON
XML and JSON are much older methods than SOAP. Instead of using a specific format for
data transfer, both methods use a simpler approach to calls and tend to use much less bandwidth,
which sometimes can be preferred.
REST – Representation State Transfer
When working with IoT hardware development boards such as Particle Photon, Arduino Yun,
Raspberry Pi, Intel Edison/Galileo, Beagle Bone Black/Green plus many more; chances are you will
be using a Restful API to communicate your electronic hardware with the rest of the world using a
IoT software platform. REST APIs are a set of architectural principles rather than a protocol. Some of
the features required for a REST service include the simplicity of interfaces, identification of
resources within the request made and also the ability to manipulate the resources via that particular
interface. From the client side of an application using REST, REST services offer and easy-to-parse
URL structure, made up of mostly nouns that would identify the logic and hierarchical categories of
the data available. (Digikey.com, 2019)

IoT application development plan (Original plan)


Project Plan
There are five steps for my proposed project plan. They are Requirement Specification,
Design, Coding, Testing and Fixing, Installation and deployment.

Requirement Specification
Before starting the project the data necessary for the project is needed to collect first. And
there are many methods for collecting data and I will use interviewing method to collect data for my
project I will create an interview question for collecting user requirements data.

I will use these components for my projects.

Software Components

-Arduino IDE

-Blynk Mobile App

Hardware Components

- Servo Motor
- Arduino Uno
- Jumpers
- Ultrasonic Sensor
- Two Servo Motors (metal)

Design
I will create a 3D model of the trash bin using 3D software Maya and draw the logo design
with Photoshop. And I will draw the circuit diagram with Fitzing.

Implementation
For this project I will use Arduino IDE to implement on this project. For the language I will
choose C programming.

Testing
After writing code I will test and fix the project using Arduino IDE.

Comparison of the final application with the original plan.


Time Scales
No. Start Date End Date Task Name Task Detail
1. 6.5.2019 10.2.2019 Requirement Interview question data collect and
Specification analog, select components, software,
hardware
2. 13.5.2019 15.5.2019 Design Fritzing, Designing the 3D model of the
trash bin.
3. 20.5.2019 24.5.2019 Implementation Search for the necessary components,
Install the necessary software, Testing
servo motor with nodemcu, Testing Servo
motor with blynk IoT mobile app, testing
servo motor with Ultrasonic sensor.
4. 25.5.2019 26.5.2019 Testing Creating the prototype and test it
5. 27.5.2019 29.5.2019 Deployment Testing Overall, Presentation and report.

Comparison of final project with original plan


Project Plan
There are five steps for my proposed project plan. They are Requirement Specification,
Design, Coding, Testing and Fixing, Installation and deployment.

Requirement Specification
I Created interview questions and asked by interviewing people.
I only use these components in the final project. I want to control the trash bin lid wirelessly but in
the original plan I said I will use Arduino Uno but it don’t have WiFi modules so I have to use
NodeMCU (ESP8266). Also I don’t need two servo motors to open the trash bin lid.

Software Requirements

- Arduino IDE
- Blynk Software

Hardware Requirements

- NodeMCU (ESP8266)
- Jumpers
- BreadBoard
- UltraSonic Sensor(HC-SR04)
- Servo Motor

Design
At the design stage, I use blender 3D software to model the 3D version of the trash bin. I
draw the circuit diagram for the project using Fritzing.

In the original plan I said I will use maya for creating the 3D model but I design the trash bin 3D
model version using the Blender 3D software because it is much easier to use and it is also open
source. I also create the logo design of with the Photoshop. And I use fitting for drawing circiuit
diagram.
Figure – 3D model of the trash bin

Figure – Fritzing for the Smart trash bin


Figure - Logo

Coding
In this project I use Arduino IDE to implement on this project. For the language I choose C++
programming. I choose C++ because it is easier than other programming language.

Testing and fixing


Test plan for Smart Trash Bin

Test Number Test Expected Result Actual Result Success/Fail


1 Code compiling After compiling After compiling the Fail
not done the code it need code there is an
successfully to be success. error
2 Opening the After opening the After pressing the Fail
trash bin with trash bin with the on button in the
Blynk app blynk mobile app blynk mobile app
the trash bin the trash bin lid
need to be open didn’t open at all
3 Opening the When the user When the user Success
Trash bin with stand or put their stand or put their
ultrasonic sensor hand in front of hand in front of the
the sensor the sensor the trash bin
trash bin lid open lid open
4 The trash bin lid After the lid open After the lid open it Fail
close after it stay for like 5 close immediately
opening seconds.
Test 1 (Compiling the code)

After writing the code I compile it and there was an error.


So I research about it online and found that it was because I need to install the Blynk libraries. So I
install it and it work successfully now.

Test 2(Opening the trash bin lid with the Blynk mobile app)

After pressing the on button in the blynk mobile app the trash bin lid didn’t open at all and it
is because of the code error. I accidently add wrong virtual pin number in the code. In the blynk app I
set the on button to Virtual Pin V3 but in the code I set it as V4.
I change the code back and it is now working perfectly.

Test 3(opening the trash bin with ultrasonic sensor)

When the user stand or put their hand in front of the sensor the trash bin lid open.
Test 4 (The trash bin lid close after opening)

After the lid open it close back immediately. And it is because there is no delay time after
opening. So I add the delay and now when the lid open and in 5s it close itself.

Time Scales

No. Short Date Task Name

1 6.5.2019 Preparing survey questions

2 7.5.2019 Collecting data and analyze

3 8.5.2019 Checking the survey

4 9.5.2019 Choose components for the projects

5 10.5.2019 Search the app and hardware for the projects

6 13.5.2019 Install Arduino IDE for testing LED test

7 14.5.2019 Install NodeMCU and libraries for testing WiFi control LED project

8 15.5.2019 Install Blynk app and testing led control with moble over the internet

9 20.5.2019 Connecting all the hardware components

10 21.5.2019 Research about Arduino coding

11 22.5.2019 Writing the code for the project

12 23.5.2019 Testing the code


13 24.5.2019 Compiling the hardware and software
14 27.5.2019 Creating prototype and test it.
15 28.5.2019 Writing presentation
16 29.5.2019 Writing report

Step by step procedure


Step 1 – First install NodeMCU ESP8266 board on Arduino IDE.
Step 2 – Download and Install Blynk Libraries on github.

Step 3 – Install Blynk in mobile.


Step 4 – Create a new project. Select ESP8266 in choose device and change the connection type to
WiFi.
Step 5 – Get the Auth Token form your email and put it in the program.
Step 6 – Add two buttons.
Step 7 – Select the Virtual pin number V2 to OFF button and ON button to V3.
Step 8 – Install the Nodemcu and ultrasonic sensor onto the breadboard.

Step 9 – Connect NodeMCU Vin to positive of the breadboard and GND to negative.
Step 10 – Connect the Ultrasonic sensor VCC to positive of the breadboard, Trig to D4 and Echo to
D3 of the nodemcu, and put the GND to negative of the breadboard.

Step 11 – Install the servo motor to the lid of the dust bin.
Step 12 – Connect the Brown wire to negative of the breadboard, red to the positive and Orange to
the D8 of the Nodemcu.

Step 13 – Upload the code to the NodeMCU

Step 14 – and finally you can open or close the the Trash bin wirelessly with blynk or ultrasonic.
Advantage and disadvantage of the Smart trash bin
Advantage Disadvantage
Don’t have to touch the lid so prevent from Sensors might get damaged If it is raining.
germs and diseases. The smart trash bin will not work if it is out
If the user hands are full it will open of power.
automatically for the user. If people keep passing across the sensor it
Using smart trash bin improve living will open continuously.
standard.

User Feedback
1. Where will be place the sensors?
2. When open the door of trash bin, all trash bins will open?
3. Who are used? Trash collector or home resident?
4. What is the power supply for the trash bin?
5. What about security?
6. Is there any power break down procedure?
7. How to prototype / what is prototype design?
8. Are you going to supply power to the trash bin 24 hours?
9. What are the difficulties of trash system?
10. Will the lid close within small after leaving the sensor zone.
11. If the lid is open the sensor system know the user?
Bibliography
Bharadwaj, A., Rego, R. and Chowdhury, A. (2019). IoT based solid waste management system: A
conceptual approach with an architectural solution as a smart city application. [online]
Semanticscholar.org. Available at: https://www.semanticscholar.org/paper/IoT-based-solid-waste-
management-system%3A-A-approach-Bharadwaj-Rego/
f3180f8cf17eb07b4f628748ba2f7b6f36c0e018 [Accessed 29 May 2019].

Peddibhotla, G. (2019). 35 Open Source tools for Internet of Things. [online] Kdnuggets.com.
Available at: https://www.kdnuggets.com/2016/07/open-source-tools-internet-things.html [Accessed
29 May 2019].

Electronicwings.com. (2019). Ultrasonic Sensor HC-SR04 Interfacing With Particle Photon | Part...
[online] Available at: https://www.electronicwings.com/particle/ultrasonic-sensor-hc-sr04-interfacing-
with-particle-photon [Accessed 29 May 2019].

Electronicwings.com. (2019). Servo Motor Interfacing With Arduino Uno | Arduino. [online] Available
at: https://www.electronicwings.com/arduino/servo-motor-interfacing-with-arduino-uno [Accessed 29
May 2019].

IBM Developer. (2019). Getting to know NodeMCU and its DEVKIT board. [online] Available at:
https://developer.ibm.com/tutorials/iot-nodemcu-open-why-use/ [Accessed 29 May 2019].

Digikey.com. (2019). How important are APIs in IoT. [online] Available at:
https://www.digikey.com/en/maker/blogs/how-important-are-apis-in-iot [Accessed 29 May 2019].

Anon, (2019). [online] Available at:


https://www.researchgate.net/publication/319381573_The_Design_and_Implementation_of_Smart_Tr
ash_Bin [Accessed 29 May 2019].

Anon, (2019). Smart Trash Bin - The IEEE Maker Project. [online] Available at:
https://transmitter.ieee.org/makerproject/view/8c49a [Accessed 29 May 2019].

You might also like