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

CHAPTER-1

INTRODUCTION

Maintenance of manholes manually is tedious and dangerous due to the poor


environmental conditions inside, so the main focus of this project is to provide a
system which monitors water level, atmospheric temperature, water flow and toxic
gases.

An integral part of any drainage system is the access points into it when it comes to
cleaning, clearing, and inspection. Metropolitan cities have adopted underground
drainage system and the city’s municipal corporation must maintain its cleanliness.

If the sewage maintenance is not proper, ground water gets contaminated causing
infectious disease.

In India, the process to monitor and maintain the drainage system is done manually.
Current improvements and sophistication in planning are essential in the modern
environment. Wastewater consists of solid and liquid waste generated from hospitals,
factories, factories, and households.

Dangerous gasses are released from these wastes, affecting the health of people.
When sewer workers are exposed to the toxic gas, they are more likely to be affected
by illnesses such as paratyphoid fever, hepatitis and even death. Manual drainage pipe
monitoring and cleaning is required, but too long cleaning can create an unhealthy
environment and spread many illnesses.

Nowadays, accidents due to toxic environment under the sewage are quite frequent.
Manholes are not monitored properly in developing countries. These accidents can
lead to serious injuries and also death.

Hence, here we propose a system to overcome this problem. We have included an


array of sensors for complete monitoring of the manhole cover so that such accidents
can be prevented.

Accidents due to sewage is common nowadays so to overcome these miseries we


made this electronic system which will help us to know about the environment under
the sewage through Wi-Fi module which send data to an application.

1
CHAPTER-2

COMPONENTS USED

2.1 Hardware Components:

Table 2.1: List of Hardware Components

Component Name Price

Arduino UNO Rs. 400


LCD 16x2 Rs. 260
Gas Sensor (mq2) Rs. 180
Ultrasonic Sensor Rs. 160
Buzzer Rs. 149
Wi-Fi Module (esp 8266) Rs.225
Battery Rs. 80
Temperature Sensor (dth11) Rs. 76
Breadboard/PCB Rs. 100
Connecting Wires Rs. 40
LED Rs. 5
Switch Rs. 5
Veroboard Dotted Rs. 70

2.2 Software:
Arduino IDE

2
CHAPTER-3
COMPONENTS DESCRIPTION

3.1 Arduino UNO:


The Arduino Uno is an open-source microcontroller board based on the Microchip
ATmega328P microcontroller and developed by Arduino.cc and initially released in
2010. The board is equipped with sets of digital and analog input/output (I/O) pins
that may be interfaced to various expansionboards (shields) and other circuits. The
board has 14 digital I/O pins (six capable of PWM output), 6 analogI/O pins, and is
programmable with the Arduino IDE (Integrated Development Environment), via a
type B USB cable.

Fig. 3.1 Arduino Uno

It contains everything needed to support the microcontroller; simply connect it to a


computer with a USB cable or power it with a AC-to-DC adapter or battery to get
started. You can tinker with your Uno without worrying too much about doing
something wrong, worst-case scenario you can replace the chip for a few dollars and
start over again.

"Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved tonewer releases. The Uno board is the

3
first in a series of USB Arduino boards, and the reference model forthe Arduino
platform; for an extensive list of current, past or outdated boards see the Arduino
index of boards.

3.1.1 Technical Specifications:

 Operating Voltage: 5 Volts


 Input Voltage: 7 to 20 Volts
 Digital I/O Pins: 14
 Analog Input Pins: 6
 DC Current per I/O Pin: 20

A number of pins, which are used to connect with various components you
might want to use with Arduino.

These pins come in two varieties:


Digital pins, which can read and write a single state, on or off. Most Arduinos have 14
digital I/O pins.
Analog pins, which can read a range of values, and are useful for more fine-grained
control. Most Arduinoshave six of these analog pins. These pins are arranged in a
specific pattern, so that if you buy an add-on board designed to fit into them,
typically called a “shield,” it should fit into most Arduino-compatible devices
easily.

A power connector, which provides power to both the device itself, and provides
a low voltage which canpower connected components like LEDs and various
sensors, provided their power needs are reasonably low. The power connector
can connect to either an AC adapter or a small battery.

Here, we will learn about the different components on the Arduino board. We will
study the Arduino UNO board because it is the most popular board in the Arduino
board family. In addition, it is the best board to get started with electronics and
coding. Some boards look a bit different from the one given below, but most
Arduinos have majority of these components in common.

4
Fig. 3.2 Arduino Board

Power USB

Arduino board can be powered by using the USB cable from your computer. All you
need to do is connect the USB cable to the USB connection (1).

Barrel Jack (Power (Barrel Jack))

Arduino boards can be powered directly from the AC mains power supply by
connecting it to the Barrel Jack (2).

Voltage Regulator

The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the processor and other elements.

Crystal Oscillator

The crystal oscillator helps Arduino in dealing with time issues.

Arduino Reset

We can reset our Arduino board, i.e., start your program from the beginning. You can
reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET
(5).

5
Pins

Pins (3.3, 5, GND, Vin)

3.3V (6) − Supply 3.3 output volt

5V (7) − Supply 5 output volt

Most of the components used with Arduino board works fine with 3.3 volt and 5 volts.

GND (8) (Ground) − There are several GND pins on the Arduino, any of which can be
used to ground your circuit.

Vin (9) − This pin also can be used to power the Arduino board from an external power
source, like AC mains power supply.

Analog pins

The Arduino UNO board has six analog input pins A0 through A5. These pins can
read the signal from an analog sensor like the humidity sensor or temperature sensor
and convert it into a digital value that can be read by the microprocessor.

Main microcontroller

Each Arduino board has its own microcontroller (11). You can assume it as the brain
of your board. The main IC (integrated circuit) on the Arduino is slightly different
from board to board. The microcontrollers are usually of the ATMEL Company.

ICSP pin

Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting
of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI
(Serial Peripheral Interface), which could be considered as an "expansion" of the
output. Actually, you are slaving the output device to the master of the SPI bus.

Power LED indicator

This LED should light up when you plug your Arduino into a power source to indicate
that your board is powered up correctly. If this light does not turn on, then there is
something wrong with the connection.

6
TX and RX LEDs

On your board, you will find two labels: TX (transmit) and RX (receive). They appear
in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate
the pins responsible for serial communication. Second, the TX and RX led (13). The
TX led flashes with different speed while sending the serial data. The speed of
flashing depends on the baud rate used by the board. RX flashes during the receiving
process. Digital I/O The Arduino UNO board has 14 digital I/O pins (15) (of which 6
provide PWM (Pulse Width Modulation) output. These pins can be configured to
work as input digital pins to read logic values (0 or 1) or as digital output pins to drive
different modules like LEDs, relays, etc. The pins labelled “~” can be used to
generate PWM.

AREF

AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins. After
learning about the main parts of the Arduino UNO board, we are ready to learn how to
set up the Arduino IDE. Once we learn this, we will be ready to upload our program
on the Arduino board. In this section, we will learn in easy steps, how to set up the
Arduino IDE on our computer and prepare the board to receive the program via USB
cable.

Step 1 − First you must have your Arduino board (you can choose your favourite
board) and a USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano,
Arduino Mega 2560, or Diecimila, you will need a standard USB cable (A plug to B
plug), the kind you would connect to a USB printer as shown in the following image.

Fig. 3.3 USB Cable of Arduino

7
In case you use Arduino Nano, you will need an A to Mini-B cable instead.

Step 2 − Download Arduino IDE Software.

You can get different versions of Arduino IDE from the Download page on the
Arduino Official website. You must select your software, which is compatible with
your operating system (Windows, IOS, or Linux). After your file download is
complete, unzip the file.

Fig. 3.4 Opening Window of Arduino IDE

Step 3 − Power up your board.

The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power
from either, the USB connection to the computer or an external power supply. If you
are using an Arduino Diecimila, you have to make sure that the board is configured to
draw power from the USB connection. The power source is selected with a jumper, a
small piece of plastic that fits onto two of the three pins between the USB and power
jacks. Check that it is on the two pins closest to the USB port. Connect the Arduino
board to your computer using the USB cable. The green power LED (labelled PWR)
should glow.

Step 4 − Launch Arduino IDE.

8
After your Arduino IDE software is downloaded, you need to unzip the folder.
Inside the folder, you can find the application icon with an infinity label
(application.exe). Double-click the icon to start the IDE.

Fig. 3.5 Launch Window of Arduino IDE

Step 5 − Open your first project.

Once the software starts, you have two options −

Create a new project.

Open an existing project example.

To create a new project, select File → New.

Fig. 3.6 Edit File Step

To open an existing project example, select File → Example → Basics → Blink.

9
Fig. 3.7 Open Project in Arduino IDE.

Here, we are selecting just one of the examples with the name Blink. It turns the LED
on and off with some time delay. You can select any other example from the list.

Step 6 − Select your Arduino board.

To avoid any error while uploading your program to the board, you must select the
correct Arduino board name, which matches with the board connected to your
computer.

Go to Tools → Board and select your board.

Fig. 3.8 Board Selection

1
Select Board

Here, we have selected Arduino Uno board according to our tutorial, but you must select
the name matching the board that you are using.

Step 7 − Select your serial port.

Select the serial device of the Arduino board. Go to Tools → Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware
serial ports). To find out, you can disconnect your Arduino board and re-open the
menu, the entry that disappears should be of the Arduino board. Reconnect the board
and select that serial port.

Fig. 3.9 Port Selection

Step 8 − Upload the program to your board.

Before explaining how we can upload our program to the board, we must demonstrate
the function of each symbol appearing in the Arduino IDE toolbar.

1
Fig.3.10 Toolbar Symbol

Upload program

A − Used to check if there is any compilation error.

B − Used to upload a program to the Arduino board.

C − Shortcut used to create a new sketch.

D − Used to directly open one of the example sketch.

E − Used to save your sketch.

F − Serial monitor used to receive serial data from the board and send the serial data
to the board.

Now, simply click the "Upload" button in the environment. Wait a few seconds; you
will see the RX and TX LEDs on the board, flashing. If the upload is successful, the
message "Done uploading" will appear in the status bar.

Note − If you have an Arduino Mini, NG, or other board, you need to press the reset
button physically on the board, immediately before clicking the upload button on the
Arduino Software.

3.2 LCD 16x2:

In LCD 16×2, the term LCD stands for Liquid Crystal Display that uses a plane panel
display technology, used in screens of computer monitors & TVs, smartphones,
tablets, mobile devices, etc. Both the displays like LCD & CRTs look the same
but their

1
operation is different. Instead of electrons diffraction at a glass display, a liquid
crystal display has a backlight that provides light to each pixel that is arranged in a
rectangular network.

Every pixel includes a blue, red, green sub-pixel that can be switched ON/OFF. Once
all these pixels are deactivated, then it will appear black and when all the sub-pixels
are activated then it will appear white. By changing the levels of each light, different
color combinations are achievable. This article discusses an overview of LCD 16X2
& its working with applications.

3.2.1 Definition

An electronic device that is used to display data and the message is known as LCD
16×2. As the name suggests, it includes 16 Columns & 2 Rows so it can display 32
characters (16×2=32) in total & every character will be made with 5×8 (40) Pixel
Dots. So, the total pixels within this LCD can be calculated as 32 x 40 otherwise 1280
pixels.

16 X2 displays mostly depend on multi-segment LEDs. There are different types of


displays available in the market with different combinations such as 8×2, 8×1, 16×1,
and 10×2, however, the LCD 16×2 is broadly used in devices, DIY circuits, electronic
projects due to less cost, programmable friendly & simple to access.

3.2.2 Specifications of LCD 16x2

The specifications of LCD 16X2 are discussed below.

 The operating voltage of this display ranges from 4.7V to 5.3V


 The display bezel is 72 x 25mm
 The operating current is 1mA without a backlight
 PCB size of the module is 80L x 36W x 10H mm
 HD47780 controller
 LED color for backlight is green or blue
 Number of columns – 16
 Number of rows – 2
 Number of LCD pins – 16
 Characters – 32
1
 It works in 4-bit and 8-bit modes
 Pixel box of each character is 5×8 pixel
 Font size of character is 0.125Width x 0.200height

3.2.3 Pin Diagram of LCD 16x2

Fig.3.11 LCD 16x2

3.2.4 Configurations of LCD 16x2

The pin configuration of LCD 16 X 2 is discussed below so that LCD 16×2


connection can be done easily with external devices.

 Pin1 (Ground): This pin connects the ground terminal.


 Pin2 (+5 Volt): This pin provides a +5V supply to the LCD
 Pin3 (VE): This pin selects the contrast of the LCD.
 Pin4 (Register Select): This pin is used to connect a data pin of an MCU &
gets either 1 or 0. Here, data mode = 0 and command mode =1.
 Pin5 (Read & Write): This pin is used to read/write data.
 Pin6 (Enable): This enables the pin must be high to perform the Read/Write
procedure. This pin is connected to the data pin of the microcontroller to be
held high constantly.
 Pin7 (Data Pin): The data pins are from 0-7 which are connected through the
microcontroller for data transmission. The LCD module can also work on the
4-bit mode through working on pins 1, 2, 3 & other pins are free.
 Pin8 – Data Pin 1

1
 Pin9 – Data Pin 2
 Pin10 – Data Pin 3
 Pin11 – Data Pin 4
 Pin12 – Data Pin 5
 Pin13 – Data Pin 6
 Pin14 – Data Pin 7
 Pin15 (LED Positive): This is a +ve terminal of the backlight LED of the
display & it is connected to +5V to activate the LED backlight.
 Pin16 (LED Negative): This is a -ve terminal of a backlight LED of the
display & it is connected to the GND terminal to activate the LED backlight.

3.2.5 LCD 16x2 Command

The LCD 16×2 commands are discussed below.

 HexCode 1: This command will remove data displaying on the screen of LCD.
 HexCode 2: It used to move return home.
 HexCode 4: It is used to modify a cursor location to the left side.
 HexCode 6: It is used to change the cursor location to the right side.
 HexCode 5: It is used to shift the display to right.
 HexCode 7: It used to shift the display to left.
 HexCode 8: It is used to turn off the display & the cursor will be turned off.
 HexCode 0A: It is used to turn ON the cursor &turn off the display
 HexCode 0C: It is used to turn OFF the cursor & turn ON the display
 HexCode 0E: It is used to turn ON the display & blink the cursor.
 HexCode 0F: It is used to turn ON display & blink the cursor
 HexCode 10: It changes the cursor location to left.
 HexCode 14: It changes the cursor location to right.
 HexCode 18: It changes the display location to the left side.
 HexCode 1C: It changes the display location to the right side.
 HexCode 80: It is used to shift the cursor to the primary line.
 HexCode C0: It moves the cursor to the beginning of the next line
 HexCode 38: 2- lines & 5×7 matrix.

1
3.2.6 Working Principle of LCD

The basic working principle of LCD is passing the light from layer to layer
through modules. These modules will vibrate & line up their position on 90 o that
permits the polarized sheet to allow the light to pass through it.

3.3 Gas Sensor:

A gas sensor is a device which detects the presence or concentration of gases in the
atmosphere. Based on the concentration of the gas the sensor produces a
corresponding potential difference by changing the resistance of the material inside
the sensor, which can be measured as output voltage. Based on this voltage value the
type and concentration of the gas can be estimated.

The type of gas the sensor could detect depends on the sensing material present inside
the sensor. Normally these sensors are available as modules with comparators as
shown above. These comparators can be set for a particular threshold value of gas
concentration. When the concentration of the gas exceeds this threshold, the digital
pin goes high. The analog pin can be used to measure the concentration of the gas.

A Typical human nose has 400 types of scent receptors enabling us to smell about 1
trillion different odours. But still, many of us do not have the capacity to identify the
type or concentration of gas present in our atmosphere.

Fig.3.12 Gas Sensor

1
The most commonly used gas sensor is the Metal oxide semiconductor-based gas
sensor. All Gas sensors will consist of a sensing element which comprises of the
following parts.

1. Gas sensing layer


2. Heater Coil
3. Electrode line
4. Tubular ceramic
5. Electrode

3.3.1 Different type of gas sensors are given below:

 Metal Oxide based gas Sensor.


 Optical gas Sensor.
 Electrochemical gas Sensor.
 Capacitance-based gas Sensor.
 Calorimetric gas Sensor.
 Acoustic based gas Sensor.

3.3.2 The below image illustrates the parts present in a metal oxide gas sensor:

Fig.3.13 Gas Sensor Pin Diagram

1
3.3.3 The purpose of each of these elements is as below:

Gas sensing layer: It is the main component in the sensor which can be used to sense
the variation in the concentration of the gases and generate the change in electrical
resistance. The gas sensing layer is basically a chemiresistor which changes its
resistance value based on the

The concentration of particular gas in the environment. Here the sensing element is
made up of a Tin Dioxide (SnO2) which is, in general, has excess electrons (donor
element). So whenever toxic gases are being detected the resistance of the element
changes and the current flown through it varies which represents the change in
concentration of the gases.

