Está en la página 1de 101

UNDERGROUND DRAINAGE

MONITORING SYSTEM FOR METROPOLITAN CITIES


Index

Abstract

Block Diagram

Introduction to project

Introduction to Embedded Systems

Communication or technology what we are using in the project

Explanation of Each Block

Working with Keil Compiler

Advantages

Applications

Conclusion

Reference
ABSTRACT
ABSTRACT

India has announced a project of making 100 smart cities. For making a
smart city one needs to consider many parameters such as smart water,
smart electricity, smart transportation etc. There will be a need of smart
underground infrastructure which includes underground water pipelines,
communication cables, gas pipelines, electric flow, etc. As most of the cities
in India have adopted underground drainage system, it is very important that
this system should work in proper manner to keep the city clean, safe and
healthy. If they fail to maintain the drainage system the pure water may get
contaminated with drainage water and can spread infectious diseases. So
different kind of work has been done to detect, maintain and manage these
underground systems. Also Leaks and bursts are an unavoidable aspect of
water distribution systems management, and can account for significant
water loss within a distribution network if left undetected for long periods.
This paper presents the implementation and design functions for monitoring
and managing underground drainage system with different approaches. It
also gives description about Water wise system and detection method to
detect leakage defects in sewer pipeline. Also some part of condition rating
model for underground Infrastructure Sustainable Water Mains and Intelligent
system for underground pipeline assessment, rehabilitation and
management are explained.
BLOCK DIAGRAM
BLOCK DIAGRAM:
WORKING

1. Power on System

2. we are using 2 sensors for monitor the drainage condition.

3. when water level will increase means drainage will full that time our
sensor will send signal to controller.

4. Controller will send signal to the GSM Module.

5. GSM Module will send message to the Authenticated person that drainage
is full.

According to Message Person will take action.

Fig. working diagram

level of liquid

flow rate

pipe number

location/area
fig. flow of circuit diagram

HARDWARE REQUIREMENT

8051 Microcontroller
arduino
Flow sensor
Water level sensor
Buzzer
GSM Module
SOFTWARE REQUIREMENT

1. PROGRAMMING LANGUAGES
Embedded C

2. COMPILERS:
Keil 4.0uv

3. DUMPING SOFTWARE:
Using Micro controller flash magic/ proload Software we are
dumping our HEX Code into Micro Controller
INTRODUCTION TO PROJECT

INTRODUCTION
Underground drainage system is important component of urban
infrastructure. It is considered to be citys lifeline. Most management on
underground drainage is manual therefore it is not efficient to have clean
and working underground system. Therefore, it is essential to develop a
system which can handle underground drainage without human intervention.
Underground Drainage involves sewerage system, gas pipeline network,
water pipeline and manholes. In this paper, different functions are described
which are used for maintenance and monitoring underground drainage
system. Underground manhole is one of the most efficient solutions to
drainage .However putting these manholes underground is very challenging.
Also the difficulties derived from the fact that manhole is hard to search once
it is hide under the road surface. Therefore, it is necessary to develop a set
of mechanism which can be used to search, authenticate manhole in order to
manage this problem. Closings of these manholes are covered by a manhole
cover. Manhole cover is a flat plug which is designed to protect from
unauthorized access. Also some people implements Underground Drainage
and Manhole Monitoring System. This is a model which provides a system
which is able to monitor the water level, atmospheric temperature. Also it
can be used to find pressure inside a manhole and to check whether a
manhole lid is open. Also this system can be used to monitors underground
installed electric power lines. Manhole explosion is one of the most
dangerous and serious problems as these explosions releases of chemical
and electrical energy inside a manhole. Manhole explosion events can be of
three types mainly smoking events, fires and explosion due to sudden raise
in pressure so they can monitor these manholes using sensors. If such
drainage system gets blocked and water overflows it can be identified by
sensor system. Also if suppose that manhole lid is open it will immediately
sense by the sensor in system, and that sensor sends information via
transmitter which is located in that area to the corresponding managing
station. But sometime this fails to solve these kinds of problems because it
increases the number of sensors. It is not able to provide scalability. These
are reasons for significant water loss. Therefore it is necessary to build a
system which has the ability to detect and localize pipe burst and leaks.

INTRODUCTION TO EMBEDDED SYSTEMS


Embedded Systems Overview:

Introduction of Embedded System:

An Embedded System is a combination of computer hardware and software, and


perhaps additional mechanical or other parts, designed to perform a specific function. A good
example is the microwave oven. Almost every household has one, and tens of millions of them
are used everyday, but very few people realize that a processor and software are involved in the
preparation of their lunch or dinner.

This is in direct contrast to the personal computer in the family room. It too is comprised
of computer hardware and software and mechanical components (disk drives, for example).
However, a personal computer is not designed to perform a specific function rather; it is able to
do many different things. Many people use the term general-purpose computer to make this
distinction clear. As shipped, a general-purpose computer is a blank slate; the manufacturer does
not know what the customer will do wish it. One customer may use it for a network file server
another may use it exclusively for playing games, and a third may use it to write the next great
American novel.

Frequently, an embedded system is a component within some larger system. For


example, modern cars and trucks contain many embedded systems. One embedded system
controls the anti-lock brakes, other monitors and controls the vehicle's emissions, and a third
displays information on the dashboard. In some cases, these embedded systems are connected by
some sort of a communication network, but that is certainly not a requirement.

At the possible risk of confusing you, it is important to point out that a general-purpose
computer is itself made up of numerous embedded systems. For example, my computer consists
of a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of
which is an embedded system. Each of these devices contains a processor and software and is
designed to perform a specific function. For example, the modem is designed to send and receive
digital data over analog telephone line. That's it and all of the other devices can be summarized
in a single sentence as well.
If an embedded system is designed well, the existence of the processor and software
could be completely unnoticed by the user of the device. Such is the case for a microwave oven,
VCR, or alarm clock. In some cases, it would even be possible to build an equivalent device that
does not contain the processor and software. This could be done by replacing the combination
with a custom integrated circuit that performs the same functions in hardware. However, a lot of
flexibility is lost when a design is hard-cooled in this way. It is mush easier, and cheaper, to
change a few lines of software than to redesign a piece of custom hardware.

History and Future:

Given the definition of embedded systems earlier is this chapter; the first such systems
could not possibly have appeared before 1971. That was the year Intel introduced the world's
first microprocessor. This chip, the 4004, was designed for use in a line of business calculators
produced by the Japanese Company Busicom. In 1969, Busicom asked Intel to design a set of
custom integrated circuits-one for each of their new calculator models. The 4004 was Intel's
response rather than design custom hardware for each calculator, Intel proposed a general-
purpose circuit that could be used throughout the entire line of calculators. Intel's idea was that
the software would give each calculator its unique set of features.

The microcontroller was an overnight success, and its use increased steadily over the
next decade. Early embedded applications included unmanned space probes, computerized traffic
lights, and aircraft flight control systems. In the 1980s, embedded systems quietly rode the
waves of the microcomputer age and brought microprocessors into every part of our kitchens
(bread machines, food processors, and microwave ovens), living rooms (televisions, stereos, and
remote controls), and workplaces (fax machines, pagers, laser printers, cash registers, and credit
card readers).

