You are on page 1of 43

ABSTRACT

For the cultivation of agricultural crops during the span of inadequate rainfall, irrigation process
can be used. An automatic irrigation system does the work quite efficiently and with a positive
impact on the place where it is installed. It doesn’t require any human intervention to perform
operations if it is installed and also the water distribution to the crops and nurseries becomes
easier. It connects the external environment that utilizes embedded technology and the various
traditional devices via internet. The proposed model uses Internet of Things to communicate with
the external environment. The working model helps in development of an automated system that
could be efficiently used in agriculture. The primary goal of this model is to maintain the growth
of the plant. To avoid over-watering, detection of soil condition, moisture level prediction is very
essential. The sensors help to detect the moisture and water level and thereby direct the pump to
pour the required amount of water to crops. The proposed model works well both in landscapes
and slope areas and it also helps to control the uneven moisture with the help of soil moisture
sensor. Water is fed to the crops and sequence of operations is intimated to the user.
CHAPTER 1

INTRODUCTION

Water scarcity is a problem that is gripping the major metro cities of the world; the main culprit
is not availability but undue wastage. Most of the people who have easy access to resources like
water, have careless attitude toward this kind of issues but people who face this problem knows
the worth of clean drinkable water. Some even say third world war will neither be fought for oil
nor boundaries but water, many would not believe it but it‟s the truth, it's already a polling
agenda in developing countries like India. Today, there are several names of manufacturers to
take, which provide the devices to control the water level, inside the tank. Since there costs
ranges in decades of thousands, are not suitable for domestic purpose. Thus an economical &
portable system is to be designed to control the water level inside the tank.

This paper is a sincere effort for developing an economical and portable water level controller. In
this the water level controller depends on two detection points in the tank. The water level must
be controlled at these two points (made standardized). To facilitate this, we have used sensors
and these sensors are metallic contacts with space between them present at each detection point.
When water reaches a sensor, a proper circuit must be present such that the presence of water is
detected and a signal is produced. This signal must pass through logic circuits to give the correct
actuator output. Also it must be strong enough to activate the actuator. A similar action must take
place when water reaches another sensor. Circuit essentially uses the high and low states of a
NAND gate to activate or deactivate the actuator. Simply put, we rely on the ON and OFF states
of the actuator. We have used simple microcontroller for the actuation.
1.1 Overview:

People generally switch on the pump when their taps go dry and switch off the pump when the
overhead tank starts overflowing. This results in the unnecessary wastage and sometimes
nonavailability of water in the case of emergency. The project “automatic water level control
with an automatic pump control system” is design to monitor the level of liquid in the tank. The
system has an automatic pumping system attached to it so as to refill the tank once the liquid gets
to the lower threshold, while offing the pump once the liquid gets to the higher threshold.
Sustainability of available water resource in many reason of the word is now a dominant issue.
This problem is quietly related to poor water allocation, inefficient use, and lack of adequate and
integrated water management. Water is commonly used for agriculture, industry, and domestic
consumption. Therefore, efficient use and water monitoring are potential constraint for home or
office water management system. Moreover, the common method of level control for home
appliance is simply to start the feed pump at a low level and allow it to run until a higher water
level is reached in the water tank. This water level control, controls monitor and maintain the
water level in the overhead tank and ensures the continuous flow of water round the clock
without the stress of going to switch the pump ON or OFF thereby saving time, energy, water,
and prevent the pump from overworking Besides this, liquid level control systems are widely
used for monitoring of liquid levels in reservoirs, silos. Proper monitoring is needed to ensure
water sustainability is actually being reached with disbursement linked to sensing and
automation, such programmatic approach entails microcontroller based automated water level
sensing and controlling or using 555 timer IC .
1.2 Aims and Objectives:

The goal or objectives of which the designed device is expected to accomplish is to build an
automatic water level control with automatic control system. In this project sensors are place at
different level of the tank and with the aid of this sensors, the microcontroller monitor the level
of the liquid at any particular point in time, some of the objectives are
(i). to design an automatic water monitoring system
(ii). to incorporate an interactive medium between the end user and the machine
(iii). to prevent over labour of the pumping machine and prevent it from getting bad
(iv). to avoid wastage of water
(v). since the demand of electricity is very high, automatic water level control saves energy

CHAPTER 2

LITERATURE SURVEY

Design and development of Automatic water flow meter(International journal of computer


science, engineering and applications Vol 3,no 3,June 2013)

Ria sood,Manjit kaur,hemant lanka

This research paper emphasis on the need of water level controller in irrigation in
agriculture. When we given command to Arduino it can check the input command in the voice
stored in build library and pass to the signal to the solenoid valve it can convert electrical signal
to mechanical and open the valve water it pass.
From this review,we learned that the command flowing in the arduino circuit.

Automatic water level controller with short messaging service notifications (International
journal of scientific and research publications , volume 4,sepetember 2014)

Sanam pudasanii,Anuj pathak, sukirthi dhakal,milan paudel

This research paper presents a system of an automatic water level controller with SMS
notifications.In the automatic method human is replaced by a controller to increase the
accuracy.The liquid level is sensed by float and sensed level is fed to the controller, controller
compares the sensed level with desired level and error signal is generated, according to that error
signal actuator controls the output valve.

From this review, we learned that the automatic water level controller with SMS
notifications

IOT soil moisture monitoring and irrigation system development

(International conference on software and computer applications, 2020)

Kim mey chew, syvester chiang wei tan, siew ping

In preliminary,a wireless soil moisture monitoring and irrigation system was


developed. This system aims to monitor the moisture and properties of soil for plants. At the
same time,with a self sufficient and self organised irrigation system based on the water control
algorithm.

From this review,we learned that how to establish a less manpower plantation in smart
city with the use of IOT technology to improve the crop cultivation.

Modern control systems,International conference software and computer applications


2018)

Dorf, R.C and R.H Bishop

Errors due to human, error due to time wasted in opening and closing of valves ,so there
is a need of automatic system to increase the accuracy
From this review, we learned that to increase the accuracy,automation is needed.

