Вы находитесь на странице: 1из 75

PATIENT HEARTBEAT MONITORING USING GSM AND

ZIGBEE TECHNOLOGY

A PROJECT REPORT

SUBMITTED BY

G.MALAVIKA (09TF1A0427)

MOHAMMAD IRFAN (09TF1A0459)

J.SAKETH (09TF1A0435)

AT

ECIL-ECIT

(ELECTRONICS CORPORATION OF INDIA LIMITED)

UNDER THE ESTEEMED GUIDANCE OF

Mr. L.VASUDEVA MURTHY (AGM, HEAD CED)

ELECTRONICS AND COMMUNICATION ENGINEERING

AT

College name

HYDERABAD
ACKNOWLEDGEMENT

We wish to take opportunity to express our deep gratitude to all people who extended
their cooperation in various ways during our project work. It is our pleasure to acknowledge the
help of all those individuals.

We would like to thank Mr. L.VASUDEVA MURTHY (AGM, HEAD CED) and our
project guide Ms. A.TEJASWI for her guidance and help throughout development of this project
work provided us with information. Without her guidance, cooperation and encouragement we
could not have learned many new things during our project.

We express our profound gratitude to our guide, Assistant Professor Mrs. LAXMI
PRASANNA, Department of Electronics and Communication Engineering for her support and
encouragement in completing the project.

BY:

G.MALAVIKA (09TF1A0427)

MOHAMMAD IRFAN (09TF1A0459)

J.SAKETH (09TF1A0435)
COMPANY PROFILE

ECIL was setup under the Department of Atomic Energy on 11th April, 1967 with a view
to generate a strong indigenous capability in the field of professional grade electronics. The
initial accent was on total self-reliance and ECIL was engaged in the design development,
Manufacture and Marketing of several products with emphasis on three technology lines viz.
Computers, Control Systems and Communications. Over the years, ECIL pioneered the
development of various complex electronics products without any external technology help and
scored several ‘firsts’ in this fields prominent among them being country’s

First Digital Computer


First Solid State TV
First Control & Instrumentation of Nuclear Power Plants
First Earth Station Antenna
First Computerized Operator Information System
First radiation Monitoring & Detection System
First Automatic Message Switching System
First Operation & Maintenance Center for E-108 Exchange
First Programmable Logic Controller
First Solid state Cockpit Voice Recorder
First Electronics Voting Machines
The company played a very significant role in the training and growth of high caliber technical
and managerial man power especially in the fields of Computer and Information Technology. Though the
initial thrust was on meeting the Control & Instrumentation requirements of the Nuclear Power Program,
the expand scope of self-reliance pursued by ECIL enabled the company to develop various products to
cater to the needs of Defense, Civil Aviation, Information & Broadcasting, Telecommunications,
Insurance, banking, Police and Para-Military Forces, Oil & Gas, Power, Space Education, Health,
Agriculture Steel and Coal Sectors and various user departments in the Government domain. ECIL thus
evolved as multi-product company serving multiple sectors of Indian economy with emphasis on import
of country substitution and development of products & services that are of economic and strategic
significance to the country.
PATIENT HEARTBEAT MONITORING USING GSM AND
ZIGBEE TECHNOLOGY
ABSTRACT
In case of emergency and dangerous situations we have to alert the doctor immediately.
For this we are using a GSM based network for doctor to patient communication in the hospital
and even to communicate and indicate the status of the patient through SMS. This way of
communication is actually done with the GSM network. Each patient will be given this module
and with the help of this module the patient health condition is monitored and if there is any
change in the condition of the heath then it immediately sends that changed data through GSM to
the system where the main module is connected to the computer to maintain the status of the
patient. The same information is transfer as message to GSM to the corresponding or the relevant
person.

In this we check the patient’s health condition by monitoring the heart beat. The heart
beat is monitored with the pulse rate of the body. The high intensity light sensor senses the
expansion and contraction of the heart with the help of the nerves. That beam will transmit the
signal to the receiver and the minuet change in the pulse is noticed as the heart beat. If there is
any change in the pulses then it is noticed as the change in the heart and then the controller will
get a disturbed pulse count which indicates the fault or malfunction of the heart. The controller is
fixed for a no. of pulses initially. If there is any change in the any of the pulse count then it
considers as a malfunction of the heart and then it transmits the pulse count with the patients ID
to the doctor in the hospital and at the same to it sends a sms to a fixed number in the
microcontroller. This is convenient process to monitor the patients health conditions form any of
the distance we present. Since we are using both the networks like Zigbee and GSM this makes
the user to communicate for internal system and as well as to the longer distances.
INTERFACES USED
MICROCONTROLLER:

Microcontrollers as the name suggests are small controllers. They are like single chip
computers that are often embedded into other systems to function as processing/controlling unit.
For example the remote control you are using probably has microcontrollers inside that do
decoding and other controlling functions. They are also used in automobiles, washing machines,
microwave ovens, toys ... etc, where automation is needed.

Micro-controllers are useful to the extent that they communicate with other devices, such as
sensors, motors, switches, keypads, displays, memory and even other micro-controllers. Many
interface methods have been developed over the years to solve the complex problem of balancing
circuit design criteria such as features, cost, size, weight, power consumption, reliability,
availability, manufacturability. Many microcontroller designs typically mix multiple interfacing
methods. In a very simplistic form, a micro-controller system can be viewed as a system that
reads from (monitors) inputs, performs processing and writes to (controls) outputs. Embedded
system means the processor is embedded into the required application. An embedded product
uses a microprocessor or microcontroller to do one task only. In an embedded system, there is
only one application software that is typically burned into ROM. Example: printer, keyboard,
video game player.

GSM MODEM:

GSM (Global System for Mobile Communications: originally from Group Special
Mobile) is the world's most popular standard for mobile telephony systems.

GSM is a cellular network, which means that mobile phones connect to it by searching
for cells in the immediate vicinity. There are five different cell sizes in a GSM network—macro,
micro, Pico, femto and umbrella cells. The coverage area of each cell varies according to the
implementation environment. Macro cells can be regarded as cells where the base station antenna
is installed on a mast or a building above average roof top level. Micro cells are cells whose
antenna height is under average roof top level; they are typically used in urban areas. Pico cells
are small cells whose coverage diameter is a few dozen meters; they are mainly used indoors.
Femto cells are cells designed for use in residential or small business environments and connect
to the service provider’s network via a broadband internet connection. Umbrella cells are used to
cover shadowed regions of smaller cells and fill in gaps in coverage between those cells.

POWER SUPPLY:

Power supply is a reference to a source of electrical power. A device or system that


supplies electrical or other types of energy to an output load or group of loads is called a power
supply unit or PSU. The term is most commonly applied to electrical energy supplies, less often
to mechanical ones, and rarely to others.

HEART BEAT SENSOR:

Heart beat sensor is designed to give digital output of heat beat when a finger is placed on
it. When the heart beat detector is working, the beat LED flashes in unison with each heart beat.
This digital output can be connected to microcontroller directly to measure the Beats Per Minute
(BPM) rate. It works on the principle of light modulation by blood flow through finger at each
pulse. However this sensor is of high cost, hence in this project we are using a transducer to
demonstrate the measure of heart beat rate. we are just showing a prototype and demonstrating
how we can measure heart beat rate and send to remote doctors.

LIQUID CRYSTAL DISPLAY:


A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of
a column of liquid crystal molecules suspended between two transparent electrodes, and two
polarizing filters, the axes of polarity of which are perpendicular to each other. Without the liquid
crystals between them, light passing through one would be blocked by the other. The liquid
crystal twists the polarization of light entering one filter to allow it to pass through the other.
Many microcontroller devices use 'smart LCD' displays to output visual information. LCD
displays designed around Hitachi's LCD HD44780 module, are inexpensive, easy to use, and it is
even possible to produce a readout using the 8x80 pixels of the display.

They have a standard ASCII set of characters and mathematical symbols. For an 8-bit
data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit data bus it only requires
the supply lines plus seven extra lines. When the LCD display is not enabled, data lines are tri-
state and they do not interfere with the operation of the microcontroller. Data can be placed at
any location on the LCD.