It seems inevitable hat the number of embedded systems will continue to increase rapidly.
Already there are promising new embedded devices that have enormous market potential; light
switches and thermostats that can be central computer, intelligent air-bag systems that don't
inflate when children or small adults are present, pal-sized electronic organizers and personal
digital assistants (PDAs), digital cameras, and dashboard navigation systems. Clearly, individuals
who possess the skills and desire to design the next generation of embedded systems will be in
demand for quite some time.

Real Time Systems:

One subclass of embedded is worthy of an introduction at this point. As commonly


defined, a real-time system is a computer system that has timing constraints. In other words, a
real-time system is partly specified in terms of its ability to make certain calculations or
decisions in a timely manner. These important calculations are said to have deadlines for
completion. And, for all practical purposes, a missed deadline is just as bad as a wrong answer.

The issue of what if a deadline is missed is a crucial one. For example, if the real-time
system is part of an airplane's flight control system, it is possible for the lives of the passengers
and crew to be endangered by a single missed deadline. However, if instead the system is
involved in satellite communication, the damage could be limited to a single corrupt data packet.
The more severe the consequences, the more likely it will be said that the deadline is "hard" and
thus, the system is a hard real-time system. Real-time systems at the other end of this discussion
are said to have "soft" deadlines.

All of the topics and examples presented in this book are applicable to the designers of
real-time system who is more delight in his work. He must guarantee reliable operation of the
software and hardware under all the possible conditions and to the degree that human lives
depend upon three system's proper execution, engineering calculations and descriptive
paperwork.

Application Areas

Nearly 99 per cent of the processors manufactured end up in embedded systems. The
embedded system market is one of the highest growth areas as these systems are used in very
market segment- consumer electronics, office automation, industrial automation, biomedical
engineering, wireless communication, data communication, telecommunications, transportation,
military and so on.
Consumer appliances:

At home we use a number of embedded systems which include digital camera, digital
diary, DVD player, electronic toys, microwave oven, remote controls for TV and air-conditioner,
VCO player, video game consoles, video recorders etc. Todays high-tech car has about 20
embedded systems for transmission control, engine spark control, air-conditioning, navigation
etc. Even wristwatches are now becoming embedded systems. The palmtops are powerful
embedded systems using which we can carry out many general-purpose tasks such as playing
games and word processing.

Office automation:

The office automation products using em embedded systems are copying machine, fax
machine, key telephone, modem, printer, scanner etc.

Industrial automation:

Today a lot of industries use embedded systems for process control. These include
pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and
transmission. The embedded systems for industrial use are designed to carry out specific tasks
such as monitoring the temperature, pressure, humidity, voltage, current etc., and then take
appropriate action based on the monitored levels to control other devices or to send information
to a centralized monitoring station. In hazardous industrial environment, where human presence
has to be avoided, robots are used, which are programmed to do specific jobs. The robots are
now becoming very powerful and carry out many interesting and complicated tasks such as
hardware assembly.

Medical electronics:

Almost every medical equipment in the hospital is an embedded system. These


equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices, X-ray
scanners; equipment used in blood analysis, radiation, colonoscopy, endoscopy etc.
Developments in medical electronics have paved way for more accurate diagnosis of diseases.
Computer networking:

Computer networking products such as bridges, routers, Integrated Services Digital


Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay switches are
embedded systems which implement the necessary data communication protocols. For example,
a router interconnects two networks. The two networks may be running different protocol stacks.
The routers function is to obtain the data packets from incoming pores, analyze the packets and
send them towards the destination after doing necessary protocol conversion. Most networking
equipments, other than the end systems (desktop computers) we use to access the networks, are
embedded systems

Telecommunications:

In the field of telecommunications, the embedded systems can be categorized as


subscriber terminals and network equipment. The subscriber terminals such as key telephones,
ISDN phones, terminal adapters, web cameras are embedded systems. The network equipment
includes multiplexers, multiple access systems, Packet Assemblers Dissemblers (PADs),
sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded systems
that provide very low-cost voice communication over the Internet.

Wireless technologies:

Advances in mobile communications are paving way for many interesting applications
using embedded systems. The mobile phone is one of the marvels of the last decade of the 20th
century. It is a very powerful embedded system that provides voice communication while we are
on the move. The Personal Digital Assistants and the palmtops can now be used to access
multimedia services over the Internet. Mobile communication infrastructure such as base station
controllers, mobile switching centers are also powerful embedded systems.

Insemination:

Testing and measurement are the fundamental requirements in all scientific and
engineering activities. The measuring equipment we use in laboratories to measure parameters
such as weight, temperature, pressure, humidity, voltage, current etc. are all embedded systems.
Test equipment such as oscilloscope, spectrum analyzer, logic analyzer, protocol analyzer, radio
communication test set etc. are embedded systems built around powerful processors. Thank to
miniaturization, the test and measuring equipment are now becoming portable facilitating easy
testing and measurement in the field by field-personnel.

Security:

Security of persons and information has always been a major issue. We need to protect
our homes and offices; and also the information we transmit and store. Developing embedded
systems for security applications is one of the most lucrative businesses nowadays. Security
devices at homes, offices, airports etc. for authentication and verification are embedded systems.
Encryption devices are nearly 99 per cent of the processors that are manufactured end up in~
embedded systems. Embedded systems find applications in every industrial segment- consumer
electronics, transportation, avionics, biomedical engineering, manufacturing, process control and
industrial automation, data communication, telecommunication, defense, security etc. Used to
encrypt the data/voice being transmitted on communication links such as telephone lines.
Biometric systems using fingerprint and face recognition are now being extensively used for user
authentication in banking applications as well as for access control in high security buildings.

Finance:

Financial dealing through cash and cheques are now slowly paving way for transactions
using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time Money)
machines. Smart card, of the size of a credit card, has a small micro-controller and memory; and
it interacts with the smart card reader! ATM machine and acts as an electronic wallet. Smart card
technology has the capability of ushering in a cashless society. Well, the list goes on. It is no
exaggeration to say that eyes wherever you go, you can see, or at least feel, the work of an
embedded system!

Overview of Embedded System Architecture

Every embedded system consists of custom-built hardware built around a Central Processing
Unit (CPU). This hardware also contains memory chips onto which the software is loaded. The
software residing on the memory chip is also called the firmware. The embedded system
architecture can be represented as a layered architecture as shown in Fig.
The operating system runs above the hardware, and the application software runs above
the operating system. The same architecture is applicable to any computer including a desktop
computer. However, there are significant differences. It is not compulsory to have an operating
system in every embedded system. For small appliances such as remote control units, air
conditioners, toys etc., there is no need for an operating system and you can write only the
software specific to that application. For applications involving complex processing, it is
advisable to have an operating system. In such a case, you need to integrate the application
software with the operating system and then transfer the entire software on to the memory chip.
Once the software is transferred to the memory chip, the software will continue to run for a long
time you dont need to reload new software.

Now, let us see the details of the various building blocks of the hardware of an embedded
system. As shown in Fig. the building blocks are;

Central Processing Unit (CPU)