The Application of wireless sensor network in the irrigation area automatic system

Yan xijun, Lu Limei , Xu lizhong..,2002

The two traditional methods of finding the level of water in a tank are either by tapping
the side of a tank until the sound suddenly chnages, by removing the tank cover and dipping in a
measuring stick. The first method is notoriously unreliable , while the second method can be
ackward and time consuming. A more advanced method of sensing the water level in a tank
utilizes various electronic circuitry developed for different applications.

From this review,we learned that traditional method of water level sensing.

Microcontroller based Automated water level sensing and controlling design and
implementation issue ,2020

S.M.Khaled Reza, Shah Ahsanuzzaman Md.Tariq and S.M.Mohsin Reza.

In present days ,there are many parts on earth which face scarcity of water ,calamities like
drought etc...Energy production is laborious and cannot be misused.The water tank floods as the
tallness of water in the tank can’t be haphazardly speculated .This prompts additional vitality
utilization ,which is a high worry in the present period. Individual likewise need to pause and
quit doing their different exercises until the point that the tank is full. Henceforth, here is a
thought which faculties and shows the water level so the pump can be turned off on proper time
and spare water, power and time also.

From this review ,we learned that solution for recovery of water wastage problems
CHAPTER 3

3.1 HARDWARE DESCRIPTION


3.1.3 Arduino

Arduino is a single-board microcontroller, intended to make the application of interactive objects


or environments more accessible. The hardware consists of an open-source hardware board
designed around an 8-bit Atmel AVR microcontroller, or a 32-bit Atmel ARM. Current models
feature a USB interface, 6 analog input pins, as well as 14 digital I/O pins which allows the user
to attach various extension boards.

The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits. The
Diecimila, Duemilanove, and current Uno provide 14 digital I/O pins, six of which can produce
pulse width modulated signals, and six analog inputs.

The Arduino integrated development environment (IDE) is a cross-platform application written


in Java, and is derived from the IDE for the Processing programming language and the wiring
projects. It is designed to introduce programming to artists and other newcomers unfamiliar with
software development. It includes a code editor with features such as syntax highlighting, brace
matching and automatic indentation, and is also capable of compiling and uploading programs to
the board with a single click. A program or code written for Arduino is called a "sketch".
Arduino programs are written in C or C++. The Arduino IDE comes with a software library
called "Wiring" from the original wiring project, which makes many common input/output
operations much easier.
Fig 3.6: Arduino UNO

It is an open-source project, software/hardware is extremely accessible and very flexible to be


customized and extended. It is flexible, offers a variety of digital and analog inputs, SPI and
serial interface and digital and PWM outputs. It is easy to use, connects to computer via USB
and communicates using standard serial protocol, runs in standalone mode and as interface
connected to PC/Macintosh computers. It is inexpensive, around 30 euro per board and comes
with free authoring software.

3.1.4 Light Dependent

A photo resistor is a device whose resistivity is a function of the incident electromagnetic


radiation. Hence, they are light sensitive devices. They are also called as photo conductors, photo
conductive cells or simply photocells. They are made up of semiconductor materials having high
resistance. There are many different symbols used to indicate a LDR, one of the most commonly
used symbol is shown in the figure below. The arrow indicates light falling on it. When light
falls i.e. when the photons fall on the device, the electrons in the valence band of the
semiconductor material are excited to the conduction band. These photons in the incident light
should have energy greater than the band gap of the semiconductor material to make the
electrons jump from the valence band to the conduction band. Hence when light having enough
energy is incident on the device more & more electrons are excited to the conduction band which
results in large number of charge carriers. The result of this process is more and more current
starts flowing and hence it is said that the resistance of the device has decreased.

A light dependent resistor works on the principle of photo conductivity. Photo conductivity is an
optical phenomenon in which the materials conductivity (hence resistivity) reduces when light is
absorbed by the material. LDR’s are light dependent devices whose resistance decreases when
light falls on them and increases in the dark. When a light dependent resistor is kept in dark, its
resistance is very high. This resistance is called as dark resistance. It can be as high as 1012 Ω.
And if the device is allowed to absorb light its resistance will decrease drastically.

If a constant voltage is applied to it and intensity of light is increased the current starts
increasing. LDR’s have low cost and simple structure. They are often used as light sensors. They
are used when there is a need to detect absences or presences of light like in a camera light
meter. Used in street lamps, alarm clock, burglar alarm circuits, light intensity meters, for
counting the packages moving on a conveyor belt, etc.

3.1.5 Power Light Emitting Diode (LED)

A high-power LED light source is a single LED power higher than 0.5W. At present, many
manufacturers use low power LED, but it need use a lot of LED, and also lower power LED with
higher light decay. So its trend to use high power LED source in commercial lighting. High
power LED is a light emitting diode with high rated current. Low LED power is generally 0.1W,
operating current is 20mA but high power LED can reach 1W, 2W, or even tens of watts,
operating current can be range from tens of mA to several hundred mA. Due to the constraints of
flux conversion efficiency and cost, it decides high-power mainly used in some special lighting
areas in short-term and long-term goal is the general lighting.

High power LED advantages:

High-power LED as the light source with features of low power consumption, less heating, long
life, fast response, good direction and so on. Housing is available for PC pipe, able to bear high
temperature of 135 degrees, low temperature of -45 degrees.

High power LED disadvantages:

Current high-power LED light conversion efficiency is still low, and cost is high. White LED
color is easy to be changed for long time use, cooling.

Applications:

High-power LED mainly used in oilfield, petrochemical, railway, mining, military and other
special industries. And most important is high power LED is more and more popular in general
lighting.
3.1.6 Voltage Regulator (LM317)

The LM317 device is an adjustable three-terminal positive-voltage regulator capable of


