PJ New 1
PJ New 1
INTRODUCTION
1.1 BACKGROUND
Water is one of the most important substances on earth. All plants and animals must have water to survive.
Water scarcity involves water crises, water shortage, water deficit or water stress. Water scarcity can be due
to physical water scarcity and economic water scarcity. Physical water scarcity refers to a situation where
natural water resources are unable to meet region’s demand while economic water crisis is a result of poor
water management resources. If there was no water there would be no life on earth. Apart from drinking it
to survive, people have many other uses for water. Overhead water tanks are used for Domestic water
storage and commercial water storage purposes. They are generally placed over the rooftop of any house,
building or apartment. These tanks circulate the water through its distributary channels or pipes to the taps.
Generally most of the houses depend upon the overhead tanks as the main source of water. One of the
commonly seen situations in every house is that the overflow from the tank made people to switch off the
pump. Otherwise they should keep monitoring the tank when the pump is ON and switch OFF the pump as
soon as the tank is full. What happens when the client or user is not aware of water overflow or he is not at
the home while water is overflowing, As a result water resource is being wasted only because of improper
management standards that we follow. Efficient usage techniques should be employed to gain better control
on resource consumption water wastage is a serious issue that must be considered. Every drop of water
counts when it comes to human survival on this planet as we only have a little amount of water available for
us. as per the records only 3 percent of the water is available for the inhabitation the remaining 97 percent
of the water is situated in the oceans.
Currently there are many products which can solve this problem but the implementation and
maintenance are much difficult. This model does works by communicating wirelessly so the client
will no longer worry about the connection wires.
Automatic water level monitoring system uses network of things i.e. this model uses its own local
area network to maintain communication between the nodes Arduino calculate and make decisions
based on the program given by the developer.
Electronics deals with electrical circuits that involve active electrical components such as pump,
relay, LCD, transmitter and receiver circuit, LED, and sensors.
Electronics is considered to be a branch of physics and electrical engineering. An electronic
component is any physical entity in an electronic system used to affect the electrons or their
associated fields in a manner consistent with the intended function of the electronic system.
Components are generally intended to be connected together, usually by being soldered to a printed
circuit board (PCB), to create an electronic circuit with a particular function (for example an
amplifier, radio receiver, or oscillator Some common electronic components are capacitors,
inductors, resistors, diodes, transistors, etc. Components are often categorized as active or passive.
1.3 Objectives
The main intention of this project is to control the water management activity automatic by
using some sensors which can detect the water level and controllers which can turn ON or OFF
the pump based on the water level.
The system which decreases human intervention in maintaining the overhead tanks which is
capable of effective water usage.
To test the water temperature using LM35 sensor, if the temperature is above threshold valve,
then water flows through special valve provided or else it flows to sump for reuse without
wastage.
To design water billing monitoring system using flow liquid meter sensor and SMS gateway.
Ria Sood, Manjit Kaur, Hemant Lenka( IJCSE vol3,june2013) have emphasised on the need of
water level controller in irrigation in agriculture. It says that every crop requires different amount of
water and this can be done by using automatic water level controller which will also help in
reducing wastage of water. Here they use a technique to measure flow of rate of water in irrigation
pipelines. It uses a Hall Effect Sensor to measure the rate flow. G1/2 Hall Effect water flow sensor
is used as a sensing unit with a turbine rotor inside it, whose speed of rotation changes with the
different rate of flow of water.
Asaad Ahmed Mohammed Ahamad Eltaieb , Zhang Jian Min (IJSR 2016) Thet involved in
designing and development of automatic water level control system had exposed to the better way of
software and hardware architecture that blends together for the interfacing purposes. The system
employs the use of advance sensing technology to detect the water level. It uses Arduino and uses
relay to control motor. Different wires are attached at different Junctions of the Beaker. When we
pour water in the beaker. The water comes in contact with the wire and tells the level of water in the
tank. Accordingly, they have displayed the level of water on LCD display. And uses relay to turn
ON and OFF the motor.
Ms.Pooja K, Ms. Kusumavathi , Ms. Pavithra, Ms. Nishmitha, Prof. Aishwarya D Shetty
involved in water level indicator and controller system is used to sort out the issues associated with
water tank. It is also possible to check the level of the water using sensor so that whenever the water
goes below, pump gets turned ON automatically also when there is overflow of water in water tank
it uses sensor to detect the water level so that if the water level goes above, the pump gets turned off
automatically. This system prevents wastage of water.
Vaishnavi Raikar, Archana Ranjan, Pramodh Poddar, K. J. Chaitanya involved water level
Indicator which help us to know when the water in our tanks is either full or empty and
automatically switch ON and OFF the pump as and when necessary. By using the basic principle of
ultrasonic sensors, i.e. the ECHO method. The 20 kHz ultrasonic distance sensor remotely senses
level of water by measuring length of emptiness or fullness of the tank from recorded time of arrival
of echo from water surface. This length is interpreted and displayed by program-based
microprocessor in percentage of the capacity on Liquid Crystal Display (LCD) unit.
Vardaan Mittal (IJSR 2018) involved in measuring of water level with the help of ultrasonic
sensors. This system uses automated turning motor ON/OFF with the help of relay which helps in
controlling the excess water flow from overhead tanks. Accordingly, they have displayed the level
of water on LCD Display.
INTRODUCTIONTOTHEARDUINO BOARD
looking at the board from the top down, this is an outline of what you will see(parts of the
board you might interact with in the course of normal use arehighlighted):
STARTINGCLOCKWISEFROMTHETOPCENTER: -
analoginpins0-5(light blue)
power and ground pins(power: orange, grounds: light orange)
external power supply in(9-12vdc) -x1(pink)
togglesexternalpowerandusbpower(placejumperontwopinsclosesttodesiredsupply)
-sv1(purple)
usb (used for uploading sketches to the board and for serial communication
between the board and the computer ; can be used to power the board)(yellow)
Digital Pins: -
In addition to the specific functions listed below, the digital pins on an arduino board can be
used for general purpose input and output via the pin mode(), digital read(),and digital
write() commands. Each pin has an internal pull-up resistor which can be turned on and off
using digital write() (w/ a value of high or low, respectively) when the pin is configured as an
input . the maximum current per pin is 40 ma.
.serial: 0 (rx) and 1 (tx). used to receive (rx) and transmit (tx) ttl serial data. on the arduino
decimal , these pins are connected to the corresponding pins of the ftdiusb-to-ttl serial chip.on
the arduino bt, they are connected to the corresponding pins of the wt11 bluetooth module.on
the arduino mini and lily pad arduino, they are intended for use with an external ttl serial
module(e.g. the mini-usb adapter).
external interrupts: 2 and 3. these pins canbe configured to trigger an interrupt on a lowvalue, a
rising or falling edge, or a change in value. see the attachinterrupt() function fordetails.
pwm: 3, 5, 6, 9, 10, and 11. provide 8-bit pwm output with the analogwrite() function.
onboardswith an atmega8,pwmoutputisavailable onlyonpins 9, 10, and11.
btreset:7.(arduinobt-only)connectedtotheresetlineofthebluetoothmodule.
spi: 10 (ss), 11 (mosi), 12 (miso), 13 (sck). these pins support spi communication,
which,althoughprovidedby theunderlyinghardware,is notcurrently includedin
thearduinolanguage.
led: 13. on the diecimila and lilypad, there is a built-in led connected to digital pin 13.
whenthepinishighvalue, theledison, whenthe pinislow,it'soff.
ANALOGPINS:-
in addition to the specific functions listed below, the analog input pins support 10-bit analog-
to-digital conversion (adc) using the analogread() function. most of the analog inputs can
alsobeusedasdigital pins:analoginput 0asdigital pin14throughanaloginput5as digitalpin
19. analoginputs6and7(presentontheminiandbt)cannotbeusedasdigitalpins.
POWERPINS:-
vin (sometimes labelled "9v"). the input voltage to the arduino board when it's using
anexternal power source(as opposed to 5 volts from the usb connection or other
regulatedpower source). you can supply voltage through this pin, or, if supplying voltage via
the powerjack, access it through this pin. note that different boards accept different input
voltagesranges, please see the documentation for your board. also note that the lilypad has no
vin pinandaccepts onlyaregulatedinput.
5v. the regulated power supply used to power the microcontroller and other components onthe
board. this can come either from vin via an on-board regulator, or be supplied by usb
oranotherregulated 5vsupply.
3v3.(diecimila-only)a3.3 voltsupplygeneratedbytheon-board ftdichip.
gnd.groundpins.
OTHERPINS:-
the text of the arduino getting started guide is licensed under a creative commons attribution-
sharealike3.0 license. codesamplesin theguidearereleased into thepublicdomain.
arduinoisanopen-sourcehardwareandsoftwarecompany,projectandusercommunitythatdesigns
and manufactures single-board microcontrollers and microcontroller kits for buildingdigital
devices. its products are licensed under the gnu lesser general public license (lgpl)
orthegnugeneralpubliclicense(gpl),permittingthemanufactureofarduinoboardsandsoftware
distribution by anyone. arduino boards are available commercially in preassembledformor as
do-it-yourself(diy) kits.
arduinoboarddesignsuseavarietyofmicroprocessorsandcontrollers.theboardsareequipped with
sets of digital and analog input/output (i/o) pins that may be interfaced tovarious expansion
boards ('shields') or breadboards (for prototyping) and other circuits. theboards feature serial
communications interfaces, including universal serial bus (usb) on
somemodels,whicharealsousedforloadingprogramsfrompersonalcomputers.themicrocontroller
s can be programmed using c and c++programming languages. in addition tousing traditional
compiler toolchains, the arduino project provides an integrated developmentenvironment(ide)
basedon the processinglanguageproject.
the arduino project started in 2005 as a program for students at the interaction design
instituteivreain ivrea, italy, aiming to provide a low-cost and easy way for novices and
professionalsto create devices that interact with their environment using sensors and
actuators. commonexamples of such devices intended for beginner hobbyists
includesimplerobots, thermostatsand motiondetectors.
the name arduino comes from a bar in ivrea, italy, where some of the founders of the
projectused to meet. the bar was named after arduin of ivrea, who was the margrave of the
march ofivreaandkingof italyfrom 1002 to 1014
APPLICATIONS:-
arduboy,ahandheldgameconsole basedonarduino
arduinome,amidicontrollerdevicethatmimicsthemonome
ardupilot,dronesoftwareandhardware
ardusat,a cubesatbasedonarduino.
Embedded system means some combination of computer hardware and programmable software
which is specially designed for a particular task like displaying message on LCD. If you are still
wondering about an embedded system, just take a look at these circuit applications using AT89c51
microcontroller. You can call these applications embedded systems as it involves hardware (AT89c51
microcontroller) and software (the code written in assembly language).
Some real life examples of embedded systems may involve ticketing machines, vending
machines, temperature controlling unit in air conditioners etc. Microcontrollers are nothing without a
Program in it.
One of the important part in making an embedded system is loading the software/program we
develop into the microcontroller. Usually it is called “burning software” into the controller. Before
“burning a program” into a controller, we must do certain prerequisite operations with the program. This
includes writing the program in assembly language or C language in a text editor like notepad, compiling
the program in a compiler and finally generating the hex code from the compiled program. Earlier people
used different software/applications for all these 3 tasks. Writing was done in a text editor like
notepad/WordPad, compiling was done using a separate software (probably a dedicated compiler for a
particular controller like AT89c51), converting the assembly code to hex code was done using another
software etc. It takes lot of time and work to do all these separately, especially when the task involves
lots of error debugging and reworking on the source code.
Keil Micro Vision is a free software which solves many of the pain points for an embedded
program developer. This software is an integrated development environment (IDE), which integrated a
text editor to write programs, a compiler and it will convert your source code to hex files too.
Here is simple guide to start working with Keil Vision which can be used for
These are the simple steps to get off the mark your inning!
Step 1: After opening Keil uV4, Go to Project tab and Create new u Vision project. Now Select new
folder and give name to Project. As shown in figure 1.
Figure: 1
Step 2: After Creating project now Select your device model. Example.NXP-LPC2148 as shown in
figure 2.
Figure: 2
Step 3: so now your project is created and Message window will appear to add startup file of your Device
click on Yes so it will be added to
your project folder. As shown in
figure 3.
Figure: 3
Step 4: Now go to File and create new file and save it with .C extension if you will write program in C
language or save with .asm for assembly language. As shown in figure 4.
Figure : 4
Step 5: Now write your program and save it again. You can try example given at end of this tutorial.
Right click on target and click on options for target. Here you can change your device also. As shown
in figure 5.
Figure: 5
Step 6: After that on left you see project window [if it’s not there….go to View tab and click on project
window]. Now come on Project window. Click output tab here & check create Hex file if you want to
generate hex file. Now click on ok so it will save changes. As shown in figure 6.
Figure: 6
Step 7: Now Expand target and you will see source group. Right click on group and click on Add files
to source group. As shown in figure 7.
Figure: 7
Now add your program file which you have written in C/assembly. You can see program file added
under source group.
Step 8: Now Click on Build target. You can find it under Project tab or in toolbar .It can also be done
by pressing F7 key.
Figure: 7
Step 9: you can see Status of your program in Build output window
Now you are done with your program. Next time we will look at Debugging and Simulation of
Program. Hope you find it helpful
IDE:-
the arduino ide supports the languages c and c++using special rules of code structuring.
thearduinoidesuppliesasoftwarelibraryfromthewiringproject,whichprovidesmanycommon
input and output procedures. user-written code only requires two basic functions, forstarting
the sketch and the main program loop, that are compiled and linked with a programstub
main() into an executable cyclic executive program with the gnu toolchain, also
includedwiththeidedistribution.thearduinoideemploystheprogramavrdudetoconverttheexecuta
ble code into a text file in hexadecimal encoding that is loaded into the arduino
boardbyaloader programinthe board's firmware.
proide:-
on october 18th, 2019, arduino pro ide (alpha preview) was released. the system still
usesarduinocli(commandlineinterface),butimprovementsincludeamoreprofessionaldevelopme
ntenvironment,autocompletionsupport,andgitintegration.the application frontend is based on
the eclipse open source ide. the main features available in the alpha release are:
modern,fullyfeatureddevelopmentenvironment
dual mode, classic mode (identical to the classic arduino ide) and pro mode (file
systemview)
newboardmanager
newlibrarymanager
boardlist
basicauto-completion(armtargetsonly)
gitintegration
serialmonitor
darkmode
SKETCH[EDIT]:-
a sketch is a program written with the arduino ide sketches are saved on the development
computer as text files with the file extension.ino.arduino software(ide) pre-
1.0savedsketcheswith the extension .pde.
setup(): this function is called once when a sketch starts after power-up or reset. it is
usedto initialize variables, input and outputpin modes, and other libraries needed in
thesketch.itisanalogous tothe functionmain()
loop(): after setup() function exits (ends), the loop() function is executed repeatedly in
themain program.it controlsthe boarduntil the boardis poweredofforis reset.it
isanalogousto the functionwhile(1)
blink example
most arduino boards contain a light-emitting diode (led) and a current limiting
resistorconnectedbetweenpin13andground,whichisaconvenientfeatureformanytestsandprogramfunctions.atypicalprogr
amusedbybeginners,akintohello,world!,is"blink",whichrepeatedlyblinkstheon-
boardledintegratedintothearduinoboard.thisprogramusesthefunctionspinmode(),digitalwrite(),anddelay(),whicharepro
videdbytheinternallibrariesincludedintheideenvironment.thisprogramisusuallyloadedintoanewarduinoboard bythe
manufacturer
Power(USB/BarrelJack)
every arduino board needs a way to be connected to a power source. the arduino uno can be
powered from a usb cable coming from your computer or a wall power supply (like this)
thatis terminated in a barrel jack. in the picture above the usb connection is labeled (1) and
thebarreljack is labeled (2).
the usb connection is also how you will load code onto your arduino board. more on how
toprogramwith arduino canbefound inourinstallingand programmingarduinotutorial.
note: do not use a power supply greater than 20 volts as you will overpower (and
therebydestroy) your arduino. the recommended voltage for most arduino models isbetween 6
and12 volts.
Pins(5V,3.3V,GND,Analog,Digital,PWM,AREF)
gnd (3): short for „ground‟. there are several gnd pins on the arduino, any of
whichcanbeusedtogroundyourcircuit.
5v (4) & 3.3v (5): as you might guess, the 5v pin supplies 5 volts of power, and
the3.3v pin supplies 3.3 volts of power. most of the simple components used with
thearduino run happilyoffof 5 or3.3volts.
analog (6): the area of pins under the „analog in‟ label (a0 through a5 on the uno)
areanalogin pins.these pinscanreadthe signalfromananalog
sensor(likeatemperaturesensor)and convertitinto adigitalvaluethat we canread.
digital (7): across from the analog pins are the digital pins (0 through 13 on the
uno).these pins can be used for both digital input (like telling if a button is pushed)
anddigitaloutput(likepoweringanled).
pwm(8):youmayhavenoticedthetilde(~)nexttosomeofthedigitalpins(3,5,6,9, 10, and 11
on the uno). these pins act as normal digital pins, but canalso be usedfor something
called pulse-width modulation (pwm). we have a tutorial on pwm, butfor now, think
of these pins as being able to simulate analog output (like fading an ledinandout).
aref(9):standsforanalogreference.mostofthetimeyoucanleavethispinalone.itis
sometimes used to set an external reference voltage (between 0 and 5 volts) as
theupperlimitforthe analog inputpins.
RESETBUTTON
just like the original nintendo, the arduino has a reset button (10). pushing it will
temporarilyconnect the reset pin to ground and restart any code that is loaded on the arduino.
this can bevery useful if your code doesn‟t repeat, but you want to test it multiple times.
unlike theoriginalnintendo however, blowingon thearduinodoesn't usuallyfixanyproblems.
POWERLEDINDICATOR
just beneath and to the right of the word “uno” on your circuit board, there‟s a tiny led next
tothe word „on‟ (11). this led should light up whenever you plug your arduino into a
powersource. if this light doesn‟tturn on, there‟s a good chance something is wrong. time to
re-checkyourcircuit!
TXRX LEDS
tx is short for transmit, rx is short for receive. these markings appear quite a bit in
electronicsto indicate the pins responsible for serial communication. in our case, there are two
places onthe arduino uno where tx and rx appear -- once by digital pins 0 and 1, and a second
time nextto the tx and rx indicator leds (12). these leds will give us some nice visual
indicationswhenever our arduino is receiving or transmitting data (like when we‟re loading a
newprogramonto the board).
MAINIC
the black thing with all the metal legs is an ic, or integrated circuit (13). think of it as
thebrains of our arduino. the main ic on the arduino is slightly different from board type to
boardtype,butis usually fromtheatmegaline ofic‟sfromtheatmelcompany.thiscanbeimportant,
as you may need to know the ic type (along with your board type) before loadingup a new
program from the arduino software. this information can usually be found in writingon the
top side of the ic. if you want to know more about the difference between various
ic's,readingthe datasheetsisoften a goodidea.
VOLTAGEREGULATOR
the voltage regulator (14) is not actually something you can (or should) interact with on
thearduino. but it is potentially useful to know that it is there and what it‟s for. the
voltageregulator does exactly what it says -- it controls the amount of voltage that is let into
thearduino board. think of it as a kind of gatekeeper; it will turn away an extra voltage that
mightharm the circuit. of course, it has its limits, so don‟thook up your arduino to anything
greaterthan 20 volts.
THEARDUINOFAMILY
arduino makes several different boards, each with different capabilities. in addition, part
ofbeing open source hardware means that others can modify and produce derivatives of
arduinoboards that provide even more form factors and functionality. if you‟re not sure
which one isright for your project, check this guide for some helpful hints. here are a few
options that arewell-suitedto someonenew to the world ofarduino:
ARDUINOUNO(R3)
the uno is a great choice for your first arduino. it's got everything you need to get started,
andnothing you don't. it has 14 digital input/output pins (of which 6 can be used as
pwmoutputs), 6 analog inputs, a usb connection, a power jack, a reset button and more. it
containseverything needed to support the microcontroller; simply connect it to a computer
with a usbcableorpoweritwith aac-to-dcadapteror batterytogetstarted.
LILYPADARDUINO
at sparkfun we use many arduinos and we're always looking for the simplest, most stable
one.each board is a bit different and no one board has everything we want -- so we decided
tomakeour own version that combines all our favoritefeatures.
the redboard can be programmed over a usb mini-b cable using the arduino ide. it'll work
onwindows 8 without having tochangeyour security settings (we used signed drivers,
unliketheuno).it'smorestableduetotheusb/ftdichipweused,plusit'scompletelyflatontheback,
making it easier to embed in your projects. just plug in the board, select "arduino
uno"fromtheboardmenuandyou'rereadytouploadcode.youcanpowertheredboardoverusbor
through thebarrel jack.the on-board power regulator can handleanythingfrom7 to15vdc.
ARDUINOMEGA(R3)
the arduino mega is like the uno's big brother. it has lots (54!) of digital input/output pins (14can be used as pwm
outputs), 16 analog inputs, a usb connection, a power jack, and a resetbutton. it contains everything needed to support
the microcontroller; simply connect it to acomputer with a usb cable or power it with a ac-to-dc adapter or battery to
get started. thelarge number of pins make this board very handy for projects that require a bunch of digitalinputs or
outputs
sensors
with some simple code, the arduino can control and interact with awidevarietyof sensors thingsthatcanmeasure light,
temperature, degreeofflex, pressure, proxi mity, acceleration, carbon monoxide, radioactivity, humidity, barometric
pressure, you name it, you can sense it!
justafew ofthe sensors that are easilycompatiblewith arduinoshields
additionally, there are these things called shields -- basically they are pre-built circuit
boardsthatfitontopofyourarduinoandprovideadditional capabilities --
controllingmotors,connectingto the internet,providing cellularorother
wirelesscommunication,controllingan lcd screen,and muchmore.
apartialselectionofavailableshields toextendthepowerofyour arduino
C-SR04UltrasonicSensor
ULTRASONIC SENSORHCSR04PINDIAGRAM
ULTRASONICSENSORPINCONFIGURATION
1 VCC THEVCCPINPOWERSTHESENSOR,TYPICALLYWITH
+5V
3 ECHO ECHOPINISANOUTPUTPIN.THISPINGOESHIGHFORAPERI
ODOFTIMEWHICHWILLBEEQUALTOTHETIME TAKEN
FOR THE US WAVE TO RETURN BACK TOTHESENSOR.
4 GROUND THISPINISCONNECTEDTOTHEGROUNDOFTHESYS
TEM.
HC-SR04SENSORFEATURES
operatingvoltage:+5v
theoreticalmeasuringdistance:2cmto450cm
practicalmeasuringdistance:2cmto80cm
accuracy:3mm
measuringangle covered:<15°
operatingcurrent:<15ma
operatingfrequency:40hz
hc-sr04ultrasonicsensor-working
as shown above the hc-sr04 ultrasonic (us) sensor is a 4 pin module, whose pin names
arevcc, trigger, echo and ground respectively. this sensor is a very popular sensor used in
manyapplications where measuring distance or sensing objects are required. the module has
twoeyes like projects in the front which forms the ultrasonic transmitter and receiver. the
sensorworkswith the simple high school formulathat
distance=speed×time
the ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when
itgets objected by any material it gets reflected back toward the sensor this reflected wave
isobservedbythe ultrasonicreceivermoduleas showninthepicturebelow
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 roomconditions which is 330m/s. the
circuitry inbuilt on the module will calculate the time takenfor the us wave to come back and turns on the
echo pin high for that same particular amountof time, this way we can also know the time taken. now simply
calculate the distance using amicrocontrollerormicroprocessor
how to usethe hc-sr04ultrasonicsensor
power the sensor using a regulated +5v through the vcc ad ground pins of the sensor.
thecurrentconsumed by the sensor is less than 15ma and hence can be directly powered by
theon board 5v pins (if available). the trigger and the echo pins are both i/o pins and hence
theycan be connected to i/o pins of the microcontroller. to start the measurement, the trigger
pinhas to be made high for 10us and then turned off. this action will trigger an ultrasonic
wave atfrequency of 40hz from the transmitter and the receiver will wait for the wave to
return. oncethe wave is returned after it getting reflected by any object the echo pin goes high
for aparticular amount of time which will be equal to the time taken for the wave to return
back tothesensor.
the amount of time during which the echo pin stays high is measured by the mcu/mpu as
itgives the information about the time taken for the wavetoreturn back to the sensor.
usingthisinformation thedistance ismeasuredas explained intheaboveheading.
APPLICATIONS
usedtoavoidanddetectobstacleswithrobotslikebipedrobot,obstacleavoiderrobot,pathfindingr
obotetc.
usedto measurethe distancewithin awiderange of2cmto400cm
canbeusedtomaptheobjectssurroundingthesensorbyrotatingit
depthofcertainplaceslikewells,pitsetccanbemeasuredsincethewavescanpenetratethrough
water
RELAY
A relay is an electrically operated switch in which contacts can be made to operate in the pre –
arranged fashion.
In short, a relay is a switch worked by an electromagnet.
CLASSIFICATION OF RELAYS.
1. Electromagnet relays.
2. Solid state relays.
3. Hybrid relays.
ELECTROMAGNETIC RELAYS
by currents and employed to control large power or to Relays are switching devices operated perform
switching operations.
OPERATION:
Fig shows the construction features of a simple electromagnetic relay. It consists of a coil.
A dc current passing through which produces a magnetic field. This magnetic field attracts an armature
which in turn operates the contact, normally open contacts close and normally closed contacts open. As
long as current flows, the two contacts remains closed. When the current is switched off, the attractive force
on armature is no longer present and the contact is opened.
RELAY INTERFACE
The circuit diagram shows the connection of Relay Driver Circuit. When the logic signal from
the Buffer O/P is applied to base of the transistor through resistor 1KOhm the starts conducting, it energizes the
relay. The transistor act as a small signal amplifier resistor of 1KOhm is used to provide proper emitter base
voltage to turn the transistor to ON state from OFF state.
Relay is an electromechanical switch & it works on the principled energizing an electromagnet. It
consists of primary coil, 2 contacts one is normally open contact “NO” & the other is normally closed contact
“NC”& pole normally identified a common. When relay is in off state the pole is connected to normally closed
(NC contact).The load is connected to the relay as shown in above circuit diagram. The load may be a fan or dc
motor or heater coil, when transistor starts conducting current starts flowing through the coil. Which develops
its own magnetic flux when the strength of current is suitable, a sufficient flux when produced attracts the pole
to make contact with normally open position ‘NO’. Hence the load connected to it performs its operation until
the contact is broken. A diode connected in parallel across the primary coil is to eliminate the effect of back
EMF on the transistor. Relays have great application in industry. Using the principle of energizing an
Electromagnet we can handle large voltages & current application. Without the risk of shocks.
NodeMCU ESP8266
NodeMCU is an open-source Lua based firmware and development board specially targeted for IoT based
Applications. It includes firmware that runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and
hardware which is based on the ESP-12 module.
The LM35 thus has an advantage over linear temperature sensors calibrated in ˚ Kelvin, as the user is not
required to subtract a large constant voltage from its output to obtain convenient Centi-grade scaling. The
LM35 does not require any external calibration or trimming to provide typical accuracies of ±1⁄4˚C at room
temperature and ±3⁄4˚C over a full −55 to +150˚C temperature range.
The Receiver CKT is arranged as shown above. The 433MHz RF receiver (ASK type) gets the data from
antenna & the serial data is available at its data O/P pin. The corresponding +Vcc & GND pins are
connected to +5V source.
HT 12D Decoder decodes the serial data to parallel & it is available at D1- D4 data bits the
oscillating resistor of 51K is connected to its oscillating pins (pin 15 pin16) Pin 17 is considered as going
high when Transmitter starts generating & sending RF wave the pin 17 is connected to a transistor & an
LED which glows & indicates the link between Transmitter & Receiver. If a data bit of 1010 is applied to
the D0-D3 of HT 12E is Transmit serially. Transmit 433MHz & now through Transmitter& Receiver
receives the data bits & HT 12D decodes the serial data bits to parallel & the same data i.e. 1010 is
available at D1-D4 pins of HT 12D.
LED’S
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in
many devices and are increasingly used for other lighting.
The LED consists of a chip of semiconducting material doped with impurities to create a p-n
junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not
in the reverse direction. Charge-carriers—electrons and holes—flow into the junction from electrodes with
different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in
the form of a photon.
The wavelength of the light emitted, and thus its color depends on the band gap energy of the materials
forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non-
radiative transition, which produces no optical emission, because these are indirect band gap materials. The
materials used for the LED have a direct band gap with energies corresponding to near-infrared, visible, or
near-ultraviolet light.
LED development began with infrared and red devices made with gallium arsenide. Advances
in materials science have enabled making devices with ever-shorter wavelengths, emitting light in a variety
of colors.
LEDs are usually built on an n-type substrate, with an electrode attached to the p-type layer deposited
on its surface. P-type substrates, while less common, occur as well. Many commercial LEDs, especially
GaN/InGaN, also use sapphire substrate.
Most materials used for LED production have very high refractive indices. This means that much light will
be reflected back into the material at the material/air surface interface. Thus, light extraction in LEDs is an
important aspect of LED production, subject to much research and development.
Parts of an LED.
Although not directly labeled, the flat bottom surfaces of the anvil and post embedded inside the epoxy act
as anchors, to prevent the conductors from being forcefully pulled out from mechanical strain or vibration
The LCD panel used in this block interfaced with micro-controller through output port. This is a 16
character × 2Line LCD module, capable of display numbers, characters, and graphics. The display contains
two internal byte-wide registers, one for commands (RS=0) and the second for character to be displayed
(RS=1). It also contains a user programmed Ram area (the character RAM) character that can be formed
using dot matrix that can be programmed to generate any desired. Two distinguished between these areas,
the hex command byte will be signify that the display RAM address 00h is chosen.
LCD can add a lot to our application in terms of providing a useful interface for the user, debugging
an application or just giving it a “professional” look. The most common type of LCD controller is the
Hitachi 44780 which provides a relatively simple interface between a processor and an LCD. Using this
inter is often not attempted by inexperienced designers and programmers because it is difficult to find good
documentation on the interface, initializing the interface can be problem and the displays themselves are
expensive.
Connection to a PC parallel port is mostly simple. These displays can handle eight bit input directly.
They also need two extra lines to control which kind of data has just arrived and when the data is meant to
be stable. Those signals are also called RS (Register Select, instruction or data register) and EN (enable).
So it has to control ten data lines (8 bits + RS + EN) and one common ground (GND) line, which
make eleven lines to the parallel port. Data read back is not supported by the driver and so it does not
require extra line for this. The following table shows the needed connection.
BLOCK DIAGRAM: