Automatic Water Level Control in Overhead Tanks A Project Report Submitted in Partial Fulfillment of PDF Free

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

AUTOMATIC WATER LEVEL CONTROL IN OVERHEAD TANKS

A Project Report Submitted in partial fulfillment of

The Requirements for the award of the degree of

BACHELOR OF TECHNOLOGY

In

COMPUTER SCIENCE AND ENGINEERING

By

K Vishnuvardhan Reddy R Shivaraj kumar

(15005A0506) (15005A0504)

Under the guidance of

Prof. P. CHENNA REDDY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY ANANTAPUR

COLLEGE OF ENGINEERING

(Autonomous)

ANANTHAPURAMU-515002

ANDHRA PRADESH

2018

1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY ANANTAPUR
COLLEGE OF ENGINEERING (AUTONOMOUS)
ANANTHAPURAMU – 515002
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that the project entitled “AUTOMATIC WATER LEVEL CONTROL IN
OVERHEAD TANKS” is a bonafide work of KANCHIREDDYGARI VISHNUVARDHAN
REDDY, bearing Admn. No: 15005A0506 and RUDRAPPAGARI SHIVARAJ KUMAR, bearing
Admn. No: 15005A0504 is submitted to the faculty of Computer Science & Engineering, in partial
fulfillment of the requirements for the award of degree of BACHELOR OF TECHNOLOGY in
COMPUTER SCIENCE AND ENGINEERING from Jawaharlal Nehru Technological University
Anantapur, College of Engineering (Autonomous), Ananthapuramu.

Signature of the GUIDE Signature of the H.O.D

Prof. P. Chenna Reddy Dr. S. Vasundra M.Tech., Ph.D.,


Professor, Professor & HOD,
Department of CSE, Department of CSE,
JNT University Anantapur, JNTUA College of Engineering,
ANANTHAPURAMU-515002. ANANTHAPURAMU-515002.

2
ACKNOWLEDGEMENTS
We have taken efforts in this project. However it would not have been possible without the kind
support and help of many individual and organizations. We would like to extend our sincere thanks to
all of them.

We to express our gratitude to Prof. K. Ramanaidu Garu, Principal, JNTUA College of


Engineering, Anantapur. For his co-operation and his timely help in the successful completion of the
project.

We are highly thankful to Prof. M.L.S. Deva Kumar Garu, Vice Principal, JNTUA College of
Engineering, Anantapur for his kind co-operation and encouragement which helped us in completion of
the project.

We would like to express special thanks to Prof. S. Vasundra Garu, Head of the Department,
Computer Science and Engineering, JNTUA College of Engineering, Anantapur for his support and
timely help in the completion of the project.

We are highly indebted to Prof. P. Chenna Reddy Garu, Professor, Computer Science and
Engineering, JNTUA College of Engineering, Anantapur for his guidance and constant supervision as
well as for providing necessary information regarding the project and also his support in the success of
this project.

Our thanks and appreciations also extends to our entire faculty, technicians of Department of
Computer Science and Engineering and our friends in developing the project and people who have
willingly helped out with their abilities.

3
ABSTRACT
Generally most of the houses depends upon the overhead tanks as the main source of water.
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.

This phenomenon is commonly seen in both Urban and rural areas and this needs to controlled
by monitoring water level in the tank, here we need a mechanism capable of switching on the motor
when the water level in the tank goes low and switching it off as soon as the water level reaches a
maximum level. Automatic water level control can be achieved by monitoring and keeping track of
water level with the help of electronic sensors and controllers.

Ultrasonic sensor is used to monitor the water level by calculating roundtrip time of echo from
transmitter to water surface. Water level obtained from ultrasonic sensor is given to Arduino, where all
the calculations and decisions are made. Arduino generate a signal to turn on/off the motor based on
water level. This on/off signal and the water level should be communicated to the motor by using RF
module where radio waves are used as the means of communication. The motor will be controlled
automatically based on the water level in the tank.

Some of the advantages of Automatic water level control system in overhead tanks are Automatic
system replaces human intervention and provides hassle free maintenance, prevents wastage of water,
efficient usage of water and energy resources.

4
Contents

1. INTRODUCTION……………………………………………………………… 07

1.1 Background...………………………………………………………..……….07

1.2 Problem Statement………………………………………………....………. 10

1.3 Objectives…………………………………………………………………… 10

1.4 Scope of the Project………………………………………………………… 10