supplying more than 1.5 Ampere over an output-voltage range of 1.25 V to 37 V. It requires only
two external resistors to set the output voltage. The device features a typical line regulation of
0.01% and typical load regulation of 0.1%. It includes current limiting, thermal overload
protection, and safe operating area protection. Overload protection remains functional even if the
ADJUST terminal is disconnected.

Features:

Output Voltage Range Adjustable From 1.25 V to 37 V


Output Current Greater Than 1.5 A
Internal Short-Circuit Current Limiting
Thermal Overload Protection
Output Safe-Area Compensation

Fig 3.10: Voltage Regulator Circuit diagram

The LM317 is versatile in its applications, including uses in programmable output regulation and
local on-card regulation. Or by connecting a fixed resistor between the ADJUST and OUTPUT
terminals, the LM317 can function as a precision current regulator. An optional output capacitor
can be added to improve transient response. The ADJUST terminal can be bypassed to achieve
very high ripple-rejection ratios, which are difficult to achieve with standard three-terminal
regulators.
3.1.7 ULN2003 Darlington Pair

We are using this IC as the switch circuit for the power LED. This IC has many advantages and
used in many application. ULN2003 is a high voltage and high current Darlington array IC. It
contains seven open collector Darlington pairs with common emitters. A Darlington pair is an
arrangement of two bipolar transistors.

ULN2003 belongs to the family of ULN200X series of ICs. Different versions of this family
interface to different logic families. ULN2003 is for 5V TTL, CMOS logic devices. These ICs
are used when driving a wide range of loads and are used as relay drivers, display drivers, line
drivers etc. ULN2003 is also commonly used while driving Stepper Motors. Each channel or
Darlington pair in ULN2003 is rated at 500mA and can withstand peak current of 600mA. The
inputs and outputs are provided opposite to each other in the pin layout. Each driver also
contains a suppression diode to dissipate voltage spikes while driving inductive loads. The
schematic for driver is given below:

Fig 3.12: Schematic for ULN2003 driver

Main specifications:

500 mA rated collector current (single output).


50 V output (there is a version that supports 100 V output).
Includes output flyback diodes.
Inputs compatible with TTL and 5-V CMOS logic
Fig 3.13: ULN2003 Darlington transistor array
Fig 3.14: ULN2003 Pin Diagram

3.1.8 Resistors A resistor is an electrical component that limits or regulates the flow of electrical
current in an electronic circuit. Resistors can also be used to provide a specific voltage for an
active device such as a transistor. All other factors being equal, in a direct-current (DC) circuit,
the current through a resistor is inversely proportional to its resistance, and directly proportional
to the voltage across it. This is the well-known Ohm's Law. In alternating-current (AC) circuits,
this rule also applies as long as the resistor does not contain inductance or capacitance. Resistors
can be fabricated in a variety of ways. The most common type in electronic devices and systems
is the carbon-composition resistor. Fine granulated carbon (graphite) is mixed with clay and
hardened. The resistance depends on the proportion of carbon to clay; the higher this ratio, the
lower the resistance. Another type of resistor is made from winding Nichrome or similar wire on
an insulating form. This component, called a wire wound resistor, is able to handle higher
currents than a carboncomposition resistor of the same physical size. However, because the wire
is wound into a coil, the component acts as an inductors as well as exhibiting resistance. This
does not affect performance in DC circuits, but can have an adverse effect in AC circuits because
inductance renders the device sensitive to changes in frequency.

Fig 3.16: Resistor


1.9 Capacitors Capacitor is a passive component used to store charge. The charge (q) stored in a
capacitor is the product of its capacitance (C) value and the voltage (V) applied to it. Capacitors
offer infinite reactance to zero frequency so they are used for blocking DC components or
bypassing the AC signals. The capacitor undergoes through a recursive cycle of charging and
discharging in AC circuits where the voltage and current across it depends on the RC time
constant. For this reason, capacitors are used for smoothing power supply variations. Other uses
include, coupling the various stages of audio system, tuning in radio circuits etc. These are used
to store energy like in a camera flash. Capacitors may be non-polarized/polarized and
fixed/variable. Electrolytic capacitors are polarized while ceramic and paper capacitors are
examples of non polarized capacitors. Since capacitors store charge, they must be carefully
discharged before troubleshooting the circuits. The maximum voltage rating of the capacitors
used must always be greater than the supply voltage.

Applications are:

 store charges such as in a camera flash circuit


 smoothing the output of power supply circuits
 coupling of two stages of a circuit (coupling of an audio stage with a loud speaker)
 filter networks(tone control of an audio system)
 delay applications (as in 555 timer IC controlling the charging and discharging)
 tuning radios to particular frequencies
Fig 3.17: Capacitors

3.1.10 Op-Amp 741


The Operational Amplifier is probably the most versatile Integrated Circuit available. It is
very cheap especially keeping in mind the fact that it contains several hundred
components. The most common Op-Amp is the 741 and it is used in many circuits. The
OP AMP is a ‘Linear Amplifier’ with an amazing variety of uses. Its main purpose is to
amplify (increase)a weak signal - a little like a Darlington Pair. The OP-AMP has two
inputs, inverting ( - ) and non-inverting (+) and one output at pin 6. The chip can be used
in a circuit in two ways. If the voltage goes into pin two then it is known as an inverting
amplifier. If the voltage goes into pin three then the circuit becomes a non-inverting
amplifier. The 741 integrated circuit looks like any other ‘chip’. However, it is a general
purpose OP-AMP. You need only to know basic information about its operation and use.
The diagram opposite shows the pins of the 741 OP-AMP. The important pins are 2,3 and
6 because these represent inverting, non-inverting and voltage out.

Fig 3.18: Op-Amp 741


Inverting amplifier:
Leg two is the input and the output is always reversed. In an inverting amplifier the
voltage enters the 741 chip through leg two and comes out of the 741 chip at leg six. If
the polarity is positive going into the chip, it negative by the time it comes out through
leg six. The polarity has been ‘inverted’.
Non-Inverting amplifier:
Leg three is the input and the output is not reversed. In a noninverting amplifier the
voltage enters the 741 chip through leg three and leaves the 741 chip through leg six.
This time if it is positive going into the 741 then it is still positive coming out.
Features of 741 IC :
Short circuit and overload protection provided.
In theory, the dc output voltage will be zero if both the inputs of the 741 IC are connected
to the ground. But in practice, a small dc output may appear due to minor internal
unbalances. It is usually unnoticed in normal applications. But for critical conditions, the
output voltage can be set precisely to zero by connecting a 10K potentiometer between
terminals marked “offset-null”.
Low power consumption
No external frequency compensation is required. It also does not need any external
compensation for phase component. This simplifies the circuit design and minimizes the
number of components used. This solar energy is not only used on the Earth but also used
in space stations where no electrical power is available. Here is the simple circuit to
charge rechargeable Lead-acid battery from the solar panel. This solar charger has current
and voltage regulation and also has over voltage cutoff facilities. This circuit may also be
used to charge any battery at constant voltage because output voltage is adjustable.
Fig 3.19: Op-Amp 741 Pin Diagram

9. LCD DISPLAY

A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the light
modulating properties of liquid crystals (LCs). LCDs do not emit light directly. Liquid crystal
displays (LCDs) are a passive display technology. This means they do not emit light; instead,
they use the ambient light in the environment. By manipulating this light, they display images
using very little power. This has made LCDs the preferred technology whenever low power
consumption and compact size are critical. They are used in a wide range of applications,
including computer monitors, television, instrument panels, aircraft cockpit displays, signage,
etc. They are common in consumer devices such as video players, gaming devices, clocks,
watches, calculators, and telephones. LCDs have displaced cathode ray tube (CRT) displays in
most applications. They are usually more compact, lightweight, portable, less expensive, more
reliable, and easier on the eyes.

9.1. PIN INFORMATION OF LCD


Fig.5.6. Pin Information Of Lcd

9.2. ALGORITHM TO SEND DATA TO LCD

 Make R/W low


 Make RS=0 ;if data byte is command
 RS=1 ;if data byte is data (ASCII value)
 Place data byte on data register
 Pulse E (HIGH to LOW)
 Repeat the steps to send another data byte

9.3. LCD INITIALIZATION


Working of LCD depend on the how the LCD is initialized. We have to send few
command bytes to initialize the LCD. Simple steps to initialize the LCD.

1. Specify function set:

Send 38H for 8-bit, double line and 5x7 dot character format.

2. Display On-Off control:

Send 0FH for display and blink cursor on.

3. Entry mode set:

Send 06H for cursor in increment position and shift is invisible.

4. Clear display:

Send 01H to clear display and return cursor to home position.

                                              Fig 1: Character LCD type HD44780 Pin diagram

Pin No. Name Description

Pin no. 1 VSS Power supply (GND)

Pin no. 2 VCC Power supply (+5V)

Pin no. 3 VEE Contrast adjust


0 = Instruction input
Pin no. 4 RS
1 = Data input

0 = Write to LCD Module


Pin no. 5 R/W
1 = Read from LCD module

Pin no. 6 EN Enable signal

Pin no. 7 D0 Data bus line 0 (LSB)

Pin no. 8 D1 Data bus line 1

Pin no. 9 D2 Data bus line 2

Pin no. 10 D3 Data bus line 3

Pin no. 11 D4 Data bus line 4

Pin no. 12 D5 Data bus line 5

Pin no. 13 D6 Data bus line 6

Pin no. 14 D7 Data bus line 7 (MSB)

                        Table 1: Character LCD pins with 1 Controller


Instruction Register (IR) and Data Register (DR)

There are two 8-bit registers in HD44780 controller Instruction and Data register. Instruction
register corresponds to the register where you send commands to LCD e.g LCD shift command,
LCD clear, LCD address etc. and Data register is used for storing data which is to be displayed
on LCD. when send the enable signal of the LCD is asserted, the data on the pins is latched in to
the data register and data is then moved automatically to the DDRAM and hence is displayed on
the LCD.
Data Register is not only used for sending data to DDRAM but also for CGRAM, the address
where you want to send the data, is decided by the instruction you send to LCD. We will discuss
more on LCD instuction set further in this tutorial.

Commands and Instruction set

Only the instruction register (IR) and the data register (DR) of the LCD can be controlled by
the MCU. Before starting the internal operation of the LCD, control information is temporarily
stored into these registers to allow interfacing with various MCUs, which operate at different
speeds, or various peripheral control devices. The internal operation of the LCD is determined by
signals sent from the MCU. These signals, which include register selection signal (RS),
read/write signal (R/W), and the data bus (DB0 to DB7), make up the LCD instructions (Table
3). There are four categories of instructions that:

 Designate LCD functions, such as display format, data length, etc.


 Set internal RAM addresses
 Perform data transfer with internal RAM

LCD Initialization

Before using the LCD for display purpose, LCD has to be initialized either by the internal reset
circuit or sending set of commands to initialize the LCD. It is the user who has to decide whether
an LCD has to be initialized by instructions or by internal reset circuit. we will dicuss both ways
of initialization one by one.
Sending Commands to LCD

To send commands we simply need to select the command register. Everything is same as we
have done in the initialization routine. But we will summarize the common steps and put them in
a single subroutine. Following are the steps:

 Move data to LCD port


 select command register
 select write operation
 send enable signalwait for LCD to process the command

9.5. ADVANTAGES

 Very compact and light.


 Low power consumption. Depending on the set display brightness and content being
displayed, the older CCFT backlit models typically use 30–50% of the power a CRT
monitor of the same size viewing area would use, and the modern LED backlit models
typically use 10–25% of the power a CRT monitor would use.[58]
 Very little heat emitted during operation, due to low power consumption.
 No geometric distortion.
 The possible ability to have little or no flicker depending on backlight technology.
RELAY DRIVER:

How to Build a Relay Driver Circuit

A relay driver circuit is a circuit which can drive, or operate, a relay so that it can function
appropriately in a circuit.

