You are on page 1of 14

CHAPTER FOUR

DESCRIPTION OF AUTOMATIC WATER TANK LEVEL


CONTROL SYSTEM
Automatic water level controllers are a product that was created to
automatically control a motor, which helps to ensure a constant reserve of
water in a storage tank. These automatic water level controllers are used to
automatically fill the over-head tank when it starts or has become empty as
well as monitor the water level in it.

Automatic water level controllers switch the motor on whenever the water


level drops below a certain level and shuts the motor off when the water
rises well above a fixed level. The motor will also switch off when the sump
water is exhausted before it fills the over-head tank, or if the pump is running
dry as well as maintains voltage fluctuations. These are state of the art
advanced, digital technology micro-controller based products. This system is
quite versatile. There are also custom made variations such as control of
multiple pumps or multiple tanks.

4.1 Structure of the Project


4.1.1 Features of the Project
5 Automatic water level controllers can maintain an exact preset water
level.
6 It can be installed in homes, hotels, and hospitals.
7 The power used by this controller is low and negligible.
8 It can be installed in metro cities where the drinking water is the only
water used for all purposes, which keeps the drinking water from being
wasted.
9 These controllers are compact, easy to installed, and easy to move.
10 The sensor can be free of corrosion and the maintenance cost is very low.
Thank you for reading “Automatic Water Level Controller Working
Principle“! Stay tuned for more from the revolutionary water level control
manufacturers at Water Level Controls.

10.1.1 Parts and Functions

Components Used Water level Controller:


Arduino uno r3 datasheet pdf - Arduino is used for building different types of electronic
circuits easily using of both a physical programmable circuit board usually microcontroller and
piece of code running on computer with USB connection between the computer and Arduino.

Programming language used in Arduino is just a simplified version of C++ that can easily
replace thousands of wires with words.

Arduino UNO-R3 Physical Components

ATMEGA328P-PU Microcontroller
The most important element in Arduino Uno R3 is ATMEGA328P-PU is an 8-bit icrocontroller
with flash memory reach to 32k bytes.

It’s features as follow:


 High Performance, Low Power AVR
 Advanced RISC Architecture
o 131 Powerful Instructions – Most Single Clock Cycle Execution
o 32 x 8 General Purpose Working Registers
o Up to 20 MIPS Throughput at 20 MHz
o On-chip 2-cycle Multiplier
 High Endurance Non-volatile Memory Segments
o 4/8/16/32K Bytes of In-System Self-Programmable Flash program memory
o 256/512/512/1K Bytes EEPROM
o 512/1K/1K/2K Bytes Internal SRAM
o Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
o Data retention: 20 years at 85°C/100 years at 25°C
o Optional Boot Code Section with Independent Lock Bits
o In-System Programming by On-chip Boot Program
o True Read-While-Write Operation
o Programming Lock for Software Security
 Peripheral Features
o Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
o One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
o Real Time Counter with Separate Oscillator
o Six PWM Channels
o 8-channel 10-bit ADC in TQFP and QFN/MLF package
o Temperature Measurement
o 6-channel 10-bit ADC in PDIP Package
o Temperature Measurement
o Programmable Serial USART
o Master/Slave SPI Serial Interface
o Byte-oriented 2-wire Serial Interface (Philips I2 C compatible)
o Programmable Watchdog Timer with Separate On-chip Oscillator
o On-chip Analog Comparator
o Interrupt and Wake-up on Pin Change
 Special Microcontroller Features
 Power-on Reset and Programmable Brown-out Detection
 Internal Calibrated Oscillator
 External and Internal Interrupt Sources
 Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and
Extended Standby
 I/O and Packages
o 23 Programmable I/O Lines
o 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
 Operating Voltage:
o 1.8 - 5.5V
 Temperature Range:
o -40°C to 85°C
 Speed Grade:
o 0 - 4 MHz@1.8 - 5.5V, 0 - 10 MHz@2.7 - 5.5.V, 0 - 20 MHz @ 4.5 - 5.5V
 Power Consumption at 1 MHz, 1.8V, 25°C
o Active Mode: 0.2 mA
o Power-down Mode: 0.1 µA
o Power-save Mode: 0.75 µA (Including 32 kHz RTC)

Arduino Uno R3 Schematic

Other Arduino Uno R3 Parts


Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output, using pin Mode (),
digitalWrite(), and digitalRead() functions.

They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an
internal pull-up resistor (disconnected by default) of 20-50 k Ohms.

In addition, some pins have specialized functions:


 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial
chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
 using the SPI library.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e.1024 different values).

By default they measure from ground to 5 volts, though is it possible to change the upper end of
their range using the AREF pin and the analogReference() function.

Additionally, some pins have specialized functionality:

 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.

