Sunteți pe pagina 1din 111

1

City University of Science and Information Technology


Dalazak road, Peshawar, Pakistan
Electrical Engineering Department

CERTIFICATE
This is to certify that the project thesis entitled Measuring heartbeat and
temperature and sending data through GSM modem is prepared by
NAME ID
Zartash Haider 2988
Hadi Hassan 3097
Abdur Rauf 2984
Muhammad Arif 2978

Students of final year B.Sc Electrical (Telecom.) have satisfactory completed their work.
Approved:
Internal Examiner External Examiner
__________________ __________________
Supervisor
Engr. Asar Ali

________________________

A thesis submitted in partial fulfillment of the requirements for the degree of B.Sc Electrical
(Telecom.) engineering, The city university of science and information technology Peshawar.

0

TABLE OF CONTENTS

Acknowledgements ................................................................................................................. i
Abstract ................................................................................................................................. ii
List Of Acronyms .................................................................................................................. iii
List Of Figures ........................................................................................................................ v
List Of Tables ...................................................................................................................... vii

Chapter 1: INTRODUCTION .................................................................................................. 1
1.1 Aim of the project .................................................................................................... 1
1.2 Objective ................................................................................................................. 1
1.3 Problem definition ................................................................................................... 2
1.4 Methodology ........................................................................................................... 2
1.5 Simulation and Simulation tools ............................................................................... 3
1.6 Analysis of result ..................................................................................................... 3
1.7 Goals ...................................................................................................................... 4
1.8 Guidelines of thesis ................................................................................................. 4
1.9 Research work ......................................................................................................... 4

Chapter 2: BACKGROUND ....................................................................................................5
2.1 QRS complex .......................................................................................................... 5
2.1.1 R wave progression .......................................................................................... 6
2.2 Heartbeat measurement (medical point of view) ....................................................... 7
2.2.1 At rest ............................................................................................................. 8
2.2.2 Maximum ...................................................................................................... 10
2.3 Target rate ............................................................................................................. 14
2.3.1 Karvonen method ............................................................................................ 15
2.3.2 Zoladz method ................................................................................................ 15
2.4 Heart rate reserve ................................................................................................... 15
2.5 Recovery heart rate ................................................................................................ 16
2.6 Abnormalities ........................................................................................................ 16
2.6.1 Tachycardia ................................................................................................... 16
2.6.2 Bradycardia .................................................................................................... 17
2.6.3 Arrhythmia ..................................................................................................... 17
2.7 Risk factor ............................................................................................................. 17
2.8 Light-emitting diode .............................................................................................. 18

1

2.8.1 LED Lamp (Light-Emitting Diode) ................................................................. 20
2.9 Liquid crystal display ............................................................................................ 20
2.9.1 Applications of LCD ...................................................................................... 21
2.10 GSM ..................................................................................................................... 22
2.10.1 GSM demonstration ....................................................................................... 23
2.10.2 GSM Network Infrastructure .......................................................................... 23

Chapter 3: MICROCONTROLLER, ITS INTERFACES AND PROJECT CIRCUIT .............. 25
3.1 Microcontroller description (AT89S52) .................................................................. 25
3.2 Pin configuration of AT89S52 ............................................................................... 27
3.3 Pin Description of AT89S52 .................................................................................. 31
3.3.1 V
CC
................................................................................................................ 31
3.3.2 GND ............................................................................................................. 31
3.3.3 Port 0 ............................................................................................................ 31
3.3.4 Port 1 ............................................................................................................ 31
3.3.5 Port 2 ............................................................................................................ 31
3.3.6 Port 3 ............................................................................................................ 32
3.3.7 RST ............................................................................................................... 32
3.3.8 ALE/PROG ................................................................................................... 32
3.3.9 PSEN ............................................................................................................ 33
3.3.10 EA/VPP ......................................................................................................... 33
3.3.11 XTAL1 .......................................................................................................... 33
3.3.12 XTAL2 .......................................................................................................... 33
3.4 Special Function Registers of AT89S52 ................................................................. 33
3.4.1 Timer 2 Registers ........................................................................................... 34
3.4.2 Interrupt Registers .......................................................................................... 34
3.4.3 Dual Data Pointer Registers ............................................................................ 34
3.4.4 Power off Flag ............................................................................................... 34
3.5 Watchdog Timer of AT89S52 ................................................................................ 34
3.5.1 Using the WDT .............................................................................................. 35
3.5.2 WDT during Power-down and Idle ................................................................. 35
3.6 ADC0804 IC ......................................................................................................... 36
3.7 Interfacing of microcontroller with ADC0804 ........................................................ 38
3.8 Pin description of ADC0804 .................................................................................. 40
3.8.1 CS, Chip Select .............................................................................................. 40
3.8.2 RD, Read ....................................................................................................... 40

2

3.8.3 WR, Write ..................................................................................................... 41
3.8.4 CLK IN, Clock IN ......................................................................................... 41
3.8.5 INTR, Interrupt .............................................................................................. 41
3.8.6 Vin+ .............................................................................................................. 41
3.8.7 Vin- ............................................................................................................... 41
3.8.8 AGND ........................................................................................................... 41
3.8.9 Vref/2 ............................................................................................................ 41
3.8.10 DGND ........................................................................................................... 42
3.8.11 D7-D0 ........................................................................................................... 42
3.8.12 CLKR ........................................................................................................... 42
3.8.12 Vcc ............................................................................................................... 42
3.9 Description of AT89C2051 .................................................................................... 42
3.9.1 Pin Configuration ........................................................................................... 43
3.10 Interface of LCD with micro controller .................................................................. 43
3.10.1 Command/Instruction Register ....................................................................... 44
3.10.2 Data Register ................................................................................................. 44
3.10.3 Displaying character on screen ....................................................................... 44
3.11 SIM900(D) ............................................................................................................ 45
3.11.1 General features ............................................................................................. 46
3.11.2 Specifications for Fax .................................................................................... 46
3.11.3 Specifications for Data ................................................................................... 46
3.11.5 Special firmware ............................................................................................ 47
3.11.6 Specifications for Voice ................................................................................. 47
3.11.7 Interfaces ....................................................................................................... 47
3.11.8 Compatibility ................................................................................................. 48
3.11.9 Certificates .................................................................................................... 48
3.11.10 Carrier Approvals .......................................................................................... 48
3.11.11 Specifications for SMS via GSM/GPRS .......................................................... 48
3.12 Heartbeat sensor of project (LDR) .......................................................................... 49
3.12.1 Specification and model ................................................................................. 50
3.12.2 Applications .................................................................................................. 50
3.13 Heat sensor of project, LM35 series (LM35DZ) ....................................................... 51
3.13.1 General description ......................................................................................... 51
3.13.2 Features ......................................................................................................... 52
3.14 LM358 IC ............................................................................................................. 52

3

3.14.2 Features ......................................................................................................... 54
3.15 Microcontroller interfacing and circuit of project .................................................... 55
3.15.1 LM35P circuitry with heartbeat sensor ............................................................ 60
3.16 Sensor Clip ........................................................................................................... 65
3.17 Project device source .............................................................................................. 71
3.18 Project device in operation ..................................................................................... 72

Chapter 4: SIMULATION (PHYSICAL MODELING AND CODING) ................................. 74
4.1 Introduction (of the project for simulation) ............................................................. 74
4.2 Theory (of the project for simulation) ..................................................................... 74
4.3 Simulation circuits ................................................................................................. 75
4.4 Coding .................................................................................................................. 79
4.4.1 AT89S52 coding ............................................................................................ 79
4.4.2 AT89C2051 coding ........................................................................................ 86

Chapter 5: ANALYSIS AND RESULTS OF SIMULATION ................................................. 87
5.1 Analysis and results ............................................................................................... 87
5.1.1 Conditioning circuit with heartbeat sensor....................................................... 88
5.1.2 Power for GSM modem ................................................................................. 94
5.2 Summary .............................................................................................................. 95
5.3 Conclusion ............................................................................................................ 95
5.4 Future work ........................................................................................................... 95

References ........................................................................................................................... 97


i

Acknowledgements


First and for most our profound gratitude and humble thanks to Almighty Allah
who gave us strength and intellectual ability to accomplish this task successfully.

Without the support and encouragement of numerous persons both within and
outside our university (CUSIT City University), the completion of this thesis would have
been a nearly insurmountable task.

We are highly indebted to our supervisor Engr. Asar Ali, Lecturer, Engineering
Department, CUSIT for his support and encouragement at all stages of the project.
Without his guidance and support it would have been impossible for us to accomplish
this task successfully.

We also express our thanks to the other faculty members of Engineering
Department for giving us the valuable suggestions throughout the year. We sincerely
thank them for their guidance and help through the hard and easy timing during the
development of this project.

































ii

Abstract


The thesis describes the design of Heartbeat and temperature monitoring using
Global System for Mobile (GSM) modem. Human being heartbeat rate can be monitored
within a preset range by the user. In order to improve the portability, the system is
developed using a version of 8052 series microcontroller from Atmel (AT89S52) [we
can also use PIC microcontroller (PIC16F628A)] and a GSM modem is implemented to
send Short Messaging Service (SMS) to the preset user mobile. The system allows the
user to set the upper and lower limit of heartbeat rate. An LCD screen is connected to
the microcontroller to display the current heartbeat. A prototype based on the design is
built and tested successfully

We developed an electronic device that can be used to measure things for which
we normally use mechanical methods or do it manually, like heartbeat measurement by
holding hand of a patient/person and counting beats for heartbeat rate manually or using
thermometer to measure temperature of a patient/person.

The Project is comprised of basically two major modules, which handles all the
basic functionalities of the device.

The modules we intend to develop are:
1. Heartbeat and temperature sensing using sensor
2. Measured data transmission through GSM modem

This report discusses design, constructional details, applications, and economics of
the Heartbeat and temperature monitoring using Global System for Mobile (GSM)
modem.

The Electronics of the device has been primarily built around the Atmel
8052microcontroller which controls data transmission of measured data, and controls the
system.

Keywords: Heartbeat measurement, GSM modem, Temperature sensor, LDR sensor.















iii

List Of Acronyms


A/D Analog to Digital
ADC Analog to Digital Converter
ASCII Stands For American Standard Code for Information Interchange
AUC Authentication Center
BSC Base Station Controller
BSS Base Station Subsystem
BTS Base Transceiver System (Antenna System + Radio Base Station)
CISC Complex Instruction Set Computer
CMOS Complementary MetalOxideSemiconductor
CPU Central Processing Unit
ECG Electro Cardiogram
EDGE Enhanced Data rate for GSM Evolution
EEPROM Electrically Erasable Programmable Read-Only Memory
EIR Equipment Identification Register (for IMEI verification)
EMS Enhanced Messaging Services
EUSART Enhanced Universal Asynchronous Receiver Transmitter
FNR Flexible Numbering Register (for number portability)
FTP Special Function Registers
GMSC Gateway Mobile Switching Center (MSC)
GPRS General Packet Radio Service
GSM Groupe Speciale Mobile (original) or Global Specification for Mobile
HLR Home Location Register
HR Heart Rate
HSCSD High-Speed Circuit-Switched Data
I/O Input/Output
IC Integrated Circuit
ILR Interworking Location Register
IMEI International Mobile Equipment Identity
ISDN Integrated Services Digital Network
ITO Indium tin oxide or tin-doped indium oxide
IWF Interworking Function
IWMSC Interworking Mobile Switching Centre (MSC)
LCD Liquid Crystal Display
LDR Light Dependent Resistor
LED Light Emitting Diode
MIPS Million Instructions Per Second
MMS Multimedia Messaging Services
MS Mobile Station
MSC Mobile Switching Center
NMS Network Management Subsystem
NSS Network Switching Subsystem
OSS Operation and Support System
PDIP Plastic Dual Inline Package
PDN Public Data Network

iv

PEROM Programmable And Erasable Read Only Memory
PLCC Plastic Leaded Chip Carrier
PLMN Public Land Mobile Network
PSTN Public Switched Telephone Network
RAM Random Access Memory
RISC Reduced Instruction Set Computer
SMS Short Message Service
SPI Serial Peripheral Interface
TQFP Thin Quad Flat Pack
VLR Visitor Location Register








































v

List Of Figures


Figure 2.1: (a) Schematic representation of normal ECG, (b) Schematic representation
of the QRS complex, (c) Diagram showing how the polarity of the QRS
complex in leads I, II, and III can be used to estimate the heart's electrical
axis in the frontal plane ............................................................................................ 6
Figure 2.2: Fox and Haskell formula; widely used. .................................................................. 11
Figure 2.3: Electronic symbol and Pin configuration anode and cathode ................................ 19
Figure 2.4: Parts of an LED ...................................................................................................... 19
Figure 2.5: Reflective twisted nematic liquid crystal display ................................................... 21
Figure 2.6: Wireless communications systems and networks .................................................. 23
Figure 2.7: Hexa cellular range of BTS based network diagram .............................................. 24

Figure 3.1: Pin configuration of microcontroller AT89S52 different versions ........................ 29
Figure 3.2: Block diagram of AT89S52 ................................................................................... 30
Figure 3.3: Pin diagram of ADC0804 IC .................................................................................. 37
Figure 3.4: Block diagram of ADC0804 .................................................................................. 37
Figure 3.5: Diagram of general connections for ADC0804 ...................................................... 39
Figure 3.6: Circuit diagram for ADC0804 IC interfacing with microcontroller ...................... 40
Figure 3.7: Pin configuration of AT89C2051 ........................................................................... 43
Figure 3.8: (a) Circuit diagram of interfacing LCD with micro controller, (b) project
LCD screen ............................................................................................................. 45
Figure 3.9: Pre-assembled/Readymade SIM900D module GSM modem with Antenna ......... 48
Figure 3.10: The symbol for a Photoresistor .............................................................................. 49
Figure 3.11: A Light Dependent Resistor (LDR) ....................................................................... 50
Figure 3.12: LM35DZ IC ........................................................................................................... 51
Figure 3.13: LM358P ................................................................................................................. 53
Figure 3.14: Pin diagram of LM358 ........................................................................................... 53
Figure 3.15: Schematic diagram of LM35 .................................................................................. 54
Figure 3.16: Block diagram of the measuring device ................................................................. 56
Figure 3.17: Complete diagram of the project circuit ................................................................. 57
Figure 3.18: Left side of the complete project diagram .............................................................. 58
Figure 3.19: Right side of the complete project diagram ........................................................... 59
Figure 3.20: LM35P circuitry with heartbeat sensor .................................................................. 60
Figure 3.21: Project initial stage diagram when photodiode and IR diode was used ................. 61
Figure 3.22: This figure is available on internet, (a) In this picture we only used the LDR
& High intensity LED portion on right in our project for reference ...................... 64
Figure 3.23: Components used in making a sensor clip ............................................................. 65
Figure 3.24: Making holes in the clip for sensor components placement .................................. 66
Figure 3.25: Ready clip and placement of finger in the clip ....................................................... 66
Figure 3.26: Soldering iron of rating 30W, 220V/240V ............................................................. 67
Figure 3.27: Chip holder soldered on the bread board ............................................................... 67
Figure 3.28: Complete project picture with soldering iron ......................................................... 68