The driven relay can then operate as a switch in the circuit which can open or close, according to
the needs of the circuit and its operation.

In this project, we will build a relay driver for both DC and AC relays. Since DC and AC
voltages operate differently, to build relay drivers for them requires slightly different setup. We
will also go over a generic relay driver which can operate from either AC or DC voltage and
operate both AC and DC relays.

All the circuits are relatively simple to understand.


DC Relay Driver Circuit

We will first go over how to build a relay driver circuit for relays which operate from DC power.

To drive a DC relay, all we need is sufficient DC voltage which the relay is rated for and a zener
diode.

All relays come with a voltage rating. This is called on a relay's datasheet its rated coil voltage.
This is the voltage needed in order for the relay to be able to operate and be able to open or close
its switch in a circuit. In order for a relay to function, it must receive this voltage at its coil
terminals. Thus, if a relay has a rated voltage of 9VDC, it must receive 9 volts of DC voltage to
operate. So the most important thing a DC relay needs is its rated DC voltage. If you don't know
this, look up what relay you have and look up its datasheet and check for this specification.

And the reason why a diode is needed is usually because it functions to eliminate voltage spikes
from a relay circuit as the relay opens and closes. The coil of a relay acts an inductor. Remember
that inductors are basically coils of wires wrapped around a conductive core. This is what relay
coils are as well. Therefore, they act as inductors. Inductors are electronic components that resist
changes in current. Inductors do not like sudden changes in current. If the flow of current
through a coil is suddenly interrupted, for example, a switch opening, the coil will respond by
producing a sudden, very large voltage across its leads, causing a large surge of current through
it. From a physics or physical perspective, this phenomen is a result of a collapsing magnetic
field within the coil as the current is terminated abruptly. Mathematically, this can be understood
by noticing how a large change in current (dI/dt) affects the voltage across a coil (V=LdI/dt).
Since we are opening the switch, in this case, the current literally goes from full mode to 0
instantaneously. This creates a large voltage spike. Surges in current that result from inductive
effects can create very high voltage spikes (as high as 1000V) that can have nasty effects on
neighboring devices with in the circuits, such as switches and transistors getting zapped. Not
only are these voltage spikes damaging to other electronic components in a circuit but thye are
also damaging to the relay's switch contacts. The contacts will suffer from these spikes as well.

So how do we prevent these voltage spikes? How can we suppress them so that they don't cause
this damage? The answer for DC relay circuits is to use a diode. A diode is placed reverse biased
in parallel with the relay. The diode acts as a transient suppressor. A transient is a spike. A
transient suppressor suppresses these spikes. Placing a diode in reverse bias across a relay's coil
eliminates voltage spikes by going into conduction before a large voltage can form across the
coil. In other words, a diode will conduct current in reverse bias once the voltage reaches a
certain threshold and shunt the current to ground. Once the diode begins conducting, it no longer
holds voltage. So that the relay in parallel will not receive the excess voltage. So the diode
functions to shunt excess power to ground once it reaches a certain threshold. Diodes are devices
that do not conduct in reverse. However, if the voltage reaches a certain level, called the
breakdown voltage, it will conduct. This is a good thing, when we need the diode to act as a
transient suppressor, because it forces all excess power to ground, as to not affect any other parts
of the circuit.

The diode must be rated to handle currents equivalent to the maximum current that woudl have
been flowing through the coil before the supply current was interrupted. Therefore, if the relay
normally passes a certain amount of current through it during normal operation, the diode must
be rated for a current rating above this value, as to not stop normal operation.

Components Needed

 DC Relay
 Zener Diode
 DC Voltage regulator

Advantages of Low Side Driver


More interface options are available which includes popular ULN2003 driver.

 Easy to interface to low voltage logic circuitry.


 Fewer components are used.
 Less expensive NPN drive transistors.
 Relay power reduces load on voltage regulator.
 It uses more commonly obtained NPN drive transistors.
 It is easier to interface relay.
 It is economic.
 Uses Industry standard technique.

REGULATOR 7805

Voltage sources in a circuit may have fluctuations resulting in not providing fixed voltage
outputs. A voltage regulator IC maintains the output voltage at a constant value. 7805 IC, a
member of 78xx series of fixed linear voltage regulators used to maintain such fluctuations, is a
popular voltage regulator integrated circuit (IC). The xx in 78xx indicates the output voltage it
provides. 7805 IC provides +5 volts regulated power supply with provisions to add a heat sink.

All voltage sources cannot able to give fixed output due to fluctuations in the circuit. For getting
constant and steady output, the voltage regulators are implemented. The integrated circuits which
are used for the regulation of voltage are termed as voltage regulator ICs. Here, we can discuss
about IC 7805.The voltage regulator IC 7805 is actually a member of 78xx series of voltage
regulator ICs. It is a fixed linear voltage regulator. The xx present in 78xx represents the value of
the fixed output voltage that the particular IC provides. For 7805 IC, it is +5V DC regulated
power supply. This regulator IC also adds a provision for a heat sink. The input voltage to this
voltage regulator can be up to 35V, and this IC can give a constant 5V for any value of input less
than or equal to 35V which is the threshold limit.
7805 IC Rating

 Input voltage range 7V- 35V


 Current rating Ic = 1A
 Output voltage range   VMax=5.2V ,VMin=4.8V

Regulated Power Supply Circuit

 The voltage regulator 7805 and the other components are arranged in the circuit as
shown in figure.
The purposes of coupling the components to the IC7805 are explained below. C 1- It is the bypass
capacitor, used to bypass very small extent spikes to the earth. C 2 and C3- They are the filter
capacitors. C2 is used to make the slow changes in the input voltage given to the circuit to the
steady form. C3 is used to make the slow changes in the output voltage from the regulator in the
circuit to the steady form. When the value of these capacitors increases, stabilization is enlarged.
But these capacitors single-handedly are unable to filter the very minute changes in the input and
output voltages. C4- like C1, it is also a bypass capacitor, used to bypass very small extent spikes
to the ground or earth. This is done without influencing other components.