2. SYSTEM ANALYSIS….……………………………………………….……… .11

2.1 System Analysis…….……………………………………………….……… .11

2.2 System Requirements and Specifications…….…………………………... .11

2.2.1 Hardware…………………………….……………………………….. 12

2.2.2 Software ……………………………….……………………………… 12

2.3 System Design……………………………….……………………….……… 13

3. How sensors work? ……………………………….……………………..………15

3.1 Microcontrollers and sensors……………………………………………... 15

3.2 Working of the model……………………………………………...……….18

4. Implementation and Testing ………….……...................................................... 20

4.1 Development Phases………………………………………………………….. 20

4.1.1 Water Level Indicator……………………………………………….. .20

4.1.2 Rectifier Based water Level Indicator………………………………..23

5
4.1.3 Automatic Water Level Control in Overhead Tanks……………….26

4.2 Circuit Diagram……………………………………………………….…….. 31

4.3 Connections and software…………………………………………….…….. 33

4.4 Installation……………………………………………………………..…….. 35

4.5 Maintenance …………………………………………………………..…….. 35

5. Conclusion………………………………………………………………..…….. 36

6. Bibliography…………………………………………………………………… 37

List of Images

Figure 2.3.1: Transmitter Section ……………………………………………. 13

Figure 2.3.2: Receiver Section ………………………………………………... 14

Figure 3.1.a: Ultrasonic Working ……………………………………………. 15

Figure 3.1.b: Relay ……………………………………………………………. 16

Figure 4.1.1.a: Water Level Indicator Setup …………………………………21

Figure 4.1.1.b: Water Level Indicator Circuit ……………………………….22

Figure 4.1.2: Product …………………………………………………………..25

Figure 4.1.3.a: Transmitter ……………………………………………………27

Figure 4.1.3.b: Transmitter ……………………………………………………32

Figure 4.2.2: Receiver ……………………………………………………….. 33

6
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. 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 circulates the water through its distributary channels or pipes to the taps.
Generally most of the houses depends upon the overhead tanks as the main source of water. One of the
commonly seen situation 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.

We can’t use sea water by any means because it is salty. Now a day’s sea water is being used in
energy generation system. So the 3 percent of the water is present in the underground and rivers. Bore
wells and pumps are used to extract water from the underground and stored in the tanks or sumps. Such
an important and lifesaving resource is being wasted by us. Water wastage is the serious problem for
both the rural and urban areas, this can be achieved by using current technologies which are made
available by the research community for general use. We can develop an automatic system which can
monitor behalf of us. 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.

7
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 Microcontrollers 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 vacuum tubes, transistors,
diodes, integrated circuits, optoelectronics, and sensors, associated passive electrical components, and
interconnection technologies. Commonly, electronic devices contain circuitry consisting primarily or
exclusively of active semiconductors supplemented with passive elements; such a circuit is described as
an electronic circuit. 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, with a specifically designed API and software which makes
programming it very easy. 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
allows 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.

8
Embedded systems works 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 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 everything
else works as a slave in the network.

IoT devices are a part of the larger concept of home automation, also known as domotics. 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. Internet of things may not be secured because of limited processing power and
the limited device configuration may not be efficient to incorporate complex encryption and crypto
standards. One of the disadvantage of the IoT is Lack of security standards. All these technologies and
communication platforms facilitate an environment to the developer and research community to
implement more solutions to the day to day problems.

9
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.
 Autonomous system which guarantees overflow prevention and optimal power usage.
 To deploy a system which can solve the problem of water overflow from the tanks.

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 is not intended
for triggering the alarm or any other notifying activities to the user.

10
Chapter 2
SYSTEM ANALYSIS

2.1 System Analysis:

Automatic water monitoring system solves the problem of water overflow by installing the HC-
SR04 Ultrasonic module interfacing with the Arduino UNO at the top of the water tank. This senses the
water level and gives the value in the form of centimetres. Arduino is programmed to send the water
level to the pump, where another Arduino is installed with 5V relay. The communication between the
two Arduinos can be achieved by using RF modules. The module we are using is NRF24L01 which can
transmit the signal up to 1000 m in line of sight. And Greater than 500 m with any obstructions in
between. The distance may vary depending upon the Obstructing medium.

Let say the height of the tank is 140 cm so that we can consider that the maximum point or
threshold that the water can reach maximum is 120 cm. When ultrasonic outputs the distance as less
than 30 cm then the water is about to reach its threshold. When the water reaches 120 cm the ultrasonic
outputs 20 cm. Arduino is progr4ammed to continuously transmit the data to the arduino which is
installed at the pump. Let’s say that the Arduino and the Setup installed at the pump will be the receiver
section. The sensors and microcontroller at the tank will be the transmitter section.

The arduino at the receiver section is programmed to trigger the relay when the data transmitted
by the transmitter will be 20 cm. The 5V relay is already running and operational when is triggered by
giving 1 then the relay will break the connection or power supply to pump. Another case is when the
data transmitted is above 100 cm then the Arduino at the receiver will again trigger the 5V relay but this
time it triggers by giving logic 0 so that the pump will be switched ON. The data 100 cm indicates that
the water in the tank is low.

2.2 Requirements and Specifications:

This project is going to need some hardware and software requirements which are necessary to
bring out the proposed model. The hardware and software requirements are listed below.

11
2.2.1 Hardware:

 Arduino UNO (2 boards)


 Ultrasonic sensor US 100
 NRF24L01+PA+LNA (2 boards)
 Relay
 Connection wires and breadboard
 USB cable
 Power Adapters for Arduino

Arduino UNO which is capable of interfacing two more sensors and processing power which
suffice two electronic chips. Arduino acts as a microcontroller which controls every sensor and
chip. Currently we are using Arduin with an ATMega328p processor with a flash memory of
32KB, SRAM 2KB and EEPROM 1KB. This Arduin works on clk speed of 16 Mhz.

Ultrasonic sensor is used to measure the water level and we are using a sensor capable of
measuring a distance of 300 cm. NRF24L01 is a Radi0 frequency module which is used to
maintain the communication in between both the sender and receiver sections. This RF module
is capable of communicating at a distance of over one kilometer in line of sight and 300 to 600
with the obstacles presence.
Power adapter of 5v is used to power the Arduino UNO which convers AC power to DC power
supply.

2.2.2 Software:

 Arduino IDE
 RF24 library
 Windows operating system 7/8/8.1/10.

Arduino IDE is an integrated development environment which have all the tools and libraries to
develop an arduino based solution to a problem. IDE provides a way to load the program into
arduino microcontroller.

12
RF24 is a collection of software libraries which can control the RF module to efficiently manage
the radio and data transmission in both NRF24L01 chips. RF24 package consists of methods to
switch the NRF24l01 into modes which offer different services.
Operating system is essential to run the IDE and load the program into the microcontroller.

2.3 System Design:

Figure 2.3.1

The setup at the water tank consists of Arduino, Ultrasonic and RF module.

And the setup at the receiver section consists of Arduino, RF module and Relay. The Schematic
diagram for the receiver section is given below. Both of these circuits are fabricated into single units.
So that the sensors and microcontroller are not exposed to the outer environment.

13
Figure 2.3.2

14
Chapter 3
How it works

3.1 Microcontrollers and sensors:

In this chapter the working of different sensors and microcontroller will be addressed. The
sensors and microcontrollers are Arduino, Ultrasonic sensor, RF modules and the relay.

Ultrasonic sensor:

HC-SR04 Ultrasonic (US) sensor is a 4 pin module, whose pin names are Vcc, Trigger, Echo and Ground
respectively. This sensor is a very popular sensor used in many applications where measuring distance
or sensing objects are required. The module has two eyes like projects in the front which forms the
Ultrasonic transmitter and Receiver. The sensor works with the simple high school formula that

Distance = Speed × Time

The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when it gets objected
by any material it gets reflected back toward the sensor this reflected wave is observed by the Ultrasonic
receiver module as shown in the picture below:

Figure 3.1.a

Now, to calculate the distance using the above formulae, we should know the Speed and time. Since we
are using the Ultrasonic wave we know the universal speed of US wave at room conditions which is

15
330m/s. The circuitry inbuilt on the module will calculate the time taken for the US wave to come back
and turns on the echo pin high for that same particular amount of time, this way we can also know the
time taken. Now simply calculate the distance using a microcontroller or microprocessor.

Relay:

Relay is an electromagnetic device which is used to isolate two circuits electrically and connect them
magnetically. They are very useful devices and allow one circuit to switch another one while they are
completely separate. They are often used to interface an electronic circuit (working at a low voltage) to
an electrical circuit which works at very high voltage. For example, a relay can make a 5V DC battery
circuit to switch a 230V AC mains circuit. Thus a small sensor circuit can drive, say, a fan or an electric
bulb.