ZIGBEE COMMUNICATION:
The Zigbee Modules were engineered to operate within the Zigbee protocol and support
the unique needs of low-cost, low-power wireless sensor net-works. The modules require minimal
power and provide reliable delivery of data b/w remote devices. Both modules operate within the
ISM 2.4 GHz frequency band & are pin-for-pin compatible with each other.
INDEX
1. INTRODUCTION 1
1.1. Project Objective
1.2. Overview
1.3 Aim of the Project
2. INTRODUCTION TO EMBEDDED SYSTEMS 3
2.1 Introduction
2.2 Definition of an Embedded System
2.3 Features of an Embedded System
2.4 Characteristics of an Embedded System
2.5 Overview of an Embedded System Architecture
2.6 Applications of Embedded Systems
2.7 Types of Embedded Systems
3. DESIGN ELEMENTS 9
3.1. Introduction
3.2 Microcontroller
3.3 Power Supply
3.4 Filters
3.5 Light Emitting Diode:
3.6 Rectifier:
3.7 Push Button:
3.8 Reset Button:
3.9 Regulator:
3.10 Liquid Crystal Display
3.11 Heart Beat Sensor:
3.12 Gsm Modem
3.13 Subscriber Identity Module
3.14 Zigbee Module
4. CIRCUIT EXPLANATION 38
4.1Description
4.2 Interfacing LCD with Controller:
4.3 Zigbee Module Interfacing With 8089c51 Microcontroller
5. SOFTWARE EXPLANATION 45
6. ADVANTAGES AND LIMITATIONS 58
7. FUTURE SCOPE 59
8. CONCLUSION 60
9. BIBLIOGRAPHY 61
ABBREVIATIONS
 PSW: Program status word
 IP: Interrupt Priority
 SFR: Special Function Register
 ALE: Address Latch Enable
 SP: Stack Pointer
 DPL/DPH: Data Pointer Low/Data Pointer High
 PSEN: Program Store Enable
 PCON: Power Control
 TCON: Timer Control
 TMOD: Timer Mode
 ACC: Accumulator
 CAN: Control Area Network
 LED: Light Emitting Diode
 LCD: Liquid Crystal Display
 IR: Infrared
 EA: External Access Enable
 RTS: Request to send
 CTS: Clear to send
 ISP : In system Programmable
 DTR: Data terminal ready
 DSR: Data set ready
 DB: Define byte
 SCON:Selection control
 SBUF: Selection buffer
 RS: Selection register
 RW: Read write
 EN: Enable

INTERNSHIP SUMMARY
As a part of our curriculum, we have been instructed to do an internship for a span of six
months. The intention of introducing internship as a part of our curriculum is to gain practical
knowledge of the subjects learnt in our classroom and to gain industrial exposure. We have been
allotted ECIL to undergo our internship. The internship’s duration is from 30 January 2013 to 3
March 2013. We were divided into batches at ECIL and were asked to select projects in the
stream of embedded systems for which problem statements were given and out of our interest
and curiosity we have select the project PATIENT HEARTBEAT
MONITORINGUSINGGSM AND ZIGBEE TECHNOLOGY

Being a student, it is a wonderful experience to get a chance to work in an esteemed


Organization. We have learnt Organizational etiquette and attained industrial work experience
while maintaining the bi-lateral relations of the University and the Organization and thereby
fulfilling the intention of the University in introducing internship as a part of our curriculum.

PROBLEM STATEMENT
In case of emergency and dangerous situations we have to alert the doctor immediately. For
this we are using a Zigbee based network for doctor to patient communication in the hospital and
even to communicate and indicate the status of the patient through SMS. This way of
communication is actually done with Zigbee network topology and with the GSM network. Each
patient will be given this module and with the help of this module the patient health condition is
monitored and if there is any change in the condition of the health then it immediately sends that
changed data through Zigbee to the local system where the main module is connected to the
computer to maintain the status of the patient.

The heart beat is monitored with the pulse rate of the body. The high intensity light sensor
senses the expansion and contraction of the heart with the help of the nerves. That beam will
transmit the signal to the receiver and the minute change in the pulse is noticed as the heart beat.
If there is any change in the pulses then it is noticed as the change in the heart and then the
controller will get a disturbed pulse count which indicates the fault or malfunction of the heart.
The controller is fixed for a no. of pulses initially. If there is any change in the any of the pulse
count then it considers as a malfunction of the heart and then it transmits the pulse count with the
patients ID to the doctor in the hospital and at the same to it sends a sms to a fixed number in the
microcontroller. This is convenient process to monitor the patients health conditions form any of
the distance we present. Since we are using both the networks like Zigbee and GSM this makes
the user to communicate for internal system and as well as to the longer distances.

1. INTRODUCTION

1.1. PROJECT OBJECTIVE


In this chapter introduction of the PATIENT HEART BEAT MONITORING USING
GSM AND ZIGBEE TECHNOLOGY are discussed. It gives overall view of the project design
and the related literature and the environment to be considered. Chapter wise organization of the
thesis and the appendices is given at the end of this chapter. At first we discuss the main
processing done using 8051 microcontroller is and then what is the process that can be
automated which is within the scope of the work. Then we discuss the implementation aspects.
1.2. OVERVIEW

In case of emergency and dangerous situations we have to alert the doctor immediately. For
this we are using a Zigbee based network for doctor to patient communication in the hospital and
even to communicate and indicate the status of the patient through SMS. This way of
communication is actually done with Zigbee network topology and with the GSM network. Each
patient will be given this module and with the help of this module the patient health condition is
monitored and if there is any change in the condition of the health then it immediately sends that
changed data through Zigbee to the local system where the main module is connected to the
computer to maintain the status of the patient.

The heart beat is monitored with the pulse rate of the body. The high intensity light sensor
senses the expansion and contraction of the heart with the help of the nerves. That beam will
transmit the signal to the receiver and the minute change in the pulse is noticed as the heart beat.
If there is any change in the pulses then it is noticed as the change in the heart and then the
controller will get a disturbed pulse count which indicates the fault or malfunction of the heart.
The controller is fixed for a no. of pulses initially. If there is any change in the any of the pulse
count then it considers as a malfunction of the heart and then it transmits the pulse count with the
patients ID to the doctor in the hospital and at the same to it sends a sms to a fixed number in the
microcontroller. This is convenient process to monitor the patients health conditions form any of
the distance we present. Since we are using both the networks like Zigbee and GSM this makes
the user to communicate for internal system and as well as to the longer distances.

1.3 AIM OF THE PROJECT


The main processes involved in this type of control system are to monitor the patient’s
health status. Zigbee is a wireless connection network that is used to connect different devices at
a frequency of 2.4GHz. For medical applications also this Zigbee is widely used. The Zigbee
can communicate with the devices of about 1km. The other network is GSM network. This can
be operated from any distance to any point of control. The communication is done with the help
of local network support. This can get communicated to any part of the world which the network
of the local system is applicable. Here we are using for the hospital communication for
monitoring the patient.

2. INTRODUCTION TO EMBEDDED SYSTEMS

2.1 INTRODUCTION:
Each day, our lives become more dependent on 'embedded systems', digital information
technology that is embedded in our environment. More than 98% of processors applied today are
in embedded systems, and are no longer visible to the customer as 'computers' in the ordinary
sense. An Embedded System is a special-purpose system in which the computer is completely
encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose
computer, such as a personal computer, an embedded system performs one or a few pre-defined
tasks, usually with very specific requirements. Since the system is dedicated to specific tasks,
design engineers can optimize it, reducing the size and cost of the product. Embedded systems
are often mass-produced, benefiting from economies of scale. The increasing use of PC hardware
is one of the most important developments in high-end embedded systems in recent years.
Hardware costs of high-end systems have dropped dramatically as a result of this trend, making
feasible some projects which previously would not have been done because of the high cost of
non-PC-based embedded hardware. But software choices for the embedded PC platform are not
nearly as attractive as the hardware.

Typically, an embedded system is housed on a single microprocessor board with the


programs stored in ROM. Virtually all appliances that have a digital interface -- watches,
microwaves, VCRs, cars -- utilize embedded systems. Some embedded systems include an
operating system, but many are so specialized that the entire logic can be implemented as a
single program.

Physically, Embedded Systems range from portable devices such as digital watches and
MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems
controlling nuclear power plants.

