0% found this document useful (0 votes)
14 views

rep new 01

The document discusses the importance of efficient water management, particularly for overhead tanks, to prevent water wastage and ensure availability. It outlines a project aimed at automating water level monitoring using sensors and controllers to minimize human intervention and optimize resource usage. The project also includes a billing monitoring system and references various studies on automatic water level control technologies.

Uploaded by

Manoj Nadagouda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

rep new 01

The document discusses the importance of efficient water management, particularly for overhead tanks, to prevent water wastage and ensure availability. It outlines a project aimed at automating water level monitoring using sensors and controllers to minimize human intervention and optimize resource usage. The project also includes a billing monitoring system and references various studies on automatic water level control technologies.

Uploaded by

Manoj Nadagouda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Smart water management for overhead tank

CHAPTER 1
INTRODUCTION
1.1 BACKGROUND
Water is one of the most important substances on earth. All plants and animals must have water
to survive. Water scarcity involves water crises, water shortage, water deficit or water stress.
Water scarcity can be due to physical water scarcity and economic water scarcity. Physical water
scarcity refers to a situation where natural water resources are unable to meet region’s demand
while economic water crisis is a result of poor water management resources. If there was no
water there would be no life on earth. Apart from drinking it to survive, people have many other
uses for water. Overhead water tanks are used for Domestic water storage and commercial water
storage purposes. They are generally placed over the rooftop of any house, building or
apartment. These tanks circulate the water through its distributary channels or pipes to the taps.
Generally most of the houses depend upon the overhead tanks as the main source of water. One
of the commonly seen situations in every house is that the overflow from the tank made people
to switch off the pump. Otherwise they should keep monitoring the tank when the pump is ON
and switch OFF the pump as soon as the tank is full. What happens when the client or user is not
aware of water overflow or he is not at the home while water is overflowing, As a result water
resource is being wasted only because of improper management standards that we follow.
Efficient usage techniques should be employed to gain better control on resource consumption
water wastage is a serious issue that must be considered. Every drop of water counts when it
comes to human survival on this planet as we only have a little amount of water available for us.
as per the records only 3 percent of the water is available for the inhabitation the remaining 97
percent of the water is situated in the oceans.
 Currently there are many products which can solve this problem but the implementation
and maintenance are much difficult. This model does works by communicating wirelessly
so the client will no longer worry about the connection wires.
 Automatic water level monitoring system uses network of things i.e. this model uses its
own local area network to maintain communication between the nodes Arduino calculate
and make decisions based on the program given by the developer.

Department of EEE , KLEIT, Hubballi Page 1


Smart water management for overhead tank

 Electronics deals with electrical circuits that involve active electrical components such as
pump, relay, LCD, transmitter and receiver circuit, LED, and sensors.
 Electronics is considered to be a branch of physics and electrical engineering. An
electronic component is any physical entity in an electronic system used to affect the
electrons or their associated fields in a manner consistent with the intended function of
the electronic system.
Components are generally intended to be connected together, usually by being soldered
to a printed circuit board (PCB), to create an electronic circuit with a particular
function (for example an amplifier, radio receiver, or oscillator Some common electronic
components are capacitors, inductors, resistors, diodes, transistors, etc. Components are
often categorized as active or passive.

1.2 Problem Statement


Most of the times People generally switch on the motor when their taps go dry and switch off the
motor when the tank starts overflowing. This results in unnecessary wastage of water and
sometimes non-availability of water in emergency.
Sometimes people forget to switch OFF the pump by involving in their day-to-day activities.
This results in wastage of both water and power resources. This is the serious problem that must
be considered because the global scale of power and water resource wastage will be high.

1.3 Objectives

 The main intention of this project is to control the water management activity automatic
by using some sensors which can detect the water level and controllers which can turn
ON or OFF the pump based on the water level.

 The system which decreases human intervention in maintaining the overhead tanks which
is capable of effective water usage.

 To test the water temperature using LM35 sensor, if the temperature is above threshold
valve, then water flows through special valve provided or else it flows to sump for reuse
without wastage.

Department of EEE , KLEIT, Hubballi Page 2


Smart water management for overhead tank

 To design water billing monitoring system using flow liquid meter sensor and SMS
gateway.

1.4 Scope of the Project:


This model can turn OFF the pump as soon as the sensor detects the maximum water level in the
tank. The pump will be turned ON as soon as the water level in the tank goes low. This circuit
not only indicates the amount of water present in the overhead tank but also gives alarm when
the tank is full. This worthy device starts ringing as soon as the water tank becomes full. It is
suitable for every tank.

1.5 Organization of the project:


The report comprises of five chapters. As mentioned below:

Chapter 1: Chapter 1 gives the brief introduction about the importance of the water usage. The
chapter 1 also summarizes various papers and articles in the field of water monitoring/
management system.
Chapter 2: Chapter 2 briefs about methodology adopted for implantation of the work.Also
explain about the software details and individual components working details.
Chapter 3: Chapter 3 briefs about the system explanation and also procedure for the building of
program.
Chapter 4: Chapter 4 describes the results of the project.It is obtained during the process of
operation of proposed project .
Chapter 5: Chapter 5 describes about the conclusion and future scope drawn from the overall
work carried out.

Department of EEE , KLEIT, Hubballi Page 3


Smart water management for overhead tank

1.6 LITERATURE REVIEW

(Ria Sood et.al., 2013)have emphasised on the need of water level controller in irrigation in
agriculture. It says that every crop requires different amount of water and this can be done by
using automatic water level controller which will also help in reducing wastage of water. Here
they use a technique to measure flow of rate of water in irrigation pipelines. It uses a Hall Effect
Sensor to measure the rate flow. G1/2 Hall Effect water flow sensor is used as a sensing unit
with a turbine rotor inside it, whose speed of rotation changes with the different rate of flow of
water.

(SanamPudasaini et.al.,2014)(International journal of Scientific and Research publication,


September 2014) have presented a system of an automatic water level controller with SMS
notification. SMS notification was added to automatic controller system so that water can be
managed by user during load shedding. Two systems work synergistically. automatic level
controller system and SMS system. The program was developed in Arduino program developing
environment and uploaded to the Microcontroller. Water level in the system is controlled
automatically. The controller operates on a battery power. Whenever the system encounters
empty level and the status of load shedding, the SMS notification is sent to the user. The system
will automate the process by placing a single sensor unit in the tank that will periodically take
measurements of the water level and will control the motor automatically. This system eliminates
the efforts of people for daily filling of the tank and checks for overflow.

(Asaad Ahmed Mohammed Ahamad Eltaieb et.al.,2016)The involved in designing and


development of automatic water level control system had exposed to the better way of software
and hardware architecture that blends together for the interfacing purposes. The system employs
the use of advance sensing technology to detect the water level. It uses Arduino and uses relay to
control motor. Different wires are attached at different Junctions of the Beaker. When we pour
water in the beaker. The water comes in contact with the wire and tells the level of water in the
tank. Accordingly, they have displayed the level of water on LCD display. And uses relay to turn
ON and OFF the motor.

Department of EEE , KLEIT, Hubballi Page 4


Smart water management for overhead tank

(Ms.Pooja K, Ms. Kusumavathiet.al.,2017)involved in water level indicator and controller


system is used to sort out the issues associated with water tank. It is also possible to check the
level of the water using sensor so that whenever the water goes below, pump gets turned ON
automatically also when there is overflow of water in water tank it uses sensor to detect the water
level so that if the water level goes above, the pump gets turned off automatically. This system
prevents wastage of water.

(P. Nancy Rachel et.al.,2019)presented the drinking water crisis in India is reaching alarming
proportions. It might very soon attain the nature of global crisis. Hence it is of extreme
importance to preserve water. In homebased water tank, the one problem is very common to us
that the control of water level of overhead tank, as a result the wastage of water is increasing day
by day. But we all know water is very precious to us. This problem can be controlled by a simple
electronic circuit consists with some cheap electronic components that circuit is called 'water
level indicator'. As the water level rises or falls, different circuits in the controller send different
signals. The relay operates the water pump so, when the water level is maximum, the relay turns
the pump OFF and when the water level is minimum, the relay turns ON the pump.
This reduces the water wastage due to overflow from tanks and also ensures that water in the
tank is always available to use. Also reduces human involvement in turning ON and OFF the
pump, as this process is made entirely automatic.

(Vaishnavi Raikar et.al.,2019) involved water level Indicator which help us to know when the
water in our tanks is either full or empty and automatically switch ON and OFF the pump as and
when necessary. By using the basic principle of ultrasonic sensors, i.e., the ECHO method. The
20 kHz ultrasonic distance sensor remotely senses level of water by measuring length of
emptiness or fullness of the tank from recorded time of arrival of echo from water surface. This
length is interpreted and displayed by program-based microprocessor in percentage of the
capacity on Liquid Crystal Display (LCD) unit.

(ANIRUDH KODAVATIGANTI et.al.,2018) (International Journal of Research in Engineering and


Applied Sciences (IJREAS) involved in the designing of a water level sensor device using Arduino
UNO, that can detect the level of water in a water storage system. An ultrasonic sensor is used to

Department of EEE , KLEIT, Hubballi Page 5


Smart water management for overhead tank

generate ultrasonic waves, a water sensor to detect the water level, LEDs to signify the
importance of different water levels, PC to observe the levels of water. We indicated a green
LED for safe water level, one red LED for about to reach max level and two red LEDs for
maximum water level. This circuit is efficient and can be used for any application involving the
levels of any liquid.

(Mr. MuthamilSelvan.S et.al.,2018) (Automatic water level indicator using ultrasonic sensor and
GSM module. Water is being measured by using ultrasonic sensors. Initially, the tank is
considered to be empty. When the sound waves are transmitted in the environment, they are
reflected back as ECHO. This same concept is applied this project. Waves generated by
ultrasonic sensors is sent to the water tank and their time of travelling and coming back is noted
and after few calculations we can estimate the level of water in the tank. The motor pump is
automatically turned ON when the water level becomes low and turned OFF when the tank is
full. These alerts are sent as notifications in our phones through the GSM Module.

(Prayash, Kurnalsingh et.al.,2019) International Journal of Science and Research


(IJSR),2019)involved in development of water level controlling and monitoring system for
preserving water using Arduino and easy-to-use mobile application. Actually, there is a lot of
drinking water crisis in India and also in other countries. Today we need to preserve water at any
cost. In India, we can see many houses as overhead tanks and they keep on overflowing water. It
wastes a lot of water as well as electricity. If we do not do anything on this matter than we can
face huge scarcity of water.

(Vardaan Mittal et.al.,2019) involved in measuring of water level with the help of ultrasonic
sensors. This system uses automated turning motor ON/OFF with the help of relay which helps
in controlling the excess water flow from overhead tanks. Accordingly, they have displayed the
level of water on LCD Display.

(Mallikarjun Hudedmani et.al.,2018) (Flexible Automatic Water level controller) presented


that water is very precious for the living beings and scarcity of the same is gradually increasing.
Most of the cities in the county and that of the world are facing this problem. This is one of the

Department of EEE , KLEIT, Hubballi Page 6


Smart water management for overhead tank

motivations for the current work and to deploy techniques in order to save water and help the
environment which in turn ensures water for the future. Hence, it is of utmost importance to
preserve and save water. In many houses there exists unnecessary wastage of water due to
overflow from overhead tanks etc. Automatic Water Level Controller can provide a solution to
this problem. Present work does not use any microcontrollers etc. The operation of water level
controller is based on the fact that water conducts electricity. As the water level rises or fall the
sensing probes and circuits of the controller detect the same. These signals are used to switch ON
or switch OFF the pump motor as per requirements. This system is used to automate the process
of water pumping to over-head tank storage and has the facility to select the level of water to
pump. The logical situations using electronic circuit manage the system. The required amount or
volume of water can be pumped to the overhead tank by choosing level selector unlike waiting
for the complete filling in the conventional circuits.

(Gaurav Gosavi et.al.,2017) (GOA COLLEGE OF ENGINEERING, GOA INDIA Smart water
flow monitoring and forecasting system) developed accurate metering and determining proper
tariff, as well as billing system, are vital in water management system. The paper proposes a
method to watch and forecast the consumption of the water in the domestic pipeline through a
web server. There are many systems to do the same, but this is about monitoring consumption of
water using the Internet with the help of Raspberry pi and Arduino. The flow rate of the water is
measured by Hall Effect sensor-based flow meter. Raspberry Pi a micro-computer receives the
data from Arduino micro-controller which is connected to the flow meter. The Raspberry pi
uploads the data onto cloud infrastructure where database is setup. The web base solution also
depicts the day to day consumption of the water to its users and water distributors. The paper
also aims at predicting the consumption of the water in future for its users using advance data
analytics. This paper also includes demand management, asset management, and leakage
management aspects of water management system.

(F Fahmi1, A Hizriadi2 et.al.,2019) Explained Public clean water company as public


organization which is designed to meet the needs of the community. Currently, the number of
PDAM subscribers is very big and will continue to grow, but the service and facilities to
customers are still done conventionally by visiting the customer's home to record the last

Department of EEE , KLEIT, Hubballi Page 7


Smart water management for overhead tank

position of the meter. One of the problems of PDAM is the lack of disclosure of PDAM
customers' invoice because it is only done monthly. This, of course, makes PDAM customers
difficult to remember the date of payment of water account. Therefore, it is difficult to maintain
the efficiency. The purpose of this research is to facilitate customers of PDAM water users to
know the details of water usage and the time of payment of water bills easily. It also facilitates
customers in knowing information related to the form of water discharge data used, payment
rates, and time grace payments using SMS Gateway. In this study, Flow Liquid Meter Sensor
was used for data retrieval of water flowing in the piping system. Sensors used to require the
help of Hall Effect sensor that serves to measure the speed of water discharge and placed on the
pipe that has the same diameter size with the sensor diameter. The sensor will take the data from
the rate of water discharge it passes; this data is the number of turns of the mill on the sensor.
The results of the tests show that the built system works well in helping customers know in detail
the amount of water usage in a month and the bill to be paid.

(V. Basil Hans et.al 2018) Water the critical resource of agriculture, has not been well managed
in India, despite the country being an agricultural powerhouse. It has some 195 MH of land
under cultivation of which some 62 per cent is rain-fed and 37 per cent, irrigated. Agriculture
uses 85 per cent of the water resources with low efficiency. The rain-fed area is the critical area
of cultivation with the largest concentration of rural poverty spanning several agro ecological
regions. Water management is related to three important challenges in the agricultural front
today namely raising productivity per unit of land, reducing poverty, and responding to food
security needs. In the light of the new call to achieve “more crop per drop”, this paper discusses
pertinent issues related to irrigation in India and the strategies and arrangements to address water
scarcity for irrigation. The study finds that problems are largely institutional, structural, and
administrative. Overcoming them is crucial for agricultural development in general and water
management in particular.

(Mohammed Shahanas.Ka, Dr.Bagavathi Sivakumar et.al 2016) The Internet, invention of the
century, has completely revolutionized the world and brought people closer to each other than
ever before. The advancement in technologies of computing, communication brings the next
generation of Internet, Internet of Things. As the population and urbanization increases, the cities

Department of EEE , KLEIT, Hubballi Page 8


Smart water management for overhead tank

have to transform to Smart Cities which can be achieved with the help of Internet of Things.
Water is one of the vital resource for existence of human life and so Smart water management
system has a key role in smart city. The paper reviewed different technologies and platforms that
are required for a smart environment. An architecture design for Smart water management is
proposed and an implementation detail of Smart water monitoring system is discussed.

(Neha.LS. Khaire, Minal .D. Mahajan , Aditee .S. Kavitake et.al 2017) We are proposing an
intelligent system for management of water by using Embedded System and Smart phone app i.e.
Android app for indexing the water consumption and showing graphical analysis of water used
with an extra -ordinary comparative consumption done. We are using ultrasonic sensor to
calculate total water in a tank and water flow sensor to capture the flow of water i.e. water
consumption from tank using Arduino to compute details and then this raw data is sent to local
server via Wi-Fi for processing it on terms like, i) amount of water needed per person ii) amount
of water consumed daily/weekly/yearly indexing iii) comparative analysis of different colleges
need different amount of water depending on needs iv) excess water consumed a nd report
generation. Then the processed data is sent to android app accordingly and a daily , weekly,
monthly report of water consumption is generated.