Applications of Voltage Regulator 7805 IC

 Current regulator
 Regulated dual supply
 Building circuits for Phone charger, UPS power supply circuits, portable CD player etc
 Fixed output regulator
 Adjustable output regulator etc.

2.1.1 Ultrasonic Sensor

Ultrasonic ranging and detecting devices use high-frequency sound waves to detect the
presence of an object and its range. The systems either measure the echo reflection of the
sound from objects or detect the interruption of the sound beam as the objects pass between
the transmitter and receiver. An ultrasonic sensor typically utilizes a transducer that produces
an electrical output in response to received ultrasonic energy. The normal frequency range
for human hearing is roughly 20 to 20,000 hertz. Ultrasonic sound waves are sound waves
that are above the range of human hearing and thus, have a frequency above about 20,000
hertz. Any frequency above 20,000 hertz may be considered ultrasonic. Most industrial
processes, including almost all source of friction, create some ultrasonic noise. The ultrasonic
transducer produces ultrasonic signals. These signals are propagated through a sensing
medium and the same transducer can be used to detect returning signals. Ultrasonic sensors
typically have a piezoelectric ceramic transducer that converts an excitation electrical signal
into ultrasonic energy bursts. The energy bursts travel from the ultrasonic sensor, bounce off
objects, and are returned toward the sensor as echoes. Transducers are devices that convert
electrical energy to mechanical energy, or vice versa.

The transducer converts received echoes into Analog electrical signals that are output from
the transducer. The piezoelectric effect refers to the voltage produced between surfaces of a
solid dielectric (non-conducting substance) when a mechanical stress is applied to it.
Conversely when a voltage is applied across certain surfaces of a solid that exhibits the
piezoelectric effect, the solid undergoes a mechanical distortion. Such solids typically
resonate within narrow frequency ranges. Piezoelectric materials are used in transducers e.g.,
phonograph cartridges, microphones, and strain gauges that produce an electrical output from
a mechanical input. They are also used in earphones and ultrasonic transmitters that produce
a mechanical output from an electrical input. Ultrasonic transducers operate to radiate
ultrasonic waves through a medium such as air. Transducers generally create ultrasonic
vibrations through the use of piezoelectric materials such as certain forms of crystal or
ceramic polymers.

2.1.2 Ultrasonic sensing and control

Ultrasonic signals are like audible sound waves, except the frequencies are much higher. Our
ultrasonic transducers have piezoelectric crystals which resonate to a desired frequency and
convert electric energy into acoustic energy and vice versa. The illustration shows how sound
waves, transmitted in the shape of a cone, are reflected from a target back to the transducer.
An output signal is produced to perform some kind of indicating or control function. A
minimum distance from the sensor is required to provide a time delay so that the "echoes"
can be interpreted. Variables which can affect the operation of ultrasonic sensing include,
target surface angle, reflective surface roughness or changes in temperature or humidity. The
targets can have any kind of reflective form - even round objects.

2.2 Measurement principle and effective use of Ultra Sonic Sensor

Ultrasonic sensor transmits ultrasonic waves from its sensor head and again receives the
ultrasonic waves reflected from an object. Basically, in our project ultrasonic sensor ranges
of about 2 centimetres to 1 metre. By measuring the length of time from the transmission to
reception of the sonic wave, it detects the position of the object. The ultrasonic transducer
produces ultrasonic signal. These signals are propagated through a sensing medium and the
same transducer can be used to detect returning signals. In most applications, the sensing
medium is simply air. An ultrasonic sensor typically comprises at least one ultrasonic
transducer which transforms electrical energy into sound and in reverse sound into electrical
energy, a housing enclosing the ultrasonic transducer, an electrical connection and optionally,
an electronic unit for signal processing also enclosed in the housing.

2.3 Advantages of Ultrasonic Sensors

Ultrasonic have a lot of advantages for using in real application. The advantages of ultrasonic
sensor are: ∑ Discrete distances to moving objects can be detected and measured. ∑ Less
affected by target materials and surfaces, and not affected by colour. Solid-state units have
virtually unlimited, maintenance free life. Ultrasonic can detect small objects over long
operating distances. ∑ Resistance to external disturbances such as vibration, infrared
radiation, ambient noise, and EMI (Electro Magnetic Interference) radiation. ∑ Measures and
detects distances to moving objects. ∑ Impervious to target materials, surface and colour. ∑
Solid-state units have virtually unlimited, maintenance free lifespan. ∑ Detects small objects
over long operating distance. ∑ Ultrasonic sensors are not affected by dust, dirt or high
moisture environments.

2.4 Disadvantages of Ultrasonic Sensors

Some disadvantages of ultrasonic sensor are: ∑ Overheating of a wave emitter precludes the
energy of ultrasonic waves emitted there from being enhanced to a practical level. ∑
Interference between the projected waves and the reflected waves takes place, and
development of standing waves provides adverse effects. ∑ It is impossible to discern
between reflected waves from the road surface and reflected waves from other places or
objects.

2.5 Target Angle and Beam Spread

This term refers to the "tilt response" limitations of a given sensor. Since ultrasonic sound
waves reflect off the target object, target angles indicate acceptable amounts of tilt for a
given sensor. This term is defined as the area in which a round wand will be sensed if passed
through the target area. This is the maximum spreading of the ultrasonic sound as it leaves
the transducer.

2.6 Effect of Environmental factors on Ultrasonic sensor

There are many factors present in the environment which can affect the working of ultrasonic
sensor. They are:

2.6.1 Temperature

The velocity of sound in air is 13,044 inches/s at 0 0C, it is directly proportional to air
temperature. As the ambient air temperature increases, the speed of sound also increases.
Therefore if a fixed target produces an echo after a certain time delay, and if the temperature
drops, the measured time for the echo to return increases, even though the target has not
moved. This happens because the speed of sound decreases, returning an echo more slowly
than at the previous, warmer temperature. If varying ambient temperatures are expected in a
specific application, compensation in the system for the change in sound speed is
recommended.