Memory (Read-only Memory and Random Access Memory)

Input Devices

Output devices

Communication interfaces

Application-specific circuitry
Central Processing Unit (CPU):

The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-
cost processor. Its main attraction is t2hat on the chip itself, there will be many other components
such as memory, serial communication interface, analog-to digital converter etc. So, for small
applications, a micro-controller is the best choice as the number of external components required
will be very less. On the other hand, microprocessors are more powerful, but you need to use
many external components with them. D5P is used mainly for applications in which signal
processing is involved such as audio and video processing.

Memory:

The memory is categorized as Random Access Memory (RAM) and Read Only Memory
(ROM). The contents of the RAM will be erased if power is switched off to the chip, whereas
ROM retains the contents even if the power is switched off. So, the firmware is stored in the
ROM. When power is switched on, the processor reads the ROM; the program is program is
executed.

Input devices:

Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the embedded
system is no easy task. Many embedded systems will have a small keypad-you press one key to
give a specific command. A keypad may be used to input only the digits. Many embedded
systems used in process control do not have any input device for user interaction; they take
inputs from sensors or transducers 1fnd produce electrical signals that are in turn fed to other
systems.

Output devices:

The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of
the system modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD)
may also be used to display some important parameters.

Communication interfaces:

The embedded systems may need to, interact with other embedded systems at they may
have to transmit data to a desktop. To facilitate this, the embedded systems are provided with one
or a few communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB),
IEEE 1394, Ethernet etc.

Application-specific circuitry:

Sensors, transducers, special processing and control circuitry may be required fat an
embedded system, depending on its application. This circuitry interacts with the processor to
carry out the necessary work. The entire hardware has to be given power supply either through
the 230 volts main supply or through a battery. The hardware has to design in such a way that the
power consumption is minimize.
INTRODUCTION TO WIRELESS COMMUNICATION
In the world today, everything would be incredibly different if it were not for wireless
communication devices. The fact that we can communicate with people in other parts of our own
country and the world is amazing and has led to lots of changes in human history. There are
various kinds of wireless communication tools and here we will look at a few different kinds as
well as the benefits of having them.

Short Distances

Sometimes wireless communication does not happen across thousands of miles but only across a
few feet. For instance, if you have a television with a remote control, there is communication
happening between the two. The remote control tells the television what to do and this
information is transferred without the use of any wires.

You could also use walkie talkies for this purpose. These are little devices that work like
telephones except with different methods and will allow two people or a group of people to talk
to each other from a small distance away, such as at a festival or celebration.

Benefits of Short Distance Wireless Communication

Having these short distance devices allows many things to happen. You do not have to get up to
change the channel, for one thing. With walkie talkies you are able to communicate with a group
of people, which means that people who need to work together such as police men or fire fighters
or security guards can do so at special events without having to take the time to dial a phone
number. This can save time and sometimes lives.

Medium and Long Distances


Anything that can connect to the internet is capable of going through medium or long distances.
Many forms of wireless communication such as cell phones and laptop computers can send
information from ten feet to thousands of miles because they can connect to the internet.
Wireless communication of this form has changed the world dramatically.

One of the most widely acknowledged benefits of long distance wireless communication is that
people can perform their jobs at a distance. If they are trying to contact their boss or write a
report, they can do so from almost any part of the globe without having to be physically present.
This reduces travel costs and the impact of travel on the environment.

Another benefit of long distance wireless communication is that families can stay in touch with
each other even if one of them is far away. It used to be that if someone was on a business trip,
they would have to write a letter to communicate with their loved ones. Now they can
communicate through video and show their family exactly where they are so that the family can
connect about these experiences and maintain closer relationships with each other.

The types and forms of wireless communication are changing at a rapid pace to include ever
more increasing advances in technology. The benefits of these devices are many and range from
benefits that relate to our jobs to those that relate to our loving connection to our families. There
is virtually no end to the amount that human kind can advance given the incredible leaps and
bounds we are making with technology!

Applications of Wireless Data Communications:

Wireless data communications are an essential component of mobile computing. The various
available technologies differ in local availability, coverage range and performance, and in some
circumstances, users must be able to employ multiple connection types and switch between
them. To simplify the experience for the user, connection manager software can be used, or a
mobile VPN deployed to handle the multiple connections as a secure, single virtual network.
Supporting technologies include:

Wi-Fi is a wireless local area network that enables portable computing devices to connect easily
to the internet. Standardized as IEEE 802.11a,b,g,n, Wi-Fi approaches speeds of some types of
wired Ethernet. Wi-Fi has become the de facto standard for access in private homes, within
offices, and at public hotspots. Some businesses charge customers a monthly fee for service,
while others have begun offering it for free in an effort to increase the sales of their goods.

Cellular data service offers coverage within a range of 10-15 miles from the nearest cellsite.
Speeds have increased as technologies have evolved, from earlier technologies such as
GSM,CDMA and GPRS, to3G networks such as W-CDMA,EDGE or CDMA2000

Mobile Satellite Communications may be used where other wireless connections are
unavailable, such as in largely rural areas or remote locations Satellite Communication are
especially important for transportation, aviation, maritime and military.
GSM

(Global System for Mobile)


GLOBAL SYSTEM FOR MOBILE COMMUNICATION

It is a globally accepted standard for digital cellular communication. GSM is the name of
standardization group established in 1982 to create a common European mobile telephone standard
that would formulate specifications for a pan-European mobile cellular radio system operating at
900MHZ.

Throughout the evolution of cellular telecommunications, various systems have been


developed without the benefit of standardized specification. This presented many problems directly
related to compatibility, especially with the development of digital radio technology. The GSM
standard is intended to address these problems.

GSM-Introduction

Architecture

Technical Specifications

Frame Structure

Channels

Security
Characteristics and features
Applications

Definition:

Global System for Mobile (GSM) is a second generation cellular standard

developed to cater voice services and data delivery using digital modulation.

GSM-History

Developed by Group Special Mobile (founded 1982) which was an initiative of

CEPT (Conference of European Post and Telecommunication)

Aim : to replace the incompatible analog system

Presently the responsibility of GSM standardization resides with special mobile

group under ETSI ( European telecommunication Standards Institute )

Full set of specifications phase-I became available in 1990


Under ETSI, GSM is named as Global System for Mobile communication

Today many providers all over the world use GSM (more than 135

Countries in Asia, Africa, Europe, Australia, America)

More than 1300 million subscribers in world and 45 million subscribers in India.

GSM IN WORLD
GSM IN INDIA

GSM SERVICES

Tele-services
Bearer or Data Services
Supplementary services

Tele-services

Telecommunication services that enable voice communication

via mobile phones

Offered services

- Mobile telephony

- Emergency calling

Bearer or Data Services

Include various data services for information transfer between GSM and other networks
like PSTN, ISDN etc at rates from 300 to 9600 bps
Short Message Service (SMS)
up to 160 character alphanumeric data transmission to/from the mobile terminal
Unified Messaging Services(UMS)
Group 3 fax
Voice mailbox
Electronic mail

Supplementary services

Call related services :