vi

Figure 3.29: Complete project Picture ........................................................................................ 69
Figure 3.30: Circuital picture of project, some similarity is found (from components
placement point of view) when this picture is compared with
Figure 3.17 to 3.19 ................................................................................................. 70
Figure 3.31: 9V batteries and variable adapter (rating: 1.5V-12V, 2A) ..................................... 71
Figure 3.32: Device running on battery ...................................................................................... 71
Figure 3.33: Device running on adapter ..................................................................................... 72
Figure 3.34: Any mobile SIM (with balance) placement in the GSM modem ........................... 72
Figure 3.35: Turn on device using battery or adapter, place finger in the sensor clip ................ 73
Figure 3.36: Readings after one minute ...................................................................................... 73

Figure 4.1: These circuits were made on Multisim 11 at initial stages, this version (old)
of project did not included GSM system and used 7-segment display ................... 75
Figure 4.2: These circuits were made on Proteus 7 Pro., this version (new) of project
included temperature sensor and hypothetical GSM system, and used LCD
display .................................................................................................................... 78

Figure 5.1: Complete circuit in running condition ................................................................... 88
Figure 5.2: Conditioning circuit for heartbeat sensor in simulator ........................................... 89
Figure 5.3: Result on Oscilloscope by increasing value of comparators potentiometer ......... 91
Figure 5.4: Result on Oscilloscope by increasing value of amplifiers potentiometer ............. 93
Figure 5.5: Actual amplitude levels (same scaled in Oscilloscope) of signals comparison ..... 94
Figure 5.6: Circuit for GSM modem (SIM900D module based) voltage supply ..................... 94



















vii

List Of Tables


Table 2.1: Table of heart rates for men ....................................................................................... 9
Table 2.2: Table of heart rates for women ................................................................................ 10

Table 3.1: Table for pin configuration of ADC0804 ................................................................ 38
Table 3.2: Port 3 also receives some control signals for Flash programming and
verification. .............................................................................................................. 43








.

















1

Chapter 1: INTRODUCTION

1.1 Aim of the project

This project is the design of a simple, low-cost microcontroller based
heart rate and temperature measuring device with LCD, mobile phone
output. Heart rate and temperature of a patient/person is measured from the
finger using optical sensors, and temperature from LM358 and the rate is
then averaged and displayed on a text based LCD and mobile phone
through GSM service.

Heart rate measurement is one of the very important parameters of
the human cardiovascular system. The heart rate of a healthy adult at rest is
around 72 beats per minute (bpm). Athletes normally have lower heart rates
than less active people. Babies have a much higher heart rate at around 120
bpm, while older children have heart rates at around 90 bpm. The heart rate
rises gradually during exercises and returns slowly to the rest value after
exercise. The rate when the pulse returns to normal is an indication of the
fitness of the person. Lower than normal heart rates are usually an
indication of a condition known as bradycardia, while higher than normal
heart rates are known as tachycardia.

1.2 Objective

Heart rate is simply and traditionally measured by placing the thumb
over the subjects arterial pulsation, and feeling, timing and counting the
pulses usually in a 30 second period. Heart rate (bpm) of the subject is then
found by multiplying the obtained number by 2. This method although
simple, is not accurate and can give errors when the rate is high. More
sophisticated methods to measure the heart rate utilize electronic
techniques. Electro-cardiogram (ECG) is one of frequently used and
accurate methods for measuring the heart rate. ECG is an expensive device
and its use for the measurement of the heart rate only is not economical.
Low-cost devices in the form of wrist watches are also available for the
instantaneous measurement of the heart rate. Such devices can give
accurate measurements but their cost is usually in excess of several hundred
dollars, making them uneconomical. Most hospitals and clinics in the UK
use integrated devices designed to measure the heart rate, blood pressure,

2

and temperature of the subject. Although such devices are useful, their cost
is usually high and beyond the reach of individuals.

Thesis describes the design of a very low-cost device which
measures the heart rate and temperature of the subject by clipping sensors
on one of the fingers and then displaying the result on a text based LCD.
The device has the advantage that it is microcontroller based and thus can
be programmed to display various quantities, such as the average,
maximum and minimum rates over a period of time and so on. Another
advantage of such a design is that it can be expanded and can easily be
connected to a recording device or a PC to collect and analyze the data for
over a period of time.

1.3 Problem definition

The basic problem with heartbeat measuring manually is that its time
consuming And the person who is measuring heart rate has to pay attention
continuosly for conting heartbeat pulses by holding the wrist of apatient.
Another problem is that the doctor cannot stay with a patient continuosly to
keep an eye on the patient heart rate. Other then this there are still many
people who do not know how find heart rate of a person manually by
holding thee wrist. Heart rate is not only effected by heart condition; things
such sickness or non still state (running joging etc.) also effect a persons
heart rate.

1.4 Methodology

Methodology of this project is very simple. As we know that our
heart pumps blood in our body per beat this means that evey time our
heartbeats the pressure of blood in our body changes. Research shows that
high entensity or Infra Red light reflects from our blood and the amount of
rays depends on the density or pressure of our blood. Using this idea we
formed the bases for or project. The reflected rays will detected by a sensor,
in our project case LDR (Light Depended Resistor). We have also used a
heat/thermal sensor (LM35) for measuring temperature of the patient in
Celcius because the LM35 is specifically designed/callibrated for output in

3

Celcius. The result in Celsius caneasily be transformed in Fahrenheit using
formula:
[F] = [C]
9

5
+ 32
Also the program of the project can also be modified to display
answer in Fahrenheit but for that the formula mentioned above is needed to
be integrated in the program.

1.5 Simulation and Simulation tools

The Simulators or Simulation tools that we used for this project are:

Hardware Simulation: MultiSim 11.0.1 Ultiboard PowerPro
Hardware Simulation: Proteus Professional V7.6 SP4
Program testing(C language): Borland C++
Program testing(Assembly): Keil-uVision3-v8.12-C51
Program testing(Assembly): MDA-WinIDE Studio-51

Hardware Simulation was done in stages through out which we
made changes in our project and siwtched simulators,specifically among
two simulators that our mentioned above mentioned above. Same in case of
prgram testing. Note that the program and hardware structure was
developed together in stages because programing cannot work without
hardware and hardware cannot work without the program.

1.6 Analysis of result

Heart rate result of our project is satisfactory because the electronic
components we bought for the project are cheap and not very sensitive in
terms of sensing and are effected by the environmental conditions more.
Which means that by using good quality components the overall
performance will step up in terms of accuracy of measurement. Our project
heartbeat measurement has a tolerance of about 2 to 5 heartbeats while the
temperature has a tolerance of about 1 to 3 Centigrade. Other than the
reasons defined before, another thing that is effecting our accuracy is the

4

stability of the physical parts of the project/device such as, we have used a
cloth clip for sensors to hold the finger as shown below.

1.7 Goals

The main goal of this project is to make it easy to keep an eye on the
heart condition of a heart patient thus extending the range of treatment of
patients for the doctor meaning that heartbeat monitoring will be done by
this device while in the meantime the doctor can analyze another patient.
And he will also be kept informed by the device through SMS (the device
program can also be edited such that it will send SMS only when the patient
is in critical state).

1.8 Guidelines of thesis

The chapters in this thesis are divided on the basis of technicality and
in order of from basic to complex, meaning that at every next chapter the
depthness in the project will increment. The chapter names define there
main and core contents.

1.9 Research work

Related to this project lot of work has be done but due some technical
point, further research is still needed to perfect this device. The research on
those technical points is in progress. One of the basic problem is related to
the formulae used to calculate the heart rate of a person which will be
discussed in the next chapter. The references related to this project are
mentioned at the end of the thesis on Reference page.







5

Chapter 2: BACKGROUND

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.

2.1 QRS complex

The QRS complex is a name for the combination of three of the
graphical deflections seen on a typical electrocardiogram (ECG). It is
usually the central and most visually obvious part of the tracing. It
corresponds to the depolarization of the right and left ventricles of the
human heart. In adults, it normally lasts 0.06 - 0.10 s; in children and during
physical activity, it may be shorter.

Typically an ECG has five deflections, arbitrarily named "P" to "T"
waves. The Q, R, and S waves occur in rapid succession, do not all appear
in all leads, and reflect a single event, and thus are usually considered
together. A Q wave is any downward deflection after the P wave. An R
wave follows as an upward deflection, and the S wave is any downward
deflection after the R wave. The T wave follows the S wave, and in some
cases an additional U wave follows the T wave.


6

(a) (b)
(c)
Figure 2.1: 1(a) Schematic representation of normal ECG, (b) Schematic
representation of the QRS complex, (c) Diagram showing how the polarity of the
QRS complex in leads I, II, and III can be used to estimate the heart's electrical
axis in the frontal plane

2.1.1 R wave progression

Looking at the precordial leads, the r wave usually progresses from
showing arS-type complex in V
1
with an increasing R and a decreasing S
wave when moving towards the left side. There is usually anqR-type of
complex in V
5
and V
6
with the R-wave amplitude usually taller in V
5
than
in V
6
. It is normal to have a narrow QS and rSr' patterns in V
1
, and so is

7

also the case for qRs and R patterns in V
5
and V
6
. The transition zone is
where the QRS complex changes from predominately negative to
predominately positive (R/S ratio becoming >1), and this usually occurs at
V
3
or V
4
. It is normal to have the transition zone at V
2
(called "early
transition"), and at V
5
(called "delayed transition").

The definition of poor R wave progression (PRWP) varies in the
literature, but a common one is when the R wave is less than 24 mm in
leads V
3
or V
4
and/or there is presence of a reversed R wave progression,
which is defined as R in V
4
< R in V
3
or R in V
3
< R in V
2
or R in V
2
< R in
V
1
, or any combination of these.Poor R wave progression is commonly
attributed to anterior myocardial infarction, but it may also be caused by
left bundle branch block, WolffParkinsonWhite syndrome, right and left
ventricular hypertrophy as well as by faulty ECG recording technique.

2.2 Heartbeat measurement (medical point of view)

Heart rate is measured by finding the pulse of the body. This pulse
rate can be measured at any point on the body when 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 correct perception of the target pulse.
[1]


Possible points for measuring the heart rate are:
1. The ventral aspect of the wrist on the side of the thumb (radial artery).
2. The ulnar artery.
3. The neck (carotid artery).
4. The inside of the elbow, or under the biceps muscle (brachial artery).
5. The groin (femoral artery).
6. Behind the medial malleolus on the feet (posterior tibial artery).
7. Middle of dorsum of the foot (dorsalispedis).
8. Behind the knee (popliteal artery).
9. Over the abdomen (abdominal aorta).
10. The chest (apex of heart), which can be felt with one's hand or fingers.
However, it is possible to auscultate the heart using a stethoscope.
11. The temple (superficial temporal artery).

8

12. The lateral edge of the mandible (facial artery).
13. The side of the head near the ear (basilar artery).

A more precise method of determining pulse involves the use of
an electrocardiograph, or ECG (also abbreviated EKG). Continuous
electrocardiograph monitoring of the heart is routinely done in many
clinical settings, especially in critical care medicine. Commercial heart rate
monitors are also available, consisting of a chest strap with electrodes. The
signal is transmitted to a wrist receiver for display. Heart rate monitors
allow accurate measurements to be taken continuously and can be used
during exercise when manual measurement would be difficult or impossible
(such as when the hands are being used).

Another way of determining the heart rate is by recording of the
body vibrations: (seismocardiography). Probably the first scientific paper
on this topic was presented by Salerno, DM and Zanetti, J in the Journal of
Cardiovascular Technology in year 1990 (Title: Seismocardiography - a
new technique for recording cardiac vibrations - concept, method, and
initial observations). In 2012 the first smart phone application incorporating
this principle was presented seismoCardiograph.

2.2.1 At rest

The resting heart rate (HR
rest
) 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 resting heart rate in adults is 60-90 beats per minute
(bpm)
[2]
. Rates below 60 bpm are referred to as bradycardia and rates above
100 bpm are referred to as tachycardia.

Conditioned athletes often have resting heart rates below 60 bpm,
with values of below 40 bpm not unheard of. The cyclist Miguel
Indurain had a resting heart rate of 28 bpm
[3]
.

The low pulse in conditioned athletes is due to the increased
efficiency of the heart as a pump coupled with more effective vascular
networks among peripheral muscle beds. Exercise leads to the healthy

9

enlargement of the ventricles of the heart and a condition known
as Athlete's heart.

Average resting heart rate depends on age.
[4]


Men
Age: 18-25 26-35 36-45 46-55 56-65 65+
Athlete 49-55 49-54 50-56 50-57 51-56 50-55
Excellent 56-61 55-61 57-62 58-63 57-61 56-61
Good 62-65 62-65 63-66 64-67 62-67 62-65
Above Average 66-69 66-70 67-70 68-71 68-71 66-69
Average 70-73 71-74 71-75 72-76 72-75 70-73
Below Average 74-81 75-81 76-82 77-83 76-81 74-79
Poor 82+ 82+ 83+ 84+ 82+ 80+
Table 2.1:1Table of heart rates for men






10


Women
Age: 18-25 24-35 36-45 46-55 56-65 65+
Athlete 54-60 54-59 54-59 54-60 54-59 54-59
Excellent 61-65 60-64 60-64 61-65 60-64 60-64
Good 66-69 65-68 65-69 66-69 65-68 65-68
Above Average 70-73 69-72 70-73 70-73 69-73 69-72
Average 74-78 73-76 74-78 74-77 74-77 73-76
Below Average 79-84 77-82 79-84 78-83 78-83 77-84
Poor 85+ 83+ 85+ 84+ 84+ 84+
Table 2.2:2Table of heart rates for women

I n children: The normal heart rate in children is variable and depends on the child's
age. Children exercising can have heart rates up to 200 bpm.
[5]


2.2.2 Maximum

The maximum heart rate (HR
max
) is the highest heart rate an
individual can safely achieve through exercise stress, and depends on age.
The most accurate way of measuring HR
max
is via a cardiac stress test. In
such a test, the subject exercises while being monitored by an ECG. During

11

the test, the intensity of exercise is periodically increased (if a treadmill is
being used, through increase in speed or slope of the treadmill), continuing
until certain changes in heart function are detected in the ECG, at which
point the subject is directed to stop. Typical durations of such a test range
from ten to twenty minutes.

Standard textbooks of physiology and medicine mention that heart
rate (HR) is readily calculated from the ECG as follows: HR = 1,500/RR
interval in millimeters, HR = 60/RR interval in seconds, or HR =
300/number of large squares between successive R waves. In each case, the
authors are actually referring to instantaneous HR, which is the number of
times the heart would beat if successive RR intervals were constant.
Conducting a maximal exercise test can require expensive
equipment. People just beginning an exercise regimen are normally advised
to perform this test only in the presence of medical staff due to risks
associated with high heart rates. For general purposes, people instead
typically use a formula to estimate their individual maximum heart rate.

Formula

Figure 2.2:2Fox and Haskell formula; widely used.


12

Various formulas are used to estimate individual maximum heart
rates, based on age, but maximum heart rates vary significantly between
individuals.
[6]
Even within a single elite sports team, such as Olympic
rowers in their 20s, maximum heart rates can vary from 160 to 220.
[6]
This
variation is as large as a 60 or 90 year age gap by the linear equations given
below, and indicates the extreme variation about these average figures.

The most common formula encountered, with no indication of
standard deviation, is:
HR
max
= 220 age
The formula has been attributed to various sources, but is widely
thought to have been devised in 1970 by Dr. William Haskell and Dr.
Samuel Fox.
[6]
Inquiry into the history of this formula reveals that it was not
developed from original research, but resulted from observation based on
data from approximately 11 references consisting of published research or
unpublished scientific compilations.
[7]
It gained widespread use through
being used by Polar Electro in its heart rate monitors,
[6]
which Dr. Haskell
has "laughed about",
[6]
as it "was never supposed to be an absolute guide to
rule people's training".
[6]


While the most common (and easy to remember and calculate), this
particular formula is not considered by reputable health and fitness
professionals to be a good predictor of HR
max
. Despite the widespread
publication of this formula, research spanning two decades reveals its large
inherent error (Sxy = 711 b/min). Consequently, the estimation calculated
by HR
max
= 220 age has neither the accuracy nor the scientific merit for
use in exercise physiology and related fields.
[7]


A study in year 2002
[7]
of 43 different formulae for HR
max
(including
the one above) concluded the following:
1. No "acceptable" formula currently existed, (they used the term
"acceptable" to mean acceptable for both prediction of VO
2
(VO
2
falls
under the umbrella of exercise science. VO2 is defined as the
maximum amount of oxygen that the human body can utilize while
exercising aerobically. VO2, also called VO2 max, is a way to not only
show quantitatively the limits of the human cardiovascular system but

13

also to serve as a way to measure individual fitness. VO
2
tests can
serve as an indicator for a physiological advantage in endurance
oriented sports) and prescription of exercise training (HR ranges)
2. The formula deemed least objectionable was:
HR
max
= 205.8 (0.685 age)
This was found to have a standard deviation that, although large
(6.4 bpm), was still considered to be acceptable for the use of prescribing
exercise training HR ranges.

Other often cited formulae are going to be:
HR
max
= 206.3 (0.711 age)
(Often attributed to "Londeree and Moeschberger from the University of
Missouri")
HR
max
= 217 (0.85 age)
(Often attributed to "Miller et al. from Indiana University")
HR
max
= 208 (0.7 age)
(Another "tweak" to the traditional formula is known as the Tanaka method.
Based on a study of thousands of individuals, a new formula was devised
which is believed to be more accurate).
[8]


In year 2007, researchers at the Oakland University analysed
maximum heart rates of 132 individuals recorded yearly over 25 years, and
produced a linear equation very similar to the Tanaka formulaHR
max
=
206.9 (0.67 age)and a nonlinear equationHR
max
= 191.5 (0.007
age
2
). The linear equation had a confidence interval of 58 bpm and the
nonlinear equation had a tighter range of 25 bpm. Also a third nonlinear
equation was produced HR
max
= 163 + (1.16 age) (0.018 age
2
).
[9]

These figures are very much averages, and depend greatly on
individual physiology and fitness. For example an endurance runner's rates
will typically be lower due to the increased size of the heart required to
support the exercise, while a sprinter's rates will be higher due to the
improved response time and short duration. While each may have predicted
heart rates of 180 (= 220 age), these two people could have actual
HR
max
20 beats apart (e.g., 170190).

14


Further, note that individuals of the same age, the same training, in
the same sport, on the same team, can have actual HR
max
60 bpmapart (160
to 220):
[6]
the range is extremely broad, and some say "The heart rate is
probably the least important variable in comparing athletes."
[6]


Year 2010 research conducted at Northwestern University revised the
maximum heart rate formula for women. According to Martha Gulati, et al.,
it is:
HR
max
= 206 (0.88 age)
[10][11]


A study from Lund, Sweden gives reference values (obtained during
bicycle ergometry).
for men:
HR
max
= 203.7 / (1 + exp (0.033 x (age - 104.3)))
[12]

and for women:
HR
max
= 190.2 / (1 + exp (0.0453 x (age - 107.5)))
[13]

The Target Heart Rate or Training Heart Rate (THR) is a desired
range of heart rate reached duringaerobic exercise which enables.

2.3 Target rate

The Target Heart Rate or Training Heart Rate (THR) is a desired
range of heart rate reached during aerobic exercise which enables one's
heart and lungs to receive the most benefit from a workout. This theoretical
range varies based mostly on age; however, a person's physical condition,
gender, and previous training also are used in the calculation. Below are
two ways to calculate one's THR. In each of these methods, there is an
element called "intensity" which is expressed as a percentage. The THR can
be calculated as a range of 65%85% intensity. However, it is crucial to
derive an accurate HR
max
to ensure these calculations are meaningful (see
above).

Example for someone with a HR
max
of 180(age 40, estimating HR
max
As 220
age):

15

65% Intensity: (220 (age = 40)) 0.65 117 bpm
85% Intensity: (220 (age = 40)) 0.85 153 bpm

2.3.1 Karvonen method

The Karvonen method factors in resting heart rate (HR
rest
) to
calculate target heart rate (THR), using a range of 5085% intensity:
THR = ((HR
max
HR
rest
) % intensity) + HR
rest




Example for someone with a HR
max
of 180 and a HR
rest
of 70:
50% Intensity: ((180 70) 0.50) + 70 = 125 bpm
85% Intensity: ((180 70) 0.85) + 70 = 163 bpm

2.3.2 Zoladz method

An alternative to the Karvonen method is the Zoladz method, which
derives exercise zones by subtracting values from HR
max
:
THR = HR
max
Adjuster 5 bpm
Zone 1 Adjuster = 50 bpm
Zone 2 Adjuster = 40 bpm
Zone 3 Adjuster = 30 bpm
Zone 4 Adjuster = 20 bpm
Zone 5 Adjuster = 10 bpm

Example for someone with a HR
max
of 180:
Zone 1(easy exercise): 180 50 5 125 135 bpm
Zone 4(tough exercise): 180 20 5 155 165 bpm

2.4 Heart rate reserve

The Heart rate reserve (HRR) is a term used to describe the
difference between a person's measured or predicted maximum heart rate
and resting heart rate. Some methods of measurement of exercise intensity
measure percentage of heart rate reserve. Additionally, as a person
increases their cardiovascular fitness, their HR
rest
will drop, thus the heart

16

rate reserve will increase. Percentage of HRR is equivalent to percentage of
VO
2
reserve.
HRR = HR
max
HR
rest


This is often used to gauge exercise intensity (first used in 1957 by
Karvonen).
[14]


Karvonen's study findings have been questioned, due to the following:
1. The study did not use VO
2
data to develop the equation.
2. Only six subjects were used, and the correlation between the
percentages of HRR and VO
2
max was not statistically significant.
[15]


2.5 Recovery heart rate

The Recovery heart rate is the heart rate measured at a fixed (or
reference) period after ceasing activity, typically measured over a one
minute period.

A greater reduction in heart rate after exercise during the reference
period indicates a better-conditioned heart. Heart rates that do not drop by
more than 12 bpm one minute after stopping exercise are associated with an
increased risk of death.
[16]


Training regimes sometimes use recovery heart rate as a guide of
progress and to spot problems such as overheating or dehydration.
[17]
After
even short periods of hard exercise it can take a long time (about 30
minutes) for the heart rate to drop to rested levels.

2.6 Abnormalities

2.6.1 Tachycardia

Tachycardia is a resting heart rate more than 100 beats per minute.
This number can vary as smaller people and children have faster heart rates
than average adults.

Physiological condition when tachycardia occurs are:
1. Exercise.
2. Pregnancy.
3. Emotional conditions such as anxiety or stress.

17


Pathological conditions when tachycardia occurs are:
1. Fever.
2. Anemia.
3. Hypoxia.
4. Hyperthyroidism.
5. Hypersecretion of catecholamines.
6. Cardiomyopathy.
7. Valvular heart diseases.
8. Acute Radiation Syndrome.

2.6.2 Bradycardia

Bradycardia is defined as a heart rate less than 60 beats per minute
although it is seldom symptomatic until below 50 bpm when a human is at
total rest. This number can vary as children and small adults tend to have
faster heart rates than average adults. Bradycardia may be associated with
medical conditions such as hypothyroidism.

Trained athletes tend to have slow resting heart rates, and resting
bradycardia in athletes should not be considered abnormal if the individual
has no symptoms associated with it. For example Miguel Indurain, a
Spanish cyclist and five time Tour de France winner, had a resting heart
rate of 28 beats per minute, one of the lowest ever recorded in a healthy
human.

2.6.3 Arrhythmia

Arrhythmias are abnormalities of the heart rate and rhythm
(sometimes felt as palpitations). They can be divided into two broad
categories: fast and slow heart rates. Some cause few or minimal
symptoms. Others produce more serious symptoms of lightheadedness,
dizziness and fainting.

2.7 Risk factor

A number of investigations indicate that faster resting heart rate has
emerged as a new risk factor for mortality in homeothermic mammals,
particularly cardiovascular mortality in human beings. Faster heart rate may
accompany increased production of inflammation molecules and increased

18

production of reactive oxygen species in cardiovascular system, in addition
to increased mechanical stress to the heart. There is a correlation between
increased resting rate and cardiovascular risk. This is not seen to be "using
an allotment of heartbeats" but rather an increased risk to the system from
the increased rate.
[18]


An Australian-led international study of patients with cardiovascular
disease has shown that heartbeat rate is a key indicator for the risk of heart
attack. The study, published in The Lancet (September 2008) studied
11,000 people, across 33 countries, who were being treated for heart
problems. Those patients whose heart rate was above 70 beats per minute
had significantly higher incidence of heart attacks, hospital admissions and
the need for surgery. University of Sydney professor of cardiology Ben
Freedman from Sydney's Concord hospital, said "If you have a high heart
rate there was an increase in heart attack, there was about a 46 percent
increase in hospitalizations for non-fatal or fatal heart attack."
[19]


Standard textbooks of physiology and medicine mention that heart
rate (HR) is readily calculated from the ECG as follows:
HR = 1,500/RR interval in millimeters, HR = 60/RR interval in
seconds, or HR = 300/number of large squares between successive R
waves. In each case, the authors are actually referring to
instantaneous HR, which is the number of times the heart would beat
if successive RR intervals were constant. However, because the
above formula is almost always mentioned, students determine HR
this way without looking at the ECG any further.

2.8 Light-emitting diode

A number of investigations indicate that faster resting heart rate has
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

19

of the photon) is determined by the energy gap of the semiconductor. LEDs
are often small in area (less than 1 mm
2
), 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 physical 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.
[20]



Figure 2.3:3Electronic symbol and Pin configuration anode and cathode


Figure 2.4:4Parts of an LED


20

The flat bottom surfaces of the anvil and post embedded inside the
epoxy act as anchors, to prevent the conductors from being forcefully
pulled out from mechanical strain or vibration.

2.8.1 LED Lamp (Light-Emitting Diode)

Light-emitting diode features:
[21]


1. Viewing angle: +10 to +200 degrees (as required).
2. Super high intensity luminary: 100 - 20,000mcd.
3. Wave length: 375 - 700nm.
4. Reliable, long lifespan with over 60,000 ~ 100,000 hours.
5. Choice of various viewing angles and colors emitted: red, green, blue,
white, yellow, amber (optional).
6. Applications:
a. Commercial outdoor signs.
b. Automotive interior lights.
c. Front panel indicators.
d. Front panel backlights.
e. City beautification of night piece.
f. Traffic light.
g. Display.
7. All kinds of shapes including: round, columni form, square shape,
elliptica shape, tower shape, super flux, triangular shape.
8. Its outer packing comes in Anti-static bag and exporting carton.

2.9 Liquid crystal display

A liquid crystal display (LCD) is a flat panel display, electronic
visual display, or video display that uses the light modulating properties of
liquid crystals (LCs). LCs do not emit light directly.

LCD displays are available to display arbitrary images (as in a
general-purpose computer display) or fixed images which can be displayed
or hidden, such as preset words, digits, 7-segment displays, etc., as in a
digital clock. They use the same basic technology, except that arbitrary

21

images are made up of a large number of small pixels, while other displays
have larger elements.
[22]


2.9.1 Applications of LCD

LCDs are used in a wide range of applications, including computer
monitors, television, instrument panels, aircraft cockpit displays, signage,
etc. They are common in consumer devices such as video players, gaming
devices, clocks, watches, calculators, and telephones. LCDs have replaced
cathode ray tube (CRT) displays in most applications. They are available in
a wider range of screen sizes than CRT and plasma displays, and since they
do not use phosphors, they cannot suffer image burn-in. LCDs are,
however, susceptible to image persistence.
[23]


The LCD is more energy efficient and offers safer disposal than a
CRT. Its low electrical power consumption enables it to be used in battery-
powered electronic equipment. It is an electronically modulated optical
device made up of any number of segments filled with liquid crystals and
arrayed in front of a light source (backlight) or reflector to produce images
in color or monochrome. Liquid crystals were first developed in 1888.
[24]

By 2008 worldwide sales of televisions with LCD screens exceeded annual
sales of CRT units; the CRT became obsolete for most purposes.

Figure 2.5:5Reflective twisted nematic liquid crystal display

1. Polarizing filter film with a vertical axis to polarize light as it enters.
2. Glass substrate with Indium tin oxide or tin-doped indium oxide (ITO)
electrodes. The shapes of these electrodes will determine the shapes
that will appear when the LCD is turned ON. Vertical ridges etched on
the surface are smooth.
3. Twisted nematic liquid crystal.

22

4. Glass substrate with common electrode film (ITO) with horizontal
ridges to line up with the horizontal filter.
5. Polarizing filter film with a horizontal axis to block/pass light.
6. Reflective surface to send light back to viewer. (In a backlit LCD, this
layer is replaced with a light source.).

2.10 GSM

The Global System for Mobile Communication known as GSM is a
technology that dominated mobile communication industry over the past
decade. GSM originated from Europe and spread into many other countries
to become a popular standard for mobile communication. GSM started
mainly with voice communication, offering few basic services, then data
communication was introduced, but due to slow data rate, it was useful to
very few applications. Research and development brought about the
different evolutions of GSM, namely HSCSD (High Speed Circuit
Switched Data), GPRS (General Packet Radio Service) and EDGE
(Enhanced Data rate for GSM Evolution). Presently, GSM network
operators provide a wide range of services, including many new services
such as web surfing, MMS (Multimedia Messaging Services), and EMS
(Enhanced Messaging Services). There are a lot of useful technological
products developed in the world to make life much easier, products which
are not used by many simply because these are not well known or not
properly understood.
[25]


Public understanding of science and technology is a very important
aspect of our modern world. Scientific discoveries and new technologies
serve the purpose of pushing back the frontiers of human ignorance and
make life and the actual way humans do things much simpler. It is therefore
of little use keeping them in laboratories and libraries alone. Information
on scientific discoveries and new technologies should be disseminated to
the general public so that people can be aware of them and make informed
choices.
[25]





23

2.10.1 GSM demonstration

Many companies invest significant capital in the development of new
technologies, new products or new services, which they have to
commercialize at the end. It is a serious problem for these companies when
the public is not aware of the existence of these new products on the
market, or when the public is not ready to use the new technology.
Therefore educating people about new technologies, their importance and
their use is extremely important for such companies. The quicker people
can be educated about new technologies, the better for themselves, for the
companies developing these technologies, for the government and society
in general.
[25]


2.10.2 GSM Network Infrastructure

The following figure below depicts a typical GSM network (called,
Public Land Mobile Network or PLMN) infrastructure.
[26]



Figure 2.6:6Wireless communications systems and networks


24

Dont need to go in depth of how internal structure of components of
GSM network works because we are only interested in sending SMS
through a mobile, not with which process it will have to go through. GSM
infrastructure is for extra knowledge and to know that how your SMS will
reach the receiver (in this project case the doctor).


Figure 2.7:7Hexa cellular range of BTS based network diagram

The GSM divides the infrastructure into the following three parts.
[26]

Network Switching Subsystems (NSS)
Base Station Subsystem (BSS)
Network Management Subsystem (NMS)

If we count the Mobile Station (MS) or cell-phone is the 4 the
element.
[26]


Any telecommunications network requires some kind of NMS. A
part of NMS is generic for any telecom system. The billing and messaging
are two examples. The core of the NSS is the MSC (Mobile Switching
Center) which is basically a PSTN switch with mobility management
related enhancement/add-on. The BSS is entirely new (compared to PSTN)
that are required for wireless access and mobility. The following sections of
this document provide an overview of the network elements and their
functions. The role of these elements will be clearer as we learn more.
[26]







25

Chapter3: MICROCONTROLLER, ITS
INTERFACES AND PROJECT CIRCUIT

3.1 Microcontroller description (AT89S52)

The AT89S52 is a low-power, high-performance Static 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.
[27]


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.
[27]


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, axis-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.
[27]


When choosing a controller chip for the tracking system, it was
important to consider the functions it would need to perform. The functions
include converting the analog voltages from the sensor circuits into digital
values that can then be compared. The controller also needs the capacity to
handle inputs from the user interface and the outputs to the dc motor control
circuit.

These inputs and Outputs need to be clarified before the controller is
chosen. To handle the analog to digital (A/D) conversions, the control chip
must read four voltage levels simultaneously and continuously. After
researching an appropriate 28control chip, the AT89S52 microcontroller
was found to be the preferred choice as it can perform all required functions

26

using only a single chip. The chip contains an on chip A/D converter,
adequate programmable memory space, ample input and output pins and a
supply voltage of five volts. This powerful 10 MIPS (100 nanosecond
instruction execution) yet easy-to-program (only 77 single word
instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's
powerful architecture into an 40 -pin package and is upwards compatible
with theAT89ASXX , devices and thus providing a seamless migration
path of software code to higher level of hardware integration.

The AT89S52 features a 'C' compiler friendly development
environment, 256 bytes of EEPROM, Self-programming, an ICD, 2
capture/compare/PWM functions, 8 channels of 10-bit Analog-to-Digital
(A/D)converter, the synchronous serial port can be configured as either 3-
wire Serial Peripheral Interface (SPI) or the 2-wire Inter-Integrated Circuit
bus and Enhanced Universal Asynchronous Receiver Transmitter
(EUSART). We will describe about the AT89S52 and at the same time, it
will give more understanding for me to employ this controller. Almost all
type of AT89S microcontroller is included in a class of 8-bit
microcontrollers of RISC architecture. Basically, the AT89S52 architecture
is minimized to be a simpler item but it still operates at the same function.
The Harvard architecture is a newer concept than von-Neumann. It was
designed as a response for the need to speed up the work of a
microcontroller. In Harvard architecture, data bus and address bus are
separate. Thus, the data will flow directly through the central processing
unit and the address bus is neglected. This greater flow of data will impact
for a greater speed of work. Besides that, the architecture will involve for a
small number of a fixed length instruction. It means the instruction is not to
have to be 8-bit words but it can use 14 bits for instructions which allows
for all instruction to be one word instructions.

Microcontrollers with Harvard architecture are called "RISC
microcontrollers". RISC is a short form for Reduced Instruction Set
Computer. Micro controllers with von-Neumann's architecture are called
CISC microcontrollers. CISC is a short form for Complex Instruction Set
Computer. Same as discussion before, RISC microcontroller has a reduced
set of instructions, maybe 35 instructions for one cycle. If we compared it
with Intels and Motorolas microcontroller, it has over hundred
instructions. Simplified point, we can say that the features of
microcontroller are:

1. Separate code and data spaces (Harvard architecture).
2. A small number of fixed length instructions.

27

3. Most instructions are single cycle execution with single delay cycles
upon branches and skips.
4. All RAM locations function as registers as both source and/or
Destination of math and other functions.
5. A hardware stack for storing return addresses.
6. A fairly y small amount of addressable data space (typically 256
bytes), extended through banking.
7. Data space mapped CPU, port and peripheral registers.
8. The program counter is also mapped into the data space and writable.

Microprocessor divides to 6 parts. Those are program memory,
EEPROM, RAM, PORTA and PORTB. AT89S52 has a total of 40 pins.
The program counter is also mapped into the data space and writable. So,
the result for AT89S52 microcontroller reaches of 2:1 in code compression
an in speed in relation to other 8-bit microcontrollers in its class. AT89S52
microprocessor divides to 6 parts. Those are program memory, EEPROM,
RAM, PORTA and PORTB, free-run timer and central processing unit.
Furthermore, AT89S52 (PDIP)will be used in this project as base
controller.

As mentioned in previous paragraph, AT89S52 has a total of 40 pins.
Each pin has its meaning. The program counter is also mapped into the data
space and writable. So, the result for microcontroller reaches of 2:1 in code
compression and 4:1 bit microcontrollers in its class.

The AT89S52 pin no. 40 (VDD), pin no. 31 (VDD), these pins will
be connecting to the 5V voltage. For pin no. 20 pin no. this pin will be
connecting to the ground (GND). For pin no. 18 (OSC1) and pin no. 19
(OSC2), these pins will be connecting to the oscillator. For other pins, we
take point for the input and output. The most important part is how to
program this AT89S52.For program this Microcontroller we used pin no
6,7,8,9,10,11. And program is written in Assembly language.

3.2 Pin configuration of AT89S52

In this Project 8051 series microcontroller will be used. The 8051
series microcontroller we have used as base control is an Atmel corporation
AT89S52 40-Lead PDIP type microcontroller.


28

(a)

(b)

29

(c)
Figure 3.1: 8Pin configuration of microcontroller AT89S52 different versions

30


Figure 3.2: 9Block diagram of AT89S52









31

3.3 Pin Description of AT89S52

3.3.1 V
CC


Supply voltage.
[27]


3.3.2 GND

GND stands for ground. Used to provide a ground.
[27]


3.3.3 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 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.
[27]


3.3.4 Port 1

Port 1 is an 8-bit bidirectional 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. As inputs, Port 1 pins that are externally being Pulled low will
source current (IIL) because of the internal pull-ups. In addition, P1.0 and
P1.1Can 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,
Port 1 also receive s the low-order address bytes during Flash programming
and verification.
[27]


3.3.5 Port 2

Port 2 is an 8-bit bidirectional 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

32

inputs. As inputs, Port 2 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. 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 (MO VX
@DPTR) In this application, Port 2 uses strong internal pull-ups when
emitting 1s. During Accesses to external data memory that uses 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.
[27]


3.3.6 Port 3

Port 3 is an 8-bit bidirectional 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.
[27]


3.3.7 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.
[27]


3.3.8 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-

33

disable bit has no effect if the microcontroller is in external execution
mode.
[27]


3.3.9 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.
[27]


3.3.10 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.
[27]


3.3.11XTAL1

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


3.3.12 XTAL2

Output from the inverting oscillator amplifier.
[27]


3.4 Special Function Registers of AT89S52

A map of the on-chip memory area called the Special Function Register
(SFR) space. Note that not all of the addresses are occupied, and
unoccupied addresses may not be implemented on the chip. Read accesses
to these addresses will in general return random data, and write accesses
will have an indeterminate effect. User software should not write 1s to these
unlisted locations, since they may be used in future products to invoke new

34

features. In that case, the reset or inactive values of the new bits will always
be 0.
[27]


3.4.1 Timer 2 Registers

Control and status bits are contained in registers T2CON and T2MOD
for Timer 2. The register pair (RCAP2H, RCAP2L) is the Capture/Reload
registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode.
[27]


3.4.2 Interrupt Registers

The individual interrupt enable bits are in the IE register. Two priorities
can be set for each of the six interrupt sources in the IP register.
[27]


3.4.3 Dual Data Pointer Registers

To facilitate accessing both internal and external data memory, two
banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address
locations 82H-83H and DP1 at 84H-85H. Bit DPS = 0 in SFR AUXR1
selects DP0 and DPS = 1 selects DP1. The user should always initialize the
DPS bit to the appropriate value before accessing the respective Data
Pointer Register.
[27]


3.4.4 Power off Flag

The Power off Flag (POF) is located at bit 4 (PCON.4) in the PCON
SFR. POF is set to 1 during power up. It can be set and rest under
software control and is not affected by reset.2.2.5 Memory Organization
MCS-51 devices have a separate address space for Program and Data
Memory. Up to 64K bytes each of external Program and Data Memory can
be addressed.
[27]


3.5 Watchdog Timer of AT89S52

(One-time Enabled with Reset-out) The WDT is intended as a recovery
method in situations where the CPU may be subjected to software upsets.
The WDT consists of a 13-bit counter and the Watchdog Timer Reset
(WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To

35

enable the WDT, a user must write 01EH and 0E1H in sequence to the
WDTRST register (SFR location 0A6H). When the WDT is enabled, it will
increment every machine cycle while the oscillator is running. The WDT
timeout period is dependent on the external clock frequency. There is no
way to disable the WDT except through reset (either hardware reset or
WDT overflow reset). When WDT overflows, it will drive an output
RESET HIGH pulse at the RST pin.
[27]


3.5.1 Using the WDT

To enable the WDT, a user must write 01EH and 0E1H in sequence to
the WDTRST register (SFR) location 0A6H). When the WDT is enabled,
the user needs to service it by writing 01EH and 0E1H to WDTRST to
avoid a WDT overflow. The 13-bit counter overflows when it reaches 8191
(1FFFH), and this will reset the device. When the WDT is enabled, it will
increment every machine cycle while the oscillator is running. This means
the user must reset the WDT at least every 8191 machine cycles. To reset
the WDT the user must write 01EH and 0E1H to WDTRST. WDTRST is a
write-only register. The WDT counter cannot be read or written. When
WDT overflows, it will generate an output RESET pulse at the RST pin.
The RESET pulse duration is 96xTOSC, where TOSC=1/FOSC. To make
the best use of the WDT, it should be serviced in those sections of code that
will periodically be executed within the time required to prevent a WDT
reset.
[27]


3.5.2 WDT during Power-down and Idle

Power-down mode the oscillator stops, which means the WDT also
stops. While in Power- down mode, the user does not need to service the
WDT. There are two methods of exiting Power-down mode: by a hardware
reset or via a level-activated external interrupt which is enabled prior to
entering Power-down mode. When Power-down is exited with hardware
reset, servicing the WDT should occur as it normally does whenever the
AT89S52 is reset. Exiting Power-down with an interrupt is significantly
different. The interrupt is held low long enough for the oscillator to
stabilize. When the interrupt is brought high, the interrupt is serviced. To
prevent the WDT from resetting the device while the interrupt pin is held
low, the WDT is not started until the interrupt is pulled high. It is suggested
that the WDT be reset during the interrupt service for the interrupt used to
exit Power-down mode. To ensure that the WDT does not overflow within
a few states of exiting Power-down, it is best to reset the WDT just before

36

entering Power-down mode. Before going into the IDLE mode, the
WDIDLE bit in SFR AUXR is used to determine whether the WDT
continues to count if enabled. The WDT keeps counting during IDLE
(WDIDLE bit = 0) as the default state. To prevent the WDT from resetting
the AT89S52 while in IDLE mode, the user should always set up a timer
that will periodically exit IDLE, service the WDT, and reenter IDLE mode.
With WDIDLE bit enabled, the WDT will stop to count in IDLE mode and
resumes the count upon exit from IDLE.
[27]


3.6 ADC0804 IC

ADC0804 is a very commonly used 8-bit analog to digital convertor.
It is a single channel IC, i.e., it can take only one analog signal as input.
The digital outputs vary from 0 to a maximum of 255. The step size can be
adjusted by setting the reference voltage at pin9. When this pin is not
connected, the default reference voltage is the operating voltage, i.e., Vcc.
The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in
the analog input, the output varies by 1 unit. To set a particular voltage
level as the reference value, this pin is connected to half the voltage. For
example, to set a reference of 4V (Vref), pin9 is connected to 2V (Vref/2),
thereby reducing the step size to 15.62mV (4V/255).
[28]


ADC0804 needs a clock to operate. The time taken to convert the
analog value to digital value is dependent on this clock source. An external
clock can be given at the Clock IN pin. ADC 0804 also has an inbuilt clock
which can be used in absence of external clock. A suitable RC circuit is
connected between the Clock IN and Clock R pins to use the internal
clock.
[28]




37


Figure 3.3:10Pin diagram of ADC0804 IC



Figure 3.4:11Block diagram of ADC0804






38

Pin configuration of ADC0804

Table 3.1:3Table for pin configuration of ADC0804

3.7 Interfacing of microcontroller with ADC0804

ADC0804 is connected as shown in Figure 3.5 and 3.6. Here the
input is taken from a preset input device/sensor, which gives different
analog signals to the ADC. The control pins of the ADC are connected to
the microcontroller AT89S52 (note that in simulation AT89C52 is used,
both AT89C52 and AT89S52 are same just that ones internal structure
operation is CMOS based while the other is Static based).

ADC0804 is a single channel analog to digital convertor i.e., it can
take only one analog signal. An ADC has n bit resolution (binary form)
where n can be 8,10,12,16 or even 24 bits. ADC 0804 has 8 bit resolution.
Pin
No
Function Name
1 Activates ADC; Active low Chip select
2 Input pin; High to low pulse brings the data from
internal registers to the output pins after conversion
Read
3 Input pin; Low to high pulse is given to start the
conversion
Write
4 Clock Input pin; to give external clock. Clock IN
5 Output pin; Goes low when conversion is complete Interrupt
6 Analog non-inverting input Vin(+)
7 Analog inverting Input; normally ground Vin(-)
8 Ground(0V) Analog
Ground
9 Input pin; sets the reference voltage for analog input Vref/2
10 Ground(0V) Digital
Ground
11
8 bit digital output pins
D7
12 D6
13 D5
14 D4
15 D3
16 D2
17 D1
18 D0
19 Used with Clock IN pin when internal clock source is
used
Clock R
20 Supply voltage; 5V Vcc

39

The higher resolution ADC gives smaller step size. Step size is smallest
change that can be measured by an ADC. For an ADC with resolution of 8
bits, the step size is 19.53mV (5V/255).

The time taken by the ADC to convert analog data into digital form is
dependent on the frequency of clock source. ADC0804 can be given clock
from external source. It also has an internal clock. However the conversion
time cannot be more than110us. To use the internal clock a capacitor and
resistor is connected to pin 19 and 4 .The frequency is given by the relation
f= 1/ (1.1RC). The circuit uses a resistance of 10k and a capacitor of 150pF
to generate clock for ADC0804. Vin, which is the input pin, is connected to
a preset to provide analog input.


Figure 3.5:12Diagram of general connections for ADC0804
In the circuit shown in Figure 3.6, microcontroller is used to take
input form ADC0804. CS and RD pin of ADC is directly connected to
ground. The DB port of ADC is connected to P1 of AT89S52 (In case of
simulation AT89C52 was used).

40


Figure 3.6:13Circuit diagram for ADC0804 IC interfacing with microcontroller

3.8 Pin description of ADC0804

3.8.1 CS, Chip Select

This is an active low pin and used to activate the ADC0804.
[29]


3.8.2 RD, Read

This is an input pin and active low. After converting the analog data,
the ADC stores the result in an internal register. This pin is used to get the
data out of the ADC 0804 chip. When CS=0 & high to low pulse is given to
this pin, the digital output is shown on the pins D0-D7.
[29]


41

3.8.3 WR, Write

This is an input pin and active low. This is used to instruct the ADC
to start the conversion process. If CS=0 and WR makes a low to high
transition, the ADC starts the conversion process.
[29]


3.8.4 CLK IN, Clock IN

This is an input pin connected to an external clock source.
[29]


3.8.5 INTR, Interrupt

This is an active low output pin. This pin goes low when the
conversion is over.
[29]


3.8.6 Vin+

Analog Input.
[29]


3.8.7 Vin-

Analog Input. Connected to ground.
[29]


3.8.8 AGND

Analog Ground.
[29]


3.8.9 Vref/2

This pin is used to set the reference voltage. If this is not connected
the default reference voltage is 5V. In some application it is required to
reduce the step size. This can be done by using this pin.
[29]



42

3.8.10 DGND

Digital Ground.
[29]


3.8.11 D7-D0

Output Data Bits (D7-D0).
[29]


3.8.12 CLKR

Clock Reset.
[29]


3.8.12 Vcc

Positive Supply.
[29]


3.9 Description of AT89C2051

The AT89C2051 is a low-voltage, high-performance CMOS 8-bit
microcomputer with 2K Bytes of Flash programmable and erasable read
only memory (PEROM). The device is manufactured using Atmel's high
density nonvolatile memory technology and is compatible with the industry
standard MCS-51TM instruction set. By combining a versatile 8-bit CPU
with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful
microcomputer which provides a highly flexible and cost effective solution
to many embedded control applications.
[30]


The AT89C2051 provides the following standard features: 2K Bytes of
Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five
vector two-level interrupt architecture, a full duplex serial port, a precision
analog comparator, on-chip oscillator and clock circuitry. In addition, the
AT89C2051 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

43

saves the RAM contents but freezes the oscillator disabling all other chip
functions until the next hardware reset.
[30]


3.9.1 Pin Configuration

Figure 3.7:14Pin configuration of AT89C2051

Port 3 also serves the functions of various special features of the
AT89C2051 as listed below:

Table 3.2:4Port 3 also receives some control signals for Flash programming and
verification.
3.10 Interface of LCD with micro controller

A 16x2 LCD means it can display 16 characters per line and there are
2 such lines. In this LCD each character is displayed in 5x7 pixel matrix.
This LCD has two registers.


44

3.10.1 Command/Instruction Register

stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing, clearing
the screen, setting the cursor position, controlling display etc.

3.10.2 Data Register

Stores the data to be displayed on the LCD. The data is the ASCII
value of the character to be displayed on the LCD.

3.10.3 Displaying character on screen

The LCD is interfaced with microcontroller (AT89S52). This
microcontroller has 40 pins with four 8-bit ports (P0, P1, P2, and P3). Here
P2 is used as output port which is connected to data pins of the LCD. The
control pins (pin 4 and 6) are controlled with pins 1 and 0 of P0 port. Pin 3
of LCD can be connected to a 10k potentiometer to adjust the contrast on
LCD screen. In our case we have not used potentiometer thus full contrast
display.

45

(a)
(b)
Figure 3.8:15(a) Circuit diagram of interfacing LCD with micro controller, (b)
project LCD screen

3.11 SIM900(D)

The Module we are using for our project is an ultra compact and
reliable wireless module-SIM900D of SIIMCOM company. This is a
complete Quad-band GSM/GPRS module in a SMT type and designed with
a very powerful single-chip processor integrating AMR926EJ-S core,

46

allowing you to benefit from small dimensions and cost-effective solutions.
Furthermore, SIM900D can be compatible with SIM340DZ.

Featuring an industry-standard interface, the SIM900D delivers
GSM/GPRS 850/900/1800/1900MHz performance for voice, SMS, Data,
and Fax in a small form factor and with low power consumption. With a
tiny configuration of 33mm x 33mm x 3 mm, SIM900D can fit almost all
the space requirements in your M2M applications, especially for slim and
compact demands of design.

3.11.1 General features

1. Quad-Band 850/ 900/ 1800/ 1900 MHz.
2. GPRS multi-slot class 10/8.
3. GPRS mobile station class B.
4. Compliant to GSM phase 2/2+.
a. Class 4 (2 W @850/ 900 MHz).
b. Class 1 (1 W @ 1800/1900MHz).
5. Dimensions: 33*33*3mm .
6. Weight: 6.2g.
7. Control via AT commands (GSM 07.07 ,07.05 and SIMCOM
enhanced AT Commands).
8. SIM application toolkit.
9. Supply voltage range : 3.2 ... 4.8V.
10. Low power consumption: 1.0mA(sleep mode).
11. Operation temperature: -40 C to +85C.

3.11.2 Specifications for Fax

1. Group 3, class 1.

3.11.3 Specifications for Data

1. GPRS class 10: max. 85.6 kbps (downlink).
2. PBCCH support.
3. Coding schemes CS 1, 2, 3, 4.
4. USSD.
5. Non transparent mode.
6. PPP-stack.


47

3.11.4 Software features

1. 0710 MUX protocol.
2. embedded TCP/UDP protocol.
3. FTP/HTTP.

3.11.5 Special firmware

1. FOTA.
2. MMS.
3. Embedded AT.

3.11.6 Specifications for Voice

1. Tricodec.
a. Half rate (HR).
b. Full rate (FR).
c. Enhanced Full rate (EFR)
Hands-free operation
(Echo suppression).
2. AMR.
a. Half rate (HR).
b. Full rate (FR).

3.11.7 Interfaces

1. Interface to external SIM 3V/ 1.8V.
2. analog audio interface.
3. RTC backup.
4. SPI interface (option).
5. Serial interface.
6. Embedded SIM (option ).
7. Antenna pad.
8. GPIO.
9. ADC.
10. Charge interface for Li battery.
11. PWM.


48

3.11.8 Compatibility

1. AT cellular command interface.

3.11.9 Certificates

1. ROHS.
2. REACH.
3. CE.

3.11.10 Carrier Approvals

1. Orange.

3.11.11 Specifications for SMS via GSM/GPRS

1. Point-to-point MO and MT.
2. SMS cell broadcast.
3. Text and PDU mode.


Figure 3.9:16Pre-assembled/Readymade SIM900D module GSM modem with
Antenna

49


Note that it is better to buy a pre-assembled GSM modem with
Sim900Dmodule. Also when buying an antenna make sure it is of good
quality because if it is not then it will cause SMS sending problem.

3.12 Heartbeat sensor of project (LDR)

A Photoresistor or Light Dependent Resistor (LDR) is a resistor
whose resistance decreases with increasing incident light intensity; in other
words, it exhibits photoconductivity.
[32]


A Photoresistor is made of a high resistance semiconductor. If light
falling on the device is of high enough frequency, photons absorbed by the
semiconductor give bound electrons enough energy to jump into the
conduction band. The resulting free electron (and its hole partner) conduct
electricity, thereby lowering resistance.
[32]


A Photoelectric device can be either intrinsic or extrinsic. An
intrinsic semiconductor has its own charge carriers and is not an efficient
semiconductor, e.g. silicon. In intrinsic devices the only available electrons
are in the valence band, and hence the photon must have enough energy to
excite the electron across the entire bandgap. Extrinsic devices have
impurities, also called dopants, added whose ground state energy is closer
to the conduction band; since the electrons do not have as far to jump,
lower energy photons (i.e., longer wavelengths and lower frequencies) are
sufficient to trigger the device. If a sample of silicon has some of its atoms
replaced by phosphorus atoms (impurities), there will be extra electrons
available for conduction. This is an example of an extrinsic semiconductor.
Photoresistors are basically photocells.
[33]



Figure 3.10:17The symbol for a Photoresistor

50


Figure 3.11:18A Light Dependent Resistor (LDR)

3.12.1 Specification and model

There are many types of Photoresistors, with different specifications
and models. Photoresistors can be coated with or packaged in different
materials that vary the resistance, depending on the use for each LDR.
[32]


3.12.2 Applications

Photoresistors come in many different types. Inexpensive cadmium
Sulphide cells can be found in many consumer items such as camera light
meters, street lights, clock radios, alarm devices, outdoor clocks, solar street
lamps and solar road studs etc.
[32]


They are also used in some dynamic compressors together with a
small incandescent lamp or light emitting diode to control gain reduction
and are also used in bed lamps etc.
[32]


Lead Sulphide (PbS) and indium Antimonide (InSb) LDRs (light
dependent resistor) are used for the mid infrared spectral region. Ge:Cu
photoconductors are among the best far-infrared detectors available, and are
used for infrared astronomy and infrared spectroscopy.
[32]







51

3.13 Heat sensor of project,LM35 series (LM35DZ)

3.13.1 General description

The LM35 series are precision integrated-circuit temperature sensors,
whose output voltage is linearly proportional to the Celsius (Centigrade)
temperature. The LM35 thus has an advantage over linear temperature
sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from its output to obtain convenient Centigrade scaling.
The LM35 does not require any external calibration or trimming to provide
typical accuracies of 1/4C at room temperature and 3/4C over a full -55
to +150C temperature range. Low cost is assured by trimming and
calibration at the wafer level. The LM35s low output impedance, linear
output, and precise inherent calibration make interfacing to readout or
control circuitry especially easy. It can be used with single power supplies,
or with plus and minus supplies. As it draws only 60 A from its supply, it
has very low self-heating, less than 0.1C in still air. The LM35 is rated to
operate over a -55 to +150C temperature range, while the LM35C is rated
for a -40 to +110C range (-10 with improved accuracy). The LM35
series is available packaged in hermetic TO-46 transistor packages, while
the LM35C, LM35CA, and LM35D are also available in the plastic TO-92
transistor package. The LM35D is also available in an 8-lead surface mount
small outline package and a plastic TO-220 package.
[34]

LM35CZ-40Cto+110C
LM35DZ 0Cto+100C


Figure 3.12:19LM35DZ IC


52

3.13.2Features

1. Calibrated directly in Celsius (Centigrade).
2. Linear + 10.0 mV/C scale factor.
3. 0.5C accuracy guaranteeable (at +25C).
4. Rated for full -55 to +150C range.
5. Suitable for remote applications.
6. Low cost due to wafer-level trimming.
7. Operates from 4 to 30 volts.
8. Less than 60 A current drain.
9. Low self-heating, 0.08C in still air.
10. Nonlinearity only 1/4C typical.
11. Low impedance output, 0.1 for 1mA load.

3.14 LM358 IC

LM358 IC circuit consists of two independent, high gain, internally
frequency compensated, low power dual Op. Amps. which were designed
specifically to operate from a single power supply over a wide range of
voltages. The low power supply drain is independent of the magnitude of
the power supply voltage.
[35]


Application areas include transducer amplifiers, DC gain blocks and
all the conventional Op.Amp. Circuits which now can be more easily
implemented in single power supply systems. For example, the circuits
can be directly supplied with the standard +5V which is used in logic
systems and will easily provide the required interface electronics without
requiring any additional power supply.
[35]


In the linear mode the input common-mode voltage range includes
ground and the output voltage can also swing to ground, even though
operated from only a single power supply voltage.
[35]







53


Figure 3.13:20LM358P
Remarks :

There are several versions of LM35temperature sensors :
LM35CZ & LM35CAZ (in TO-92 case) ---- 40C to +110C
LM35DZ (in TO-92 case) -------------------- 0 ~ 100
o
C
LM35H & LM35AH (in TO-46 case) -------- 55C to +150C
The one we supply with this project is the -DZ version with
temperature detection range from 0 ~ 100
o
C. to +150C
The one we supply with this project is the -DZ version with
temperature detection range from 0 ~ 100
o
C.


Figure 3.14:21Pin diagram of LM358



54

Calibration:

No special instrument is required. The relay can be set to "trip" (change
state) at any temperature form 0 ~ 100
o
C. For example: To set a 70
o
C trip
point (switchover temperature) :
1. Connect a precision digital volt meter or multimeter across the test
points "TP1" & "GND".
2. Slowly Adjust VR1 until you get an exact reading of 700 mV (or 0.7V)
on your voltmeter or multimeter.

3.14.2 Features

1. Internally frequency compensated.
2. Large dc voltage gain: 100dB.
3. Wide bandwidth (unity gain): 1.1MHz
(temperature compensated).
4. Very low supply current/op (500A) essentially independent of supply
Voltage.
5. Low input bias current: 20nA (temperature compensated).
6. Low input offset voltage: 2mV.
7. Low input offset current: 2nA.
8. Input common-mode voltage range includes ground.
9. Differential input voltage range equal to the power supply voltage.
10. Large output voltage swing 0V to (VCC- 1.5V).


Figure 3.15:22Schematic diagram of LM35

55

For more information about LM35P and other components
mentioned in the thesis of the project, refer to there respective datasheets
that are easily available on internet.

3.15 Microcontroller interfacing and circuit of project

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.

Figure 3.16 shows the block diagram of the proposed device.
Basically, the device consists of a High intensity LED and a High intensity
LDR sensor. The transmitter-sensor pair is clipped on one of the fingers of
the subject/patient. The LED emits High intensity light to the finger of the
subject/patient. The High intensity LDR detects this light beam and
measures the change of blood volume through the finger artery. This signal,
which is in the form of pulses is then conditioned and is fed to a low-cost
microcontroller for analysis and display. The microcontroller counts the
number of pulses over a fixed time interval and thus obtains the heart rate
of the subject. The calculated heart rate is displayed on the LCD in beats-
per-minute with temperature in Celsius.


56


Figure 3.16:23Block diagram of the measuring device

The output of the conditioning circuit was fed to one of the digital
inputs of AT89C2051 type microcontroller. In order to reduce the cost of
the circuit the microcontroller is operated from a 11.0592MHz resonator
which is shared between AT89S52 and AT89C2051 (see Figure 3.17).
AT89S52 microcontroller output ports drive the LCD as shown in
Figure 3.16 and Figure 3.19. The circuit operates when a push-button
connected to P3.3 port pin of the AT89S52 microcontroller is pressed.

The complete interfacing diagram with microcontroller on paper was
drawn initially as we moved on in the project progress. The diagram is
actually a combination of many circuital parts. The LDR and High Intensity
LED circuit is actually taken form internet; LCD interfacing is available on
internet; plus some portions were needed to b set according to its
manufacturers (datasheets). Its better to do it this way because trying to
make all the circuit by yourself, specifically the portions on which work is
already been done is waste of time. In circuit making process internet
played an important in increasing our knowledge about the project for its
making.

57


Figure 3.17:24Complete diagram of the project circuit


58


Figure 3.18:25Left side of the complete project diagram


59


Figure 3.19:26Right side of the complete project diagram




60

3.15.1 LM35P circuitry with heartbeat sensor

The heartbeat sensor is a combination of an High intensity
LDR(photodiode can also be used in place of High intensity LDR but
photodiode will be used in combination with IR diode while High intensity
LDR is used in combination with High intensity LED) and High intensity
visible range LED(IR diode can also be used but IR light is not visible, the
high intensity visible range LED is visible thats why we are using it so that
during the project making we would know if the connections are working).
The diagram of connections is shown below.


Figure 3.20:27LM35P circuitry with heartbeat sensor

The diagram shown above is actually a combination of two diagrams
or circuits that are given in Figure 3.21 and Figure 3.32. The potentiometers
in circuit shown in Figure 3.20 makes it much more simpler and since High
intensity LDR and High intensity visible range LED is used which together
in combination make a very sensitive sensor, in terms of sensing, Thats
why no need to bother with cut-off frequency and two stages high gain. If
you look carefully then you will see that the first Op.Amp. is used as an
amplifier while the second Op.Amp. is used as a comparator since for the

61

microcontroller to count pulses the input must be a pulse thus comparator is
used. Whenever there is a change in blood pressure comparator will provide
an output pulse and that to how much blood pressure change rate the
comparator should respond, Potentiometer is used. Another Potentiometer
is also used with the first Op.Amp. which is used for changing high gain in
range of 100 to 200 times as calculated below:

Vout = R
f min
= 100k= 100 (times gain)
Vin R
i
1k

Vout = R
f max
= 200k = 200 (times gain)
Vin R
i
1k

Since we are using comparator in the new circuit so it is much more
better then the circuit we were using before. Previously (old) circuit we
were using is shown in Figure3.21.


Figure 3.21:28Project initial stage diagram when photodiode and IR diode was
used

At initial stages when we were using the circuit shown in Figure 3.21
(photodiode and IR diode circuit), also called signal conditioning circuit,
consisted of two identical active low pass filters with a cut-off frequency of
about 2.5 Hz (2.34 Hz).


1. Cut-off f of about 2.5 Hz so that the heartbeat could be measured upto
150 bpm.
a. One minute = 60 sec

62

b. For critical patients = 100 bpm or above
c. So for 150 bpm (beats per minute):
Frequency = Beats per cycle = 150 = 2.5 Hz
Seconds in a minute 60

This means the maximum measurable heart rate is about 150 bpm.
The operational amplifier IC used in this circuit is MCP602, a dual
Op.Amp. chip from Microchip. It operates at a single power supply and
provides rail-to-rail output swing. The filtering is necessary to block any
higher frequency noises present in the signal. The gain of each filter stage is
set to 101, giving the total amplification of about 10,000. A 1uF capacitor at
the input of each stage is required to block the dc component in the signal.
The equations for calculating gain and cut-off frequency of the active low
pass filter are shown in the circuit diagram. The two stage amplifier/filter
provides sufficient gain to boost the weak signal coming from the photo
sensor unit and convert it into a pulse. An LED connected at the output
blinks every time a heartbeat is detected. The output from the signal
conditioner goes to the T0CKI input of PIC16F628A.

Later on we decided to switch to Atmel microcontrollers from PIC
microcontrollers. The circuit in Figure3.21 was also called the conditioning
circuit because it involved many processes which was for enhancing the
input signal from finger because in this circuit (shown in Figure 3.21) the
sensor which is a combination of Photodiode and IR LED is used which is
not very sensitive, for which reason we needed to upgrade the design as
quick as possible there for help of internet was taken. Using one of the
similar kind of diagram circuit from internet shown in Figure 3.22 in which
High intensity LDR and High intensity LED was used, we developed our
own circuit (Figure 3.20) using Figure 3.21 and Figure 3.22
[35]
. Notice that
in our new circuit the concept of cut-off frequency is removed also the two
stages high gain is not required as much we needed in case of photodiode
and IR diode. In case of photodiode and IR diode, to make the components
detection more sensitive concept of high gain and cut-off frequency was
involved but in the new circuit the concepts are much less, simpler, easier
and more sensitive (in terms of sensing) components are used. In the new
circuit in Figure 3.20, the two potentiometers make the circuit setting much
easier since they can be changed during the circuit operation. So we can say

63

that circuit in Figure 3.20 is also a conditioning circuit just like our previous
design shown in figure 3.21 which is also a conditioning circuit. Now one
of the basic problem is that how will the microcontroller count the
heartbeat. The signal that is obtained is actually a changing amplitude while
for counting what we require are pulses so if looked carefully at
Figure 3.20, it can be seen that the circuit has a comparator which gives
output in the form of pulse only if there is a change in blood pressure. The
Figure 3.17 and Figure 3.20 circuits in simulation will be discussed in
chapter 4.

(a)

64

(b)
Figure 3.22:29This figure is available on internet, (a) In this picture we only used
the LDR & High intensity LED portion on right in our project for reference
[35]












65

3.16 Sensor Clip

Now after the circuit design, physical designing of the sensor clip
such that it will set on a finger is also an important stage. The pictures
shown in Figure 3.23 below show that which components were used to
make our own custom sensor clip.


Figure 3.23:30Components used in making a sensor clip

To make the sensor first we made holes in a cloth holder clip for the
High intensity LDR and High intensity LED. To make holes we used a
suitable size old screw driver heated it up and then pushed it in the clip
were hole were need to be made. We used an old screw driver because
normally new screw drivers are equipped with a hardened magnetic tip
which upon heating loses its magnetism thus damaging the new screw
driver.


66


Figure 3.24:31Making holes in the clip for sensor components placement

After making holes we placed the components in the holes and used
Rod glue (not over heated to fix and fill up gaps between hole and the
components, then apply Elfy to make it a solid fix. For heat sensor (LM35)
whole can also be made but due to limitation of space in clip we fixed the
heat sensor at the side of the clip using Elfy and bended head of the LM35
inwards and on sides we also used insulator (Polystyrene foam blocks) to
make heat reading accurate further we also placed cotton at the back of
LM35 for further insulation as shown in the Figure 3.25.


Figure 3.25:32Ready clip and placement of finger in the clip

Soldering for connections was done before we fixed the sensors
using a soldering iron of rating 30W, 220V/240V. Soldering for bread
board and for the sensor clip was done by the same soldering iron shown in
Figure 3.26.

67



Figure 3.26:33Soldering iron of rating 30W, 220V/240V

For soldering using soldering iron two materials were required, one
of it is the solder and the second is the separator cream used for soldering in
close/near/narrow places such in case chip holders that are needed to be
soldered on the bread board as shown in Figure 3.27.


Figure 3.27:34Chip holder soldered on the bread board

68


The complete project looks like as shown in Figure 3.28 to 3.30.


Figure 3.28:35Complete project picture with soldering iron

69


Figure 3.29:36Complete project Picture


70


Figure 3.30:37Circuital picture of project, some similarity is found (from
components placement point of view) when this picture is compared with Figure
3.17 to 3.19











71

3.17 Project device source

Since the project device we intended to develop was supposed to be
portable thats why our device runs on both, battery and adapter.


Figure 3.31:389V batteries and variable adapter (rating: 1.5V-12V, 2A)


Figure 3.32:39Device running on battery

72


Figure 3.33:40Device running on adapter

3.18 Project device in operation

When the device is turned ON it displays WELCOME on the
display screen. Finger is placed in the clip and reset button is pressed so
that it may start measuring. After each minute the device will complete its
measurement[Heart rate and temperature in Celsius (
o
C)] and will send it
through GSM modem to the target receiver number. As shown in
Figure 3.34 to 3.36. First of all place a SIM (with balance) in the modem.


Figure 3.34:41Any mobile SIM (with balance) placement in the GSM modem

73

Turn on device and place your finger in the sensor clip.


Figure 3.35:42Turn on device using battery or adapter, place finger in the sensor
clip

Now press the Reset or starting button and wait for one minute. After
one minute readings will be displayed on the LCD screen and the reading
will also be sended to the target mobile SIM number, the number which is
feeded in the program of AT89S52 microcontroller.


Figure 3.36:43Readings after one minute

Note that sending order of readings through GSM is in opposite
order, First Pulse rate (bpm) reading is send and then temperature reading.
This just because in the programming we setted it so to be sended in this
order. It can easily be changed by editing the program.

74

Chapter 4: SIMULATION (PHYSICAL MODELING
AND CODING)

4.1 Introduction (of the project for simulation)

Heart rate measurement indicates the soundness of the human
cardiovascular system. This project demonstrates a technique to measure
the heart rate by sensing the change in blood volume in a finger artery while
the heart is pumping the blood. It consists of a High intensity LED that
transmits a High intensity signal through the fingertip of the subject, a part
of which is reflected by the blood cells. The reflected signal is detected by a
High intensity LDR sensor. The changing blood volume with heartbeat
results in a train of pulses at the output of the LDR, The heart rate and
temperature is displayed on LCD screen and mobile screen through GSM
using SIM900D module based GSM modem. The GSM modem is
interfaced with AT89S52.

4.2 Theory (of the project for simulation)

Heart rate is the number of heartbeats per unit of time and is usually
expressed in beats per minute (bpm). In adults, a normal heartbeats about
60 to 100 times a minute during resting condition. The resting heart rate is
directly related to the health and fitness of a person and hence is important
to know. You can measure heart rate at any spot on the body where you can
feel a pulse with your fingers. The most common places are wrist and neck.

You can count the number of pulses within a certain interval
(say 15 sec minimum), and easily determine the heart rate in bpm. For more
accuracy normally measurement is made for interval of 1 min.

This project describes a microcontroller based heart rate
measurement system that uses optical sensors to measure the alteration in
blood volume at fingertip with each heartbeat. The sensor unit consists of a
High intensity LED and a High intensity LDR, placed side by side. The
High intensity LED transmits a High intensity light into the fingertip
(placed over the sensor unit), and the High intensity LDR senses the portion
of the light that is reflected back. The intensity of reflected light depends
upon the blood volume inside the fingertip. So, each heartbeat slightly
alters the amount of reflected infrared light that can be detected by the High

75

intensity LDR. With a proper signal conditioning, this little change in the
amplitude of the reflected light can be converted into a pulse. The pulses
can be later counted by the microcontroller to determine the heart rate.

4.3 Simulation circuits

Figure 4.1 (a) and (b) show the simulation circuits we made initially
using conditioning circuit given in Figure 3.21. This version of circuit used
seven 7-segment displays of 3 digits and did not included temperature
sensor and GSM system. This simulation was done on Multisim 11.

(a)
(b)
Figure 4.1:44These circuits were made on Multisim 11 at initial stages, this version
(old) of project did not included GSM system and used 7-segment display

76


Later on we switched from Multisim 11 to Proteus 7 Pro. since
Proteus is a much more specific components based circuit simulator. In
other words Proteus is better than Multisim 11 in terms of components
specification. The simulation circuits made on Proteus are shown in Figure
4.2 (a), (b) and (c). Figure 4.2 (a) shows the new complete simulation
circuit of our project. Figure (b) shows the test conditioning circuit. Figure
(c) shows the circuit that is specifically designed for the GSM modem
supply, most of the components in this project circuit operate at +5V but
GSM modem of our circuit operates at 4.1V (operates between 3.2V to
4.8V) therefore we needed to design a circuit that achieves that goal.

(a)

77

(b)


78

(c)
Figure 4.2:45These circuits were made on Proteus 7 Pro., this version (new) of
project included temperature sensor and hypothetical GSM system, and used LCD
display

The simulation circuit shown in Figure 4.2 (a) shows the complete
project circuit but few things have been edited due to Proteus software
limitations. First of all it can be noted in Figure 4.2 (a) and (b) that
heartbeat sensor is not used but instead a sine wave signal is being used in
these circuits. Proteus has a readymade LDR+LED sensor, the amount of
light of LED in this readymade sensor can be changed but the problem is
that it can be changed only in steps in other words it cannot be changed
analogously thus comparator does not gives any output (actually there is an
output but it is so small pulse that human eye cannot detect since the
comparator of this circuit responses only to analogues change which can be
achieved using a sine wave signal which is available in Proteus simulator.
Another difference that can be noted is that across potentiometers in the
circuits has a resistor with a push button in series. This is because some
times during simulation in Proteus the potentiometers do not work properly

79

till they are reseted there for these push buttons are pressed during
simulation. Small resistances are also added with the push buttons because
if small resistance is not added in series with push button then in case when
the potentiometer is the only resistance in the line and push button is
pressed, the push button will short the line and will cause error in
simulation. The GSM system in this simulation is not real and is considered
to be present hypothetically and since data is only needed to be sended to
GSM system therefore it does not cause any problem during simulation.
Note that the GSM system was really tested only on the actual device.

4.4 Coding

4.4.1 AT89S52 coding

DATAADC EQU 35H ;Associate constant value with data label
DATAPR EQU 36H ;Associate constant value with data label
ORG 00H ;Beginning address

MOV P1,#0FFH ;Load P1 with Immediate data FFH
MOV P3,#0FFH ;Load P3 with Immediate data FFH
CLR P3.2 ;Clear P3.2
ACALL DELAY ;Calling Delay subroutine
SETB P3.2 ;Set P3.2
ACALL INITIAL ;Calling Initial subroutine
ACALL INITIAL ;Calling Initial subroutine
ACALL TITLE0 ;CallingTITLE0 subroutine


MOV TMOD,#26H ;Load Timer mode with Immed. data 26H
MOV TH1,#-3 ;Load Timer 1 high byte with Im. data -3
MOV SCON,#50H ;Load Serial control with Immed. data 50H
MOV TH0,#00H ;Clear Timer 0 high byte
SETB TR1 ;Set/start Timer 1

MOV DPTR,#CMGF ;Copy data into 16-bit Data pointer register
ACALL SEND ;Calling SEND subroutine
ACALL DELAY ;Calling DELAY subroutine


;START: JB P3.3,START ;Jump on label if P3.3 is set
;JNB P3.3,$ ;Excluded from program

TYR: MOV R7,#20H ;Load R7 with Immediate data 20H
SETB TR0 ;Set/start Timer 0
DRT: DJNZ R7,TRY ;Decr. & jump on label until R7 becomes 0

80

TRY: LCALL DELAY ;Calling DELAY subroutine
CJNE R7,#00H,DRT ;Compare R7 for 00H & jump if not equal
CLR TR0 ;Clear/stop Timer 0
CLR TF0 ;Clear Timer 0 flag
MOV A,TL0 ;Get copy of count TL0
MOV DATAPR,A ;Associate Acc. value with data label
CLR A ;Clear Accumulator
MOV TL0,A ;Clear Timer 0 low byte












MOV A,P1 ;Load Accumulator with P1 data
MOV DATAADC,A ;Associate Acc. value with data label
ACALL DELAY ;Calling DELAY subroutine
ACALL DELAY ;Calling DELAY subroutine
MOV DPTR,#CMGS ;Copy data into 16-bit Data pointer register
ACALL SEND ;Calling SEND subroutine
ACALL DELAY ;Calling DELAY subroutine
ACALL DELAY ;Calling DELAY subroutine
ACALL DELAY ;Calling DELAY subroutine
MOV DPTR,#TEMP ;Copy data into 16-bit Data pointer register
ACALL SEND ;Calling SEND subroutine
ACALL GSMSEND ;Calling GSMSEND subroutine
SJMP TYR ;Short jump on label TYR




INITIAL:MOV A,#38H ;Load Acc. with Immediate data 38H
ACALL COMNWRT ;Calling LCD command subroutine
LCALL DELAYLCD ;Calling LCD delay subroutine
MOV A,#0EH ;Load Acc. with immediate data 0EH
ACALL COMNWRT ;Calling LCD command subroutine
LCALL DELAYLCD ;Calling LCD delay subroutine
MOV A,#06H ;Load Acc. with Immediate data 06H
ACALL COMNWRT ;Calling LCD command subroutine
RET ;Return to caller


COMNWRT: LCALL DELAYLCD ;Calling LCD delay subroutine
MOV P2,A ;Load P2 with Accumulator data
CLR P0.1 ;Clear P0.1
NOP ;No operation

81

NOP ;No operation
NOP ;No operation
SETB P0.0 ;Make P0.0 high
NOP ;No operation
NOP ;No operation
NOP ;No operation
CLR P0.0 ;Make P0.0 low
RET ;Return to caller

DATAWRT: LCALL DELAYLCD ;Calling LCD delay subroutine
MOV P2,A ;Load P2 with Accumulator data
SETB P0.1 ;Set P0.1
NOP ;No operation
NOP ;No operation
NOP ;No operation
SETB P0.0 ;Set P0.0
NOP ;No operation
NOP ;No operation
NOP ;No operation
CLR P0.0 ;Clear P0.0
RET ;Return to caller

LCD_MSG: CLR A ;Clear Accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
INC DPTR ;Increment Data pointer register
JZ LCD_MSG9 ;Jump on label if Acc. = 00H
CJNE A,#01H,LCD_MSG1 ;Comp. Acc. for 01H & jump if not equal
ACALL COMNWRT ;Calling LCD command subroutine
JMP LCD_MSG
LCD_MSG1: CJNE A,#7FH,SK ;Comp. Acc. for 7FH & jump if not equal
SK: JC LCD_MSG_DATA ;Jump if carry on label
ACALL COMNWRT ;Calling LCD command subroutine
JMP LCD_MSG
LCD_MSG_DATA: ACALL DATAWRT ;Calling LCD data subroutine
JMP LCD_MSG
LCD_MSG9: RET ;Return to caller


TITLE0: MOV DPTR,#MESSAGE0 ;Copy data into 16-bit Data pointer register
ACALL LCD_MSG ;Calling LCD_MSG subroutine
RET ;Return to caller
MESSAGE0: DB 01H,82H,'WELCOME ',00H ;Define byte directive

TITLE1: MOV DPTR,#MESSAGE1 ;Copy data into 16-bit Data pointer register
ACALL LCD_MSG ;Calling LCD_MSG subroutine
RET ;Return to caller
MESSAGE1: DB 01H,80H,'TEMP:',00H ;Define byte directive

TITLE2: MOV DPTR,#MESSAGE2 ;Copy data into 16-bit Data pointer register
ACALL LCD_MSG ;Calling LCD_MSG subroutine
RET ;Return to caller
MESSAGE2: DB 88H,'C',00H ;Define byte directive

82



TITLE3: MOV DPTR,#MESSAGE3 ;Copy data into 16-bit Data pointer register
ACALL LCD_MSG ;Calling LCD_MSG subroutine
RET ;Return to caller
MESSAGE3: DB 0C0H,'PR:',00H ;Define byte directive









GSMSEND:

MOV DPTR,#HUNDRED ;Copy data into 16-bit Data pointer register
MOV A,DATAADC ;Load data in accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL SEND1 ;Calling SEND1subroutine

ACALL TITLE1 ;Calling TITLE1subroutine
MOV DPTR,#HUNDRED ;Copy data into 16-bit Data pointer register
MOV A,DATAADC ;Load data in accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL DATAWRT ;Calling DATAWRT subroutine


MOV DPTR,#TENS ;Copy data into 16-bit Data pointer register
MOV A,DATAADC ;Load data in accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL SEND1 ;Calling SEND1subroutine


MOV DPTR,#TENS ;Copy data into 16-bit Data pointer register
MOV A,DATAADC ;Load data in accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL DATAWRT ;Calling DATAWRT subroutine

MOV DPTR,#ONES ;Copy data into 16-bit Data pointer register
MOV A,DATAADC ;Load data in accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD ;Copy data into 16-bit Data pointer register

83

MOVC A,@A+DPTR ;Move data at A+DPTR into A

ACALL SEND1 ;Calling SEND1subroutine
;MOV A,#26 ;Load Acc. with Immediate data 26
;ACALL SEND1 ;Calling SEND1subroutine
MOV A,#13 ;Load Acc. with Immediate data 13
ACALL SEND1 ;Calling SEND1subroutine
MOV A,#10 ;Load Acc. with Immediate data 10
ACALL SEND1 ;Calling SEND1subroutine

MOV DPTR,#ONES ;Copy data into 16-bit Data pointer register
MOV A,DATAADC
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL DATAWRT ;Calling DATAWRT subroutine
ACALL TITLE2 ;Calling TITLE2subroutine


LCDDATA1:
ACALL TITLE3 ;Calling TITLE3subroutine
MOV DPTR,#PR ;Copy data into 16-bit Data pointer register
ACALL SEND ;Calling SEND subroutine


MOV DPTR,#HUNDRED1 ;Copy data into 16-bit Data pointer register
MOV A,DATAPR
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD1 ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL DATAWRT ;Calling DATAWRT subroutine
ACALL SEND1 ;Calling SEND1subroutine


MOV DPTR,#TENS1 ;Copy data into 16-bit Data pointer register
MOV A,DATAPR
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD1 ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL DATAWRT ;Calling DATAWRT subroutine
ACALL SEND1 ;Calling SEND1subroutine

MOV DPTR,#ONES1 ;Copy data into 16-bit Data pointer register
MOV A,DATAPR
MOVC A,@A+DPTR ;Move data at A+DPTR into A
MOV DPTR,#DATALCD1 ;Copy data into 16-bit Data pointer register
MOVC A,@A+DPTR ;Move data at A+DPTR into A
ACALL DATAWRT ;Calling DATAWRT subroutine

ACALL SEND1 ;Calling SEND1subroutine
MOV A,#26 ;Load Acc. with Immediate data 26
ACALL SEND1 ;Calling SEND1subroutine

84

MOV A,#13 ;Load Acc. with Immediate data 13
ACALL SEND1 ;Calling SEND1subroutine
MOV A,#10 ;Load Acc. with Immediate data 60
ACALL SEND1 ;Calling SEND1subroutine




RET ;Return to caller



ONES:
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0 ;Define byte directive
TENS:
DB 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2
DB 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4
DB 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7
DB 7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9
DB 0 ;Define byte directive
HUNDRED:
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 1 ;Define byte directive
DATALCD:
DB 30H,31H,32H,33H,34H,35H,36H,37H,38H,39H

ONES1:
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4
DB 5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
DB 0,1,2,3,4 ;Define byte directive
TENS1:
DB 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2
DB 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4
DB 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7
DB 7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9
DB 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2
DB 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4

85

DB 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7
DB 7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9
DB 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2
DB 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4
DB 5,5,5,5,5 ;Define byte directive
HUNDRED1:
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DB 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DB 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DB 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DB 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DB 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
DB 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
DB 2,2,2,2,2 ;Define byte directive
DATALCD1:
DB 30H,31H,32H,33H,34H,35H,36H,37H,38H,39H



SEND1:
MOV SBUF,A ;Load SBUF register with Acc. data
JNB TI,$ ;Stay here if TI has no bit
CLR TI ;Clear TI
RET ;Return to caller


SEND:
AGAIN: CLR A ;Clear Accumulator
MOVC A,@A+DPTR ;Move data at A+DPTR into A
JZ ZERO ;Jump on label if Accumulator is 0
INC DPTR ;Increment Data pointer register

ACALL DELAY2 ;Calling DELAY2 subroutine
MOV SBUF,A ;Load SBUF register with Acc. data
JNB TI,$ ;Stay here if TI has no bit
CLR TI ;Clear TI
SJMP AGAIN ;Short jump on label TYR
ZERO: RET ;Return to caller


CMGF:
DB 'AT+CMGF=1',13,10,0 ;Define byte directive

CMGS:
DB 'AT+CMGS="03469000955"',13,10,0
TEMP:
DB 'TEMP:',0 ;Define byte directive
PR:
DB 'PR:',0 ;Define byte directive

86


DELAY2: MOV R3,#3 ;Load R3 with Immediate data 3
BACK51: MOV R1,#100 ;Load R1 with Immediate data 100
BACK41: MOV R6,#100 ;Load R6 with Immediate data 100
DJNZ R6,$ ;Decrement until R6 becomes 0
DJNZ R1,BACK41 ;Decr. & jump on label until R1 becomes 0
DJNZ R3,BACK51 ;Decr. & jump on label until R3 becomes 0
RET ;Return to caller
DELAYLCD: MOV R3,#60 ;Load R3 with Immediate data 60
BACK1: MOV R1,#25 ;Load R1 with Immediate data 25
DJNZ R1,$ ;Decrement until R1 becomes 0
DJNZ R3,BACK1 ;Decr. & jump on label until R3 becomes 0
RET ;Return to caller


DELAY: MOV R3,#7 ;Load R3 with Immediate data 7
BACK5: MOV R1,#200 ;Load R1 with Immediate data 200
BACK4: MOV R6,#222 ;Load R6 with Immediate data 222
DJNZ R6,$ ;Decrement until R6 becomes 0
DJNZ R1,BACK4 ;Decr. & jump on label until R1 becomes 0
DJNZ R3,BACK5 ;Decr. & jump on label until R3 becomes 0
RET ;Return to caller
END ;End of program

4.4.2 AT89C2051 coding

ORG 00 ;Beginning address
CLR P3.0 ;Clear P3.0
SETB P1.2 ;Set P1.2
START: JNB P1.2,START ;Jump on label if P1.2 is clear
SETB P3.0 ;Set P3.0
ACALL DELAY ;Calling DELAY subroutine
CLR P3.0 ;Clear P3.0
SJMP START ;Short jump on label START

DELAY: MOV R3,#5 ;Load R3 with Immediate data 100
BACK5: MOV R1,#200 ;Load R1 with Immediate data 100
BACK4: MOV R6,#150 ;Load R6 with Immediate data 100
DJNZ R6,$ ;Decrement R6 until zero
DJNZ R1,BACK4 ;Decrement and jump R1 until zero
DJNZ R3,BACK5 ;Decrement and jump R3 until zero
RET ;Return to caller
END ;End of program







87

Chapter 5: ANALYSIS AND RESULTS OF
SIMULATION

5.1 Analysis and results

The analysis of the project in simulation on simulator Proteus 7 Pro.
shows that this simulator has some limitation due to which all the parts of
circuit ware not tested on the simulator. Testing the circuit without using a
simulation is a lengthy process but that was the way we chose for testing
those parts that cannot be tested on Proteus. Proteus does not have GSM
modem (SIM900D module based), these two are the only parts that were
not tested on Proteus. Other then this Proteus 7 Pro has some limitations of
its own.


(a)

88

(b)
Figure 5.1:46Complete circuit in running condition

We are not sure why but due to some reason the temperature circuit
portion of the whole circuit did not work properly in Proteus, may be
because it is due to the limitations of Proteus. Practically it worked fine. As
mentioned in previous chapters and topics that this project is a combination
of different projects mixed together with tweaks and add-ons of our own
such as GSM, comparator in conditioning circuit, variable potentiometers
etc. This is one of the reason we dont have complete detail in depth
information about the circuit. The basic goal of our project work was to
make the device much more accurate with add-ons, which we achieved.

5.1.1 Conditioning circuit with heartbeat sensor

The first portion of the project we started with was the conditioning
circuit with the heartbeat sensor. Its analysis and result was done and
obtained by using various analysis and result virtual devices available in
Proteus such as Oscilloscope. Recall discussion about project new
conditioning circuit mentioned in topic 3.15.1, the conditioning circuit has
two Op.Amp.s, the first one is used as amplifier and is also used to half
rectify the signal while the second one is used as a comparator since for the
microcontroller to count pulses the input must be a pulse thus comparator is
used, both have a potentiometer. The potentiometer with the first Op.Amp.
(used as amplifier and rectifier) is used to set the responsive sensitivity of

89

LDR while the second potentiometer which is with comparator is used to
set that for how much blood pressure change rate the comparator should
respond.


Figure 5.2:47Conditioning circuit for heartbeat sensor in simulator

It was already explained previously in topic 4.3 that why High
intensity LDR was not used in simulation. For input signal we used a sine
wave of frequency 1Hz and amplitude of 100mV. An Oscilloscope is added
to the circuit with first Probe A connected to input sine wave signal, the
second Probe B connected to output of amplifier and the third Pore C
connected to the output of the comparator. The change that occurs by
changing comparators potentiometer is shown in Figure 5.3.The use of
Push button with a resistor in series was also explained in Topic 4.3.


90

(a)
(b)

91

(c)
Figure 5.3:48Result on Oscilloscope by increasing value of comparators
potentiometer

The comparator gives no/zero result when comparators
potentiometer is set to below 46%. The first pulse you see here is at 46%
and the last widest pulse is at 86, the value stays high when potentiometer
of comparator is set to above 99%.So it can be seen that by increasing value
of potentiometer, the value of change rate that comparator should respond
to decreases.

Similarly, the response of comparator changes when potentiometer
(first) of amplifier is changed. But this time the sensitivity of High intensity
LDR is changed through potentiometer. In the first case, when we were
changing comparators potentiometer, it had effect on the output of the first
Op. Amp (used as amplifier). Changing amplifier potentiometer has effect
on the output of the comparator since amplifier output is feeded to one of
the inputs of comparator. The first Probe A is connected to input sine wave
signal, the second Probe B is connected to output of amplifier and the third
Pore C is connected to the output of the comparator.


92

(a)
(b)

93

(c)
Figure 5.4:49Result on Oscilloscope by increasing value of amplifiers
potentiometer

Note that the nob settings of the Oscilloscope Probes amplitude is
different in case of previous Figures, since we were specifically interested
in x-axis behavior of the circuit. The actual amplitude levels when signals
are same scaled in Oscilloscope look like as shown in Figure 5.5.

(a)

94

(b)
Figure 5.5:50Actual amplitude levels (same scaled in Oscilloscope) of signals
comparison

5.1.2 Power for GSM modem

The voltage that that the project GSM modem (SIM900D module
based) requires is 3.2V to 4.8V to operate. The project circuit designed has
(other than the +5V rating regulators) an adjustable regulator used to
deliver 4.1V to the GSM modem which was tested in simulation for 4.1V
setting as shown in Figure 5.6.


Figure 5.6:51Circuit for GSM modem (SIM900D module based) voltage supply

95

The simulation circuit in Figure 5.6, which is actually a part of the
whole circuit of the project, is for the voltage supply for the GSM modem
(SIM900D module based). The value for potentiometer (5k) is set to 29%
which is 1.45k. The potentiometer is used as adjusting nob for the
adjustable regulator to adjust output voltage of adjustable regulator.

5.2 Summary

In this project we established both wireless communication between
the patient and the doctor and measurement display on the Display screen
of the device itself. The wireless system of the device will help the doctor
by notifying him, by sending him SMS using GSM modem, if the patient is
in critical state.

5.3 Conclusion

It can be concluded that a low cost microcontroller based portable
device can be made that can measure heart rate through fingertip by using
optical concepts such as reflection of light. And that wireless comm.
between a subject/patient and a doctor can also be established so that the
doctor could monitor the patient wirelessly.

5.4 Future work

The device is still in development for refining its measurement
capability with other features such as the one made in this project,
wirelessly sending measurement data to the doctor.

The previous or old models of this device used concepts of sound
waves reflection, minute level sound detection and electrical flow on
human skin which is in sync with heartbeat of a human.

The latest model of this device uses concept of optics (light rays
reflection) which is the method in such devices because of its accuracy and
performance in all conditions. By condition it means that lets consider we

96

have an electrical sensing based such device for measuring heart rate and
the patient skin is wet and his is in contact with some metal, now that can
cause considerable changes in the results, while the optical based such
device is accurate as well as can work in large range of tough
environmental condition.

Other than this, optical sensors are also in research of using them in
different fields such as in security systems which is another benefit of
developing or working further on this project.




























97

References

[1]
Regulation of Human Heart Rate. Serendip. Retrieved on June 27, 2007.

[2]
Resting Heart Rate, American Heart Association.

[3]
L'quipe, France, 2 July 2004.

[4]
Resting Heart Rate Table at "Top End Sports - The Sport Science Reports website",
date of access 8 July 2012.

[5]
http://www.thelancet.com/journals/lancet/article/PIIS0140-6736%2810%2962226-
X/abstract

[6]
Kolata, Gina (2001-04-24). 'Maximum' Heart Rate Theory Is Challenged. New York
Times.

[7]
Robergs R and Landwehr R (2002). "The Surprising History of the "HRmax=220-
age" Equation" (PDF). Journal of Exercise Physiology 5 (2): 110. ISSN 1097-9751.
Retrieved 4-1-09.

[8]
Age predictive maximum heart rate.

[9]
Gellish, Ronald; Brian Goslin, Ronald Olson, Audry McDonald, Gary Russi, Virinder
Moudgil (May, 2007). "Longitudinal Modeling of the Relationship between Age and
Maximal Heart Rate". Medicine & Science in Sports & Exercise (American College of
Sports Medicine) 39 (5): 822828. doi:10.1097/mss.0b013e31803349c6.
PMID 17468581.

[10]
New formula gives first accurate peak heart rate for women.
http://phys.org/news196962986.html

[11]
http://circ.ahajournals.org/cgi/content/abstract/CIRCULATIONAHA.110.939249v1

[12]
Wohlfart, Bjrn; Farazdaghi GR (2003). "Reference values for the physical work
capacity on a bicycle ergometer for men -- a comparison with a previous study on
women.". Clin Physiol Funct Imaging. 23 (3): 16670. doi:10.1046/j.1475-
097X.2003.00491.x. PMID 12752560.

[13]
Farazdaghi, GR; Wohlfart B (2001). "Reference values for the physical work
capacity on a bicycle ergometer for women between 20 and 80 years of age.". Clin
Physiol 21 (6): 6827. doi:10.1046/j.1365-2281.2001.00373.x. PMID 11722475.


98

[14]
61. Karvonen MJ, Kental E, Mustala O. The effects of on heart rate a longitudinal
study. Ann Med Exp Fenn 1957;35(3):307-15.

[15]
Swain DP. Leutholtz BC, King ME. et al. Relationship between % heart rate reserve
and %VOi reserve in treadmill exercise. Med Sci Sports Exerc 1998;30(2):3 18-21.

[16]
Heart-Rate Recovery Immediately after Exercise as a Predictor of Mortality, Study
by: Christopher R. Cole, M.D., Eugene H. Blackstone, M.D., Fredric J. Pashkow, M.D.,
Claire E. Snader, M.A., and Michael S. Lauer, M.D. ; Art. ref. from the NEJM, Volume
341:1351-October 28, 1357, 1999. Abstract online at
http://content.nejm.org/cgi/content/short/341/18/1351.

[17]
Hydration effects on physiological strain of horses during exercise-heat stress J Appl
Physiol Vol. 84, Issue 6, 2042-2051, June 1998

[18]
"Heart rate, lifespan, and mortality risk" Ageing Research Review 2009;8:52

[19]
"Heartbeat an indicator of disease risk: study" September 1, 2008

[20]
http://en.wikipedia.org/wiki/Light-emitting_diode

[21]
http://www.lights-expert.com/b2b/lighting_bulbs_and_tubes/1/led_lamp_light
emitting_ 7.html

[22]
http://en.wikipedia.org/wiki/Liquid_crystal_display

[23]
"LCD Image Persistence". Fujitsu technical support. Fujitsu. Retrieved December
11, 2011.

[24]
Jonathan W. Steed and Jerry L. Atwood (2009). Supramolecular Chemistry (2nd
ed.). John Wiley and Sons. p. 844. ISBN 978-0-470-51234-0.

[25]
http://libserv5.tut.ac.za:7780/pls/eres/wpg_docload.download_file?p_filename=F134
975979/ ondengue.pdf

[26]
http://www6.conestogac.on.ca/~mkabir/TCOM1010_ConEd_Cellular/Day-
02_GSM%20 Network%20Architecture.pdf

[27]
www.atmel.com/Images/doc1919.pdf

[28]
http://www.engineersgarage.com/electronic-components/adc0804-datasheet

[29]
http://www.engineersgarage.com/microcontroller/8051projects/interface-ADC0804-
AT89C51-circuit

99


[30]
www.atmel.com/images/doc0368.pdf

[31]
http://wm.sim.com/producten.aspx?id=1021

[32]
http://en.wikipedia.org/wiki/Light_Dependent_Resistor

[33]
diffenderfes, robert (2005). electronic devices:system and applications. new delhi:
delimar. pp. 480. ISBN [[Special:BookSources/9768131506851|9768131506851]]

[34]
http://www.atmicroprog.com/download/metrologie/LM35dz.pdf

[35]
http://markmelive.com/ec-projects/biomedical-monitoring-system/

Papers used as reference:

Design and development of a heart rate measuring device using fingertip by Hashem,
M.M.A. Shams, R. Kader, M.A. Sayed, M.A., International conference on computer
and communication engineering, 2010.

Heart rate measurement from the finger using a low cost microcontroller by Dogan
Ibrahim and Kadri Buruncuk.

Related books:

The 8051 Microcontroller And Embedded Systems Using Assembly And C, 2
nd
Edition,
By mazidi.

The 8051 Microcontroller, 4
th
Edition, By Mackenzie.

Microprocessor Architecture, Programming, and Applications With the 8085, By
Ramesh S. Gaonkar.

Control Systems Engineering, 6
th
Edition, By Norman S. Nise.

Digital Fundamentals, 8
th
Edition, By Thomas L Floyd.

Electronic Devices Conventional Current Version, 7
th
Edition, By Thomas L. Floyd.

S-ar putea să vă placă și