2.6.2 Air Turbulence and Convection current

A particular temperature problem is posed by convection currents that contain many bands of
varying temperature. If these bands pass between the sensor and the target, they will abruptly
change the speed of sound while present. No type of temperature compensation (either
temperature measurement or reference target) will provide complete high-resolution
correction at all times under these circumstances.
In some applications it may be desirable to install shielding around the sound beam to reduce
or eliminate variations due to convection currents. Averaging the return times from a number
of echoes will also help to reduce the random effect of convection.

2.6.3 Atmospheric pressure

Normal changes in atmospheric pressure will have little effect on measurement accuracy.
Reliable operation will deteriorates however, in areas of unusually low air pressure,
approaching a vacuum.

2.6.4 Humidity

Humidity does not significantly affect the operation of an ultrasonic measuring system.
Changes in humidity do have a slight effect, however, on the absorption of sound. If the
humidity produces condensation, sensors designed to operate when wet must be used.

2.6.5 Acoustic Interference

Special consideration must be given to environments that contain background noise in the
ultrasonic frequency spectrum. For example, air forced through a nozzle, such as air jets used
for cleaning machines, generates a whistling sound with harmonics in the ultrasonic range.
When in close proximity to a sensor, whether directed at the sensor or not, ultrasonic noise at
or around the sensor's frequency may affect system operation. Typically, the level of
background noise is lower at higher frequencies, and narrower beam angles work best in
areas with a high ultrasonic background noise level. Often a baffle around the noise source
will eliminate the problem. Because each application differs, testing for interference is
suggested.

2.7 Sensor’s Target Considerations


For detecting a target, the ultrasonic sensor takes into consideration the various properties of
the target. They are:

2.7.1 Composition

Nearly all targets reflect ultrasonic sound and therefore produce an echo that can be detected.
Some textured materials produce a weaker echo, reducing the maximum effective sensing
range. The reflectivity of an object is often a function of frequency. Lower frequencies can
have reduced reflections from some porous targets, while higher frequencies reflect well
from most target materials. Precise performance specifications can often be determined only
through experimentation.

2.7.2 Shape

A target of virtually any shape can be detected ultrasonically if sufficient echo returns to the
sensor. Targets that are smooth, flat, and perpendicular to the sensor's beam produce stronger
echoes than irregularly shaped targets. A larger target relative to sound wavelength will
produce a stronger echo than a smaller target until the target is larger than approximately 10
wavelengths across. Therefore, smaller targets are better detected with higher frequency
sound. In some applications a specific target shape such as a sphere, cylinder, or internal
cube corner can solve alignment problems between the sensor and the target.

2.7.3 Target Orientation


To produce the strongest echoes, the sensor's beam should be pointed toward the target. If a
smooth, flat target is inclined off perpendicular, some of the echo is deflected away from the
sensor and the strength of the echo is reduced. Targets that are smaller than the spot diameter
of the transducer beam can usually be inclined more than larger targets. Sensors with larger
beam angles will generally produce stronger echoes from flat targets that are not
perpendicular to the axis of the sound beam. Sound waves striking a target with a coarse,
irregular surface will diffuse and reflect in many directions. Some of the reflected energy
may return to the sensor as a weak but measurable echo. As always, target suitability must be
evaluated for each application.

Ultrasonic Transducer Ultrasonic transducers are transducers that convert ultrasound waves
to electrical signals or vice versa. Those that both transmit and receive may also be called
ultrasound transceivers; many ultrasound sensors besides being sensors are indeed
transceivers because they can both sense and transmit. These devices work on a principle
similar to that of transducers used in radar and sonar systems, which evaluate attributes of a
target by interpreting the echoes from radio or sound waves, respectively. 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 microphones
that detect ultrasonic noise that is present under certain conditions, convert it to an electrical
signal, and report it to a computer.

Ultrasonic probes and ultrasonic baths are used to apply sound energy to agitate particles in a
wide range of laboratory applications. An ultrasonic transducer is a device that converts AC
into ultrasound, as well as the reverse, sound into AC. In ultrasonic, the term typically refers
to piezoelectric transducers or capacitive transducers. Piezoelectric crystals change size and
shape when a voltage is applied; AC voltage makes them oscillate at the same frequency and
produce ultrasonic sound. Capacitive transducers use electrostatic fields between a
conductive diaphragm and a backing plate. The beam pattern of a transducer can be
determined by the active transducer area and shape, the ultrasound wavelength, and the
sound velocity of the propagation medium. The diagrams show the sound fields of an
unfocused and a focusing ultrasonic transducer in water, plainly at differing energy levels.
Since piezoelectric materials generate a voltage when force is applied to them, they can also
work as ultrasonic detectors. Some systems use separate transmitters and receivers, while
others combine both functions into a single piezoelectric transceiver. Ultrasound transmitters
can also use non-piezoelectric principles such as magneto-striction. Materials with this
property change size slightly when exposed to a magnetic field, and make practical
transducers. A capacitor ("condenser") microphone has a thin diaphragm that responds to
ultrasound waves. Changes in the electric field between the diaphragm and a closely spaced
backing plate convert sound signals to electric currents, which can be amplified. Ultrasonic
sensors are widely used in cars as parking sensors to aid the driver in reversing into parking
spaces. They are being tested for a number of other automotive uses including ultrasonic
people detection and assisting in autonomous UAV navigation.

Figure 3.2 (a) and (b) Ultrasonic Transducer HC-SR04 (Front and Back view)
Ultrasonic ranging module HC - SR04 provides 2cm - 400cm non-contact measurement
function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic
transmitters, receiver and control circuit. The basic principle of work:

Using IO trigger for at least 10us high level signal,


The Module automatically sends eight 40 kHz and detect whether there is a pulse signal
back.