There are a couple of other pins on the board:

 AREF: Reference voltage for the analog inputs. Used with analogReference().
 Reset: Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board

LCD

5v relay

Motor (pump)

ULN2003

Ultrasonic Sensor

Transformer

Bridge Rectifier
Capacitor C1= 100u, C2= 100p

Lm7812

Variable resistor 10k

Arduino

Power Unit:
This unit comprises of the transformer, bridge rectifier, filtering capacitor and a voltage regulator. In this work,
a 5volts and 12volts DC was used, hence the need to use dual voltage source. The regulator 7812 stabilizes the
DC voltage to +12V, while the variable resistor (POT-HG) reduces +12v top +5v needed to power some parts
of the circuitry. This unit is very vital in any electronic circuit as it supplies the required power to each module.

Ultrasonic sensor water level controller


In an attempt to mitigate problems such as poor water allocation, inefficient use, and lack of adequate and
integrated water management, Automatic Water level controller system is designed to monitor liquid level in
an overhead tank or any liquid storage system with an automatic pumping system attached to it to refill the
tank once the liquid gets to the lower threshold, while switching OFF the pump once the liquid gets to the
higher threshold.

HC-SR04 Ultrasonic Distance Sensor

The HC-SR04 ultrasonic sensor is a distance sensing sensor; it works by sending and receiving
ultrasonic signal out with its transducers.

Here is a brief specification of the HC-SR04 ultrasonic sensor:

Basic specification of an Ultrasonic distance sensor


Brief description of how Ultrasonic distance sensor
works
I will make a complete tutorial on how the ultrasonic distance sensor works, for the sake of this very
tutorial; I will give a simple and concise explanation of how the sensor works. Before that, it will be
of a good assistance if I first show you a basic circuit connection of an Arduno and the HC-SR04
Ultrasonic distance sensor. HC-SR04 Datasheet – Ultrasonic Ranging Detector Sensor
Module
Posted on November 24, 2018September 10, 2019 by Pinout

Part Number : HC-SR04

Function : Ultrasonic Ranging Detector Sensor Module

Package : 4pin Module Type

Manufactures : Ultrasonic

Image

Description

This is the HC-SR04 ultrasonic ranging sensor. This economical sensor provides 2cm
to 400cm of non-contact measurement functionality with a ranging accuracy that can
reach up to 3mm. Each HC-SR04 module includes an ultrasonic transmitter, a receiver
and a control circuit.

There are only four pins that you need to worry about on the HC-SR04: VCC (Power),
Trig (Trigger), Echo (Receive), and GND (Ground).

Detail Information

1. Power supply : 5V DC
2. Quiescent current : 2mA
3. Effectual angle : 15 degree
4. Ranging distance : 2cm – 450 cm
5. Resolution : 0.3 cm

Pinout and Electrical parameters


 

Ultrasonic Sensor Pin Configuration

Pin Pin Description


Number Name

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 send
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 ta
the US wave to return back to the sensor.

4 Ground This pin is connected to the Ground of the system.

HC-SR04 Sensor Features

 Operating voltage: +5V


 Theoretical  Measuring Distance: 2cm to 450cm
 Practical Measuring Distance: 2cm to 80cm
 Accuracy: 3mm
 Measuring angle covered: <15°
 Operating Current: <15mA
 Operating Frequency: 40Hz

You can Buy HC-SR04 ultrasonic sensor from here.


 

Equivalent distance measuring Sensors


US transmitter Receiver pair, IR sensor module, IR sensor pair, IR Analog distance sensor,
 

HC-SR04 Ultrasonic Sensor - Working


As shown above the 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
Now, to calculate the distance using the above formulae, we should know the Speed and time. Since we are
using the Ultrasonic wave we know the universal speed of US wave at room conditions which is 330m/s. The
circuitry inbuilt on the module will calculate the time taken for the US wave to come back and turns on the
echo pin high for that same particular amount of time, this way we can also know the time taken. Now simply
calculate the distance using a microcontroller or microprocessor.
 

How to use the HC-SR04 Ultrasonic Sensor


HC-SR04 distance sensor is commonly used with both microcontroller and microprocessor platforms like
Arduino, ARM, PIC, Raspberry Pie etc. The following guide is universally since it has to be followed
irrespective of the type of computational device used.
  Power the Sensor using a regulated +5V through the Vcc ad Ground pins of the sensor. The current consumed
by the sensor is less than 15mA and hence can be directly powered by the on board 5V pins (If available). The
Trigger and the Echo pins are both I/O pins and hence they can be connected to I/O pins of the microcontroller.
To start the measurement, the trigger pin has to be made high for 10uS and then turned off. This action will
trigger an ultrasonic wave at frequency of 40Hz from the transmitter and the receiver will wait for the wave to
return. Once the wave is returned after it getting reflected by any object the Echo pin goes high for a particular
amount of time which will be equal to the time taken for the wave to return back to the sensor.
The amount of time during which the Echo pin stays high is measured by the MCU/MPU as it gives the
information about the time taken for the wave to return back to the Sensor. Using this information the distance
is measured as explained in the above heading.