Summary
It is important to save water because all living beings need water to survive. It sustains all life.
Every drop of water counts when it comes to human survival on this planet as per record only
3% of water is available for inhabitation the remaining 97% of water is situated in the oceans. So
we have developed smart way of water conservation system.

Department of EEE , KLEIT, Hubballi Page 9


Smart water management for overhead tank

Chapter 2
Methodology
2.1 BLOCK DIAGRAM

RF transmitter
IoT
Server

Wi fi module
Flow sensor

Single
Arduino contract relay Motor
Temperature Mega
sensor

Valve 1
Single
Ultrasonic contract relay
sensor
Valve 2

LCD

Fig 2.1 Block diagram of water monitoring system

Department of EEE , KLEIT, Hubballi Page 10


Smart water management for overhead tank

Automatic water level monitoring system uses network of things i.e. this model uses its own
local area network to maintain communication between the nodes Arduino calculate and
make decisions based on the program given by the developer. Electronics is the discipline
dealing with the development and application of devices and systems involving the flow of
electrons in a vacuum, in gaseous media, and in semiconductors. Electronics deals with
electrical circuits that involve active electrical components such as pump, relay, LCD,
transmitter and receiver circuit, LED, and sensors, buzzer, IC 7805. Electronics is considered
to be a branch of physics and electrical engineering. An electronic component is any physical
entity in an electronic system used to affect the electrons or their associated fields in a
manner consistent with the intended function of the electronic system. Components are
generally intended to be connected together, usually by being soldered to a printed circuit
board (PCB), to create an electronic circuit with a particular function (for example an
amplifier, radio receiver, or oscillator). Components may be packaged singly, or in more
complex groups as integrated circuits. Some common electronic components are capacitors,
inductors, resistors, diodes, transistors, etc. Components are often categorized as active or
passive. An embedded system is a computer system with a dedicated function within a larger
mechanical or electrical system, often with real-time computing constraints. It is embedded
as part of a complete device often including hardware and mechanical parts. Embedded
systems control many devices in common use today. Ninety-eight percent of all
microprocessors are manufactured as components of embedded systems. In this model we are
going to use an Arduino as a microcontroller. Arduino is a very minute part of embedded
systems, in fact you can call it as an application product of embedded system. Arduino is just
any other microcontroller board. Arduino is just a drop of water in Embedded System
Ocean. Most of the day to day problems can be addressed by using the technology.
Embedded systems allow us to develop a standalone system which can solve certain problem.
Embedded system has the capability to run automatically. It reduces the human involvement
in the problem solving once it is assembled and deployed.

Department of EEE , KLEIT, Hubballi Page 11


Smart water management for overhead tank

Tank unit

RF
Ultrasonic
transmitter
sensor
Arduino

Buzzer

Fig 2.2 Tank unit

Embedded systems work very fast at the rate of microseconds after all it is just like an electron
travelling on a semiconductor medium with specific voltage. Machines or electronics works
under any climate conditions when particular shielding is provided to the system. An embedded
system is one kind of a computer system mainly designed to perform several tasks like to access,
process, store, and also control the data in various electronics-based systems. Embedded
systems are a combination of hardware and software where software is usually known as
firmware that is embedded into the hardware. One of its most important characteristics of
these systems is, it gives the o/p within the time limits. Embedded systems support to make
the work more perfect and convenient. So, we frequently use embedded systems in simple
and complex devices too. The applications of embedded systems mainly involve in our real
life for several devices like microwave, calculators, TV remote control, home security and
neighborhood traffic control systems Embedded system alone will have limitless
opportunities when it comes to solve real world problem what happens when we provide
internet community to every system and every device that is called as an IOT. Internet of
things facilitates internet connectivity to every device making the device accessible from

Department of EEE , KLEIT, Hubballi Page 12


Smart water management for overhead tank

remote area or from internet. Connectivity allows sharing of large data with the server where
the decision-making system resides. All the nodes can be controlled by the master and every
thing else works as a slave in the network. IOT devices are a part of the larger concept of
home automation, also known as Demotic’s. Large smart home systems utilize a main hub or
controller to provide users with a central control for all of their devices. These devices can
include lighting, heating and air conditioning, media and security systems. Ease of usability
is the most immediate benefit to connecting these functionalities. Long term benefits can
include the ability to create a more environmentally friendly home by automating some
functions such as ensuring lights and electronics are turned off. One of the major obstacles to
obtaining smart home technology is the high initial cost. Connecting every device in the
home to an internet may bring more accessibility to the client as well as limited security.

2.2 SOFTWARE DETAILS

Embedded system means some combination of computer hardware and programmable software
which is specially designed for a particular task like displaying message on LCD. If you are still
wondering about an embedded system, just take a look at these circuit applications using
AT89c51 microcontroller. You can call these applications embedded systems as it involves
hardware (AT89c51 microcontroller) and software (the code written in assembly language).

Some real-life examples of embedded systems may involve ticketing machines, vending
machines, temperature controlling unit in air conditioners etc. Microcontrollers are nothing
without a Program in it.

