Professional Documents
Culture Documents
This research work is focused on the need for domestic overhead and
underground water storage to be constantly monitored and regulated
electronically in order to protect the environment, avoid wastage and high
electricity bills etc. resulting from over flowing water tank and to ensure
conservation of water for use when the need arises. The construction is
microcontroller based interfaced with ultrasonic sensor to measure water
levels. The ultrasonic sensor gives real-time water level status to the
microcontroller which then converts it into 4-bit data. The 4-bit data
containing information of water level status is then encoded transmitted,
received and decoded and the information realized is then used in the
transmitter circuitry to monitor and automate the system whose operation
is interfaced with the water pump switch. The system has manual and
automatic modes designed to checkmate the electricity supply situation in
the country. In manual mode, low water level is noticed when the buzzer is
activated, while in automatic mode low water level turns on the pump
switch and water level status is seen on a seven-segment display. Both
manual and automatic modes switch OFF the water pump at maximum
level. The construction was completed and worked according to its
specification and purpose. This research work could be adapted for use in
domestic and industrial water supply system.
Chapter one
1.0 Introduction
This project work involves providing a means for monitoring and controlling
water level basically in domestic water storage with little or no human
interference. In order to achieve this fit, we have designed an electronic
circuit which consist of several sub circuits that operate in stages, from
detection to encoding and then transmission of data obtained from an
ultrasonic sensor interfaced with a microcontroller through a 433MH
transmitter module. On the other side of reception, data is received and
decoded and the information realized is then manipulated by the
microcontroller to monitor and automate the system via interface with the
water pump switch.
Nowadays, there are various advanced methods of water level control, this
is so be because of the type of water level detector employed in the system.
Water level sensors have been around for decades, in markets such as
food and beverage, industrial, medical and domestic, printing, agriculture,
automotive and white goods for leak detection or level measurement. We
often wonder why customers choose one technology over the other and it
is a common question we are asked. Some equipment manufacturers may
also be surprised at both the variety and intelligence of level sensing
alternatives available on the market.
Here we have a number of water level detection devices that have been
used effectively to detect and control water and liquid levels as designed by
different industries who always take into consideration the level of
competition and the need to remain in market by consistently wanting to
improve quality, reduce costs, inefficiencies and waste kind of mentality.
The following are various types of water/liquid level detection methods that
are mostly used.
Optical
Ultrasonic
Float
Capacitance
Radar
Conductivity or resistance
Meanwhile, water level controller can be classified into two, 1) the contact
and 2) no contact water level controller.
Here a simple circuit to control the Water pumps. When the water level in
the overhead tank exceeds the required level, the pump automatically turns
off and stops the pumping process thus preventing the over flow of water.
It uses a relay to cut off the power supply to the water pump. Example are
Optical, float, Capacitance and conductance.
The No Contact Level Controller:
Apart from the technique discussed above, there can be another way to
control water level in the tank by sensing it using Ultrasonic technique.
Unlike the previous method, this does not require any contact with the
water tank. Example are ultrasonic and radar.
In this research work, we have adopted the use of ultrasonic sensor which
appears to be versatile in its use and can easily be interfaced with the
Arduino board in order to achieve the purpose of the study.
It is worthy of note that providing water especially for domestic use has a
lot of challenges as the requirements are quite exorbitant. The installation
of home water supply system would require at a minimum, drilling of
borehole, a water pump, a tank stand, a water reservoir and electricity.
Electricity which is a major factor in the business of water supply, is in
short supply and as such necessitates the use of generator set which is an
added cost to the system. It therefore, becomes very important for usable
water to be efficiently managed in order to get value for its cost.
This research work was carried out for the purpose of filling gaps identified
in water supply systems especially in homes, schools, work places and
other areas where such facilities for water supply is installed. The gaps
identified so far are as follows:
Water Scarcity: There are times when unforeseen circumstances will occur
and people are meant to suffer because there was no prior information
preceding the incident. Running out of water during crucial times or at wee
hours has a regular occurrence. It becomes more devastating when there is
power outage and an option for secondary power supply is not available.
Forecasting and Planning: knowing the level or quantity of water available
in the water storage is a good information for forecasting and planning.
One would either be able to determine when water will runout and how to
go about pumping water at the right time especially in a period when there
is long time power outage.
Keeping Clean and Hazard Free Environment: A water supply systems that
is not under any form of automation is bound to cause flooding and poses
hazard in the premises. Slippery floors and inconvenience in movement
sets in and sometimes adjacent street or some areas in the neighborhood
become flooded as well.
Level display: - the device is configured to monitor and record water levels
from 0 to 8 predetermined levels.
Set points: - the maximum and minimum setpoints at which the system
starts and stops the water pumping process is 5cm and 150cm
respectively.
There has been an increase in the price of PMS coupled with other
factors that has led to increase in transportation fair.
Given the current economic situation and high cost of goods and
services in Nigeria, sourcing for funds for this project happened to be
the mother of all challenges faced with in the course of this project
work.
1.7 Definition of Terms
2.1.1 Definition
[12] Liquid level sensors are termed as the sensors used for detecting
liquid levels or interfaces between liquids such as water and oil or solids
and liquids. These sensors can also be defined as transducers or as
integrated systems with instrumentation and control capabilities. This type
of liquid level sensor is one of the most important sensors and plays a vital
role in variety of industrial and consumer applications.
Point level measurement sensors are used for the purpose of marking a
single liquid height or for presetting a level condition. Usually, this sensor
works as a high alarm that measures the overflow conditions in tanks
through liquid level sensors, or works as a marker to note down the low
alarm conditions. The different types of sensors are given below:
Float Sensor
Capacitance Sensors
Conductivity Probes
C= E(K A/d)
E= constant
When you have a tank with the level at zero percent, then you have only air
as your insulating material. As the product begins to fill the vessel, that
material will change to a liquid or solid, thus changing the capacitance. So
the capacitance measured by the sensor is directly proportional to the level
of the tan [15].
Ultrasonic Sensor
Optical Sensor
source: Watelectronics.com
The optical sensor consists of an infrared LED and a light receiver. The
light emitted from the LED is directed towards a prism which forms the tip
of the level sensor. If there is no liquid present in the tank, then the light
from the LED is reflected within the prism and the receiver.
When the liquid level raises and immerses the sensing prism, the light gets
refracted out into the liquid, leaving little amount of light or no light to reach
the receiver. Sensing this change, the receiver activates electronic
switching within the level unit for operating external alarm or control circuit
[9].
source: www.watelectronics.com
Bridge Rectifier
[25] Bridge Rectifiers are circuits that convert alternating current (AC) into
direct current (DC) using diodes arranged in the bridge circuit configuration.
Bridge rectifiers typically comprise of four or more diodes. The output wave
generated is of the same polarity irrespective of the polarity at the input.
Bridge rectifier. Source: www.electronics-tutorials.
The eighth segment called “Decimal Point” is denoted by DP and is used for
the display of non-integer numbers.
Depending on how the terminals are connected, the SSDs can be classified
as:
If Cathodes of all the 8 LEDs are connected together and all the Anodes are
left alone, then we refer to the SSD as “Common Cathode Type”.
Output Pins
Depending on the type of the SSD, the two middle pins denoted by COM are
either common anodes or common cathodes of all the LEDs [21].
Antenna
Transformer
Transformers come in two varieties – step up, which increase the voltage
or current, and steps down, which decreases the voltage or current input.
For example, the transformers in your microwave Oven is a secondary
transformer that is used to supply around 2200Volts to the vacuum tube in
the Microwave Oven.
For example, consider the following situation. The number of turns in the
primary winding of a transformer is 3000 and that in the secondary winding
is 150. If the alternating voltage at the primary of the transformer is 240V,
then the voltage at the secondary of the transformer can be calculated
using the following equation.
VP/VS = NP/NS
Here, NP is primary winding turns = 30000
Filter Capacitor
In general, filters are used to remove unwanted parts of a signal. They may
be used, for instance, to block undesirable frequencies emitted near a radio
receiver (i.e. to reduce radiated radio frequency interference). Because
signal processing filters respond to frequency, there are different types of
filters, determined by the frequency they affect.
Filter Capacitor
In general, filters are used to remove unwanted parts of a signal. They may
be used, for instance, to block undesirable frequencies emitted near a radio
receiver (i.e. to reduce radiated radio frequency interference). Because
signal processing filters respond to frequency, there are different types of
filters, determined by the frequency they affect.
Low-Pass Filters
Band-Pass Filters
Beyond their functional differences, filters can be divided into active and
passive types: active filters require an external power source while passive
filters do not.
The regulated power supply will accept an AC input and give a constant DC
output. The figure below shows the block diagram of a typical regulated DC
power supply.
LM7805
Definition: Voltage regulator like IC7805 belongs to the 78xx series ICs. In
the 78xx series, xx represents the fixed output voltage value and 7805 is a
fixed linear voltage regulator. Batteries provide a voltage of 1.2V, 3.7V, 9V,
and 12V. This voltage is good for the circuits which voltage requirements
are in that range. The regulated power supply in this regulator is +5V DC.
LM7812
In case if both the positive and negative voltage supply is needed in the
same circuit. The voltage regulator ic 7812 is combined with its
corresponding 79XX family IC that is 7912 IC.
Relay
Types of Relays
Voltage Relay
Current Relay
The latching relay has a small metal strip which can pivot between two
terminals. The switch is magnetized, or attached to a small magnet. On
either side of that magnet are small coils of wire called solenoids. The
switch has an input and two outputs at the terminals. It can be used to turn
one circuit on and off, or to switch power between two different circuits.
Electrical relays, in one form or another, have been around for over 100
years. It wasn’t until 1971 when Crydom invented the solid-state relay that
we had our next big step in relay technology.
Fig 9. SSR source: www.engineering.com
Advantages of SSR
Design simplicity, long life, low power consumption, fast switching, quiet
operation, minimum EMITTER noise, Ideal for hash environment [13].
Thermal Relays
Thermal overload relays are wired in series with the motor, so the current
flowing to the motor also flows through the overload relay. When the
current reaches or exceeds a predetermined limit for a certain amount of
time, the relay activates a mechanism that opens one or more contacts to
interrupt current flow to the motor. Thermal overload relays are rated by
their trip class, which defines the amount of time for which the overload
can occur before the relay responds, or trips. Common trip classes are 5,
10, 20, and 30 seconds.
Time delay relays are simply control relays with a time delay function built
in. They control an event, by energizing the secondary circuit, after a certain
amount of time or for a certain amount of time, some can even do both.
Microcontroller
Introduction to ATmega328.
ATmega-328 is basically an Advanced Virtual RISC (AVR) micro-controller.
It supports the data up to eight (8) bits. ATmega-328 has 32KB internal
builtin memory. This micro-controller has a lot of other characteristics. This
property shows if the electric supply supplied to the micro-controller is
removed, even then it can store the data and can provide results after
providing it with the electric supply. Moreover, ATmega-328 has 2KB Static
Random Access Memory (SRAM). Other characteristics will be explained
later. ATmega 328 has several different features which make it the most
popular device in today's market. These features consist of advanced RISC
architecture, good performance, low power consumption, real timer counter
having separate oscillator, 6 PWM pins, programmable Serial USART
programming lock for software security, throughput up to 20 MIPS etc.
ATmega-328 is mostly used in Arduino
ATMEGA328P pinouts:
Fig 13. Atmega328P pinouts Source: www.components101.com
Arduino
Components Overview
The PCB design of the Arduino UNO uses SMD (Surface Mount Device)
components. I entered the SMD world years ago when I dug into Arduino
PCB design while I was a part of a team redesigning a DIY clone for Arduino
UNO.
Integrated circuits use standardized packages, and there are families for
packages.
The dimensions of many SMD resistors, capacitors, and LEDs are indicated
by package codes such as the following:
USB connector
Power port
Microcontroller
Digital pins
Reset switch
Crystal oscillator
TX RX LEDs
USB connector:
USB connector
This is a printer USB port used to load a program from the Arduino IDE onto
the Arduino board. The board can also be powered through this port.
Power port:
Power port
The Arduino board can be powered through an AC-to-DC adapter or a
battery. The power source can be connected by plugging in a 2.1mm center
-positive plug into the power jack of the board.
Arduino IDE
Arduino IDE is an open source software that is mainly used for writing and
compiling the code into the Arduino Module.
It is easily available for operating systems like MAC, Windows, Linux and
runs on the Java Platform that comes with inbuilt functions and commands
that play a vital role for debugging, editing and compiling the code in the
environment [26].
1. Arduino IDE is an open source software that is mainly used for writing
and compiling the code into the Arduino Module. 2. It is an official Arduino
software, making code compilation too easy that even a common person
with no prior technical knowledge can get their feet wet with the learning
process. 3. It is easily available for operating systems like MAC, Windows,
Linux and runs on the Java Platform that comes with inbuilt functions and
commands that play a vital role for debugging, editing and compiling the
code in the environment. 4. A range of Arduino modules available including
Arduino Uno, Arduino Mega, Arduino Leonardo, Arduino Micro and many
more. 5. Each of them contains a microcontroller on the board that is
actually programmed and accepts the information in the form of code. 6.
The main code, also known as a sketch, created on the IDE platform will
ultimately generate a Hex File which is then transferred and uploaded in the
controller on the board. 7. The IDE environment mainly contains two basic
parts: Editor and Compiler where former is used for writing the required
code and later is used for compiling and uploading the code into the
given Arduino Module. 8. This environment supports both C and C++
language.
What is C?
What is C++?
C++ was developed by Bjarne Stroustrup in 1979 while working at Bell Labs.
He wanted an extension of C that was both flexible and efficient. C++ is
object-oriented, but like C can be used for development on a diverse range
of platforms. It also supports manual memory management. C++ is great
for networks, server-side, and gaming applications [28].
Ultrasonic Sensor
[29] Ultrasonic refers to signals that are above the human hearing span
(>20 kHz), and usually in the 40- to 70-kHz range. These signals are used
like radar—they’re radiated toward a target and reflected back to the source.
They are low cost, flexible, and especially useful in shorter-range
applications, especially automotive, home, and industrial robotic designs.
Source: microcontrollerslab.com
Hardware Overview
When a logic HIGH is applied to the DATA input, the oscillator runs
producing a constant RF output carrier wave at 433.xx MHz and when the
DATA input is taken to logic LOW, the oscillator stops. This technique is
known as Amplitude Shift Keying, which we will discuss in detail shortly.
433MHz RF Receiver Working Block Diagram
433 MHz RF Transmitter and Receiver module pinout, features & working
Source: www.components101.com
HT12 Decoder pin configuration and minimum circuit
Source: www.components101.com
Module Specifications:
REFERENCE
http://electronicsadventures.blogspot.com/2017/04/data-encoderdecoder-
ht12eht12d.html?m=1 Retrieved 2021-05-14
[20]Watelectronics, (2020). What is 7805 Regulator and it's Working
Principle?
https://www.watelectronics.com/what-is-7805-voltage-regulator-its-
working
Retrieved 2021-03-24
[21] Sumanbargavr, (2019). 7 Segment Display- A brief introduction
https://www.rs-online.com/designspark/7-segment-display-a-brief-
introduction Retrieved 2021-05-20[22] Electrical4u, (2020).
Electromagnetic Relay Working | Types of Electromagnetic Relays
https://www.electrical4u.com/electromagnetic-relay-working-types-of-
electromagnetic-relays/ Retrieved 2021-03-17[23] Quisure, (2020). What is
The Working Principle and Function of The
Relahttps://www.quisure.com/blog/faq/what-is-the-principle-and-function-
of-the-relay Retrieved 2021-03-27