In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.

2.2 DEFINITION OF AN EMBEDDED SYSTEM:

An Embedded system is defined as, for a particular/specific application implementing the


software code to interact directly with that particular hardware what we built. Software is used
for providing features and flexibility, Hardware = {Processors, ASICs, Memory...} is used for
Performance (& sometimes security).

(Or)

An embedded system is a special-purpose computer system designed to perform one or a


few dedicated functions, often with real-time computing constraints. It is usually embedded as
part of a complete device including hardware and mechanical parts. In contrast, a general-
purpose computer, such as a personal computer, can do many different tasks depending on
programming.

(Or)

An embedded system is a single-purpose computer built into a larger system for the
purposes of controlling and monitoring the system. A computer system that is part of a larger
system or machine.

There are many definitions of embedded system but all of these can be combined into a
single concept. An embedded system is a special purpose computer system that is used for
particular task.

2.3 FEATURES OF AN EMBEDDED SYSTEM:

The versatility of the embedded computer system lends itself to utility in all kinds of
enterprises, from the simplification of deliverable products to a reduction in costs in their
development and manufacture. Complex systems with rich functionality employ special
operating systems that take into account major characteristics of embedded systems. Embedded
operating systems have minimized footprint and may follow real-time operating system
specifics.

The special computers system is usually less powerful than general-purpose systems,
although some expectations do exist where embedded systems are very powerful and
complicated. Usually a low power consumption CPU with a limited amount of memory is used
in embedded systems. Many embedded systems use very small operating systems; most of these
provide very limited operating system capabilities.

Since the embedded system is dedicated to specific tasks, design engineers can optimize
it, reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.

Some embedded systems have to operate in extreme environment conditions such as very
high temperature & humidity.

For high volume systems such as portable music players or mobile phones, minimizing
cost is usually the primary design consideration. Engineers typically select hardware that is just
“good enough” to implement the necessary functions.

For low volume or prototype embedded systems, general purpose computers may be
adapted by limiting the programs or by replacing the operating system with a real-time operating
system.

2.4 CHARACTERISTICS OF AN EMBEDDED SYSTEM:

An Embedded computing systems generally exhibit rich functionality complex


functionality is usually the reason for introducing CPUs into the design. However, they also
exhibit many non-functional requirements that make the task especially challenging:

• Real-time deadlines that will cause system failure if not met;

• Multi-rate operation;

• In many cases, low power consumption;

• Low manufacturing cost, which often means limited code size.

Workstation programmers often concentrate on functionality. They may consider the


performance characteristics of a few computational kernels of their software, but rarely analyze
the total application. They almost never consider power consumption and manufacturing cost.
The need to juggle all these requirements makes embedded system programming very
challenging and is the reason why embedded system designers need to understand computer
architecture.

2.5 OVERVIEW OF AN EMBEDDED SYSTEM ARCHITECTURE:

Every Embedded system consists of a custom-built hardware built around a central


processing unit. This hardware also contains memory chips onto which the software is loaded.

Application Software
Operating System
H/W

Overview of embedded system architecture

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 desktop
computer. However these are significant differences. It is not compulsory to have an operating
system in every embedded system. For small applications such as remote control units, air
conditioners, toys etc.

2.6 APPLICATIONS OF EMBEDDED SYSTEMS:


Some of the most common embedded systems used in everyday life are
Small embedded controllers: 8-bit CPUs dominate, simple or no operating system
(e.g., thermostats)
Control systems: Often use DSP chip for control computations(e.g., automotive
engine control)
Distributed embedded control: Mixture of large and small nodes on a real-time
Embedded networks
(e.g., cars, elevators, factory automation)
System on chip: ASIC design tailored to application area
(e.g., consumer electronics, set-top boxes)
Network equipment: Emphasis on data movement/packet flow
(e.g., network switches; telephone switches)
Critical systems: Safety and mission critical computing
(e.g., pacemakers, automatic trains)
Signal processing: Often use DSP chips for vision, audio, or other signal
Processing (e.g., face recognition)
Robotics: Uses various types of embedded computing (especially
Vision and control) (e.g., autonomous vehicles)
Computer peripherals: Disk drives, keyboards, laser printers, etc.
Wireless systems: Wireless network-connected “sensor networks” and
“Motes” to gather and report information
Embedded PCs: Palmtop and small form factor PCs embedded into
Equipment
Command and control: Often huge military systems and “systems of systems”
(e.g., a fleet of warships with interconnected
Computers)
Home Appliances: intercom, telephones, security systems, garage door openers, answering
machines, fax machines, home computers, TVs, cable TV tuner,VCR, camcorder, remote
controls, video games, cellular phones, musical instruments, sewing machines, lighting control,
paging, camera, pinball machines, toys, exercise equipment

Office Telephones, computers, security systems, fax machines, microwave, copier, laser printer,
color printer, paging

Auto Trip computer, engine control, air bag, ABS, instrumentation, security system, transmission
control, entertainment, climate control, cellular phone, keyless entry.

2.7 TYPES OF EMBEDDED SYSTEMS:


Based on functionality and performance embedded systems categorized as 4 types

1. Stand alone embedded systems

2. Real time embedded systems


3. Networked information appliances

4. Mobile devices

Stand alone embedded systems:

As the name implies, stand alone systems work in standalone mode. They take i/p,
process them and produce the desire o/p. The i/p can be an electrical signal from transducer or
temperature signal or commands from human being. The o/p can be electrical signal to drive
another system an led or LCD display

Ex digital camera, microwave oven, CD player, Air conditioner etc

Real time embedded systems:

In this type of an embedded system a specific work has to be complete in a particular


period of time.

Hard Real time systems: - embedded real time used in missiles

Soft Real time systems: - DVD players

Networked information appliances:

Embedded systems that are provided with n/w interfaces and accessed by n/w's such as
local area n/w or internet are called Network Information Appliances.

Ex: A web camera is connected to the internet. Camera can send pictures in real time to any
computers connected to the internet

Mobile devices:

Actually it is a combination of both VLSI and Embedded System. Mobile devices such as
Mobile phone, Personal digital assistants, smart phones etc are special category of embedded
systems.

3.DESIGN ELEMENTS

3.1. INTRODUCTION
Mainly the block diagram of the project consists of microcontroller, sensors, GSM
modem, Zigbee module, power supply and Liquid Crystal Display. In case of emergency and
dangerous situations we have to alert the doctor immediately. For this we are using a Zigbee
based network for doctor to patient communication in the hospital and even to communicate and
indicate the status of the patient through SMS. This way of communication is actually done with
Zigbee network topology and with the GSM network. Each patient will be given this module and
with the help of this module the patient health condition is monitored and if there is any change
in the condition of the health then it immediately sends that changed data through Zigbee to the
local system where the main module is connected to the computer to maintain the status of the
patient. The same information is transfer as message to GSM to the corresponding or the relevant
person.
In this we check the patient’s health condition by monitoring the heart beat. The heart
beat is monitored with the pulse rate of the body. . The high intensity light sensor senses the
expansion and contraction of the heart with the help of the nerves. That beam will transmit the
signal to the receiver and the minute change in the pulse is noticed as the heart beat. If there is
any change in the pulses then it is noticed as the change in the heart and then the controller will
get a disturbed pulse count which indicates the fault or malfunction of the heart. The controller is
fixed for a no. of pulses initially.
If there is any change in the any of the pulse count then it considers as a malfunction of
the heart and then it transmits the pulse count with the patients ID to the doctor in the hospital
and at the same to it sends a sms to a fixed number in the microcontroller. This is convenient
process to monitor the patients health conditions form any of the distance we present. Since we
are using both the networks like Zigbee and GSM this makes the user to communicate for
internal system and as well to the longer distances.
FIG: TRANSMITTER CIRCUIT

FIG: RECEIVER CIRCUIT


3.2 MICROCONTROLLER

Microcontrollers as the name suggests are small controllers. They are like single chip
computers that are often embedded into other systems to function as processing/controlling unit.
For example the remote control you are using probably has microcontrollers inside that do
decoding and other controlling functions. They are also used in automobiles, washing machines,
microwave ovens, toys ... etc, where automation is needed.

Micro-controllers are useful to the extent that they communicate with other devices, such as
sensors, motors, switches, keypads, displays, memory and even other micro-controllers. Many
interface methods have been developed over the years to solve the complex problem of balancing
circuit design criteria such as features, cost, size, weight, power consumption, reliability,
availability, manufacturability. Many microcontroller designs typically mix multiple interfacing
methods. In a very simplistic form, a micro-controller system can be viewed as a system that
reads from (monitors) inputs, performs processing and writes to (controls) outputs. Embedded
system means the processor is embedded into the required application. An embedded product
uses a microprocessor or microcontroller to do one task only. In an embedded system, there is
only one application software that is typically burned into ROM. Example: printer, keyboard,
video game player.

Microprocessor - A single chip that contains the CPU or most of the computer

Microcontroller - A single chip used to control other devices

Microcontroller differs from a microprocessor in many ways. First and the most
important is its functionality. In order for a microprocessor to be used, other components such
as memory, or components for receiving and sending data must be added to it. In short that
means that microprocessor is the very heart of the computer. On the other hand,
microcontroller is designed to be all of that in one.

Basically, a microcontroller is a device which integrates a number of the components of a


microprocessor system onto a single microchip. So a microcontroller combines onto the same
microchip. The following components:

1. CPU
2. Core Memory (Both RAM and ROM)

3. Some Parallel Digital I/Os


The microprocessor is the integration of a number of useful functions into a single IC
package. Has the ability to execute a stored set of instructions to carry out user defined tasks;
also has ability to access external memory chips to both read and write data from and to the
memory.

Essentially, a microcontroller is obtained by integrating the key components of


microprocessor, RAM, ROM, and Digital I/O onto the same chip die. Modern microcontrollers
also contain a wealth of other modules such as Serial I/O, Timers, and Analogue to Digital
Converters. There are a large number of specialized devices with additional modules for specific
needs. E.g. CAN controllers.

FEATURES:

 8K Bytes of In-System Reprogrammable Flash Memory


 Endurance: 1,000 Write/Erase Cycles
 Fully Static Operation: 0 Hz to 24 MHz
 256 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Three 16-bit Timer/Counters
 Eight Interrupt Sources
 Programmable Serial Channel
 Low-power Idle and Power-down Modes

DESCRIPTION:

The AT89S52 is a low-power, high-performance CMOS 8-bit micro controller with


8Kbytes of in-system programmable Flash memory.

The device is manufactured using Atmel’s high-density non-volatile memory


technology and is compatible with the industry-standard 80C51 micro controller. The on-
chip Flash allows the program memory to be reprogrammed in-system or by a conventional
non-volatile memory programmer. By combining a versatile 8-bit CPU with in-system
programmable flash one monolithic chip; the Atmel AT89S52 is a powerful micro controller,
which provides a highly flexible and cost- effective solution to many embedded control
applications.

FIG: BLOCK DIAGRAM OF AT89S52

PIN CONFIGURATION:
FIG: PIN DIAGRAM OF 8051 MICROCONTROLLER

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, full
duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is
designed with static logic for perationdown 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 DESCRIPTION:

Vcc: Supply voltage.


GND: Ground.
PORT 0:

Port 0 is an 8-bit open drain bi-directional 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 pull-ups. Port 0 also receives the code bytes during Flash programming and outputs
the code bytes during program verification. External pull-ups are required during program
verification.

PORT 1:

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. 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 .

TABLE: PORT 1 FUNCTIONS.

PORT 2:

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. Port 2 emits the high-order address
byte during fetches from external program memory and during accesses to external data
memory that uses 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 2emits 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 bi-directional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pull-ups. 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.

TABLE: PORT 3 FUNCTIONS.

RST:

Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device.
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 of1/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 micro controller 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. A
should be strapped to VCC for internal program executions. This pin also receives the 12-
voltProgramming enables 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.


OSCILLATOR CHARACTERISTICS:

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 1. 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 Figure .

FIG: CRYSTAL CIRCUIT

3.3. POWER SUPPLY

DESCRIPTION:

As the microcontroller operating voltage is +5V DC. Through this power supply circuit
we have to create a +5V DC which is given to the micro controller. The below components are
used to create the power supply
230V AC Step down Bridge Filter Regulator
supply transformer rectifier

FIG: BLOCK DIAGRAM OF


POWER SUPPLY

230V AC supply is given to the step down


transformer of 12A type. It may be a 230V to 9V
or 12V step down transformer. The
output of the step down transformer is
given to bridge rectifier. The bridge rectifier is
formed with 1N4007 diodes. The bridge rectifier
converts the AC Voltage into DC Voltage. But the
output DC Voltage contains some AC component
(ripples). So we use a capacitors- 2200uF/25V,
0.1uF/D and resistor of 10K as a filter for removing ripples.
That output DC Voltage is given to the positive
voltage regulator LM7805 (i.e., 78 represents the
positive series and 5 represent the output voltage it
can provide). So the output of the regulator will be
the regulated +5V DC. To indicate the condition of
the circuit we place a LED at the end of the circuit.

FIG: SCHEMATIC OF POWER SUPPLY

3.4 FILTERS:

Filters are electronic circuits which perform


signal processing functions, specifically to
remove unwanted frequency components from
the signal, to enhance wanted ones, or both. Electronic
filters can be:
 passive or active
 analog or digital

 High-pass, low-pass, band pass, band-reject (band reject; notch), or all-pass.

 discrete-time (sampled) or continuous-time

 linear or non-linear

 infinite impulse response (IIR type) or finite impulse response (FIR type)

The most common types of electronic filters are linear filters, regardless of other aspects of their
design. See the article on linear filters for details on their design and analysis.

Passive implementations of linear filters are based on combinations of resistors (R),


inductors (L) and capacitors (C). These types are collectively known as passive filters, because
they do not depend upon an external power supply and/or they do not contain active components
such as transistors.

Inductors block high-frequency signals and conduct low-frequency signals, while


capacitors do the reverse. A filter in which the signal passes through an inductor, or in which a
capacitor provides a path to ground, presents less attenuation to low-frequency signals than high-
frequency signals and is a low-pass filter. If the signal passes through a capacitor, or has a path to
ground through an inductor, then the filter presents less attenuation to high-frequency signals
than low-frequency signals and is a high-pass filter. Resistors on their own have no frequency-
selective properties, but are added to inductors and capacitors to determine the time-constants of
the circuit, and therefore the frequencies to which it responds.
The inductors and capacitors are the reactive elements of the filter. The number
of elements determines the order of the filter. In this context, an LC tuned circuit being used in a
band-pass or band-stop filter is considered a single element even though it consists of two
components.

At high frequencies (above about 100 megahertz), sometimes the inductors consist of
single loops or strips of sheet metal, and the capacitors consist of adjacent strips of metal. These
inductive or capacitive pieces of metal are called stubs.

3.5 LIGHT EMITTING DIODE:

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. Introduced as a practical
electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions
are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.

When a light-emitting diode is forward-biased (switched on), electrons are able


to recombine with electron holes within the device, releasing energy in the form of photons. This
effect is called electroluminescence and the color of the light (corresponding to the energy of the
photon) is determined by the energy gap of the semiconductor. LEDs are often small in area (less
than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs
present many advantages over incandescent light sources including lower energy consumption,
longer lifetime, improved robustness, smaller size, and faster switching. LEDs powerful enough
for room lighting are relatively expensive and require more precise current and heat management
than compact fluorescent lamp sources of comparable output.

Light-emitting diodes are used in applications as diverse as aviation lighting,


automotive lighting, advertising, general lighting, and traffic signals. LEDs have allowed new
text, video displays, and sensors to be developed, while their high switching rates are also useful
in advanced communications technology. Infrared LEDs are also used in the remote control units
of many commercial products including televisions, DVD players, and other domestic
appliances.

3.6 RECTIFIER:

A rectifier is an electrical device that converts alternating current (AC), which


periodically reverses direction, to direct current (DC), which flows in only one direction. The
process is known as rectification. Physically, rectifiers take a number of forms, including tube
diodes, mercury-arc valves, solid-state diodes, silicon-controlled rectifiers and other silicon-
based semiconductor switches. Historically, even synchronous electromechanical switches and
motors have been used. Early radio receivers, called crystal radios, used a "cat's whisker" of fine
wire pressing on a crystal of galena (lead sulfide) to serve as a point-contact rectifier or "crystal
detector".

Rectifiers have many uses, but are often found serving as components of DC power
supplies and high-voltage direct current power transmission systems. Rectification may serve in
roles other than to generate direct current for use as a source of power. As noted, detectors of
radio signals serve as rectifiers. In gas heating systems flame rectification is used to detect
presence of flame.

The simple process of rectification produces a type of DC characterized by pulsating


voltages and currents (although still unidirectional). Depending upon the type of end-use, this
type of DC current may then be further modified into the type of relatively constant voltage DC
characteristically produced by such sources as batteries and solar cells.

3.7 PUSH BUTTON:

A push-button (also spelled pushbutton) (press-button in the UK) or simply button is a


simple switch mechanism for controlling some aspect of a machine or a process. Buttons are
typically made out of hard material, usually plastic or metal. The surface is usually flat or shaped
to accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are
most often biased switches, though even many un-biased buttons (due to their physical nature)
require a spring to return to their un-pushed state. Different people use different terms for the
"pushing" of the button, such as press, depress, mash, and punch.

3.8 RESET BUTTON:

In electronics and technology, a reset button is a button that can reset a device. On video game
consoles, the reset button restarts the game, losing the player's unsaved progress. On personal
computers, the reset button clears the memory and reboots the machine forcibly. Reset buttons
are found on circuit breakers to reset the circuit. This button can cause data corruption so this
button often doesn't exist on many machines. Usually, in computers, it is present as a small
button, possibly recessed into the case, to prevent accidentally pressing it.
3.9 REGULATOR:

7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear
voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not give
the fixed voltage output. The voltage regulator IC maintains the output voltage at a constant
value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides
+5V regulated power supply. Capacitors of suitable values can be connected at input and output
pins depending upon the respective voltage levels.

PIN DIAGRAM:

PIN DESCRIPTION:
Pin No Function Name
1 Input voltage (5V-18V) Input
2 Ground (0V) Ground
3 Regulated output; 5V (4.8V-5.2V) Output

3.10LIQUID CRYSTAL DISPLAY

3.10.1 INTRODUCTION:

Liquid crystal display is a type of display used in digital watches and many
portable computers.
LCD displays utilize two sheets of polarizing material with a liquid crystal solution
between them. An electric current passed through the liquid causes the crystals to align so that
light cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to
pass through or blocking the light.

The liquid crystals can be manipulated through an applied electric voltage so that light is
allowed to pass or is blocked.By carefully controlling where and what wavelength (color) of
light is allowed to pass, the LCD monitor is able to display images. A back light provides LCD
monitor’s brightness.Other advances have allowed LCD’s to greatly reduce liquid crystal cell
response times.Response time is basically the amount of time it takes for a pixel to “change
colors”.

In reality response time is the amount of time it takes a liquid crystal cell to go from
being active to inactive. Here the LCD is used at both the Transmitter as well as the receiver
side.The input which we give to the microcontroller is displayed on the LCD of the transmitter
side and the message sent is received at the receiver side which displays at the receiver end of the
LCD and the corresponding operation is performed They make complicated equipment easier to
operate.

LCDs come in many shapes and sizes but the most common is the 16 character x 4 line
display with no backlight. It requires only 11 connections – eight bits for data (which can be
reduced to four if necessary) and three control lines (we have only used two here). It runs off a
5V DC supply and only needs about 1mA of current.The display contrast can be varied by
changing the voltage into pin 3 of the display.

3.10.2 PIN DESCRIPTION of LCD:

From this description, the interface is a parallel bus, allowing simple and fast
reading/writing of data to and from the LCD. This waveform will write an ASCII Byte out to the
LCD's screen.

PIN DESCRIPTIONS: Vic, Vss and Vee:


While Vcc & Vss provide +5V and ground respectively, Vee is used for controlling LCD contrast.
PIN SYMBOL I/O DESCRIPTION

1 Vss -- Ground

2 Vcc -- +5V power supply

3 Vee -- Power supply to


control contrast
4 RS I RS=0 to select
command register

RS=1 to select
data register

5 R/W I R/W=0 for write

R/W=1 for read

6 EN I/O Enable

7 DB0 I/O The 8-bit data bus

8 DB1 I/O The 8-bit data bus

9 DB2 I/O The 8-bit data bus

10 DB3 I/O The 8-bit data bus

11 DB4 I/O The 8-bit data bus

12 DB5 I/O The 8-bit data bus

13 DB6 I/O The 8-bit data bus

14 DB7 I/O The 8-bit data bus

The ASCII code to be displayed is eight bits long and is sent to the LCD either four or
eight bits at a time.

 If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits
with an "E" Clock pulse with each nibble) are sent to make up a full eight bit transfer.
 The "E" Clock is used to initiate the data transfer within the LCD.
 Deciding how to send the data to the LCD is most critical decision to be made for an
LCD interface application.
 Eight-bit mode is best used when speed is required in an application and at least ten I/O
pins are available.
 The "R/S" bit is used to select whether data or an instruction is being transferred between
the microcontroller and the LCD.
 If the Bit is set, then the byte at the current LCD "Cursor" Position can be reader written.
 When the Bit is reset, either an instruction is being sent to the LCD or the execution
status of the last instruction is read back.

3.10.3 PIN DIAGRAM:

G +5V -5V

1 23
11

7 8 9 10 11 12 13 14 4 5 6
D0D1 D2
D3 D4 D5 D6 D7 RS R\W EN

The LCD plays a major role in the entire operation as it has the ability to display the
certain data that the user has entitled.LCD display varies from input to input as there is no
specific outline for it to operate.

HEART RATE

Heart rate is the number of heartbeats per unit of time, typically expressed as beats per
minute (bpm). Heart rate can vary as the body's need to absorb oxygen and excrete carbon
dioxide changes, such as during exercise or sleep.

The measurement of heart rate is used by medical professionals to assist in the diagnosis
and tracking of medical conditions. It is also used by individuals, such as athletes, who are
interested in monitoring their heart rate to gain maximum efficiency from their training. The R
wave to R wave interval (RR interval) is the inverse of the heart rate.

Heart rate is measured by finding the pulse of the body. This pulse rate can be measured
at any point on the body where the artery's pulsation is transmitted to the surface by pressuring it
with the index and middle fingers; often it is compressed against an underlying structure like
bone. The thumb should not be used for measuring another person's heart rate, as its strong pulse
may interfere with discriminating the site of pulsation.

The resting heart rate (HRrest) is a person's heart rate when they are at rest, that is lying
down but awake, and not having recently exerted themselves. The typical healthy resting heart
rate in adults is 60–80 bpm, with rates below 60 bpm referred to as bradycardia, and rates above
100 bpm referred to as tachycardia. Note however that conditioned athletes often have resting
heart rates below 60 bpm. and it is not unusual for people doing regular exercise to get below 50
bpm.

3.11 HEART BEAT SENSOR:

Heart beat sensor is designed to give digital output of heat beat when a finger is
placed on it. When the heart beat detector is working, the beat LED flashes in unison with each
heart beat. This digital output can be connected to microcontroller directly to measure the Beats
Per Minute (BPM) rate. It works on the principle of light modulation by blood flow through
finger at each pulse. However this sensor is of high cost, hence in this project we are using a
transducer to demonstrate the measure of heart beat rate. we are just showing a prototype and
demonstrating how we can measure heart beat rate and send to remote doctors.

FEATURES:
 Microcontroller based SMD design

 Heat beat indication by LED

 Instant output digital signal for directly connecting to microcontroller

 Compact Size

 Working Voltage +5V DC

APPLICATIONS:

 Digital Heart Rate monitor


 Patient Monitoring System

 Bio-Feedback control of robotics and applications


FIGURE: HEART BEAT SENSOR

Medical heart sensors are capable of monitoring vascular tissue through the tip of the
finger or the ear lobe. It is often used for health purposes, especially when monitoring the body
after physical training.
Heart beat is sensed by using a high intensity type LED and LDR. The finger is placed
between the LED and LDR. As Sensor a photo diode or a photo transistor can be used. The skin
may be illuminated with visible (red) using transmitted or reflected light for detection. The very
small changes in reflectivity or in transmittance caused by the varying blood content of human
tissue are almost invisible. Various noise sources may produce disturbance signals with
amplitudes equal or even higher than the amplitude of the pulse signal. Valid pulse measurement
therefore requires extensive preprocessing of the raw signal.
The new signal processing approach presented here combines analog and digital signal processing
in a way that both parts can be kept simple but in combination are very effective in suppressing
disturbance signals.

The setup described here uses a red LED for transmitted light illumination and a LDR as
detector. With only slight changes in the preamplifier circuit the same hardware and software
could be used with other illumination and detection concepts. The detectors photo current ( AC
Part) is converted to voltage and amplified by an operational amplifier (LM358).
Output is given to another non-inverting input of the same LM358; here the second
amplification is done. The value is preset in the inverting input, the amplified value is compared
with preset value if any abnormal condition occurs it will generate an interrupt to the controller
AT89C2051.
FIG: HEART BEAT MONITOR CIRCUIT

This circuit made from an infrared phototransistor and infrared LED. This transducer works
with the principle of light reflection,in this case the light is infrared. The skin is used as a

reflective surface for infrared light. The density of blood in the skin will affect on the IR
reflectivity. The pumping action of heart causes the blood density rises and falls. So that we can
calculate the heart rate based on the rise and fall of intensity of infrared that reflected by skin.

Human Heart

FIGURE : Lateral section of human heart

The human heart is a muscular organ that provides a continuous blood circulation through
the cardiac cycle and is one of the most vital organs in the human body. The heart is divided into
four main chambers: the two upper chambers are called the left and right atria and two lower
chambers are called the right and left ventricles. There is a thick wall of muscle separating the
right side and the left side of the heart called the septum. Normally with each beat the right
ventricle pumps the same amount of blood into the lungs that the left ventricle pumps out into
the body. Physicians commonly refer to the right atrium and right ventricle together as the right
heart and to the left atrium and ventricle as the left heart.

The electric energy that stimulates the heart occurs in the sinoatrial node which produces a
definite potential and then discharges, sending an impulse across the atria. In the atria the
electrical signal move from cell to cell while in the ventricles the signal is carried by specialized
tissue called the Purkinje fibers which then transmit the electric charge to the myocardium.

3.12 GSM MODEM

FIG:GSM CELL SITE ANTENNAS IN THE DETACHES MUSEUM, MUNICH,


GERMANY
FIG: GSM MODEM WITH ACCESSORIES
GSM (Global System for Mobile Communications: originally from Group Special
Mobile) is the world's most popular standard for mobile telephony systems. The GSM
Association estimates that 80% of the global mobile market uses the standard. GSM is used by
over 1.5 billion people across more than 212 countries and territories. This ubiquity means that
subscribers can use their phones throughout the world, enabled by international roaming
arrangements between mobile network operators. GSM differs from its predecessor technologies
in that both signaling and speech channels are digital, and thus GSM is considered a second
generation (2G) mobile phone system. This also facilitates the wide-spread implementation of
data communication applications into the system.

The GSM standard has been an advantage to both consumers, who may benefit from the
ability to roam and switch carriers without replacing phones, and also to network operators, who
can choose equipment from many GSM equipment vendors. GSM also pioneered low-cost
implementation of the short message service (SMS), also called text messaging, which has since
been supported on other mobile phone standards as well. The standard includes a worldwide
emergency telephone number feature (112).

Newer versions of the standard were backward-compatible with the original GSM
system. For example, Release '97 of the standard added packet data capabilities by means of
General Packet Radio Service (GPRS). Release '99 introduced higher speed data transmission

GSM is a cellular network, which means that mobile phones connect to it by searching
for cells in the immediate vicinity. There are five different cell sizes in a GSM network—macro,
micro, Pico, femto and umbrella cells. The coverage area of each cell varies according to the
implementation environment. Macro cells can be regarded as cells where the base station antenna
is installed on a mast or a building above average roof top level. Micro cells are cells whose
antenna height is under average roof top level; they are typically used in urban areas. Pico cells
are small cells whose coverage diameter is a few dozen meters; they are mainly used indoors.
Femto cells are cells designed for use in residential or small business environments and connect
to the service provider’s network via a broadband internet connection. Umbrella cells are used to
cover shadowed regions of smaller cells and fill in gaps in coverage between those cells.

3.12.1: GSM CARRIER FREQUENCIES:


GSM networks operate in a number of different carrier frequency ranges (separated into
GSM frequency ranges for 2G and UMTS frequency bands for 3G), with most 2G GSM
networks operating in the 900 MHz or 1800 MHz bands. Where these bands were already
allocated, the 850 MHz and 1900 MHz bands were used instead (for example in Canada and the
United States). In rare cases the 400 and 450 MHz frequency bands are assigned in some
countries because they were previously used for first-generation systems.

Most 3G networks in Europe operate in the 2100 MHz frequency band. Regardless of the
frequency selected by an operator, it is divided into timeslots for individual phones to use. This
allows eight full-rate or sixteen half-rate speech channels per radio frequency. These eight radio
timeslots (or eight burst periods) are grouped into a TDMA frame. Half rate channels use
alternate frames in the same timeslot. The channel data rate for all 8 channels is 270.833 Kbit/s,
and the frame duration is 4.615 ms. The transmission power in the handset is limited to a
maximum of 2 watts in GSM850/900 and 1 watt in GSM1800/1900.
3.12.2:NETWORK STRUCTURE

FIG: THE STRUCTURE OF A GSM NETWORK

The network is structured into a number of discrete sections:


 The Base Station Subsystem (the base stations and their controllers).
 the Network and Switching Subsystem (the part of the network most similar to a fixed
network). This is sometimes also just called the core network.

 The GPRS Core Network (the optional part which allows packet based Internet
connections).

 The Operations support system (OSS) for maintenance of the network.

3.13 SUBSCRIBER IDENTITY MODULE

One of the key features of GSM is the Subscriber Identity Module, commonly known as a
SIM card. The SIM is a detachable smart card containing the user's subscription information and
phone book. This allows the user to retain his or her information after switching handsets.
Alternatively, the user can also change operators while retaining the handset simply by changing
the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only
a SIM issued by them; this practice is known as SIM locking.

3.14 ZIGBEE MODULE


Zigbee is a specification for a suite of high level communication protocols using small,
low-power digital radios or Low-Rate Wireless Personal Area Networks (LR-WPANs), such as
wireless light switches with lamps, electrical meters with in-home-displays, consumer electronics
equipment via short-range radio. The technology defined by the Zigbee specification is intended
to be simpler and less expensive than other WPANs, such as Bluetooth. Zigbee is targeted at
radio-frequency (RF) applications that require a low data rate, long battery life, and secure
networking.Zigbee is a low-cost, low-power, wireless mesh networking standard. First, the low
cost allows the technology to be widely deployed in wireless control and monitoring
applications. Second, the low power-usage allows longer life with smaller batteries. Third, the
mesh networking provides high reliability and more extensive range..
The relationship between IEEE 802.15.4 and Zigbee is similar to that between IEEE
802.11 and the Wi-Fi Alliance. The Zigbee 1.0 specification was ratified on 14 December 2004
and is available to members of the Zigbee Alliance. Most recently, the Zigbee 2007 specification
was posted on 30 October 2007. The first Zigbee Application Profile, Home Automation, was
announced 2 November 2007. As amended by NIST, the Smart Energy Profile 2.0 specification
will remove the dependency on IEEE 802.15.4. Device manufacturers will be able to implement
any MAC/PHY, such as IEEE 802.15.4(x) and IEEE P1901, under an IP layer based on
6LoWPAN.
Zigbee operates in the industrial, scientific and medical (ISM) radio bands; 868 MHz
in Europe, 915 MHz in the USA and Australia, and 2.4 GHz in most jurisdictions worldwide.
The technology is intended to be simpler and less expensive than other WPANs such as
Bluetooth. Zigbee chip vendors typically sell integrated radios and microcontrollers with
between 60 KB and 256 KB flash memory..
Radios are also available as stand-alone components to be used with any processor or
microcontroller. Generally, the chip vendors also offer the Zigbee software stack, although
independent ones are also available.
Because Zigbee can activate (go from sleep to active mode) in 30 msec or less, the latency
can be very low and devices can be very responsive — particularly compared to Bluetooth wake-
up delays, which are typically around three seconds. [3] Because Zigbees can sleep most of the
time, average power consumption can be very low, resulting in long battery life.
For non-commercial purposes, the Zigbee specification is available free to the general
public. An entry level membership in the Zigbee Alliance, called Adopter, provides access to the
as-yet unpublished specifications and permission to create products for market using the
specifications. The click through license on the Zigbee specification requires a commercial
developer to join the Zigbee Alliance. "No part of this specification may be used in development
of a product for sale without becoming a member of Zigbee Alliance." This causes problems for
open-source developers because the annual fee conflicts with the GNU General Public License
USES:
Zigbee protocols are intended for use in embedded applications requiring low data rates and
low power consumption. Zigbee's current focus is to define a general-purpose, inexpensive, self-
organizing mesh network that can be used for industrial control, embedded sensing, medical data
collection, smoke and intruder warning, building automation, home automation, etc. The
resulting network will use very small amounts of power — individual devices must have a
battery life of at least two years to pass Zigbee certification.
Typical application areas include
Home Entertainment and Control — Smart lighting, advanced temperature control, safety and
security, movies and music
Wireless Sensor Networks' — starting with individual sensors like Telosb/Tmote, Memsic.

FIG:ZIGBEE MODULE

4. CIRCUIT EXPLANATION

4.1DESCRIPTION

The circuit diagram of the project consists of transmitter and receiver circuits. The
transmitter circuit transmits the signals to the mobile phone and to the Zigbee receiver module.
The below circuits represents the interfacing of Microcontroller to GSM, Zigbee, LCD and Heart
Beat Sensor, interfacing of Microcontroller to Zigbee receiver module respectively.
FIG: TRANSMITTER CIRCUIT OF THE PROJECT
FIG: RECEIVER CIRCUIT OF THE PROJECT

4.2 INTERFACING LCD WITH CONTROLLER:

P1.0 D0

P1.1 D1

P1.2 D2

8052 P1.3 D3 LCD

µC P1.4 D4

P1.5 D5

P1.6 D6

P1.7 D7

FIG: INTERFACING A LCD WITH A MICRO-CONTROLLER


LCD interfacing with 8051 is a real-world application. In recent years the LCD is finding
widespread use replacing LEDs (seven segment LEDs or other multi-segment LEDs).

This is due to following reasons:

 The declining prices of LCDs.

 The ability to display numbers, characters and graphics.

 This is in contrast to LEDs, which are limited to numbers and a few characters.

 An intelligent LCD display of two lines, 20 characters per line, which is interfaced to the
8051.Incorporation of a refreshing controller into the LCD, thereby relieving the CPU to
keep displaying the data.

 Ease of programming for characters and graphics.

4.2.1 BASIC COMMANDS of LCD:

 When LCD is powered up, the display should show a series of dark squares, possibly
only on part of display.
 These characters are actually in their off state, so the contrast control should be adjusted
anti-clockwise until the squares are just visible.
 The display module resets itself to an initial state when power is applied, which
curiously the display has blanked off so that even if characters are entered, they cannot be
seen.
 It is therefore necessary to issue a command at this point, to switch the display on.

4.2.2 PROTOTYPE CIRCUIT:

 For a LCD module to be used effectively in any piece of equipment, a microprocessor or


a micro controller is usually required to drive it.
 However, before attempting to wire the two together, some initial experiments can be
performed by connecting a series of switches to the pins of the module.
 This can be a quite beneficial step, if even you are thoroughly conversant with the
workings of microprocessors.
4.2.3 CIRCUIT DESCRIPTION OF LCD EXPERIMENT:
 The circuit can be wired up on a “plug-in-style” prototyping board, using dual-in-line
switches for the data lines (S1-S8)
 A toggle switch for the RS input (S10) and a momentary action switch (or macro switch)
for usage.
 Most of the LCD modules conform to a standard interface specification. A 14pin access is
provided having eight data lines, three control lines and three power lines.

 The connections are laid out in one of the two common configurations, either two rows of
seven pins, or a single row of 14 pins.

 One of the, pins are numbered on the LCD’s print circuit board (PCB), but if not, it is
quite easy to locate pin1.

 Since this pin is connected to ground, it often has a thicker PCB track, connected to it,
and it is generally connected to metalwork at same point.

4.2.4 PIN DIAGRAM:

G +5V -5V

1 23
11

7 8 9 10 11 12 13 14 4 5 6
D0D1 D2
D3 D4 D5 D6 D7 RS R\W EN

The LCD plays a major role in the entire operation as it has the ability to display the
certain data that the user has entitled.LCD display varies from input to input as there is no
specific outline for it to operate.

4.3 ZIGBEE MODULE INTERFACING WITH 8089C51 MICROCONTROLLER


ZigBee is a specification for a suite of high level communication protocols using small,
low-power digital radios based on an IEEE 802 standard for personal area networks.
The Digi Xbee 802.15.4 modules are the easiest to use, most reliable and cost-effective
RF devices we've experienced. The 802.15.4 Xbee modules provide two friendly modes of
communication - a simple serial method of transmit/receive or a framed mode providing
advanced features. These modules can communicate point to point, from one point to a PC, or in
a mesh network.

FIG:BLOCK DIAGRAM OF ZIGBEE

4.3.1INTERFACING ZIGBEE
Fig. shows how to interface the Zigbee with microcontroller. The Xbee modules work at the 2.4
GHz frequency which means smaller board and antenna size. Xbee modules have the ability to
transmit Digital, PWM, Analog or Serial RS232 signals wirelessly. To communicate over UART
or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit),
GND (common ground). So to interface UART with 8051, we just need the basic signals.
FIG. 1 INTERFACING ZIGBEE TO MICROCONTROLLER

4.3.2 INTERFACING ZIGBEE WITH 8051


We now want to interface the ZigBee module with 8051 Primer Board for accessing the
mobiles without wires through UART0. The data communication is done in internet by using the
ZigBee module through MAX232 into the SBUF register of 8051 microcontroller (refer serial
interfacing with 8051). The serial data from the Zigbee receiver is taken by using the Serial
Interrupt of the controller. +5V and ground is connected to provide power to the module. While
TX and RX pin is connected for communication.
UART DB-9 8051
Connector Lines Serial Port Section

TXD-0 P3.0
UART0(P1)
ISP PGM RXD-0 P3.1

TXD-1 P1.2
UART1
(P2) RXD-1 P1.3
PIN ASSIGNMENT WITH 8051

CIRCUIT DIAGRAM TO INTERFACE ZIGBEE WITH 8051


5. SOFTWARE EXPLANATION
5.1 µVISION3:

µ Vision is an IDE (Integrated Development Environment) that helps you write, compile, and
debug embedded programs. It encapsulates the following components:

1. A project manager.
2. A make facility.
3. Tool configuration.
4. Editor.
5. A powerful debugger.
To help you get started, several example programs (located in the \C51\Examples,
\C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided.

1. HELLO is a simple program that prints the string "Hello World" using the Serial Interface.

5.2 BUILDING AN APPLICATION IN µVISION2:


To build (compile, assemble, and link) an application in µVision2, you must:
1. Select Project - (for example, 166\EXAMPLES\HELLO\HELLO.UV2).
2. Select Project - Rebuild all target files or Build target.
µVision2 compiles, assembles, and links the files in your project.

5.3 CREATING YOUR OWN APPLICATION IN µVISION2:


To create a new project in µVision2, you must:

1. Select Project - New Project.


2. Select a directory and enter the name of the project file.
3. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the
Device Database™.
4. Create source files to add to the project.
5. Select Project - Targets, Groups, Files, Add/Files, select Source Group1, and add the
source files to the project.
6. Select Project - Options and set the tool options. Note when you select the target device
from the Device Database™ all special options are set automatically. You typically only
need to configure the memory map of your target hardware. Default memory model
settings are optimal for most applications.
7. Select Project - Rebuild all target files or Build target.

5.4 DEBUGGING AN APPLICATION IN µVISION2:


To debug an application created using µVision2, you must:

1. Select Debug - Start/Stop Debug Session.


2. Use the Step toolbar buttons to single-step through your program. You may enter G,
main in the Output Window to execute to the main C function.
3. Open the Serial Window using the Serial #1 button on the toolbar.

Debug your program using standard options like Step, Go, Break, and so on.

5.5 STARTING µVISION2 AND CREATING A PROJECT:

µVision2 is a standard Windows application and started by clicking on the program icon.
To create a new project file select from the µVision2 menu

Project – New Project…. This opens a standard Windows dialog that asks you for the new
project file name.

We suggest that you use a separate folder for each project. You can simply use the icon
Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the
file name for the new project, i.e. Project1.

µVision2 creates a new project file with the name PROJECT1.UV2 which contains a
default target and file group name. You can see these names in the Project
5.6 WINDOW – FILES:

Now use from the menu Project – Select Device for Target and select a CPU for your
project. The Select Device dialog box shows the µVision2 device database. Just select the
microcontroller you use. We are using for our examples the Philips 80C51RD+ CPU. This
selection sets necessary tool options for the 80C51RD+ device and simplifies in this way the tool
Configuration

5.7 BUILDING PROJECTS AND CREATING A HEX FILES:

Typical, the tool settings under Options – Target are all you need to start a new
application. You may translate all source files and line the application with a click on the Build
Target toolbar icon. When you build an application with syntax errors, µVision2 will display
errors and warning messages in the Output

Window – Build page. A double click on a message line opens the source file on the correct
location in a µVision2 editor window.

Once you have successfully generated your application you can start debugging.

After you have tested your application, it is required to create an Intel HEX file to
download the software into an EPROM programmer or simulator. µVision2 creates HEX files
with each build process when Create HEX files under Options for Target – Output is enabled.
You may start your PROM programming utility after the make process when you specify the
program under the option Run User Program #1.

5.8 CPU SIMULATION:

µVision2 simulates up to 16 Mbytes of memory from which areas can be mapped for
read, write, or code execution access. The µVision2 simulator traps and reports illegal memory
accesses being done.
In addition to memory mapping, the simulator also provides support for the integrated
peripherals of the various 8051 derivatives. The on-chip peripherals of the CPU you have
selected are configured from the Device

5.9 DATABASE SELECTION:

You have made when you create your project target. Refer to page 58 for more
Information about selecting a device. You may select and display the on-chip peripheral
components using the Debug menu. You can also change the aspects of each peripheral using the
controls in the dialog boxes.

5.10 START DEBUGGING:

You start the debug mode of µVision2 with the Debug – Start/Stop Debug Session
command. Depending on the Options for Target – Debug Configuration, µVision2 will load the
application program and run the startup code µVision2 saves the editor screen layout and restores
the screen layout of the last debug session. If the program execution stops, µVision2 opens an
editor window with the source text or shows CPU instructions in the disassembly window. The
next executable statement is marked with a yellow arrow. During debugging, most editor features
are still available.

For example, you can use the find command or correct program errors. Program source
text of your application is shown in the same windows. The µVision2 debug mode differs from
the edit mode in the following aspects:

1. _ The “Debug Menu and Debug Commands” described on page 28 are Available. The
additional debug windows are discussed in the following.
2. _The project structure or tool parameters cannot be modified. All build Commands are
disabled.

5.11DISASSEMBLY WINDOW:

The Disassembly window shows your target program as mixed source and assembly
program or just assembly code. A trace history of previously executed instructions may be
displayed with Debug – View Trace Records. To enable the trace history, set Debug –
Enable/Disable Trace Recording.

If you select the Disassembly Window as the active window all program step commands
work on CPU instruction level rather than program source lines. You can select a text line and set
or modify code breakpoints using toolbar buttons or the context menu commands.

You may use the dialog Debug – Inline Assembly… to modify the CPU instructions.
That allows you to correct mistakes or to make temporary changes to the target program you are
debugging.

1. Click on the Keil µVision 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 AT89C51 as shown below

10. Then Click on “OK”


11. The Following fig will appear
12. Then Click either YES or NO………mostly “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.
21. Now select as per your file extension given while saving the file
22. Click only one time on option “ADD”
23. Now Press function key F7 to compile. Any error will appear if so happen.

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


25. The new window is as follows
26. Then Click “OK”
27. Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

28. Drag the port a side and click in the program file.
29. Now keep Pressing function key “F11” slowly and observe.
30. You are running your program.
6.ADVANTAGES AND LIMITATIONS

ADVANTAGES:

 Zigbee technology enables doctor to monitor the patients conditions even sitting in his
room .
 Doctor will get call when patients body temperature and heart beat rises so that he can take
precautionary .measures even though he will be in remote place.

 Patient care takers can monitor the equipment easily.

LIMITATIONS:

• Bitter Expensive.
• Communication for longer distance is quite difficult through Zigbee technology

• Interference of noise in GSM modem due to high Radio frequency signals.

• Accuracy will be less.


7. FUTURE SCOPE

Monitoring the patient’s condition can be done by using biomedical telemetry method where
there is a mobile communication between microcontrollers. The temperature, heart beat and blood
pressure are all sensed by using the appropriate sensors which are placed near the patient’s body that
is under investigation. The biomedical telemetry system consists of temperature sensor, heart beat
sensor, pressure sensor, A/D converter, signal conditioning circuit, microcontroller, data cable,
mobile phone, LCD display. The temperature sensor is used to sense the temperature value of the
patient’s body.

The sensed output is given to A/D converter where the analog signal is converted to digital
signal. The digital output is given to microcontroller. The microcontroller delivers the signal for
mobile phone through data cable. Then the signal is transmitted to other mobile through GSM
network. The receiver mobile receives the signal and it is given for a PC. The signal from data cable
is given to PC and the value gets displayed using monitor. The pressure sensor is used to sense the
pressure value of the patient’s body .The sensed output is given to A/D converter where the analog
signal is converted to digital signal. The digital output is given to microcontroller.

The microcontroller delivers the signal for mobile phone through data cable. Then the signal is
transmitted to other mobile through GSM network. The receiver mobile receives the signal and it is
given for a PC. The signal from data cable is given to PC and the value gets displayed using monitor.
Heart beat can be sensed by using heart beat sensor which is then given to a signal conditioning
circuit. This unit delivers a train of pulses to microcontroller and the value gets displayed using LCD
display.
8.CONCLUSION

We presented the design and implementation of a Remote Patient Monitoring system based on
wireless technology using a cellular phone, to send an SMS (Short Message Service) to the medical
staff. The proposed system combines two commonly used technologies namely, Global System for
Mobile (GSM) and Zigbee technology. This indeed is an easy, practical, inexpensive and yet very
effective way for transmitting vital information to the healthcare staff and healthcare providers.

The system monitors patient's health status, such as ECG, heart rate, and temperature. In case,
the value for any of these parameters exceeds preset critical values, the position parameters, from the
attached GPS module, are transmitted to pre-defined phone number in form of SMS using a GSM
module.

All the information obtained from the human body from sensors and ECG filter circuit is
then transmitted to the microcontroller system as digital values. The values obtained from like ECG,
heart rate and temperature is also displayed on to the attached LCD in alphanumerical form. In the
conclusion we consider how this system can be further improved in future, may be by adding new
type of sensors as well as using new approaches for the security and triggering alarm.
9. BIBLIOGRAPHY

TEXT BOOKS REFERRED

[1] A. Goldsmith, Wireless Communications, Cambridge Press, 2005.

[2] S. Haykin, Communication Systems, Wiley, New York, 2002.

[3] Ashish Kumar Agarwal, Innovation In Wireless Communication For Industrial Automation.

[4] Gunnar Heine, GSM Networks: Protocols, Terminology & Implementation.

[5] Introducing Zigbee RF4CE". Daintree Networks

[6] Introduction to Sensors

[7] Waldemar Nawrocki And Tadeusz Nawalaniec, Sensors And Communications In

Environment Monitoring Systems.

WEBSITES REFERRED

1. www.allthedatasheets.com
2. www.complextoreal.com
3. www.atmel.com
4. www.sensor-networks.org
5. www.commsdesign.com
6. www.Zigbee.org
7. www.microcontroller.com
8. www.howstuffworks.com

Вам также может понравиться