IF the signal back, through high level , time of high output IO duration is the time from
sending ultrasonic to 4 Servo Motor A servo system mainly consists of three basic
components - a controlled device, a output sensor, a feedback system. This is an automatic
closed loop control system. Here instead of controlling a device by applying the variable
input signal, the device is controlled by a feedback signal generated by comparing output
signal and reference input signal. When reference input signal or command signal is applied
to the system, it is compared with output reference signal of the system produced by output
sensor, and a third signal produced by a feedback system. This third signal acts as an input
signal of controlled device. This input signal to the device presents as long as there is a
logical difference between reference input signal and the output signal of the system. After
the device achieves its desired output, there will be no longer the logical difference between
reference input signal and reference output signal of the system. Then, the third signal
produced by comparing theses above said signals will not remain enough to operate the
device further and to produce a further output of the system until the next reference input
signal or command signal is applied to the system. Hence, the primary task of a
servomechanism is to maintain the output of a system at the desired value in the presence of
disturbances. A servo motor is basically a DC motor (in some special cases it is AC motor)
along with some other special purpose components that make a DC motor a servo. In a servo
unit, you will find a small DC motor, a potentiometer, gear arrangement and an intelligent
circuitry. The intelligent circuitry along with the potentiometer makes the servo to rotate
according to our wishes. As we know, a small DC motor will rotate with high speed but the
torque generated by its rotation will not be enough to move even a light load. This is where
the gear system inside a servomechanism comes into the picture. The gear mechanism will
take high input speed of the motor (fast) and at the output, we will get an output speed which
is slower than original input speed but more practical and widely applicable. The output shaft
of servomotor SG 90 is capable of travelling somewhere around 180 degrees. A normal
servomotor is used to control an angular motion between 0 and 180 degrees, and it is
mechanically not capable of turning any farther due to a mechanical stop built on to the main
output gear. The angle through which the output shaft of the servomotor need to travel is
determined according to the nature of the signal given to the motor as input from the PIC
microcontroller. Due to r returning. Test distance = (high level time * velocity of sound
(340M/S) / 2. Wire connecting direct as following:

5V Supply

Trigger Pulse Input

Echo Pulse Output

0V Ground

Timing Diagram The Timing diagram is shown below. You only need to supply a short 10uS
pulse to the trigger input to start the ranging, and then the module will send out an 8 cycle
burst of ultrasound at 40 kHz and raise its echo. The Echo is a distance object that is pulse
width and the range in proportion .You can calculate the range through the time interval
between sending trigger signal and receiving echo signal. Formula: µS / 58 = centimetres or
µS / 148 =inch; Or The range = high level time * velocity (340M/S) / 2 It is always
suggested to use over 60ms measurement cycle, in order to prevent trigger signal to the echo
signal.

Figure 3.3 Timing diagram for the Ultrasonic Transducer HC-SR04

3.1.3 DC gear motor DC geared motors are essentially a DC shunt motor which has been
specially designed for low inertia, symmetrical rotation and smooth low-speed
characteristics. Geared motor is a motor with a closed feedback system in which the position
of the motor will be communicated back to the control circuit in the motors. Geared motors
are formed from four different elements: a DC motor, a position-sensing device (a
potentiometer), a gear reducing part and a control unit. All of these components work
together to make the motor to accept control signals that represent the desired output of the
motor shaft and power the DC motor until its shaft is turned to the right position. The shaft in
geared motors doesn’t rotate as freely as those in regular DC motors; it is only able to rotate
around 200 degrees in both directions. The positionsensing device in a geared motor
determines the rotation of the shaft and thus the way the motor needs to turn in order to arrive
at the desired position. The sliding mode control is robust to plant uncertainties and
insensitive to external disturbances. It is commonly used to get good dynamic performance of
controllable systems. Even then, the chattering phenomena due to the finite speed of the
switching devices can affect the system behaviour significantly. Besides, the sliding control
needs the knowledge of mathematical model of the system with bounded uncertainties.
Reduced chattering may be achieved without sacrificing robust performance by combining
the attractive features of fuzzy control with SMC.

CHAPTER 4

CONCLUSION

Automation of the various components around us has been widely increased to reduce human
intervention and save time. The water tank overflows as the height of water in the tank cannot be
randomly guessed. This leads to extra energy consumption, which is a high concern in the
present. People also need to wait and stop doing their other activities until the tank is full. Hence,
here is an idea which senses and indicates the water level so that the pump can be switched off
on appropriate time and save water, electricity and time as well. Therefore “Automatic Water
Level Indicator and Controller Using Arduino” project can definitely be useful on a large scale
basis due to minimum requirement of man power and also the installation process being easier
making more compatible for everyone to use.

CHAPTER 5

REFERENCES

[1] Asaad Ahmed Mohammed ahmed Eltaieb and Zhang Jian Min, Automatic Water Level
Control System, International Journal of Science and Research (IJSR), Volume 4 Issue 12,
December 2015.
[2] Beza Negash Getu and Hussain A. Attia, Automatic Water Level Sensor and Controller
System, ©2016 IEEE.

[3] Priya J, Sailusha Chekuri, water level monitoring system using IoT, International Research
Journal of Engineering and Technology (IRJET) Volume: 04 Issue: 12, Dec-2017.

[4] Madhurima Santra, Sanjoy Biswas, Sibasis Bandhapadhyay and Kaushik Palit, Smart
Wireless water level Monitoring & Pump controlling System, International Journal of Advances
in Scientific Research and Engineering (IJASRE), Vol. 03, Issue 4, May -2017.

[5] K. Santhosh Kumar, G. Mukesh, K. Deepti, Microcontroller based Automatic Water level
Control System ,International Refereed Journal of Engineering and Science (IRJES) Volume 4,
Issue 11, November 2015.

[6] Sanam Pudasaini, Anuj Pathak, Sukirti Dhakal and Milan Paudel, “Automatic Water Level
Controller with Short Messaging Service (SMS) Notification”, International Journal of Scientific
and Research Publications, Volume 4, Issue 9, September 2014.

You might also like