A relay switch can be divided into two parts: input and output. The input section has a coil which
generates magnetic field when a small voltage from an electronic circuit is applied to it. This voltage is
called the operating voltage. Commonly used relays are available in different configuration of operating
voltages like 6V, 9V, 12V, 24V etc. The output section consists of contactors which connect or
disconnect mechanically. In a basic relay there are three contactors: normally open (NO), normally
closed (NC) and common (COM). At no input state, the COM is connected to NC. When the operating
voltage is applied the relay coil gets energized and the COM changes contact to NO. Different relay
configurations are available like SPST, SPDT, and DPDT etc., which have different number of
changeover contacts.

Figure 3.1.b

16
NRF24l01:

NRF24l01 uses the 2.4 GHz band and it can operate with baud rates from 250 kbps up to 2 Mbps.
If used in open space and with lower baud rate its range can reach up to 1000 meters. The module can
use 125 different channels which gives a possibility to have a network of 125 independently working
modems in one place. Each channel can have up to 6 addresses, or each unit can communicate with up
to 6 other units at the same time. The power consumption of this module is just around 12mA during
transmission, which is even lower than a single LED. The operating voltage of the module is from 1.9
to 3.6V, but the good thing is that the other pins tolerate 5V logic, so we can easily connect it to an
Arduino without using any logic level converters.

Three of these pins are for the SPI communication and they need to be connected to the SPI pins of the
Arduino, but note that each Arduino board have different SPI pins. The pins CSN and CE can be
connected to any digital pin of the Arduino board and they are used for setting the module in standby or
active mode, as well as for switching between transmit or command mode. The last pin is an interrupt
pin which doesn’t have to be used.So once we connect the NRF24L01 modules to the Arduino boards
we are ready to make the codes for both the transmitter and the receiver.

Arduino UNO:

Arduino is a single-board microcontroller meant to make the application more accessible which are
interactive objects and its surroundings. The hardware features with an open-source hardware board
designed around an 8-bit Atmel AVR microcontroller or a 32-bit Atmel ARM. Current models consists
a USB interface, 6 Analog input pins and 14 digital I/O pins that allows the user to attach various
extension boards.

The Arduino Uno board is a microcontroller based on the ATmega328. It has 14 digital input/output
pins in which 6 can be used as PWM outputs, a 16 MHz ceramic resonator, an ICSP header, a USB
connection, 6 Analog inputs, a power jack and a reset button. This contains all the required support
needed for microcontroller. In order to get started, they are simply connected to a computer with a USB
cable or with a AC-to-DC adapter or battery. Arduino Uno Board varies from all other boards and they
will not use the FTDI USB-to-serial driver chip in them. It is featured by the Atmega16U2 (Atmega8U2
up to version R2) programmed as a USB-to-serial converter.

17
3.2 Working of the model:

1. Monitoring tank level


2. Reading the level
3. Communicating the level to the motor
4. Controlling the motor

Monitoring the water level is carried out by the ultrasonic sensor which works on the principle of ECHO.
Water level is measured by calculating the roundtrip time of echo from transmitter to water surface.
Water level obtained from ultrasonic sensor is given to Arduino. And then the data is communicated to
the RF Module to transmit the data wirelessly. The data transmitted is received at the other end and
given to the Arduino. Arduino controls the motor through relay after determining the water level in the
tank.

At Water Tank:

Ultrasonic sensor is used to measure the water level in the tank.the working principle of ultrasonic sensor
is based on the ultrasonic waves i.e sound waves. It emits an ultrasound at 40 000 Hz which travels
through the air and if there is an object or obstacle on its path It will bounce back to the module.
Considering the travel time and the speed of the sound we can calculate the distance.

The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo. The Ground and the VCC
pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board
respectively and the trig and echo pins to any Digital I/O pin on the Arduino Board.

18
In order to generate the ultrasound we need to set the Trig on a High State for 10 µs. That will send out
an 8 cycle sonic burst which will travel at the speed sound and it will be received in the Echo pin. The
Echo pin will output the time in microseconds the sound wave traveled.

For example, if the object is 10 cm away from the sensor, and the speed of the sound is 340 m/s or 0.034
cm/µs the sound wave will need to travel about 294 u seconds. But what you will get from the Echo pin
will be double that number because the sound wave needs to travel forward and bounce backward. So
in order to get the distance in cm we need to multiply the received travel time value from the echo pin
by 0.034 and divide it by 2.