Heater coil: The purpose of the heater coil is to burn-in the sensing element so that
the sensitivity and efficiency of the sensing element increases.

Electrode line: As the sensing element produces a very small current when the gas is
detected it is more important to maintain the efficiency of carrying those small
currents. So, Platinum wires come into play where it helps in moving the electrons
efficiently.

Electrode: It is a junction where the output of the sensing layer is connected to the
Electrode line. So that the output current can flow to the required terminal. An
electrode here is made of Gold (Au –Aurum) which is a very good conductor.

Tubular ceramic: In between the Heater coil and Gas sensing layer, the tubular
ceramic exists which is made of Aluminium oxide (Al2O3). As it has high melting
point, it helps in maintaining the burn-in (preheating) of the sensing layer which gives
the high sensitivity for the sensing layer to get efficient output current.

Mesh over the sensing element: In order to protect the sensing elements and the
setup, a metal mesh is used over it, which is also used to avoid/hold the dust particles
entering into the mesh and prevent damaging the gas sensing layer from corrosive
particles.

3.3.4 How to use Gas Sensor:

A basic gas sensor has 6 terminals in which 4 terminals (A, A, B, B) acts input or
output and the remaining 2 terminals (H, H) are for heating the coil. Of these 4
terminals, 2 terminals from each side can be used as either input or output (these

1
terminals are reversible as shown in the circuit diagram) and vice versa.

1
Fig.3.14 MQ-2

These sensors are normally available as modules (shown right), these modules consist
of the gas sensor and a comparator IC. Now let’s see the pin description of the gas
sensor module which we will generally use with an Arduino. The gas sensor module
basically consists of 4 terminals

 Vcc – Power supply


 GND – Power supply
 Digital output – This pin gives an output either in logical high or logical
low (0 or 1) that means it displays the presence of any toxic or combustible
gases near the sensor.
 Analog output – This pin gives an output continuous in voltage which
varies based on the concentration of gas that is applied to the gas sensor.

As discussed earlier the output of a gas sensor alone will be very small (in mV) so an
external circuit has to be used in order to get a digital high low output from the sensor.
For this purpose, a comparator (LM393), adjustable potentiometer, some
resistors and capacitors are used.

The purpose of LM393 is to get the output from the sensor, compare it with a
reference voltage and display whether the output is logically high or not. Whereas the
purpose of the potentiometer is to set the required threshold value of the gas above
which the digital output pin should go high.

1
3.3.5 Application of Gas Sensor

 Used in industries to monitor the concentration of the toxic gases.


 Used in households to detect an emergency incident.
 Used at oil rig locations to monitor the concentration of the gases those are
released.
 Used at hotels to avoid customers from smoking.
 Used in air quality check at offices.
 Used in air conditioners to monitor the CO2 levels.
 Used in detecting fire.
 Used to check concentration of gases in mines.
 Breath analyser.

3.4 Ultrasonic Sensor:

An ultrasonic sensor is an electronic device that measures the distance of a target


object by emitting ultrasonic sound waves, and converts the reflected sound into an
electrical signal. Ultrasonic waves travel faster than the speed of audible sound (i.e.,
the sound that humans can hear). Ultrasonic sensors have two main components: the
transmitter (which emits the sound using piezoelectric crystals) and the receiver
(which encounters the sound after it has travelled to and from the target).

An optical sensor has a transmitter and receiver, whereas an ultrasonic / level sensor
uses a single ultrasonic element for both emission and reception. In a reflective model
ultrasonic / level sensor, a single oscillator emits and receives ultrasonic waves
alternately. This enables miniaturisation of the sensor head.

The operation is not affected by sunlight or black material, although acoustically, soft
materials like cloth can be difficult to detect. It comes complete with ultrasonic
transmitter and receiver module. The operation is not affected by sunlight or black
material, although acoustically, soft materials like cloth can be difficult to detect. It
comes complete with ultrasonic transmitter and receiver module.

2
Fig.3.15(a) Ultrasonic sensor

3.4.1 Technical Specifications:


 Power Supply − +5V DC
 Quiescent Current − <2mA
 Working Current − 15mA
 Effectual Angle − <15°
 Ranging Distance − 2cm – 400 cm/1″ – 13ft
 Resolution − 0.3 cm
 Measuring Angle − 30 degree

2
Fig.3.15(b) Ultrasonic Sensor

3.4.2 Connection between Arduino and Ultrasonic Sensor:

Follow the circuit diagram and make the connections as shown in the image given
below.

Fig. 3.16 Ultrasonic connected with Arduino

3.5 LED:

A light-emitting diode (LED) is a semiconductor device that emits light when current
flows through it. Electrons in the semiconductor recombine with electron holes
releasing energy in the form of photons. The colour of the light (corresponding to the
energy of the photons) is determined by the energy required for electrons to cross the
band gap of the semiconductor. White light is obtained by using multiple
semiconductors or a layer of light-emitting phosphor on the semiconductor device.
LEDs have many advantages over incandescent light sources, including lower power
consumption, longer lifetime, improved physical robustness, smaller size, and faster
switching. In exchange for these generally favourable attributes, disadvantages of
LEDs

2
include electrical limitations to low voltage and generally to DC (not AC) power,
inability to provide steady illumination from a pulsing DC or an AC electrical supply
source, and lesser maximum operating temperature and storage temperature. In
contrast to LEDs, incandescent lamps can be made to intrinsically run at virtually any
supply voltage, can utilize either AC or DC current interchangeably, and will provide
steady illumination when powered by AC or pulsing DC even at a frequency as low as
50 Hz.

Fig.3.17 LEDs

3.6 Breadboard:

A breadboard, solderless breadboard, or protoboard is a construction base used to


build semi-permanent prototypes of electronic circuits. Unlike a stripboard
breadboard do not require soldering or destruction of tracks and are hence reusable.
For this reason, breadboards are also popular with students and in technological
education.

2
Fig.3.18 Breadboard

3.6.1 Breadboard History

The evolution of breadboard - wooden bread cutting board, perfboard, solderless


breadboard. In the before times, boards used in the kitchen for cutting bread were
used by young circuit designers to build circuits on with screws or nails driven into
the board with wires wrapped around them to complete circuits. This was an
improvement on ‘deadbug’ or direct solder connections, since the circuit could be
nailed down and secure as well as easily modified if necessary for debugging or
enhancements. The name has 19 stuck through to today, even though placing circuits
on boards for bread is only done for Instagram posts.

3.6.2 Why do we use a Breadboard?

As mentioned, a breadboard is handy because we can set up circuits quickly and


temporarily to test them and move on to a more permanent arrangement after
investigating how it works on the breadboard. They are great for hobbyists and
tinkerers to set up projects as a standalone device, or as a peripheral to an Arduino,
Raspberry Pi, Launchpad, Beagle Bone, and many other development boards. They
come in many sizes to fit projects large and small. Breadboards are also inexpensive,
and the parts that work with them are also typically inexpensive too. If you want to
make your project more permanent, moving from a design on a breadboard to
protoboard or PCB will be easier than skipping to those harder to manipulate boards.

3.7 Veroboard Dotted:

2
Dotted Small Veroboard Stripboard is designed primarily for hard wiring of discrete
components, typically in analogue circuits, but is equally useful where a number of
common bus or signal lines are required. Vero board can be used to build prototypes
for bench testing, design early electronic circuits, or produce entire electronic
equipment in small quantities. The Vero Electronics Department used Veroboard for
prototype building for the first time in 1961. Veroboard is similar in concept and
usage to a plug-in breadboard, but is cheaper and more permanent—connections are
soldered and while some limited reuse may be possible, more than a few cycles of
soldering and desoldering are likely to render both the components and the board
unusable.

Fig.3.19 Veroboard Dotted

3.8 Buzzer:

A buzzer or beeper is an audio signalling device, which may be mechanical


electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and
beepers include alarm devices train and confirmation of user input such as a mouse
click or keystroke.

2
Piezoelectric buzzers, or piezo buzzers, as they are sometimes called, were invented
by Japanese manufacturers and fitted into a wide array of products during the 1970s to
1980s. This advancement mainly came about because of cooperative efforts by
Japanese manufacturing companies. In 1951, they established the Barium Titanate
Application Research Committee, which allowed the companies to be "competitively
cooperative" and bring about several piezoelectric innovations and inventions.

Fig. 3.20 Piezo Buzzer

This piezo buzzer is 23mm in diameter and has 30mm spaced mount holes. Supplied
with a 100mm lead it is designed for 3 – 20V, it produces a 3kHz tone at an 85dB
level at 30cm.

3.8.1 Specifications:

1. Operation Voltage: 3-24V DC

2. Current: <15mA

3. SPL: 85dBA/10cm

4. Frequency: 3,300Hz

5. Colour: Black

6. Operating Temperature: – 20° to +60°C

2
3.8.2 Types of buzzers:

Buzzers come in a variety of construction, size, and specifications. Different types


and sizes of buzzers are used for different applications. Based on construction, there
are the following kinds of buzzers:

1. Piezoelectric buzzers.

2. Magnetic buzzers.

3. Electromagnetic buzzers.

4. Mechanical buzzers.

5. Electromechanical buzzers.

3.8.3 How to use a Buzzer:

A buzzer is a small yet efficient component to add sound features to our


project/system. It is very small and compact 2-pin structure hence can be easily used
on breadboard, Perf Board and even on PCBs which makes this a widely used
component in most electronic applications.

There are two types are buzzers that are commonly available. The one shown here is a
simple buzzer which when powered will make a Continuous Beep. sound, the other
type is called a readymade buzzer which will look bulkier than this and will produce a
Beep. Beep. Beep. Sound due to the internal oscillating circuit present inside it. But,
the one shown here is most widely used because it can be customised with help of
other circuits to fit easily in our application.

3.9 Wi-Fi Module (esp8266):

The ESP8266 Wi-Fi Module is a self-contained SOC with integrated TCP/IP protocol
stack that can give any microcontroller access to your Wi-Fi network. The ESP8266 is
capable of either hosting an application or offloading all Wi-Fi networking functions