Call Waiting- Notification of an incoming call while on the handset
Call Hold- Put a caller on hold to take another call
Call Barring- All calls, outgoing calls, or incoming calls
Call Forwarding- Calls can be sent to various numbers defined by the user
Caller line identification presentation
Multi Party Call Conferencing - Link multiple calls together
CLIP CLIR Caller line identification restriction
CUG Closed user group

GSM System Architecture-I

Mobile Station (MS)


Mobile Equipment (ME)

Subscriber Identity Module (SIM)

Base Station Subsystem (BSS)


Base Transceiver Station (BTS)

Base Station Controller (BSC)

Network Switching Subsystem(NSS)


Mobile Switching Center (MSC)

Home Location Register (HLR)

Visitor Location Register (VLR)

Authentication Center (AUC)

Equipment Identity Register (EIR)

System Architecture Mobile Station (MS)


The Mobile Station is made up of two entities:

1 Mobile Equipment (ME)


2. Subscriber Identity Module (SIM)

Mobile Equipment

Portable, vehicle mounted, hand held device


Uniquely identified by an IMEI (International Mobile Equipment Identity)
Voice and data transmission
Monitoring power and signal quality of surrounding cells for optimum handover
Power level : 0.8W 20 W
160 character long SMS.

Subscriber Identity Module (SIM)

Smart card contains the International Mobile Subscriber Identity (IMSI)


Allows user to send and receive calls and receive other subscribed services
Encoded network identification details
- Key Ki,Kc and A3,A5 and A8 algorithms

Protected by a password or PIN


Can be moved from phone to phone contains key information to activate the phone

System Architecture Base Station Subsystem (BSS)


Base Station Subsystem is composed of two parts that communicate across the standardized Abis
interface allowing operation between components made by different suppliers

1 Base Transceiver Station (BTS)


2 Base Station Controller (BSC)

System Architecture Base Station Subsystem (BSS)

Base Transceiver Station (BTS):

Encodes, encrypts,multiplexes,modulates and feeds the RF signals to the antenna.


Frequency hopping
Communicates with Mobile station and BSC
Consists of Transceivers (TRX) units

Base Station Controller (BSC)

Manages Radio resources for BTS


Assigns Frequency and time slots for all MSs in its area
Handles call set up
Transcoding and rate adaptation functionality
Handover for each MS
Radio Power control
It communicates with MSC and BTS

System Architecture Network Switching Subsystem(NSS)


Mobile Switching Center (MSC)

Heart of the network


Manages communication between GSM and other networks
Call setup function and basic switching
Call routing
Billing information and collection
Mobility management
- Registration

- Location Updating

- Inter BSS and inter MSC call handoff

MSC does gateway function while its customer roams to other network by using
HLR/VLR.

System Architecture Network Switching Subsystem

Home Location Registers (HLR)

- Permanent database about mobile subscribers in a large service area (generally one per GSM
network operator)

Database contains IMSI, MS ISDN, prepaid/postpaid, roaming restrictions, and supplementary


services.

Visitor Location Registers (VLR)


- Temporary database which updates whenever new MS enters its area, by
HLR database
- Controls those mobiles roaming in its area
- Reduces number of queries to HLR
- Database contains IMSI, TMSI, MSISDN, MSRN, Location Area,
authentication key

Authentication Center (AUC)


- Protects against intruders in air interface
- Maintains authentication keys and algorithms and provides security
triplets ( RAND, SRES, Kc)
- Generally associated with HLR

Equipment Identity Register (EIR)


- Database that is used to track handsets using the IMEI (International

Mobile Equipment Identity)

- Made up of three sub-classes: The White List, The Black List and the Gray
List
- Only one EIR per PLMN

GSM Specifications-1

RF Spectrum
GSM 900

Mobile to BTS (uplink): 890-915 Mhz

BTS to Mobile(downlink):935-960 Mhz


Bandwidth : 2* 25 Mhz

GSM 1800

Mobile to BTS (uplink): 1710-1785 Mhz

BTS to Mobile(downlink) 1805-1880 Mhz

Bandwidth : 2* 75 Mhz

GSM Specification-II

Carrier Separation : 200 Khz


Distance : 45 Mhz Duplex
No. of RF carriers : 124
Access Method : TDMA/FDMA
Modulation Method : GMSK
Modulation data rate : 270.833 Kbps

OPERATION OF GSM
Call Routing

Call Originating from MS


Call termination to MS
Outgoing Call

1 MS sends dialed number to BSS


2 BSS sends dialed number to MSC
3,4 MSC checks VLR if MS is allowed the requested service. If so, MSC asks BS to
allocate resources for call.

5 MSC routes the call to GMSC


6 GMSC routes the call to local exchange of called use7, 8,
9, 10 Answer back (ring back) tone is routed from called user to MS via GMSC, MSC, BSS

Incoming Call
1 Calling a GSM subscribers
2 Forwarding call to GSMC
3 Signal Setup to HLR
4 5. Request MSRN from VLR
6 Forward responsible MSC to GMSC
7 Forward Call to current MSC
8 9. Get current status of MS
10 11. Paging of MS
12 13. MS answers
14 15. Security checks
16 17. Set up connection

Handovers
Between 1 and 2 Inter BTS / Intra BSC
Between 1 and 3
Inter BSC/ Intra MSC

Between 1 and 4
Inter MSC

Security in GSM

On air interface, GSM uses encryption and TMSI instead of IMSI.


SIM is provided 4-8 digit PIN to validate the ownership of SIM
3 algorithms are specified :
- A3 algorithm for authentication
- A5 algorithm for encryption

- A8 algorithm for key generation

Characteristics of GSM Standard

Fully digital system using 900,1800 MHz frequency band.


TDMA over radio carriers(200 KHz carrier spacing.
8 full rate or 16 half rate TDMA channels per carrier.
User/terminal authentication for fraud control.
Encryption of speech and data transmission over the radio path.
Full international roaming capability.
Low speed data services (upto 9.6 Kb/s).
Compatibility with ISDN.
Support of Short Message Service (SMS).

Advantages of GSM over Analog system:

Capacity increases
Reduced RF transmission power and longer battery life.
International roaming capability.
Better security against fraud (through terminal validation and user authentication).
Encryption capability for information security and privacy.
Compatibility with ISDN, leading to wider range of services

GSM Applications

Mobile telephony
GSM-R
Telemetry System
- Fleet management

- Automatic meter reading

- Toll Collection

- Remote control and fault reporting of DG sets

Value Added Services


Future Of GSM

2nd Generation
GSM -9.6 Kbps (data rate)

2.5 Generation ( Future of GSM)


HSCSD (High Speed ckt Switched data)
Data rate : 76.8 Kbps (9.6 x 8 kbps)
GPRS (General Packet Radio service)
Data rate: 14.4 - 115.2 Kbps
EDGE (Enhanced data rate for GSM Evolution)
Data rate: 547.2 Kbps (max)
3 Generation
WCDMA(Wide band CDMA)
Data rate : 0.348 2.0 Mbps
EXPLANATION OF EACH BLOCK
Power Supply Design
POWER SUPPLY:

The input to the circuit is applied from

the regulated power supply. The a.c. input i.e.,

230V from the mains supply is step down by the

transformer to 12V and is fed to a rectifier. The output

obtained from the rectifier is a pulsating d.c voltage.

So in order to get a pure d.c voltage, the output voltage

from the rectifier is fed to a filter to remove any a.c components present

even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant

dc voltage.

230V
AC D.C
Output
50Hz

Step down Bridge


transformer Rectifier
Filter Regulator

Fig: Power supply


Transformer:

Usually, DC voltages are required to operate various electronic equipment and these

voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input

available at the mains supply i.e., 230V is to be brought down to the required voltage level. This

is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a

required level.

Rectifier:

The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C.

The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used

because of its merits like good stability and full wave rectification.

The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both

half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit

has four diodes connected to form a bridge. The ac input voltage is applied to the diagonally

opposite ends of the bridge. The load resistance is connected between the other two ends of the

bridge.
For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas

diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load

resistance RL and hence the load current flows through RL.

For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas,

D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load

resistance RL and hence the current flows through RL in the same direction as in the previous half

cycle. Thus a bi-directional wave is converted into a unidirectional wave.


Filter:

Capacitive filter is used in this project. It removes the ripples from the output of rectifier
and smoothens the D.C. Output received from this filter is constant until the mains voltage and
load is maintained constant. However, if either of the two is varied, D.C. voltage received at this
point changes. Therefore a regulator is applied at the output stage.

Voltage regulator:

As the name itself implies, it regulates the input applied to it. A voltage regulator is an
electrical regulator designed to automatically maintain a constant voltage level. In this project,
power supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812
voltage regulators are to be used. The first number 78 represents positive supply and the numbers
05, 12 represent the required output voltage levels. The L78xx series of three-terminal positive
regulators is available in TO-220, TO-220FP, TO-3, D2PAK and DPAK packages and several
fixed output voltages, making it useful in a wide range of applications. These regulators can
provide local on-card regulation, eliminating the distribution problems associated with single
point regulation. Each type employs internal current limiting, thermal shut-down and safe area
protection, making it essentially indestructible. If adequate heat sinking is provided, they can
deliver over 1 A output current. Although designed primarily as fixed voltage regulators, these
devices can be used with external components to obtain adjustable voltage and currents.
AT89S52 MICROCONTROLLER
MICROCONTROLLERS:

Microprocessors and microcontrollers are widely used in embedded systems


products. Microcontroller is a programmable device. A microcontroller has a CPU in addition to
a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a single chip. The fixed
amount of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal
for many applications in which cost and space are critical.

The Intel 8052 is Harvard architecture, single chip microcontroller (C) which was
developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and early
1990s, but today it has largely been superseded by a vast range of enhanced devices with 8052-
compatible processor cores that are manufactured by more than 20 independent manufacturers
including Atmel, Infineon Technologies and Maxim Integrated Products.

8052 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a
time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. 8052
is available in different memory types such as UV-EPROM, Flash and NV-RAM.

The present project is implemented on Keil uVision. In order to program the device,
proload tool has been used to burn the program onto the microcontroller.

The features, pin description of the microcontroller and the software tools used are
discussed in the following sections.
FEATURES:

Compatible with MCS-51 Products

8K Bytes of In-System Programmable (ISP) Flash Memory

Endurance: 1000 Write/Erase Cycles

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz

Three-level Program Memory Lock

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes

Interrupt Recovery from Power-down Mode

Watchdog Timer
Dual Data Pointer

Power-off Flag

DESCRIPTION

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K


bytes of in-system programmable Flash memory. The device is manufactured using Atmels
high-density nonvolatile memory technology and is compatible with the industry- standard
80C51 instruction set and pin out. The on-chip Flash allows the program memory to be
reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a
versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel
AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective
solution to many embedded control applications.

The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of
RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector
two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry.
In addition, the AT89S52 is designed with static logic for operation down to zero frequency and
supports two software selectable power saving modes.

The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and
interrupt system to continue functioning. The Power-down mode saves the RAM contents but
freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.
PIN DIAGRAM
PIN DESCRIPTION

VCC

Supply voltage.

GND

Ground.

Port 0

Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink
eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance
inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during
accesses to external program and data memory. In this mode, P0 has internal pullups. Port 0 also
receives the code bytes during Flash programming and outputs the code bytes during program
verification. External pullups are required during program verification.

Port 1

Port 1 is an 8-bit bidirectional I/O port with internal pullups. The Port 1 output buffers
can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the
internal pullups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled
low will source current (IIL) because of the internal pullups. In addition, P1.0 and P1.1 can be
configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2
trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the
low-order address bytes during Flash programming and verification.
Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the
internal pullups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled
low will source current (IIL) because of the internal pullups. Port 2 emits the high-order address
byte during fetches from external program memory and during accesses to external data memory
that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-
ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX
@ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the
high-order address bits and some control signals during Flash programming and verification.

Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the
internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pullups. Port 3 also serves the functions of various
special features of the AT89S52, as shown in the following table. Port 3 also receives some
control signals for Flash programming and verification.
RST

Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device. This pin drives High for 96 oscillator periods after the Watchdog times out. The
DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state
of bit DISRTO, the RESET HIGH out feature is enabled.

ALE/PROG

Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator
frequency and may be used for external timing or clocking purposes. Note, however, that one
ALE pulse is skipped during each access to external data memory. If desired, ALE operation can
be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a
MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable
bit has no effect if the microcontroller is in external execution mode.
PSEN

Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external data
memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset.

EA should be strapped to VCC for internal program executions. This pin also receives the
12-volt programming enable voltage (VPP) during Flash programming.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that

can be configured for use as an on-chip oscillator, as shown in Figure. Either a quartz crystal or

ceramic resonator may be used. To drive the device from an external clock source, XTAL2

should be left unconnected while XTAL1 is driven, as shown in the below figure. There are no

requirements on the duty cycle of the external clock signal, since the input to the internal

clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high

and low time specifications must be observed.


Fig: Oscillator Connections

C1, C2 = 30 pF 10 pF for Crystals

= 40 pF 10 pF for Ceramic Resonators

Fig: External Clock Drive Configuration


Description:

The AT89S52 is a low-voltage, high-performance CMOS 8-bit microcomputer with 4K


bytes of Flash programmable memory. The device is manufactured using Atmels high-density
nonvolatile memory technology and is compatible with the industry-standard MCS-51
instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89S52 is a powerful microcomputer, which provides a highly flexible and cost-effective
solution to many embedded control applications.

In addition, the AT89S52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode stops the
CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling
all other chip functions until the next hardware reset.
Machine cycle for the 8052

The CPU takes a certain number of clock cycles to execute an instruction. In the 8052
family, these clock cycles are referred to as machine cycles. The length of the machine cycle
depends on the frequency of the crystal oscillator. The crystal oscillator, along with on-chip
circuitry, provides the clock source for the 8052 CPU.

The frequency can vary from 4 MHz to 30 MHz, depending upon the chip rating and
manufacturer. But the exact frequency of 11.0592 MHz crystal oscillator is used to make the
8052 based system compatible with the serial port of the IBM PC.

In the original version of 8052, one machine cycle lasts 12 oscillator periods. Therefore, to
calculate the machine cycle for the 8052, the calculation is made as 1/12 of the crystal frequency
and its inverse is taken.
Arduino
Arduino/Genuino Uno

Arduino/Genuino Uno is a microcontroller board based on the ATmega328P (datasheet). It has


14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started.. You can tinker with your
UNO without worring too much about doing something wrong, worst case scenario you can
replace the chip for a few dollars and start over again.

"Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0.
The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of
Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino
boards, and the reference model for the Arduino platform; for an extensive list of current, past or
outdated boards see the Arduino index of boards.

Introduction

Arduino is an open-source platform used for building electronics projects. Arduino consists of
both a physical programmable circuit board (often referred to as a microcontroller) and a piece
of software, or IDE (Integrated Development Environment) that runs on your computer, used to
write and upload computer code to the physical board.

The Arduino platform has become quite popular with people just starting out with electronics,
and for good reason. Unlike most previous programmable circuit boards, the Arduino does not
need a separate piece of hardware (called a programmer) in order to load new code onto the
board you can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version
of C++, making it easier to learn to program. Finally, Arduino provides a standard form factor
that breaks out the functions of the micro-controller into a more accessible package.
What's on the board?

There are many varieties of Arduino boards (explained on the next page) that can be used for
different purposes. Some boards look a bit different from the one below, but most Arduinos have
the majority of these components in common:
Power (USB / Barrel Jack)

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) that is
terminated in a barrel jack. In the picture above the USB connection is labeled (1) and the barrel
jack is labeled (2).

The USB connection is also how you will load code onto your Arduino board. More on how to
program with Arduino can be found in our Installing and Programming Arduino tutorial.

NOTE: Do NOT use a power supply greater than 20 Volts as you will overpower (and thereby
destroy) your Arduino. The recommended voltage for most Arduino models is between 6 and 12
Volts.

Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)

The pins on your Arduino are the places where you connect wires to construct a circuit (probably
in conjuction with a breadboard and some wire. They usually have black plastic headers that
allow you to just plug a wire right into the board. The Arduino has several different kinds of pins,
each of which is labeled on the board and used for different functions.

GND (3): Short for Ground. There are several GND pins on the Arduino, any of which
can be used to ground your circuit.

5V (4) & 3.3V (5): As you might guess, the 5V pin supplies 5 volts of power, and the
3.3V pin supplies 3.3 volts of power. Most of the simple components used with the
Arduino run happily off of 5 or 3.3 volts.

Analog (6): The area of pins under the Analog In label (A0 through A5 on the UNO)
are Analog In pins. These pins can read the signal from an analog sensor (like
a temperature sensor) and convert it into a digital value that we can read.
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) and digital
output (like powering an LED).

PWM (8): You may have noticed the tilde (~) next to some of the digital pins (3, 5, 6, 9,
10, and 11 on the UNO). These pins act as normal digital pins, but can also be used for
something called Pulse-Width Modulation (PWM). We have a tutorial on PWM, but for
now, think of these pins as being able to simulate analog output (like fading an LED in
and out).

AREF (9): Stands for Analog Reference. Most of the time you can leave this pin alone. It
is sometimes used to set an external reference voltage (between 0 and 5 Volts) as the
upper limit for the analog input pins.

Reset Button

Just like the original Nintendo, the Arduino has a reset button (10). Pushing it will temporarily
connect the reset pin to ground and restart any code that is loaded on the Arduino. This can be
very useful if your code doesnt repeat, but you want to test it multiple times. Unlike the original
Nintendo however, blowing on the Arduino doesnt usually fix any problems.

Power LED Indicator

Just beneath and to the right of the word UNO on your circuit board, theres a tiny LED next to
the word ON (11). This LED should light up whenever you plug your Arduino into a power
source. If this light doesnt turn on, theres a good chance something is wrong. Time to re-check
your circuit!

TX RX LEDs

TX is short for transmit, RX is short for receive. These markings appear quite a bit in electronics
to indicate the pins responsible for serial communication. In our case, there are two places on the
Arduino UNO where TX and RX appear once by digital pins 0 and 1, and a second time next to
the TX and RX indicator LEDs (12). These LEDs will give us some nice visual indications
whenever our Arduino is receiving or transmitting data (like when were loading a new program
onto the board).

Main IC

The black thing with all the metal legs is an IC, or Integrated Circuit (13). Think of it as the
brains of our Arduino. The main IC on the Arduino is slightly different from board type to board
type, but is usually from the ATmega line of ICs from the ATMEL company. This can be
important, as you may need to know the IC type (along with your board type) before loading up
a new program from the Arduino software. This information can usually be found in writing on
the top side of the IC. If you want to know more about the difference between various ICs,
reading the datasheets is often a good idea.

Voltage Regulator

The voltage regulator (14) is not actually something you can (or should) interact with on the
Arduino. But it is potentially useful to know that it is there and what its for. The voltage
regulator does exactly what it says it controls the amount of voltage that is let into the Arduino
board. Think of it as a kind of gatekeeper; it will turn away an extra voltage that might harm the
circuit. Of course, it has its limits, so dont hook up your Arduino to anything greater than 20
volts.

The Arduino Family :

Arduino makes several different boards, each with different capabilities. In addition, part of
being open source hardware means that others can modify and produce derivatives of Arduino
boards that provide even more form factors and functionality. If youre not sure which one is
right for your project, check this guide for some helpful hints. Here are a few options that are
well-suited to someone new to the world of Arduino:
Arduino Uno (R3)

The Uno is a great choice for your first Arduino. Its got everything you need to get started, and
nothing you dont. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a USB connection, a power jack, a reset button and more. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.

Submersible pump

A submersible pump (or sub pump, electric submersible pump (ESP)) is a device which has
a hermetically sealed motor close-coupled to the pump body. The whole assembly is submerged
in the fluid to be pumped. The main advantage of this type of pump is that it prevents pump
cavitation, a problem associated with a high elevation difference between pump and the fluid
surface. Submersible pumps push fluid to the surface as opposed to jet pumps having to pull
fluids. Submersibles are more efficient than jet pumps.
Specifications

Version - AC 220v, 50 Hz

Power range - 1 PH, 18W

Max lifting height - 1.75m

Applications

Submersible pumps are found in many applications. Single stage pumps are used for drainage,
sewage pumping, general industrial pumping and slurry pumping. They are also popular with
pond filters. Multiple stage submersible pumps are typically lowered down a borehole and most
typically used for residential, commercial, municipal and industrial water extraction
(abstraction), water wells and in oil wells.

Other uses for submersible pumps include sewage treatment plants, seawater handling, fire
fighting (since it is flame retardant cable), water well and deep well drilling, offshore drilling
rigs, artificial lifts, mine dewatering, and irrigation systems.

Flow sensor/meter

DESCRIPTION

Water flow sensor consists of a plastic valve body, a water rotor, and a hall-effect sensor. When water
flows through the rotor, rotor rolls. Its speed changes with different rate of flow. The hall-effect sensor
outputs the corresponding pulse signal. This one is suitable to detect flow in water dispenser or coffee
machine.
Features

Compact, Easy to Install

High Sealing Performance

High Quality Hall Effect Sensor

RoHS Compliant

Specifications

Mini. Working Voltage: DC 4.5V

Max. Working Current: 15mA (DC 5V)

Working Voltage: DC 5V~24V

Flow Rate Range: 1~30L/min


Load Capacity: ≤10mA (DC 5V)

Operating Temperature: ≤80

Liquid Temperature: ≤120

Operating Humidity: 35%90%RH

Water Pressure: ≤1.75MPa

Storage Temperature: -25+ 80

Storage Humidity: 25%95%RH

Working with Water Flow Sensors & Arduino


Effective water management involves supplying water according to the real requirement, and
thus measuring water is very essential step in water management systems. There are many water
flow measurement techniques as well as different types of water flow meters used to measure the
volume of water flow in pipelines but these all are too costly. This article describes ideas for
design and development of low cost automatic water flow meters, with the help of readily-
available and low-cost water flow sensors.

YF-S201 Hall-Effect Water Flow Sensor


Accurate flow measurement is an essential step both in the terms of qualitative and economic
points of view. Flow meters have proven excellent devices for measuring water flow, and now it
is very easy to build a water management system using the renowned water flow sensor YF-
S201.This sensor sits in line with the water line and contains a pinwheel sensor to measure how
much water has moved through it. There is an integrated magnetic Hall-Effect sensor that outputs
an electrical pulse with every revolution. The YFS201 Hall Effect Water Flow Sensor comes
with three wires: Red/VCC (5-24V DC Input), Black/GND (0V) and Yellow/OUT (Pulse
Output). By counting the pulses from the output of the sensor, we can easily calculate the water
flow rate (in litre/hour L/hr) using a suitable conversion formula.
Hardware Hook Up

Connecting the water flow sensor to arduino requires minimal interconnection. Connect the VCC
(Red) and GND (Black) wires of the water flow Sensor to the 5v and Gnd of Arduino, and link
Pulse Output (Yellow) wire of the water flow sensor to Arduinos digital pin 2. Note that the
water flow sensor is not a power-hungry type; it draws a maximum of 15-20mA at 5V DC input!
Level Sensors :

Level sensors detect the level of liquids and other fluids and fluidized solids,
including slurries, granular materials, and powders that exhibit an upper free surface. Substances
that flow become essentially horizontal in their containers (or other physical boundaries) because
of gravity whereas most bulk solids pile at an angle of repose to a peak. The substance to be
measured can be inside a container or can be in its natural form (e.g., a river or a lake). The level
measurement can be either continuous or point values. Continuous level sensors measure level
within a specified range and determine the exact amount of substance in a certain place, while
point-level sensors only indicate whether the substance is above or below the sensing point.
Generally the latter detect levels that are excessively high or low.

There are many physical and application variables that affect the selection of the optimal level
monitoring method for industrial and commercial processes. The selection criteria include the
physical: phase (liquid, solid or slurry), temperature, pressure or vacuum, chemistry, dielectric
constant of medium, density (specific gravity) of medium, agitation (action), acoustical or
electrical noise, vibration, mechanical shock, tank or bin size and shape. Also important are the
application constraints: price, accuracy, appearance, response rate, ease
of calibration or programming, physical size and mounting of the instrument, monitoring or
control of continuous or discrete (point) levels. In short, level sensors are one of the very
important sensors and play very important role in variety of consumer/ industrial applications. As
with other type of sensors, level sensors are available or can be designed using variety of sensing
principles. Selection of an appropriate type of sensor suiting to the application requirement is
very important.
How to use the Water Level Sensor Arduino

This module is designed mainly for the DIY hobbyist and provide them a low-cost
and easy-to-use water level detection scheme. The sensor that I will use for this
tutorial can measure water level up to 40mm (4cm).

This is an analog sensor and the data that we will read will be values from 0 to
1024.

How to Build a Liquid Level Sensor Circuit with an Arduino

In this project, we will build a liquid level sensor circuit with an arduino.

This circuit will be able to tell us roughly how much of the sensor is covered by liquid.

Liquid level sensors are used for all types of applications. They are extensively used within
automobiles, which rely on a substantial amount of different fluids in order to operate to check
for how much gas in the car, windshield washer fluid, oil levles. Basically, they are used
whenever we want to measure the level of any type of fluid of a system. Thus, they are extremely
valuable to be able to learn and manipulate and build circuits with.

The liquid level sensor we will use is an analog sensor, meaning it outputs an analog voltage in
proportion to the amount of liquid the sensor is exposed to. We just connect the analog pin,
represented by an S, to an analog pin on the arduino board to read the analog value.

As you can see from the above image, the sensor has a series of parallel wires across the board.
These wires are what sense the liquid level that the board is exposed to.

If the board has water or another fluid covering all the wire, then it will output a maximum
analog value reading. Since analog values read by an arduino range from 0 (lowest reading) to
1023 (highest reading), a board completely submerged with a liquid will have a reading of 1023
by an arduino. If the board is halfway covered, a reading of about 512 will be read by the
arduino. If the board is 1/4 covered by a liquid, then the arduino will read about 256. And if no
liquid is on it at all, then a near 0 reading should be obtained.

With our liquid level sensor and an arduino, there are a number of options of what we can do. We
can use the sensor, simply, to read and output the analog value obtained. Or we can create a type
of alarm indicator status system. For example, we can have a green LED light up when the
sensor is completely full (submerged to the top with fluid), indicating that it's full. We can have a
red LED light up when the sensor's liquid level falls below 1/4 level, like how car dashboard
LED indicators tell us when our gas tank goes below E (empty).

So with a microcontroller like the arduino, there are basically limitless options of how we can
incorporate the liquid level sensor.

In this circuit, we will build now, we will just do the most basic circuit and simply read and
output the analog value read by the arduino.

Components Needed

Arduino

Liquid Level Sensor

The liquid level sensor we will use is built by China Harbin Okumatsu Robot Technology Co and
its product item is RB-02S048. This part can easily be obtained on ebay for most of the time
under $2 including shipping. It's very inexpensive.

The sensor operates on 5V and needs less than 20mA for operating power current, which means
the arduino can easily provide this (so no external power is needed to power it).
The liquid level sensor has 3 pins. It's very basic. The pinout is shown below.
2 of the pins are for power, 1 connecting to the +5V of the arduino and the other connecting to
the ground terminal of the arduino. The other pin, with an S, is the signal pin. This is the pin that
outputs the analog voltage signal in proportion to the amount of the sensor which is covered with
liquid. This pin connects to an analog pin on the arduino board to be read.

Arduino Liquid Level Sensor Circuit

The schematic diagram of the arduino liquid level sensor circuit is shown below.
This circuit is as basic as it can get.

The liquid level sensor board needs about 5V of power.

The signal pin (S) gets connected to an analog pin on the arduino board. Here we connect it to analog pin
A0. This allows the arduino board to be able to read the analog voltage value.
Software Tools

INTRODUCTION TO KEIL SOFTWARE


ABOUT KEIL:

1. Click on the Keil u Vision4 Icon on Desktop

2. .The following fig will appear

3. Click on the Project menu from the title bar

4. Then Click on New Project