Now for generating the Ultra sound wave we have to set the trigPin on HIGH State for 10 µs. Using
the pulseIn() function you have to read the travel time and put that value into the variable “duration”.
This function has 2 parameters, the first one is the name of the echo pin and for the second one you
can write either HIGH or LOW. In this case, HIGH means that the pulsIn() function will wait for the
pin to go HIGH caused by the bounced sound wave and it will start timing, then it will wait for the pin
to go LOW when the sound wave will end which will stop the timing. At the end the function will return
the length of the pulse in microseconds. For getting the distance we will multiply the duration by 0.034
and divide it by 2 as we explained this equation previously. At the end we send the distance to the
Reciever section.

At the Pump:

The distance given by the ultrasonic sensor is given to the RF transmitter. Here we are using NRF24L01
module which reuires 5v power supply. NRF24L01 works in 2.4 Ghz frequency. Caluculated data is
transmitted from the transmitter as soon as ultrasonic caluculates the water level in the tank.At the
receiver we use another RF module of same type to receive the data. The RF modules should be in the
same channel in order to communicate each other. Water level recieved by the RF Module is given to
the Arduino at the reciever section then the Arduino triggers the relay to switch ON/OFF the motor.

Realy is used to switch ON/OFF the motor. Here we are using single channel 5v realy which genaerally
have NO, NC and common outputs.Realy is switched ON by providing 5v from the arduino uno to vcc.

19
Chapter 4
Implementation

4.1 Development phases:

Automatic water level control in overhead tanks is an advancement for the previous two models. The
previous models include:

 Water level indicator


 Rectifier based water level indicator

4.1.1 Water level indicator:

Generally most of the houses depends upon the overhead tanks as the main source of water.
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.

This phenomenon is commonly seen in both Urban and rural areas and this needs to controlled
by monitoring water level in the tank, here we are going to notify the user about the water level in the
tank with the help of a buzzer. Then user can switch off the motor as soon as he sense the sound from
a buzzer.

In this model buzzer is connected in series with the power supply and but the circuit is in
normally opened condition with two terminals i.e. hot wire from buzzer and negative from battery will
be stripped into the water. The circuit will closed and buzzer will buzz when water level touches the
strip. Here are taking the advantage of salt water which generally shows high electric conductivity
than the pure water.

WORKING PRINCIPLE:

Using salt water as a conducting medium and closing the circuit as soon as water touches the strip.
Here closing the circuit means creating a medium which allows flow of electrons from emitter to the
GND.

20
Installation:

Select a point inside the water tank where maximum level of water is allowed. Attach the strip or
two terminals inside the tank and make sure that the distance between the terminals is about 1 inch.

Working model:

Figure 4.1.1.a setup

1. Detecting the water level and

2. Triggering the alarm

21
Scenario 1: The pump is running and the water is flowing into the tank.The buzzer is switched on as
soon as the water touches the strip. The water conducts electricity between the two terminals and acts
as a switch.

Scenario 2: The pump is turned off and the water is below the strip or max level.

In this case the buzzer didn’t ring because there is no conducting medium between the terminals. And
the system has no idea of the water level in the tank.

Scenario 3: The pump in running state and the level is above the max or strip.

In this case the buzzer will continuously ring until the water between the terminals get used. i.e. The
buzzer will continuously ring after turning off the pump and it does not make sense to the user. This is
the drawback of this prototype and this can be eliminated by adding timers into the circuit.

Circuit Diagram:

Figure 4.1.1.b

22
Hardware requirements:

1. 5v battery
2. Buzzer
3. Connecting wires
4. Glue/tape.

This prototype is not designed to switch ON/OFF the pump and this is only intended to remind
the user that the water in the tank is at maximum level. It doesn’t have the capability to ring for certain
amount of time but it ring whenever the water forms a medium for flow of electricity.

Advantages:

1. This prototype notifies the user about the maximum water level in the tank.
Disadvantages:
1. In this model the buzzer will continuously ring even after the pump is turned OFF.
2. In this model the buzzer is installed at the tank. So the possibility that the user can hear the
sound is very less.
3. This prototype runs on dc battery. So the user should maintain the power supply whenever
the battery is out of energy.

4.1.2 Rectifier based water level indicator:

Generally most of the houses depends upon the overhead tanks as the main source of water.
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.