One of the important parts in making an embedded system is loading the software/program we
develop into the microcontroller. Usually it is called “burning software” into the controller.
Before “burning a program” into a controller, we must do certain prerequisite operations with the
program. This includes writing the program in assembly language or C language in a text editor
like notepad, compiling the program in a compiler and finally generating the hex code from the
compiled program. Earlier people used different software/applications for all these 3 tasks.
Writing was done in a text editor like notepad/WordPad, compiling was done using a separate

Department of EEE , KLEIT, Hubballi Page 13


Smart water management for overhead tank

software (probably a dedicated compiler for a particular controller like AT89c51), converting the
assembly code to hex code was done using another software etc. It takes lot of time and work to
do all these separately, especially when the task involves lots of error debugging and reworking
on the source code.

2.2.1 Keil Micro Vision is a free software which solves many of the pain points for an
embedded program developer. This software is an integrated development environment (IDE),
which integrated a text editor to write programs, a compiler and it will convert your source code
to hex files too.

Here is simple guide to start working with Keil Vision which can be used for

 Writing programs in C/C++ or Assembly language


 Compiling and Assembling Programs
 Debugging program
 Creating Hex and Axf file
 Testing your program without Available real Hardware (Simulator Mode)

2.2.2 IDE

The arduino integrated development environment (ide) is a cross-platform application (for


windows, macos, and linux) that is written in the programming language java. It originated from
the ide for the languages processing and wiring. it includes a code editor with features such as
text cutting and pasting, searching and replacing text, automatic indenting, brace matching, and
syntax highlighting, and provides simple one-click mechanisms to compile and upload
programs to an arduino board. It also contains a message area, a text console, a toolbar with
buttons for common functions and a hierarchy of operation menus. The source code for the ide is
released under the gnu general public license,version2.

The Arduino ide supports the languages c and c++ using special rules of code structuring. The
Arduino ide supplies a software library from the wiring project, which provides many common
input and output procedures. user-written code only requires two basic functions, for starting the
sketch and the main program loop, that are compiled and linked with a program stub main() into

Department of EEE , KLEIT, Hubballi Page 14


Smart water management for overhead tank

an executable cyclic executive program with the gnu tool chain, also included with the ide
distribution. The arduino ide employs the programs to convert the executable code into a text file
in hexadecimal encoding that is loaded into the Arduino board by a loader program in the board's
firmware.

2.3 COMPONENTS DETAILS


2.3.1 Ultrasonic sensors

2.3 Ultrasonic sensor

Devices that use electrical–mechanical energy transformation to measure distance from the
sensor to the target object. Ultrasonic waves are longitudinal mechanical waves which travel as a
sequence of compressions and rarefactions along the direction of wave propagation through the
medium. Apart from distance measurement, they are also used in ultrasonic material testing (to
detect cracks, air bubbles, and other flaws in the products), Object detection, position detection,
ultrasonic mouse, etc.

These sensors are categorized in two types according to their working phenomenon –
piezoelectric sensors and electrostatic sensors. Here we are discussing the ultrasonic sensor using
the piezoelectric principle. Piezoelectric ultrasonic sensors use a piezoelectric material to
generate the ultrasonic waves

Department of EEE , KLEIT, Hubballi Page 15


Smart water management for overhead tank

Ultrasonic sensors (also known as transceivers when they both send and receive, but more
generally called transducers) work on a principle similar to radar or sonar, which evaluate
attributes of a target by waves. Active ultrasonic sensors generate high frequency sound waves
and evaluate the echo which is received back by the sensor, measuring the time interval between
sending the signal and receiving the echo to determine the distance to an object. Passive
ultrasonic sensors are basically microphoning that detect ultrasonic noise that is present under
certain conditions.

Fig 2.4 Working of Ultrasonic Sensor


The range of the target is determined by the "time lagging" between transmitted pulse and the
received "echo". Generally microwave and ultrasonic frequencies are used in RADARS
Our HC-SR04 ultrasonic sensor works similar to the RADAR mechanism but in a simplified
manner. This sensor consists of four PINS

Pin Description of Ultrasonic Sensor


1.Vcc-connect to 5V dc
2.Trigger-pulse input that triggers the sensor
3.Echo-indicates the reception of echo from the target
4.Gnd-ground final

Department of EEE , KLEIT, Hubballi Page 16


Smart water management for overhead tank

Table 2.1 ULTRASONIC SENSOR PIN CONFIGURATION

PIN NUMBER PIN NAME DESCRIPTION


1 VCC THE VCC PIN POWERS
THE SENSOR, TYPICALLY
WITH
+5V
2 TRIGGER TRIGGER PIN IS AN
INPUT PIN. THIS PIN HAS
TO BE KEPT HIGH FOR
10US TO INITIALIZE
MEASUREMENT BY
SENDING US WAVE.
3 ECHO ECHO PIN IS AN OUTPUT
PIN. THIS PIN GOES HIGH
FOR A PERIOD OF TIME
WHICH WILL BE EQUAL
TO THE TIME TAKEN FOR
THE US WAVE TO
RETURN BACK TO THE
SENSOR.
4 GROUND THIS PIN IS CONNECTED
TO THE GROUND OF THE
SYSTEM.

How to Find the Range of Target in Ultrasonic Sensor

ULTRASONIC pulse travels with the speed of sound 340.29 m/s = 34029 cm/s
range of target = velocity *time ==>34029 * TIMER0/2
==> 17015 * TIMER0
At 12MHz TIMER0 gets incremented for 1microsecond.
RANGE = 17015 centimeters/seconds * TIMER0 micro seconds
= 17015 centimeters/seconds * TIMER0*(10^-6) seconds
as (1microsecond=10^-6seconds)
= 17015 centimeters/seconds * TIMER0 * (10^-6) seconds

= 17015 * TIMER0 centimeters

Department of EEE , KLEIT, Hubballi Page 17


Smart water management for overhead tank

(1000000)

= TIMER0_______ centimeters
1000000/ 17015

= TIMER0_ centimeters
58.771

RANGE of target = TIMER0_ cm


59

Distance Calibration:

For accurate distance measuring you may calibrate the obtained result. Here for making
the displayed distance more accurate, I added 1 to the measured distance. This constant of
calibration can be find using a series of practical experiments with a ruler scale.

2.3.2 RELAY

Department of EEE , KLEIT, Hubballi Page 18


Smart water management for overhead tank

A relay is an electrically operated switch in which contacts can be made to operate in the pre –
arranged fashion. In short, a relay is a switch worked by an electromagnet.

CLASSIFICATION OF RELAYS
1. Electromagnet relays.
2. Solid state relays.
3. Hybrid relays.
Relays are switching devices operated by currents and employed to control large power or to
perform switching operations.

ARMAT RELAY
URE CONTACTS

COIL OF N
RETAININ
G SPRING
TURNS

Fig 2.5 ELECTROMAGNETIC RELAYS

OPERATION
Fig 3.3 shows the construction features of a simple electromagnetic relay. It
consists of a coil. A dc current passing through which produces a magnetic field. This magnetic
field attracts an armature which in turn operates the contact, normally open contacts close and

Department of EEE , KLEIT, Hubballi Page 19


Smart water management for overhead tank

normally closed contacts open. As long as current flows, the two contacts remain closed. When
the current is switched off, the attractive force on armature is no longer present and the contact is
opened.
SPECIFICATIONS OF RELAY:

1. 6 volts
2. 5 amps
3. Single contact

2.3.3 LIQUID CRYSTAL DISPLAY (LCD)

The LCD panel used in this block interfaced with micro-controller through output port. This is a
16 character × 2Line LCD module, capable of display numbers, characters, and graphics. The
display contains two internal byte-wide registers, one for commands (RS=0) and the second for
character to be displayed (RS=1). It also contains a user programmed Ram area (the character
RAM) character that can be formed using dot matrix that can be programmed to generate any
desired. Two distinguished between these areas, the hex command byte will be signifying that
the display RAM address 00h is chosen.

LCD can add a lot to our application in terms of providing a useful interface for the user,
debugging an application or just giving it a “professional” look. The most common type of LCD
controller is the Hitachi 44780 which provides a relatively simple interface between a processor
and an LCD. Using this inter is often not attempted by inexperienced designers and programmers
because it is difficult to find good documentation on the interface, initializing the interface can
be problem and the displays themselves are expensive.

Connection to a PC parallel port is mostly simple. These displays can handle eight-bit
input directly. They also need two extra lines to control which kind of data has just arrived and
when the data is meant to be stable. Those signals are also called RS (Register Select, instruction
or data register) and EN (enable).

So it has to control ten data lines (8 bits + RS + EN) and one common ground (GND)

Department of EEE , KLEIT, Hubballi Page 20


Smart water management for overhead tank

line, which make eleven lines to the parallel port. Data read back is not supported by the driver
and so it does not require extra line for this. The following table shows the needed connection.

Microcontroller Parallel port 16×2 Alphanumeric


LCD

Fig 2.6 16×2 LCD connection to microcontroller

2.3.4 7805 REGULATED POWER SUPPLY

Input IC Output
7805

Common

V in V out
(Unregulated) (Regulated)

Fig2.7 Regulated power supply

A DC power supply system, which maintains constant voltage irrespective of fluctuations in the
main supply or variation in the load, is known as Regulated Power supply.The7805 IC referred
to fixed positive voltage regulator, which provides fixed voltage 5 volts. The 7805 regulator is
known as fixed voltage regulator.

Department of EEE , KLEIT, Hubballi Page 21


Smart water management for overhead tank

Fixed –Voltage regulator design has been greatly simplified by the introduction of 3-terminal
regulator ICs such as the 78xx series of positive regulators and the 79xxx series of negative
regulators, which incorporate features such as built-in fold back current limiting and thermal
protection, etc. These ICs are available with a variety of current and output voltages ratings, as
indicated by the ‘xxx’ suffix; current ratings are indicated by the first part of the suffix and the
voltage ratings by the last two parts of the suffix. Thus, a 7805 device gives a 5V positive output
at a 1a rating, and a 79L15 device gives a 15V negative output at a 100mA rating.

3-terminal regulators are very easy to use. The regulators ICs typically give about 60dB of ripple
rejection, so 1V of input ripple appears as a mere 1mV of ripple on the regulated output. A
rectified filter and unregulated DC voltage is given to pin of IC regulator. A bypass capacitor is
connected between input and ground to bypass the ripples and oscillations. The output capacitor
is connected between output and ground to improve transient response. The unregulated input is
applied to the IC must be always more than the regulated output.

2.3.5 LED’S

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator
lamps in many devices and are increasingly used for other lighting.
The LED consists of a chip of semiconducting material doped with impurities to create
a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side,
or cathode, but not in the reverse direction. Charge-carriers—electrons and holes—flow into the
junction from electrodes with different voltages. When an electron meets a hole, it falls into a
lower energy level, and releases energy in the form of a photon.

The wavelength of the light emitted, and thus its color depends on the band gap energy of
the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes
recombine by a non-radiative transition, which produces no optical emission, because these
are indirect band gap materials. The materials used for the LED have a direct band gap with
energies corresponding to near-infrared, visible, or near-ultraviolet light.

Department of EEE , KLEIT, Hubballi Page 22


Smart water management for overhead tank

LED development began with infrared and red devices made with gallium arsenide.
Advances in materials sciencehave enabled making devices with ever-shorter wavelengths,
emitting light in a variety of colours.

LEDs are usually built on an n-type substrate, with an electrode attached to the p-type layer
deposited on its surface. P-type substrates, while less common, occur as well. Many commercial
LEDs, especially GaN/InGaN, also use sapphire substrate.

Most materials used for LED production have very high refractive indices. This means that much
light will be reflected back into the material at the material/air surface interface. Thus, light
extraction in LEDs is an important aspect of LED production, subject to much research and
development.

Fig 2.8 LEDs

Parts of an LED. Although not directly labeled, the flat bottom surfaces of the anvil and post
embedded inside the epoxy act as anchors, to prevent the conductors from being forcefully
pulled out from mechanical strain or vibration.

Why LED?
LED indicate water level. The terminals of LED are inserted in the water tank. When water rises
to different levels it makes a connection and thus it turns ON the LED. If only one LED is
glowing it indicate that water is at level 1 marked on tank. Similarly, if two LED glows it
indicate water on tank is at level 2. And if all the LED glow it indicates that water has reached

Department of EEE , KLEIT, Hubballi Page 23


Smart water management for overhead tank

maximum level and the motor needs to be turned off show that water doesn’t overflow from the
tank. A Resistor is used with LED which limit the current in the LED to a safe value. The value
of the resistor can be determined by ohms law.

Calculation –
The voltage drops across LED = 2V (STANDARD)
Current for better brightness = 20mA (STANDARD)
Apply Voltage = 5V
Using ohms law – V = I*R R = (5-3) / 20 Ma
R = 150 ohm

2.3.6 LM35 TEMPERATURE SENSORS

Fig 2.9 LM35 Temperature sensor

The LM35 datasheet specifies that this ICs are precision integrated-circuit temperature sensors,
whose output voltage is linearly proportional to the Celsius (Centigrade) temperature.

The LM35 thus has an advantage over linear temperature sensors calibrated in ˚ Kelvin, as the
user is not required to subtract a large constant voltage from its output to obtain convenient
Centigrade scaling. The LM35 does not require any external calibration or trimming to provide
typical accuracies of ±1⁄4˚C at room temperature and ±3⁄4˚C over a full −55 to +150˚C
temperature range.

Department of EEE , KLEIT, Hubballi Page 24


Smart water management for overhead tank

Why Temperature Sensor? The temperature sensor senses the temperature of the boiler at regular
intervals and provides a continuous track of the temperature variations. As soon as temperature
rises above a particular threshold it gives the indication that the temperature has reached
maximum value in the boiler and needs to be switched off. LCD show both Temperature in oC
and oF. The conversion formula for oC to oF is given by – °C x 9/5 + 32 = °F
LM35 is a precision IC temperature sensor with its output proportional to the temperature (in
oC). The sensor circuitry is sealed and therefore it is not subjected to oxidation and other
processes. With LM35, temperature can be measured more accurately than with a thermistor. It
also possess low self-heating and does not cause more than 0.1 oC temperature rise in still
air.The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV
in response to every oC rise/fall in ambient temperature, i.e., its scale factor is 0.01V/ oC.

Table 2.2 Pin configuration of LM35


Pin Number Pin namer Description
1 Vcc Input voltage is +5v for typical application
2 Analog out There will be increase in 10mv for rise of every 1 C can range from
-1v (-55C) to 6v (150C)
3 Ground Connected to ground of circuit

2.3.7 NodeMCU

Department of EEE , KLEIT, Hubballi Page 25


Smart water management for overhead tank

Fig 2.10 NodeMCU ESP8266

NodeMCU is an open-source Lua based firmware and development board specially targeted for
IoT based Applications. It includes firmware that runs on the ESP8266 Wi-Fi SoC from
Espressif Systems, and hardware which is based on the ESP-12 module.

NodeMCU ESP8266 Specifications & Features

 Microcontroller: Ten silica 32-bit RISC CPU Xtensa LX106


 Operating Voltage: 3.3V
 Input Voltage: 7-12V
 Digital I/O Pins (DIO): 16
 Analog Input Pins (ADC): 1
 UARTs: 1
 SPIs: 1
 I2Cs: 1
 Flash Memory: 4 MB
 SRAM: 64 KB
 Clock Speed: 80 MHz
 USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
 PCB Antenna
 Small Sized module to fit smartly inside your IoT projects

Brief About NodeMCU ESP8266:


The NodeMCU ESP8266 development board comes with the ESP-12E module containing
ESP8266 chip having Ten silica Extensa 32-bit LX106 RISC microprocessor. This
microprocessor supports RTOS and operates at 80MHz to 160 MHz adjustable clock frequency.
Node MCU has 128 KB RAM and 4MB of Flash memory to store data and programs. Its high
processing power with in-built Wi-Fi / Bluetooth and Deep Sleep Operating features make it
ideal for IoT projects.
NodeMCU can be powered using Micro USB jack and VIN pin (External Supply Pin). It
supports UART, SPI, and I2C interface.

Department of EEE , KLEIT, Hubballi Page 26


Smart water management for overhead tank

Fig 2.11 Wi-Fi modulator

ESP8266 schematics include the following components:


 Power supply
 Power-on sequence and reset
 Flash
 Crystal oscillator
 RF
 External resistor
 UART
So far, we cover Esp8266 preamble, functional block diagram, pins layout, description, and
schematics.In August 2014 suppressive Systems launched their first raw module which is
manufactured by third part AI-Thinker and module referred as ESP-01 module. Since then, Ai-
Thinker developed a series of modules based around ESP8266, this series referred as ESP-xx
modules ranges from 01 to 14.

Applications of Node MCU

 Prototyping of IoT devices


 Low power battery operated applications
 Network projects
 Projects requiring multiple I/O interfaces with Wi-Fi and Bluetooth functionalities

Department of EEE , KLEIT, Hubballi Page 27


Smart water management for overhead tank

2.3.8 Water flow sensor

Using Arduino Water Flow Sensor tutorial as a reference, we can implement a system which can
measure the quantity of water (or any liquid) flowing through a pipe.

Fig 2.12 interfacing of arduino and flow sensor

Monitoring Liquid Flow is very important in a variety of application like a simple plant watering
system in your home garden to complex pharmaceutical and food processing industries. Water
Flow Sensors are simple devices which can aid us in measuring the flow of a liquid.

Note on Water Flow Sensor


Water Flow Sensor, as the name suggests, is a device to measure the flow of water. The Water
Flow Sensor used in this project is shown in the image below.

Department of EEE , KLEIT, Hubballi Page 28


Smart water management for overhead tank

Fig 2.13 water flow sensor

It has a plastic valve body with a rotor and a hall sensor circuit. It has three wires namely +5V
(Red), GND (Black) and Output (Yellow). Since it works on +5V, it can be interfaced with any
microcontroller like Arduino, for example.The water level sensor, there is some information on
the top and bottom of the sensor. On top, there is a label with vital information about the sensor.

The information on the label is as follows:

 Model: YF-S201
 Working Range: 1 – 30 L/min
 Water Pressure: ≤ 1.75 MPa
On the bottom of the sensor, there is a marking in the form of an arrow, to indicate the required
direction of flow of water through the sensor. So, it is important that when connecting this sensor
to a pipe, make sure that you follow this direction.

Department of EEE , KLEIT, Hubballi Page 29


Smart water management for overhead tank

Fig 2.14 flow meter

Working of Water Flow Sensor

The Water Flow Sensor is implemented using a Hall effect Sensor. So, the working of the Water
Flow Sensor can be easily understood if you are familiar with a Hall Effect Sensor. basically, the
YF-S201 Water Flow Sensor consists of a Flap Wheel (or a Turbine Wheel) that spins when
water flows through the sensor. At the centre of this flap wheel, there is magnet fixed. Now
coming to the Hall Effect Sensor part, the Hall Effect Sensor used in my Water Flow Sensor is
Honeywell’s 460S Hall-effect Sensor IC. It is a TO-92 Packaged IC.

Fig 2.15 Hall effect sensor

The working of 460S Hall-effect sensor is as follows: when the South Pole of the magnet is
towards the IC, then the output of the sensor is LOW and when the North Pole of the magnet is
towards the IC, then the output is HIGH. when the water flows through the YF-S201 Water Flow

Department of EEE , KLEIT, Hubballi Page 30


Smart water management for overhead tank

Sensor, the flap wheel spins due to the force of the water and as a result, the magnet attached to it
will also spin.

Fig 2.16 Internal structure of flow meter

As a result, the magnetic field near the Hall-effect sensor switches polarity as the flap wheel
spins and the output of the sensor (on the output Pin – Yellow Wire) will be a pulse. keeping
track of the number of pulses from the output of the Water Flow Sensor, we can easily calculate
the amount of water flowing through the sensor and as a result the Water Flow Rate.

Summary

It important to know the detailed block diagram and the components used with their working
to build the complete model. Block diagram depict a diagram showing in schematic form the
general arrangement of the parts. Arduino is a key tool to learn new things. It is an AVR
Microcontroller based hardware and software platform which is easier to interface for coding
and do not need to worry about memory architecture of the microcontroller. Node MCU is an
open source firmware for which open source prototyping board designs are available.

CHAPTER 3

Department of EEE , KLEIT, Hubballi Page 31


Smart water management for overhead tank

SYSTEM EXPLAINATION

3.1 SOFTWARE EXPLAINATION

Step 1: After opening Keil uV4, Go to Project tab and Create new u Vision project. Now
Select new folder and give name to Project. As shown in fig3.1.

Fig 3.1 Opening of key

Step 2: After Creating project now Select your device model. Example.NXP-LPC2148 as
shown in fig 3.2.

Fig3.2 creating of project

Department of EEE , KLEIT, Hubballi Page 32


Smart water management for overhead tank

Step 3: so now your project is created and Message window will appear to add startup file of
your Device click on Yes so it will be added to your project folder. As shown in fig3.3.

Department of EEE , KLEIT, Hubballi Page 33


Smart water management for overhead tank

Fig 3.3 Adding file to project