5. Save the Project by typing suitable project name with no extension in u r own folder sited in
either C:\ or D:\
6. Then Click on Save button above.

7. Select the component for u r project. i.e. Atmel

8. Click on the + Symbol beside of Atmel


9. Select AT89S52 as shown below
10. Then Click on OK
11. The Following fig will appear

12. Then Click either YES or NOmostly NO

13. Now your project is ready to USE


14. Now double click on the Target1, you would get another option Source group 1 as shown in
next page.
15. Click on the file option from menu bar and select new
16. The next screen will be as shown in next page, and just maximize it by double clicking on its blue
boarder.

17. Now start writing program in either in C or ASM

18. For a program written in Assembly, then save it with extension . asm and for C based
program save it with extension .C
19. Now right click on Source group 1 and click on Add files to Group
Source
20. Now you will get another window, on which by default C files will
appear.
20. Now select as per your file extension given while saving the file

21. Click only one time on option ADD

22. Now Press function key F7 to compile. Any error will appear if so happen.

23. If the file contains no error, then press Control+F5 simultaneously.

24. The new window is as follows


25. Then Click OK

26. Now Click on the Peripherals from menu bar, and check your required port
as shown in fig below
27. Drag the port a side and click in the program file.
28. Now keep Pressing function key F11 slowly and observe.

29. You are running your program successfully


PROLOAD:

Proload is a software which accepts only hex files. Once the machine code is converted
into hex code, that hex code has to be dumped into the microcontroller placed in the programmer
kit and this is done by the Proload. Programmer kit contains a microcontroller on it other than the
one which is to be programmed. This microcontroller has a program in it written in such a way
that it accepts the hex file from the keil compiler and dumps this hex file into the microcontroller
which is to be programmed. As this programmer kit requires power supply to be operated, this
power supply is given from the power supply circuit designed above. It should be noted that this
programmer kit contains a power supply section in the board itself but in order to switch on that
power supply, a source is required. Thus this is accomplished from the power supply board with
an output of 12volts or from an adapter connected to 230 V AC.

Steps to work with Proload:

1. Install the Proload Software in the PC.

2. Now connect the Programmer kit to the PC (CPU) through serial cable.

3. Power up the programmer kit from the ac supply through adapter.

4. Now place the microcontroller in the GIF socket provided in the programmer kit.

5. Click on the Proload icon in the PC. A window appears providing the information like
Hardware model, com port, device type, Flash size etc. Click on browse option to select
the hex file to be dumped into the microcontroller and then click on Auto program to
program the microcontroller with that particular hex file.

6. The status of the microcontroller can be seen in the small status window in the bottom of
the page.

7. After this process is completed, remove the microcontroller from the programmer kit and
place it in your system board. Now the system board behaves according to the program
written in the microcontroller.
Logic Algorithm:

1. Switch on the power supply.

2. If Relay is on Energy meter gets activated.

3. Status is displayed on LCD.

4. EEPROM is used to store number of units.

5. It is also used as smart card/recharge card.

6. Insert Recharge card into slot and press recharge key

7. Storing 10 units into EEPROM by I2C and make recharge card invalid

8. Reading present units from EEPROM by I2C, Convert and display

9. The units consumed read by microcontroller with the help of opto isolator

10. For every 100 pulses received by microcontroller, 1 unit will be decremented from
EEPROM
\

ADVANTAGES
&
APPLICATIONS
ADVANTAGE

Prevents Water Accumulation


Reduces Soil Erosion
Provide cleanliness in city

APPLICATION

It can be used in future smart city


It can useful for industries to monitor their drainage outlet toxicity of
fluid.
Emergency flood control.
CONCLUSION
Conclusion

Underground maintenance is challenging problem. Different system are


proposed for the maintenance out of which some systems like manhole
identification, underground drainage maintenance system and water
distribution system are explained. This paper proposes different methods for
monitoring and managing underground drainage system with different
approaches. It explains various applications like Underground Drainage and
Manhole Monitoring System, manhole identification and also for water
distribution and monitoring system. In this study, the design of special
purpose RFID tags, affixed with a metal surface, long distance reading, and
reduces the interference characteristics of water, known as Ground Tag. Also
described Water WiSe an integrated platform combining a real-time wireless
sensor network with intelligent analytics and modeling tools to better aid
water distribution system operation and management with ANN model which
is robust and can be used to predict the condition rating of water mains and
ANN model is robust and can be used to predict the condition rating of water
mains.
REFERENCE
Reference
[1] Allen Y. Chang, Chang-Sung Yu,Sheng-Chi Lin,Yin-Yih Chang, pei-Chi Ho,"
Search, Identification and Positioning of the Underground Manhole with
RFIDISBN: 978-0-7695-3769-6 ,pp: 1899-1903

[2] http://www.thomasathomas.com/Metal_detectors_work.h tm

[3] MandeepKaur, ManjeetSandhu, Neeraj Mohan and Parvinder S. Sandhu


RFID Technology Principles, Advantages, Limitations& Its Applications
International Journal of Computer and Electrical Engineering, Vol.3, No.1,
February, 2011 1793-8163

[4] Christoph Jechlitschek, A survey paper on Radio Frequency Identification


(RFID) Trends"Available online at: http://www1.cse.wustl.edu/~jain/cse574-
06/index.html

[5] Joe Purtell Mapping the Underground infrastructure: Leveraging GPS


Technology to locate and identify problems North American Society for
Trenchless Technology (NASTT) No-Dig Show 2010 Chicago, Illinois May 2-7,
2010

[6] PETER H. DANA Global Positioning System (GPS) Time Dissemination for
Real-Time ApplicationsAvailable online at:
http://www.pdana.com/phdwww_files/rtgps.pdf

[7] Abdul-LateefBalogun, Abdul-NasirMatori, Dano Umar Lawal,


Geovisualization of Sub-surface Pipelines: A 3D Approach Published by
Canadian Center of Science and Education, Modern Applied Science Vol. 5,
No. 4; August 2011.

[8] Gerhard Schall, Dieter Schmalstieg, Sebastian Junghanns, VIDENTE - 3D


Visualization Of UndergroundInfrastructure Using Handheld Augmented
International Journal of Computer Applications (0975 8887) Volume 128
No.9, October 2015 17
RealityAvailableonlineat:http://www.icg.tugraz.at/Mem
bers/schall/geohydo.pdf

[9] Muragesh SK and Santhosha Rao Automated Internet of Things for


Underground Drainage and Manhole Monitoring System for Metropolitan
Cities International Journal of Information & Computation Technology. ISSN
0974-2239 Volume4, Number12 (2014), pp.1211- 1220 at
http://www.Irphouse.com

[10] Whittle, A. J., M. Allen, A. Preis, and M. Iqbal. "Sensor Networks for
Monitoring and Control of Water Distribution Systems." 6th International
Conference on Structural Health Monitoring of Intelligent Infrastructure
(SHMII 2013), Hong Kong, December 9-11, 2013

[11] R. R. Dighade, M. S. Kadu, A.M.Pande Challenges in Water Loss


Management of Water Distribution Systems in Developing Countries.
International Journal of Innovative Research in Science, Engineering and
Technology (An ISO 3297:

También podría gustarte