In the image above, the VCC pin of the arduino is connected to 5V pin of the Arduino MCU, the
GND pin is connected to the ground pin of the arduino, the Trigger pin is connected to pin 9 of the

arduino, while the Echo pin is connected to pin 10 of the arduino pin.
Figure 4: Basic specification of an Ultrasonic distance sensor

Front and back views of an ultrasonic distance sensor

Figure 5: Front and back views of an ultrasonic distance sensor

10.2 Process

Principle of Operation of Water Level Controller


This is a closed loop feedback operating system as the constant availability, inflow and outflow
of liquid content within a storage tank is dependent on the operation of the sensor which triggers
ON/OFF the pump switch using a relay. The ultrasonic sensor has a trigger and an echo pin. The
sensor is placed at the top end of the (overhead) tank with its transmitter and receiver faced
towards the bottom of the tank. The ultrasonic sensor reads the distance from the bottom of the
tank using ultrasonic wave transmission by the formula (distance = speed * time).
After the sensor is triggered, it sends out sound waves to the surface of the water/liquid content
which obstructs the signal at whichever level and echoes back to the sensor. This echo effect
enables distance measurement by allowing the Arduino Uno read the echo pin to determine time
spent between triggering and receiving of the echo.
Note: Speed of sound is around 340m/s thus distance can be calculated using
   Distance= (time/2)*Speed of sound
  To determine the level of the water in the storage tank, total length of the tank Must be
ascertained. This value would enable us calibrate our tank to suit design specifications.
The microcontroller signals the relay for automatic switching OFF of the pump when water
reduces to a low level, the device beeps an alarm to alert the user and automatically starts the
pump to refill the tank. An LCD is incorporated to display the “Empty space in the tank in cm
(centimeters)”. If the distance between the bottom of the tank and the module equals the programmed distance
for Low/High level, it turns ON/OFF the motor respectively.
With this steady water supply is ensured for public/private water management systems

Water is a gift from the gods and it shouldn’t be wasted. In most houses, we
have water tanks that are filled for regular and daily use of water. We will
switch the water motor on and keep track of the 30 to 90 minutes for the tank
to fill up. Sometimes, the water will fill the tank too fast or too slow,
depending on the amount of water remaining in the tank. The rest of the
storage tank water will be wasted. Sometimes, you have to take a bath, but
your water tank is empty. In order to resolve this issue, there is the automatic
water level controller. There are a lot of ways to control your water levels.
Here we discover the working principle of 3 different types of water level
controllers.
Ultrasonic Level Sensor Working Principle:

Take a look at the Ultrasonic Level sensor working principle above. This


water level controller will use two components the ultrasonic sensor and relay
board. The distance for the motor to turn off and on needs to be specified.
There is a special program that executes the sensor. There are a lot of
capacitors, circuit boards, resistors, and semiconductors used.

10.2.1 Maintenance

Humidifying tray and humidifying tray water level regulator 2 to 3 times to


flush out any dirt or foreign matter in the line. During use,
the water pump filter in the water tank level sensor tank can clog
with dirt and impede water supply. Check it once every 6
months.Safety and Control Measures. HAZARDOUS
LOCATIONS
 The National Electrical Code (NEC) defines hazardous locations as those “where fire or
explosion hazards may exist due to flammable gases or vapor, flammable liquids,
combustible dust or ignitable flyings.”
 Make sure your switch has the proper approvals (CSA for US and Canada, ATEX/IECEx
world-wide) and is approved for use in the proper hazardous location class. The FLX carries
Class I, Div 1 and Class I, Div 2 CSA approvals.
 As general rule it is best to use an Intrinsically Safe (IS) Barrier in any situation where
instrumentation, equipment or wiring might generate excessive electrical or thermal energy
that could cause the combustion of flammable gases, vapors, dust, or fibers found in the
hazardous area.

10.2.2 Safety and Control Measures

[Type here]

One good thing about ultrasound of this frequency is that it can reflect off liquids, so we
can utilize this technology to measure the level of liquids in a tank. All we need to do is
program the arduino in such a way that when the liquid is at certain distances from the
sensor certain things happen, maybe an LED comes ON goes OFF, or a relay is energised to
turn a switch ON or OFF.

Hence, in this project, I will show you how to visually monitor the level of water in a tank
using an LED indicator and automatically switch a water pump ON and OFF when water in
the said tank goes below and above certain thresholds in the tank respectively

You might also like