Step 4: Now go to File and create new file and save it with .C extension if you will write
program in C language or save with .asm for assembly language. As shown in fig3.4.

Fig 3.4 Saving of project

Department of EEE , KLEIT, Hubballi Page 34


Smart water management for overhead tank

Step 5: Now write your program and save it again. You can try example given at end of this
tutorial. Right click on target and click on options for target. Here you can change your device
also. As shown in fig 3.5.

Fig 3.5 Writing of the program

Step 6: After that on left you see project window [if it’s not there….go to View tab and click
on project window]. Now come on Project window. Click output tab here & check create Hex
file if you want to generate hex file. Now click on ok so it will save changes. As shown in
figure 3.6.

Department of EEE , KLEIT, Hubballi Page 35


Smart water management for overhead tank

Fig 3.6 Creation of hex file

Step 7: Now Expand target and you will see source group. Right click on group and click on
Add files to source group. As shown in figure 3.7.

Fig 3.7 Adding files to source group

Now add your program file which you have written in C/assembly. You can see program file
added under source group.

Department of EEE , KLEIT, Hubballi Page 36


Smart water management for overhead tank

Step 8: Now Click on Build target. You can find it under Project tab or in toolbar. It can also
be done by pressing F7 key.

Fig 3.8 Building of target file

Step 9: you can see Status of your program in Build output window

Fig 3.9 Output window

Department of EEE , KLEIT, Hubballi Page 37


Smart water management for overhead tank

3.2 Interfacing of Hardware


3.2.1 Interface Ultrasonic sensor with Arduino Uno

Fig 3.9 Interfacing Arduino with sensor

Ultrasonic sensor is one of the main part of numerous projects. Here we interface a
Ultrasonic sensor HC-SR 05 with Arduino Uno.
 Connect a Ultrasonic Sensor HC-SR 05 to Arduino.
 Read the sensor and convert it to length.
 Print the length to the Serial Monitor.

HC - SR 05
Department of EEE , KLEIT, Hubballi Page 38
Smart water management for overhead tank

Actually it consists of an ultrasonic transmitter and an ultrasonic receiver. First ultrasonic


transmitters send an ultrasonic wave. This signal will collide with the object and reflect the
signal. The receiver will receive the reflected signal. The distance calculated by the time
taken to receive the reflected. And the speed of sound in air. The speed of sound in air at
room temperature is 340 Meter/Second or 0.034 centimeter/microsecond. The equation for
calculating time is,
Time=Distance/speed of sound

If the object is 10 CM away from the sensor, You will get the time as per the equation is,

10/0.034 = 294.11 Microseconds. But you will get the value from the Echo pin is 588.22.
This is because of the sound wave needs to travel forward and bounce backward. So we
need to divide that value by 2 for get the actual value(time). Here we want to calculate the
distance from the time. So re-arrange the equation we will get,

Distance=Time x speed of sound

The time to start,

Step - 1

Open the Arduino IDE (refer my previous article for introduction to Arduino IDE here) and
we need define two pins, echo Pin on digital pin 2 and trig Pin on digital pin 3. by using the
keyword "define'. Next declare two variables, one is "duration". This is for store the
duration of sound wave traveled. Other is "distance" for store the distance calculated.
#defineechoPin2
#definetrigPin3
longduration;
int distance;

definition part is completed. Next setup part.

Step - 2

In the void setup() function we need to begin the serial communication with baurd rate as
9600. It is done by the keyword "Serial.begin(9600)". Then set the trigPin as "OUTPUT",

Department of EEE , KLEIT, Hubballi Page 39


Smart water management for overhead tank

by the keyword "pinMode(trigPin, OUTPUT)". Because the trigPin is the input pin of
transmitter of sensor module. Now we need to set the echoPin as "INPUT". By the keyword
"pinMode(echoPin, INPUT)".

voidsetup(){
Serial.begin(9600);
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
}

setup part is completed.

Now we need to code the loop part.

Step - 3

Now the trigPin state is in a float condition. We need to set it as "LOW". for this purpose we
use the keyword "digitalWrite(trigPin, LOW)". Then hold this state for 2 microseconds by
the keyword "delayMicroseconds(2)".

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

Now we need to set the trigPin "HIGH" for 10 seconds, with the same keyword mentioned
above. Only change the parameter.

digitalWrite(trigpin,HIGH);
delayMicroseconds(10);

Then set the trigPin as "LOW" state.

digitalWrite(trigpin,LOW);

Now read the echoPin and put it to the function "pulseIn(echoPin, HIGH)". This returns the
total travel time. So we need to store this return value to the variable "duration".

duration=pulseIn(echoPin,HIGH);

The total travel time is now stored in the variable "duration"

Department of EEE , KLEIT, Hubballi Page 40


Smart water management for overhead tank

Now we can calculate the distance from this duration by using the equation. And store
calculated value (distance) to the variable "distance". The equation is explained above

distance=(duration*0.034/2);

The distance from the sensor to the object is now stored in the variable "distance".

Then we need to display it to screen. For this purpose, here we using the serial
communication. Ypu can also use LCD, Sven Segment Display, OLED Disply, etc...(The
will change). First print a headingor a message. Here I am going to print "Distance". by
using "Serial.print("Distance : " )". After that print the distance to the serial monitor, we use
the keyword "Serial.println(distance)". Then print the unit by "Serial.println(" cm ")". Here I
used a "ln" with "Serial.print()". It's for start a new line. The code is like,

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

The code is completed. Upload the code to Arduino Uno. The complete code is given in the
code part.

Step - 4

Next add a 1 second delay

delay(1000);

Step - 5

Then connect the Ultrasonic sensor HC -SR05 to Arduino Uno with female to male jumber
wire.

HC -SR05 Arduino Uno

Vcc 5V

echo D2

trig D3

Department of EEE , KLEIT, Hubballi Page 41


Smart water management for overhead tank

GND End

Step - 5

Now we need to open Serial monitor from top right corner of Arduino IDE. select COM
port(in Windows OS) is right and braud rate is 9600.

3.2.2 Interfacing with temperature sensor

The LM35 is a classic Temperature Sensor IC. It is a Precision Centigrade Temperature Sensor.
It is also an analog sensor with its output voltage linearly proportional to the temperature in
Celsius.

Fig 3.10 Temperature sensor

Some of the important features of LM35 Temperature Sensor are:

 Range of Temperatures it can measure: -550C to +1500C (full range)


 Accuracy: 0.50C at 250C (±1/40C at room temperature)
 Supply Voltage: 4 V to 30 V
 Transfer Function: Linear with +10mV/0C scale factor
 Calibration: No need as sensor is calibrated for Degree Centigrade (Celsius).

Department of EEE , KLEIT, Hubballi Page 42


Smart water management for overhead tank

Table 3.1Types of temperature sensor

Fig 3.11 Over view of temperature sensor

Table 3.2 Temperature sensor pin configuration

Department of EEE , KLEIT, Hubballi Page 43


Smart water management for overhead tank

4.2.3 Interfacing with water flow sensor


The circuit diagram for Arduino Water Flow Sensor Interface is shown in the image below.

Fig 3.12 Interfacing with water flow sensor

Department of EEE , KLEIT, Hubballi Page 44


Smart water management for overhead tank

NOTE: Internally, the Output Pin of the Hall Effect Sensor is pulled HIGH on the circuit board
itself (as you can see in the breakdown image show above). Hence, I have not used any external
pull-up resistors.

Components Required
 Arduino UNO
 YF-S201 Water Flow Sensor
 Connecting Wires

Circuit Design
Connect the Red and Black wires of the YF-S201 Water Flow Sensor to +5V and GND. Since I
will be using the Interrupt feature of the Arduino, only Digital I/O Pins 2 and 3 are possible to
connect to the Output of the Water Flow Sensor.

Summary

Here we learned about the system explanation to build the software, to create the target, insert
the file, to create the suitable extension (.asm). As it is required to create HEX file and to add
files to the source group so we developed software program and complied and got required
results. Programming platform designed especially for engineers and scientist to analyze and
design systems and products that transform our world.

Department of EEE , KLEIT, Hubballi Page 45


Smart water management for overhead tank

CHAPTER 4

RESULTS AND DISCUSSION

Table 4.1Output result for motor

INDICATION OF MOTOR CONDITION OF MOTOR


when the level of water is less than 25% in
the tank then motor is turned on
automatically.

when the level of water is greater than


75% in the tank then motor is turned off
automatically.

Table 4.2 Temperature output Condition

WATER LCD DISPLAY EXPECTED


TEMPERATURE(Y OUTCOMES
)

Y<35 Degree Water should


flow to
underground

Y>35 Degree Water should


flow to tap

Department of EEE , KLEIT, Hubballi Page 46


Smart water management for overhead tank

Table 4.3 Specifications of measuring Parameters

Parameters Specifications
Motor 12V, 1A
Temperature Sensor 5V,50mA
Ultrasonic Sensor 5v ,50mA
Regulator 5V,1A
Relay 5V,100mA
LCD 5V,50mA
Actuator 12v,500mA
Wi-Fi Modulator 5V,500mA
Adopter 12V,1A
Arduino 12V,1A

Department of EEE , KLEIT, Hubballi Page 47


Smart water management for overhead tank

Appendix I

A1. LCD Pin out

A2. Pin diagram of NodeMCU

Department of EEE , KLEIT, Hubballi Page 48


Smart water management for overhead tank

A3.Pin diagram of WIFI modulator

Pin layout of 32-pin

 Pin1: VDDA is a power pin for analog power ranges from 2.5V to 3.6V.

 Pin2: LNA is an input/output pin specifically used for RF antenna interface. Chip
produces impedance of 39+j6 Ω.

 Pin3: VDD3P3 is a power pin to provide amplifier power ranges from 2.5V to
3.6V.

 Pin4: VDD3P3 is a power pin provide amplifier power ranges from 2.5V to 3.6V
similar to pin3.

 Pin5: VDD_RTC is categorized as a power pin and supply 1.1V but this pin is not
connected.

 Pin6: TOUT is an input pin functions as ADC pin to test the supply voltages of
Pin3 and Pin4 and the input voltages of TOUT pin6. These two functions cannot
perform simultaneously

Department of EEE , KLEIT, Hubballi Page 49


Smart water management for overhead tank

 Pin7: CHIP_EN I an input pin. When CHIP_EN pin is HIGH chip works properly
when LOW chip consumed an only small amount of current.

 Pin8: XPD_DCDC is an input/output pin which is used to wake up the chip from
deep sleep mode. Commonly it is connected with GPIO16.

 Pin9: MTMS is an input/output pin labeled as GPIO14 and it is used in SPI as


clock pin (SPI_CLK).

 Pin10: MTDI is an input/output pin labeled as GPIO12 and it is used in SPI as


Master-In-Slave-Out pin (SPI_MISO).

 Pin11: VDDPST is a power pin. It is a digital input/output power supply whose


voltages ranges from 1.8V to 3.6V. Similar to pin17.

 Pin12: MTCK is an input/output pin labeled as GPIO13 and it is used in SPI as


Master-Out Slave-In pin (SPI_MOSI) as well as used in UART as Clear To Send
pin (UART_CTS).

 Pin13: MTDO is an input/output pin labeled as GPIO15 and it is used in SPI as


Chip Select pin (SPI_CS) as well as used in UART as Request To Send pin
(UART_RTS).

 Pin14: GPIO2 is an input/output pin used as UART TX during flash


programming.

 Pin15: GPIO0 is an input/output used as Chip Select pin2 in SPI (SPI_CS2).

 Pin16: GPIO4 is an input/output pin purely used for input and output purposes.

 Pin17: VDDPST is a power pin. It is a digital input/output power supply whose


voltages ranges from 1.8V to 3.6V. Similar to pin11.

Department of EEE , KLEIT, Hubballi Page 50


Smart water management for overhead tank

 Pin18: SDIO_DATA_2 is an input/output pin labeled as GPIO9 and used to


connect with data pin 2 of SD card.

 Pin19: SDIO_DATA_3 is an input/output pin labeled as GPIO10 and used to


connect with data pin 3 of SD card.

 Pin20: SDIO_CMD is an input/output pin labeled as GPIO11 and used to connect


with command pin of SD card

 Pin21: SDIO_CLK is an input/output pin labeled as GPIO6 and used to connect


with the clock pin of SD card.

 Pin22: SDIO_DATA_0 is an input/output pin labeled as GPIO7 and used to


connect with data pin 0 of SD card.

 Pin23: SDIO_DATA_1 is an input/output pin labeled as GPIO8 and used to


connect with data pin 1 of SD card.

 Pin24: GPIO5 is an input/output pin purely used for input and output purposes.

 Pin25: U0RXD is an input/output pin labeled as GPIO3 and used as UART RX


during flash programming.

 Pin26: U0TXD is an input/output pin labeled as GPIO1 and used as UART TX


during flash programming. Also used as SPI Chip Select pin 1 (SPI_CS1).

 Pin27: XTAL_OUT is classified as an input/output pin and connected to the


output of the crystal oscillator.

 Pin28: XTAL_IN is classified as an input/output pin and connected to the input


of the crystal oscillator.

 Pin29: VDDD is a power pin provide analog power ranges from 2.5V to 3.6V.

 Pin30: VDDA is a power pin provide analog power ranges from 2.5V to 3.6V.
Similar to pin29.

Department of EEE , KLEIT, Hubballi Page 51


Smart water management for overhead tank

 Pin31: RES12K is an input pin which is serial connected with 12 kΩ resistors and
connected to the ground.

 Pin32: EXT_RSBT is an input pin used to rest the chip by providing an external
reset signal which is active at a low voltage level.

 Pin33: GND is a power pin acts as a ground for the chip.

All GPIO’s can be used as Input and Output pin but they also have their specific function.

A4. Schematic pin configuration OF ESP8266

Department of EEE , KLEIT, Hubballi Page 52


Smart water management for overhead tank

Appendix II

start
Initializing the
Ch Ultrasonic Ch
ec sensor the
Calibrating ec
k module
values obtained k
th from the ultrasonic th
e sensor e
wa wa
ter ter
Iflev
full If empty
lev
Turnel off Turnel on
the relay Display the the relay
message
B1.Working of ultrasonic sensor

Department of EEE , KLEIT, Hubballi Page 53

You might also like