This phenomenon is commonly seen in both Urban and rural areas and this needs to controlled
by monitoring water level in the tank, here we are going to notify the user about the water level in the
tank with the help of a buzzer. Then user can switch off the motor as soon as he sense the sound from
a buzzer.

In this model buzzer is connected in series with the power supply and but the circuit is in
normally opened condition with two terminals i.e. hot wire from buzzer and negative from battery will
be stripped into the water. The circuit will closed and buzzer will buzz when water level touches the

23
strip. Here are taking the advantage of salt water which generally shows high electric conductivity
than the pure water.

WORKING PRINCIPLE:

Using salt water as a conducting medium and closing the circuit as soon as water touches the strip.
Here closing the circuit means creating a medium which allows flow of electrons from emitter to the
GND.

Technical details:

In this model continues supply of 230v AC power supply is given to the circuit. The rectifier circuit
converts the 230v AC power supply to Direct current. Then the DC power supply is given to the
electronic equipment inside the circuit.

Installation:

This prototype has two wires one is supply to the prototype and another one is strip which is installed
at the maximum point in the water tank. The Input wire/Plug or hotwire is connected to the AC supply.
When the switch is in ON state then the led will glow and the system is ready to use.

Working Model:

1. Detecting the water level and

2. Triggering the alarm

Scenario 1: The pump is running and the water is flowing into the tank.
The buzzer is switched on as soon as the water touches the strip. The water conducts electricity
between the two terminals and acts as a switch.

Scenario 2: The pump is turned off and the water is below the strip or max level.
In this case the buzzer didn’t ring because there is no conducting medium between the terminals. And
the system has no idea of the water level in the tank.

Scenario 3: The pump in running state and the level is above the max or strip.

24
In this case the buzzer will continuously ring until the water between the terminals get used. I.e. The
buzzer will continuously ring after turning off the pump and it does not make sense to the user. This is
the drawback of this prototype and this can be eliminated by adding timers into the circuit.

Circuit Diagram:

Figure 4.1.2

25
Hardware requirements:

1. Plug
2. Connecting wires
3. Rectifier
4. Led
5. Buzzer

This prototype is not designed to switch ON/OFF the pump and this is only intended to remind the
user that the water in the tank is at maximum level. It doesn’t have the capability to ring for certain
amount of time but it ring whenever the water forms a medium for flow of electricity.

Advantages:

1. This prototype notifies the user about the maximum water level in the tank.
2. In this model the buzzer is installed at the living room so client can hear the ring.
3. This prototype runs on AC supply. So the user need not worry about anything.
Disadvantages:
1. In this model the buzzer will continuously ring even after the pump is turned OFF.

4.1.3 Automatic water level control in overhead tanks:

Generally most of the houses depends upon the overhead tanks as the main source of water.
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.

This phenomenon is commonly seen in both Urban and rural areas and this needs to controlled
by monitoring water level in the tank, here we need a mechanism capable of switching on the motor
when the water level in the tank goes low and switching it off as soon as the water level reaches a
maximum level. Automatic water level control can be achieved by monitoring and keeping track of
water level with the help of electronic sensors and controllers.

26
Ultrasonic sensor is used to monitor the water level by calculating roundtrip time of echo from
transmitter to water surface. Water level obtained from ultrasonic sensor is given to Arduino, where all
the calculations and decisions are made. Arduino generate a signal to turn on/off the motor based on
water level. This on/off signal and the water level should be communicated to the motor by using RF
module where radio waves are used as the means of communication. Then the motor will be controlled
automatically based on the water level in the tank.

Some of the advantages of Automatic water level control system in overhead tanks are
Automatic system replaces human intervention and provides hassle free maintenance, prevents
wastage of water, efficient usage of water and energy resources.

Schematic diagram for the setup at the Water Tank:

Figure 4.1.3

27
Diagram includes:

1. Arduino UNO
2. Ultrasonic Module – HC-SR04
3. NRF24L01
4. Connecting wires
Product Specification:
 Arduino uno - ATMega328p,5V,flash memory 32KB,SRAM 2KB,EEPROM
1KB,clk 16 MhZ
 ULTRASONIC SENSOR- HC-SR04-2 to 450 cm range, 2.4 to 5.5 v
 NRF24L01+PA+LNA- Nordic nRF24L01+ integrates a complete 2.4GHz RF
transceiver
 Relay - Single channel 5 volt

Schematic diagram for the setup at the Motor:

Figure 4.1.3.b

28
Working model:

1. Monitoring tank level

2. Reading the level

3. Communicating the level to the motor

4. Controlling the motor

Monitoring the water level is carried out by the ultrasonic sensor which works on the principle of ECHO.
Water level is measured by calculating the roundtrip time of echo from transmitter to water surface.
Water level obtained from ultrasonic sensor is given to Arduino. And then the data is communicated to
the RF Module to transmit the data wirelessly. The data transmitted is received at the other end and
given to the Arduino. Arduino controls the motor through relay after determining the water level in the
tank.

At Water Tank:

Ultrasonic sensor is used to measure the water level in the tank.the working principle of ultrasonic sensor
is based on the ultrasonic waves i.e sound waves. It emits an ultrasound at 40 000 Hz which travels
through the air and if there is an object or obstacle on its path It will bounce back to the module.
Considering the travel time and the speed of the sound we can calculate the distance.

The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo. The Ground and the VCC
pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board
respectively and the trig and echo pins to any Digital I/O pin on the Arduino Board.

In order to generate the ultrasound we need to set the Trig on a High State for 10 µs. That will send out
an 8 cycle sonic burst which will travel at the speed sound and it will be received in the Echo pin. The
Echo pin will output the time in microseconds the sound wave traveled.

For example, if the object is 10 cm away from the sensor, and the speed of the sound is 340 m/s or 0.034
cm/µs the sound wave will need to travel about 294 u seconds. But what you will get from the Echo pin
will be double that number because the sound wave needs to travel forward and bounce backward. So
in order to get the distance in cm we need to multiply the received travel time value from the echo pin
by 0.034 and divide it by 2.

29
Now for generating the Ultra sound wave we have to set the trigPin on HIGH State for 10 µs. Using
the pulseIn() function you have to read the travel time and put that value into the variable “duration”.
This function has 2 parameters, the first one is the name of the echo pin and for the second one you
can write either HIGH or LOW. In this case, HIGH means that the pulsIn() function will wait for the
pin to go HIGH caused by the bounced sound wave and it will start timing, then it will wait for the pin
to go LOW when the sound wave will end which will stop the timing. At the end the function will return
the length of the pulse in microseconds. For getting the distance we will multiply the duration by 0.034
and divide it by 2 as we explained this equation previously. At the end we will print the value of the
distance on the Serial Monitor.

The data given by the ultrasonic module will be given to the NRF24L01 module to transmit that data
wirelessly. These RF module should be present at both the sender nd reciever section to send and receive
the data. RF module is powered with 3.3v supply from the arduion itself.Technical specifications for
this model are provided below.

It uses the 2.4 GHz band and it can operate with baud rates from 250 kbps up to 2 Mbps. If used in open
space and with lower baud rate its range can reach up to 100 meters. The module can use 125 different
channels which gives a possibility to have a network of 125 independently working modems in one
place. Each channel can have up to 6 addresses, or each unit can communicate with up to 6 other units
at the same time.

The power consumption of this module is just around 12mA during transmission, which is even lower
than a single LED. The operating voltage of the module is from 1.9 to 3.6V, but the good thing is that
the other pins tolerate 5V logic, so we can easily connect it to an Arduino without using any logic level
converters.

Three of these pins are for the SPI communication and they need to be connected to the SPI pins of the
Arduino, but note that each Arduino board have different SPI pins. The pins CSN and CE can be
connected to any digital pin of the Arduino board and they are used for setting the module in standby or
active mode, as well as for switching between transmit or command mode. The last pin is an interrupt
pin which doesn’t have to be used.

The distance given by the ultrasonic sensor is given to the RF transmitter. Here we are using NRF24L01
module which reuires 5v power supply. NRF24L01 works in 2.4 Ghz frequency. Caluculated data is
transmitted from the transmitter as soon as ultrasonic caluculates the water level in the tank.At the

30
receiver we use another RF module of same type to receive the data. The RF modules should be in the
same channel in order to communicate each other. Water level recieved by the RF Module is given to
the Arduino at the reciever section then the Arduino triggers the relay to switch ON/OFF the motor.

Realy is used to switch ON/OFF the motor. Here we are using single channel 5v realy which genaerally
have NO, NC and common outputs.Realy is switched ON by providing 5v from the arduino uno to vcc.

Advantages:

1. This prototype detects the water level in the tank and switch ON/OFF accordingly.

