Chapter 3
Chapter 3
Chapter 3
3.1 INTRODUCTION
9
controller. Management and lack of smart monitoring of the condition of the
bin. This proposed paper shows an effective solution to manage the garbage.
This garbage monitor is implemented using sensors and PIC microcontroller.
This smart bin system is very useful in preventing overflow of dustbins and
accumulation of wastes around the dustbin. This system monitors the bins and
provide details about the level of garbage collected in the garbage bins via
sensors and Internet. This system uses a PIC microcontroller and node MCU
with a power supply. Ultrasonic sensor placed on the bin detect the people and
opens the lid of the bin and an another ultrasonic sensor placed under the bin lid
detect the garbage level and notifies the authorities when the bin reached
maximum level. IR sensor is used to sense near garbage if any.
1. PIC16F887
2. HC-SR04 Ultrasonic Sensor
3. ESP8266 WiFi module
4. LCD display
10
and 1Enhanced capture/compare/PWM functions, a synchronous serial port that
can be configured as either
3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter- Integrated Circuit
(I²C™) bus and an Enhanced Universal Asynchronous Receiver Transmitter
(EUSART). All of these features make it ideal for more advanced level A/D
applications in automotive, industrial, appliances or consumer applications.The
PIC16F887 is one of the latest products from Microchip. It features all the
components which modern microcontrollers normally have. For its low price,
wide range of application, high quality and easy availability, it is an ideal
solution in applications such as: the control of different processes in industry,
machine control devices, measurement of different values etc. Some of its main
features are listed below.
RISC architecture
Factory calibrated
11
Figure 3.1. PIC16F887 PD1P 40 microcontroller
35 input/output pins
Interrupt-on-Change pin
A/D converter:
14-channels
10-bit resolution
3 independent timers/counters
12
Watch-dog timer
Auto-Baud Detect
13
3.3.2 HC-SR04 ULTRASONIC SENSOR
14
3.3.2.2 ULTRASONIC SENSOR WORKING
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air
and when it gets objected by any material it gets reflected back toward the
sensor this reflected wave is observed by the Ultrasonic receiver module. Now,
to calculate the distance using the above formulae, we should know the Speed
and time. Since we are using the Ultrasonic wave we know the universal speed
of US wave at room conditions which is 330m/s. The circuitry inbuilt on the
module will calculate the time taken for the US wave to come back and turns on
the echo pin high for that same particular amount of time, this way we can also
know the time taken. Now simply calculate the distance using a microcontroller
or microprocessor.
15
3.3.3 ESP8266(IoT)
3.3.3.1 OVERVIEW
16
through the GPIOs. Software Development Kit (SDK) provides sample codes
for various applications. Espressif Systems’ Smart Connectivity Platform
(ESCP) enable sophisticated features include fast switching between sleep and
wake-up mode for energy-efficiency purpose, adaptive radio biasing for low-
power operation, advance signal processing, spur cancellation and radio co-
existence mechanisms for common cellular, Bluetooth, DDR, LVDS, LCD
interference mitigation.
3.3.3.2 THINGSPEAK
17
both human users (along visual graphs) and machines (along easily parse-able
code). We look into practical examples using the arduino micro-controller as
well as communication with graphical interface operating systems through a
Python script. Our report concludes that ThingSpeak is mainly useful for
smaller hardware projects where connectivity over the Internet is need but in
which the preservation of a committed transmission server is not real. Different
IOT services exist but tend to need payment for some of their functionality and
are as a result not open source. With the emergence and popularity of cloud
computing and IoT, the further development of industries is moving towards
cloud-based solutions in automation and control systems. New research in
industries has primarily gone into the direction of supervision, monitoring and
high-level control which is a natural path since the higher levels have less
constraints than the lower ones. Most of the existing works draw their ideas
from the service-oriented architecture (SOA) or web-based architecture (WOA)
concepts. This means that the automation functions are provided as services on
the cloud. The users then have easy access to all the different functionalities of
the system without any requirement for specialized hardware, such as HMI.
There are some solutions emerging for the L2 level as well, but very little is
done so far for L1. The problem here lies in the fact that the constraints,
especially the real-time requirements, get harder in the lower layers. This is a
problem because using an internet connection introduces unpredictability into
these systems that require predictability. Many solutions propose a local cloud
to minimize this problem and some are able to offer soft-real time guarantees.
Currently, some of the existing applications for cloud-based automation are as
follows.
Monitoring and SCADA systems - Most commonly the system is a
user-based application that enables the operators to access the plant
and monitor it remotely form a mobile device. Different access is
provided based on user privilege.
18
Analytics - Large systems with many devices produce a lot of
information which is useful for fault detecting analysis. Some
solutions use clouds for storage and analyses big chunks of data
later (batch computing) while others analyses it as it comes,
without storing it first (stream computing).
Management at different levels - Most dominant is the idea of
Cloud Manufacturing, a new and advanced computing and service-
oriented manufacturing model.
Storage - Clouds can be used for storing data that might not need
frequent use but needs to be archived, like different kinds of
documents or logs and historical data from processes and devices.
Collaboration - Using cloud computing for collaboration in the
development of automated systems is beneficial, especially when
remote teams need to work on its development.
19
Since IoT allows devices to be controlled remotely across the internet,
thus it created opportunities to directly connect & integrate the physical world
to the computer-based systems using sensors and internet. The interconnection
of these multiple embedded devices will be resulting in automation in nearly all
fields and also enabling advanced applications. This is resulting in improved
accuracy, efficiency and economic benefit with reduced human intervention. It
encompasses technologies such as smart grids, smart homes, intelligent
transportation and smart cities. The major benefits of IoT are:
Improved Customer Engagement – IoT improves customer
experience by automating the action. For e.g. any issue in the car
will be automatically detected by the sensors. The driver, as well as
the manufacturer, will be notified about it. Till the time driver
reaches the service station, the manufacturer will make sure that
the faulty part is available at the service station.
Technical Optimization – IoT has helped a lot in improving
technologies and making them better. The manufacturer can collect
data from different car sensors and analyze them to improve their
design and make them much more efficient.
Reduced Waste – Our current insights are superficial, but IoT
provides real-time information leading to effective decision making
& management of resources. For example, if a manufacturer finds
fault in multiple engines, he can track the manufacturing plant of
those engines and can rectify the issue with manufacturing belt.
20
3.3.3.4 IoT HARDWARE
21
IoT ecosystem. Today, Smartphone can interact with smart watch and fitness
band to further ease and enhance the user experience.
IoT uses multiple technologies and protocols to communicate with devices
based on the requirements. The major technologies & protocols are Bluetooth,
wireless, NFC, RFID, radio protocols and WiFi -Direct.
IoT applications are flourishing across all industries & market. The IoT has a
multitude of expansion over various industries. It spans over all groups of users,
from those who are trying to reduce & conserve energy in their home to large
organizations who want to improve their business operations. IoT has not only
proved itself useful in optimizing critical applications in many organization , but
also have boosted the concept of advanced automation which we have imagined
a decade before. Let’s understand the capabilities of IoT across different
industries and look how they are revolutionizing them.
22
LCD is a type of display used in digital watches and many portable
computers. LCD displays utilize to sheets of polarizing material with a liquid
crystal solution between them. An electric current passed through the liquid
causes the crystals to align so that light cannot pass through them. LCD
technology has advanced very rapidly since its initial inception over a decade
ago for use in lap top computers. Technical achievements has resulted in
brighter displace, higher resolutions, reduce response times and cheaper
manufacturing process.
23
Most of the LCD modules conform to a standard interface specification. A 14-
pin access is provided having eight data lines, three control lines and three
power lines. The connections are laid out in one of the two common
configurations, either two rows of seven pins, or a single row of 14 pins.
One of these pins is numbered on the LCD’s printed circuit board (PCB), but if
not, it is quite easy to locate pin1. Since this pin is connected to ground, it often
has a thicker PCB track, connected to it, and it is generally connected to metal
work at same point.
While Vcc and Vss provide +5V and ground respectively, Vee is used for
controlling LCD contrast.
RS Register Select: -
There are two very important registers inside the LCD. The RS pin is used
for their selection as follows. If RS=0, the instruction command code
register is selected, allowing the user to send a command such as clear
24
display, cursor at home, etc. If RS=1, the data register is selected, allowing
the user to send data to be displayed on the LCD.
R/W, read/write: -
R/W input allows the user to write information to the LCD or read
information from it.
R/W = 1 for
reading. R/W= 0 for
writing.
EN, enable: -
The LCD to latch information presented to its data pins uses the enable
pin. When data is supplied to data pins, a high–to- low pulse must be
applied to this pin in order for the LCD to latch in the data present at the
data pins. This pulse must be a minimum of 450 ns wide.
D0 – D7: -
The 8–bit data pins, DO – D7, are used to send information to the LCD or
read the contents of the LCD’s internal registers. To display letters and
numbers, we send ASCII codes for the letters A–Z, a-z numbers 0-9 to
these pins while making RS=1.There are also instruction command codes
that can be sent to the LCD to clear the display or force the cursor to home
position or blink the instruction command codes. We also use RS = 0 to
check the busy flag bit to see if the LCD is ready to receive information.
The busy flag is D7 and can be read when R/W=1 and RS=0, as follows: if
R/W = 1, RS = 0. When D7= 1 (busy flag = 1), the LCD is busy taking
care of internal operations and will not accept any information.
25
3.4 BLOCK DIAGRAM
3.5 CONCLUSION
26
Thus the project is designed using the above components. This Smart
Dustbin can contribute a lot towards clean and hygienic environment in building
a smart city. But since the technology is new in India, proper awareness should
be created among the public before it is implemented on a large scale.
Otherwise, sensitive devices like sensors might be damaged due to rough action
of the users.
27