2
from another application processor. Each ESP8266 module comes pre-programmed
with an AT command set firmware, meaning, you can simply hook this up to your
Arduino device and get about as much Wi-Fi-ability as a Wi-Fi Shield offers (and
that's just out of the box)! The ESP8266 module is an extremely cost-effective board
with a huge, and ever growing, community.

This module has a powerful enough on-board processing and storage capability that
allows it to be integrated with the sensors and other application specific devices
through its GPIOs with minimal development up-front and minimal loading during
runtime. Its high degree of on-chip integration allows for minimal external circuitry,
including the front-end module, is designed to occupy minimal PCB area. The
ESP8266 supports APSD for VoIP applications and Bluetooth co-existence interfaces,
it contains a self- calibrated RF allowing it to work under all operating conditions, and
requires no external RF parts.

Fig. 3.21 Wi-Fi Module

3.9.1 Use of Wi-Fi Module:

Wi-fi modules or wi-fi microcontrollers are used to send and receive data over Wi-Fi.
They can also accept commands over the Wi-Fi. Wi-Fi modules are used for
communications between devices. They are most commonly used in the field of
Internet of Things.

28
3.9.2 Why it is called ESP8266?

ESP8266 is the name of an infamous Wi-Fi module that is a system on a chip (SoC)
developed by Espressif Systems, a company based in Shanghai.

3.10 Temperature Sensor (dth11):

Humidity is the measure of water vapour present in the air. The level of humidity in
air affects various physical, chemical and biological processes. In industrial
applications, humidity can affect the business cost of the products, health and safety
of the employees. So, in semiconductor industries and control system industries
measurement of humidity is very important. Humidity measurement determines the
amount of moisture present in the gas that can be a mixture of water vapour, nitrogen,
argon or pure gas etc… Humidity sensors are of two types based on their
measurement units. They are a relative humidity sensor and Absolute humidity
sensor. DHT11 is a digital temperature and humidity sensor.

3.10.1 What is DTH11 Sensor:

DHT11 is a low-cost digital sensor for sensing temperature and humidity. This sensor
can be easily interfaced with any micro-controller such as Arduino, Raspberry Pi
etc… to measure humidity and temperature instantaneously.

DHT11 humidity and temperature sensor is available as a sensor and as a module. The
difference between this sensor and module is the pull-up resistor and a power-on
LED. DHT11 is a relative humidity sensor. To measure the surrounding air this
sensor uses a thermistor and a capacitive humidity sensor.

2
Fig. 3.22 DTH11 Sensor

3.10.2 Principle of DTH11 Sensor:

DHT11 sensor consists of a capacitive humidity sensing element and a thermistor for
sensing temperature. The humidity sensing capacitor has two electrodes with a
moisture holding substrate as a dielectric between them. Change in the capacitance
value occurs with the change in humidity levels. The IC measure, process this
changed resistance values and change them into digital form.
For measuring temperature this sensor uses a Negative Temperature coefficient
thermistor, which causes a decrease in its resistance value with increase in
temperature. To get larger resistance value even for the smallest change in
temperature, this sensor is usually made up of semiconductor ceramics or polymers.

The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree


accuracy. Humidity range of this sensor is from 20 to 80% with 5% accuracy. The
sampling rate of this sensor is 1Hz.i.e., it gives one reading for every second. DHT11
is small in size with operating voltage from 3 to 5 volts. The maximum current used
while measuring is 2.5mA.

3
3.10.3 Application of DTH11

This sensor is used in various applications such as measuring humidity and


temperature values in heating, ventilation and air conditioning systems. Weather
stations also use these sensors to predict weather conditions. The humidity sensor is
used as a preventive measure in homes where people are affected by humidity.
Offices, cars, museums, greenhouses and industries use this sensor for measuring
humidity values and as a safety measure.
It’s compact size and sampling rate made this sensor popular among hobbyists. Some
of the sensors which can be used as an alternative to DHT11 sensor are DHT22,
AM2302, SHT71.

3.11 Arduino IDE:

The software used for this project is Arduino IDE. The Arduino Integrated
Development Environment - or Arduino Software (IDE) - 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.

3.11.1 Writing Sketches:

Programs written using Arduino Software (IDE) are called sketches. These sketches
are written in the text editor and are saved with the file extension .ino. The editor 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 Software (IDE), including complete error messages and
other information. The bottom righthand corner of the window displays the
configured board and serial port. The toolbar buttons allow you to verify and upload
programs, create, open, and save sketches, and open the serial monitor.

3.11.2 Arduino Programming Language:

Arduino code is written in C++ with an addition of special methods and functions,
which we’ll mention later on. C++ is a human-readable programming language. When

3
you create a ‘sketch’ (the name given to Arduino code files), it is processed and
compiled to machine language.

3.11.3 Arduino IDE:

The Arduino Integrated Development Environment (IDE) is the main text editing
program used for Arduino programming. It is where you’ll be typing up your code
before uploading it to the board you want to program. Arduino code is referred to as
sketches Note: It's important to use the latest version of Arduino IDE. From time to
time, check for updates here.

Fig.3.23 Arduino IDE

3.11.4 Arduino code example:

As you can see, the IDE has a minimalist design. There are only 5 headings on the
menu bar, as well as a series of buttons underneath which allow you to verify and
upload your sketches. Essentially, the IDE translates and compiles your sketches into
code that Arduino can understand. Once your Arduino code is compiled it’s then
uploaded to the board’s memory. All the user has to do to start compiling their sketch
is press a button (a guide to this can be found below). If there are any errors in the
Arduino code a warning message will flag up prompting the user to make changes.
Most new users often experience difficulty with compiling because of Arduino’s
stringent syntax

3
requirements. If you make any mistakes in your punctuation when using Arduino, the
code won’t compile and you’ll be met with an error message.

3.11.5 Serial Monitor and Serial Plotter:

Arduino serial monitor can be opened by clicking on the magnifying glass icon on the
upper right side of the IDE or under tools. The serial monitor is used mainly for
interacting with the Arduino board using the computer, and is a great tool for real-
time monitoring and debugging. In order to use the monitor, you’ll need to use the
Serial class. The code you download from circuito.io has a test section that helps you
test each components using the serial monitor.

Fig.3.24 Serial Plotter.

3.11.6 Debugging Arduino Code and Hardware:

Unlike other software programming platforms, Arduino doesn’t have an onboard


debugger. Users can either use third-party software, or they can utilize the serial
monitor to print Arduino’s active processes for monitoring and debugging. By using
the Serial class, you can print to the serial monitor, debugging comments and values
of variables. On most Arduino models, this will be using serial pins 0 and 1 which are
connected to the USB port.

3
3.11.7 Installing library:

The Arduino environment can be extended through the use of libraries, just like most
programming. Libraries provide extra functionality for use in sketches, e.g., working
with hardware or manipulating data.

A number of libraries come installed with the IDE, but you can also download or
create your own.

Libraries are a collection of code that makes it easy for you to connect to a sensor,
display, module, etc. For example, the Liquid Crystal library makes it easy to talk to
character LCD displays.

To install a new library into your Arduino IDE you can use the Library Manager
(Available from IDE version 1.6.2). Open the IDE and click to the "Sketch" menu and
then Include Library > Manage Libraries.

Fig. 3.25. Library

Then the Library Manager will open and you will find a list of libraries that are
already installed or ready for installation. In this example we will install the Bridge
library. Scroll the list to find it, click on it, then select the version of the library you
want to install. Sometimes only one version of the library is available. If the version
selection menu does not appear, don't worry: it is normal.

3
Fig.3.26 Installing New Library.

Finally click on install and wait for the IDE to install the new library. Downloading
may take time depending on your connection speed. Once it has finished, an Installed
tag should appear next to the Bridge library. You can close the library manager.

Fig.3.27. Library Manager

You can now find the new library available in the Sketch > Include Library menu.

3
CHAPTER-4

WORKING

An underground drainage monitoring system will not only help in maintaining the
proper health and safety of the city but also in reducing the work of government
personnel. Various types of sensors (flow, level, temperature and gas sensors) are
interfaced with microcontroller Arduino Uno in order to make the system smart.
When the respective sensors reach the threshold level, the indication of that respective
value and sensor is being sent to the microcontroller. Furthermore, Arduino Uno then
sends the data of the manhole to the user through Wi-fi module. Also, Arduino Uno
updates the live values of all the sensors in the manholes falling under the respective
area using IoT. A message will also be displayed on the LCD.

4.1 Procedure:

The setup is now ready. We now write the code in Arduino IDE and then Upload it to
Arduino. When there would be suspicious movement detected through sensor, the
buzzer should ring.

3
CHAPTER-5

ARDUINO PROGRAM STRUCTURE

In this chapter, we will study in depth, the Arduino program structure and we will
learn more new terminologies used in the Arduino world. The Arduino software is
open- source. The source code for the Java environment is released under the GPL
and the C/C++ microcontroller libraries are under the LGPL.

Sketch − The first new terminology is the Arduino program called

“sketch”. Structure

Arduino programs can be divided in three main parts: Structure, Values (variables and
constants), and Functions. In this tutorial, we will learn about the Arduino software
program, step by step, and how we can write the program without any syntax or
compilation error.

Let us start with the Structure. Software structure consist of two main functions –

Setup() function

Loop( ) function

PURPOSE − The setup() function is called when a sketch starts. Use it to initialize the
variables, pin modes, start using libraries, etc. The setup function will only run once,
after each power up or reset of the Arduino board.

INPUT −

OUTPUT −

RETURN −

3
Void Loop ( ) {}

PURPOSE − After creating a setup() function, which initializes and sets the initial
values, the loop() function does precisely what its name suggests, and loops
consecutively, allowing your program to change and respond. Use it to actively
control the Arduino board.

INPUT –

OUTPUT −

RETURN –

Decision making structures require that the programmer specify one or more
conditions to be evaluated or tested by the program. It should be along with a
statement or statements to be executed if the condition is determined to be true, and
optionally, other statements to be executed if the condition is determined to be false.
Following is the general form of a typical decision-making structure found in most of
the programming language-

Fig.5.1. Decision making structure

3
Decision Making

Control Statements are elements in Source Code that control the flow of program
execution. They are –

Table 5.1. List of Control Statement & Description

S.NO. Control Statement and Description

1 If statement

It takes an expression in parenthesis and a statement or block of


statements. If the expression is true then the statement or block of
statements gets executed otherwise these statements are skipped.
2 If ...else statement

An if statement can be followed by an optional else statement, which


executes when the expression is false.
3 If...else if ...else statement

The if statement can be followed by an optional else if...else statement,


which is very useful to test various conditions using single if...else if
statement.
4 switch case statement

Similar to the if statements, switch...case controls the flow of programs


by allowing the programmers to specify different codes that should be
executed in various conditions.
5 Conditional Operator?:

is the only ternary operator in C.

Programming languages provide various control structures that allow for more
complicated execution paths.

3
A loop statement allows us to execute a statement or group of statements multiple
times and following is the general form of a loop statement in most of the
programming languages −

Loop Architecture

C programming language provides the following types of loops to handle looping


requirements.

Table 5.2. List of Loop & Description

S.NO. Loops and Description


1 while loop

while loops will loop continuously, and infinitely, until the expression
inside the parenthesis, () becomes false. Something must change the
tested variable, or the while loop will never exit.
2 do...while loop

The do...while loop is similar to the while loop. In the while loop, the
loop-continuation condition is tested at the beginning of the loop
before performed the body of the loop.
3 for loop

A for loop executes statements a predetermined number of times. The


control expression for the loop is initialized, tested and manipulated
entirely within the for-loop parentheses.
4 Nested Loop

C language allows you to use one loop inside another loop. The
following example illustrates the concept.

5 Infinite loop

It is the loop having no terminating condition, so the loop becomes


infinite.

4
CHAPTER-6

ARDUINO CODE

6.1 Code:

#include “DTH.H”
#include <LiquidCrystal.h>
#define DHTPIN8
#define DHTTYPEDHT11
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

intsmokeA0=A0:

int sensorThres=100;
const int trigPin=9;
const int echoPin=12;
// long duration;
int distance;

DHT dht(DHTPIN,DHTTYPE);
void setup() {

pinMode(smokeA0,INPUT);
pinMode(trigPin, OUTPUT);//Sets the trigPin as an Output
pinMode(echoPin, INPUT); //Sets the echoPin as an Input
pinMode(LED_BUILTIN, OUTPUT);

Serial.begin(9600);
Serial.println(F("DHTxx test!"));
dht.begin();

lcd.begin(16,2);
lcd.setCursor(4,0);

lcd.print("Welcome!!!");

4
delay(5000);
lcd.clear();
}

void loop() {
int analogSensor = analogRead(smokeA0);

Serial.println(analogSensor-50);
lcd.print("S:");
lcd.print(analogSensor-50);

if (analogSensor-50 > sensorThres)


{
lcd.setCursor(0, 2);
lcd.print("Alert.. .!!!");
digitalWrite(12, LOW);
}
else
}
digitalWrite(12,HIGH);
lcd.setCursor(0,2);
lcd.print(“…..normal……”);

// ultrasonic
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

4
// Calculating the distance
distance = duration * 0.034 / 2;

Serial.print("Distance: ");
Serial.println(distance);

If(distance<10){
digitalWrite(LED_BUILTIN, HIGH);
else{
digitalWrite(LED_BUILTIN, LOW);
}

// temperature DHT11

float t = dht.readTemperature();
float f =
dht.readTemperature(true);

if (isnan(t) || isnan(f)) {
Serial.println(F("Failed to read from DHT sensor!"));
return;
}

lcd.setCursor(6, 0);
lcd.print("Temp:");
lcd.print(t);

delay(500);
lcd.clear();
}

6.2 Arduino Functions Explanation:

The functions allow a programmer to divide a specific code into various sections, and
each section performs a particular task. The functions are created to perform a task
multiple times in a program.

The function is a type of procedure that returns the area of code from which it is called.
4
For example, to repeat a task multiple times in code, we can use the same set of
statements every time the task is performed.

Advantages of using functions:

Let's discuss some advantages of using functions in programming, which are listed
below:

 It increases the readability of the code.


 It conceives and organizes the program.
 It reduces the chances of errors.
 It makes the program compact and small.
 It avoids the repetition of the set of statements or codes.
 It allows us to divide a complex code or program into a simpler one.
 The modification becomes easier with the help of functions in a program.

The Arduino has two common functions setup() and loop(), which are called
automatically in the background. The code to be executed is written inside the curly
braces within these functions.void setup() - It includes the initial part of the code,
which is executed only once. It is called as the preparation block.void loop() - It
includes the statements, which are executed repeatedly. It is called the execution
block.

The Arduino void setup and void loop functions are mandatory. If we try to compile a
code with one of those functions missing, and you'll get an error.

void setup()

The code that we put inside void setup() will only run once, and that will be at the
beginning of our program.

Its start with curly { } - opening bracket & close with closing brackets. The void setup
function executes only one time as soon as you upload, power up, or reset Arduino. In
void setup, there are three things we have to define.

 Serial.begin()
 pinMode()

4
Serial.begin()

Descrpition:

Sets the data rate in bits per second (baud) for serial data transmission. For
communicating with Serial Monitor, make sure to use one of the baud rates listed in
the menu at the bottom right corner of its screen. You can, however, specify other
rates - for example, to communicate over pins 0 and 1 with a component that requires
a particular baud rate.An optional second argument configures the data, parity, and
stop bits. The default is 8 data bits, no parity, one stop bit.

Syntax:

Serial.begin(speed)
Serial.begin(speed, config)

Returns:

Nothing

Notes and Warning:

For USB CDC serial ports (e.g. Serial on the Leonardo), Serial.begin() is irrelevant.
You can use any baud rate and configuration for serial communication with these
ports. See the list of available serial ports for each board on the Serial main page.

The only config value supported for Serial1 on the Arduino Nano 33 BLE and Nano
33 BLE Sense boards is SERIAL_8N1.

pinMode()

Descrpition:

4
Configures the specified pin to behave either as an input or an output. See the Digital
pin page for details on the functionality of the pins.As of Arduino 1.0.1, it is possible
to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally,
the INPUT mode explicitly disables the internal pullups.

Syntax:

pinMode(pin, mode)

Returns:

Nothing

Notes and Warning:

The analog input pins can be used as digital pins, referred to as A0, A1, etc.

void loop()

In void loop(), our code will repeat over and over again. The void loop function takes
no argument inside it. Code within Void loops functions repeat consecutively until
Arduino is turned off. Whatever we write inside these curly brasses will run again and
again. Its start with curly { } opening bracket & close with closing brackets.

Arduino Serial and Serial.begin()

4
CHAPTER-7

CIRCUIT

DIAGRAM

7.1 Circuit on Breadboard:

Fig.7.1 Circuit on Breadboard

7.2 Circuit on Veroboard:

For the final submission of project, we made the whole circuit on Veroboard dotted.

4
CHAPTER-8

ADVANTAGES AND APPLICATION

8.1 Advantages:

The major advantages of a smart manhole system are as follows:

 The proposed system will be a beneficial product for the community since it
automates the function of individuals coming to the location and observing it.
 This system will be a helpful product since it will monitor the manhole cover
24 h a day, seven days a week.
 Most accidents may be avoided if manhole covering is maintained properly.

 As a result, the project will be a step forward in the field of safety.

8.2 Disadvantages:

 Regular power supply is needed to get update.

8.3 Applications:

 To provide safety for human beings.

 Also used in coal mines to detect the humidity and temperature level.

4
CHAPTER-9

CONCLUSION & FURURE SCOPE

9.1 Conclusion:

It is cost effective monitoring system, which can be expected to drastically


reduce the accidents during sewage cleanliness.

9.2 Future Scope:


 We can send this data to a remote location using mobile and internet, we
can also send data to the sewage worker’s phone using wi-fi.
 We can implement other related modules like fire sensor.

4
REFERENCES

 https://www.ijert.org/research/manhole-detection-and-monitoring-system-
IJERTCONV9IS12005.pdf
 https://youtu.be/vJlK0W7kRW8
 https://nevonprojects.com/iot-based-manhole-detection-and-monitoring-
system/
 Wikipedia for description of components.

You might also like