2. The burden of client is reduced by automating the motor switching according to the water
level.

3. Wireless communication reduces the wiring from the tank to the motor.

Disadvantages:
1. The maximum and minimum threshold points should be included in the program manually
at each installation.
2. Require AC Power supply at the overhead tank.

4.2 Circuit Diagram:

The circuit diagram for the transmitter and receiver section will be the following.

Transmitter Diagram includes the following:


1. Arduino UNO
2. Ultrasonic Module – HC-SR04
3. NRF24L01
4. Connecting wires
5. Power adapter for Arduino

31
Transmitter section:

Figure 4.2.1

Receiver Diagram includes:

1. Arduino UNO
2. NRF24L01
3. 5V relay

32
Figure 4.2.2

4.3 Connections and software:

The connections for the circuits at the Transmitter will be as follows:

Arduino to Ultrasonic:

 VCC-5V ON ARDUINO
 GND-GND ON ARDUINO
 ECHO-PIN 10 ON ARDUINO
 TRIG -PIN 9 ON ARDUINO

Arduino UNO to NRF:

 3.3v – VCC
 GND – GND
 8 – CSN
 7 – CE
 13 – SCK
 11 – MOSI
 12 – MISO

33
The connections for the circuits at the Receiver will be as follows:

Arduino UNO to NRF:

 3.3v – VCC
 GND – GND
 8 – CSN
 7 – CE
 13 – SCK
 11 – MOSI
 12 – MISO

Arduino and Relay:

 NC: Normally closed 120-240V terminal

 NO: Normally open 120-240V terminal

 C: Common terminal

 Ground: Connects to the ground pin on the Arduino

 5V Vcc: Connects the Arduino’s 5V pin

 Signal: Carries the trigger signal from the Arduino that activates the relay.

After connections are made as per the sketch the program coded by the developer should be loaded
into the microcontroller. The program defines the behaviour of the system. Generally every Arduino
program contains two parts:

 Setup and
 Loop

Setup code contains the details about pin usage which defines the pin to act as an input or output to the
system. Setup code contains the instructions which triggers the sensors and other chips which are being
interfaced with the Arduino UNO.

34
Setup contains the code which should run only once and another part of the program is loop which runs
recursively as long as the module is powered. This contains routine actions which are necessary for the
system to accomplish its target goals.

4.4 Installation:

The transmitter will be installed at the water tank at the top. The setup will be placed in a box
that will be attached to the tank.

At the receiver section the setup is installed at the motor and the hot wires will be given as an
input to the relay.

5.5 Maintenance:

Whenever the product would not be used for a long time then the setup will be switched off. That
will improve the life of the circuit. At the time of cleaning of the tank the product should be uninstalled
from the tank so that the circuit will not be damaged for any cause.

35
Chapter 5
Conclusion

Effective Water and power management in houses. And we don’t have to look after the motor
anymore. There are certain limitations to this model. Some of them are addressed below:

 The maximum and minimum threshold limits of the tank are variable for tank to tank.
 The power supply for the model needs AC supply at the tank client should deploy one if
it is not avail at present.
 The obstructions decrease the communication distance so that the better frequency ranges
should be deployed.

The future work of this project include adding

 The GSM board to send the real time notifications to the client.
 Automatic detection of tank depth while installation.
 Optimizing the power usage and noise decreasing in wireless communication.
 This module can be adapted to connect to the internet by giving a gprs connection with
2G network.
 This system can be altered with high processing Microcontrollers like raspberry pi to take
this model to a whole new level of IoT.
 By adding IoT the data analytics on water usage can be made possible so that the clear
picture of water wastage with respect to different analysis can be achieved.

36
References

1. Hanes, David. & Salgueiro, Gonzalo. (30 May 2017). IoT Fundamentals: Networking
Technologies, Protocols, and Use Cases for the Internet of Things. Indianapolis: Cisco press.
2. Frank Vahid, Tony Givargis., Embedded System Design: A Unified Hardware / Software
Introduction.New Jersey:willey.
3. Chaouchi, Hakima. The Internet of Things. London: Wiley-ISTE, 2010.
4. Zhou, Honbo. The Internet of Things in the Cloud: A Middleware Perspective. Boca Raton: CRC
Press, Taylor & Francis Group, 2013
5. Byers, James. (March 26 2015). Nrf24L01-2.4GHz-HowTo. Retrieved on April 24 2018,from
https://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo.

37

You might also like