You are on page 1of 28

Heartbeat Monitoring System

CHAPTER 1

INTRODUCTION

This chapter gives the brief description about the need for wireless patient monitoring
system and its importance. This chapter also gives the brief description about scope of the
project and design methodology.

Patient Monitoring System is a process where a surgeon can continuously monitor more
than one patient at a time in remote place.

1.1 Proposed Work

Some severe diseases and disorders e.g. heart failure needs close and continual
monitoring procedure after diagnosis, in order to prevent mortality or further damage as
secondary to the mentioned diseases or disorders. Monitoring these types of patients,
usually, occur at hospitals or healthcare centers. Heart arrhythmias for instance, in many
cases, need continual long-term monitoring. However, the patients are often too early
released, owing to need of hospital bed for another patient on the waiting list, who needs
to be hospitalized immediately.

1.2 Scope of the Work


Long waiting time for hospitalization or ambulatory patient monitoring/treatment, are
other well-known issues for both the healthcare institutions and the patients. This project
provides healthcare authorities to maximize the quality and breadth of healthcare services
by controlling costs. As the population increases and demand for services increases, the
ability to maintain the quality and availability of care, while effectively managing
financial and human resources, is achieved by this project. The use of modern
communication technology in this context is the sole decisive factor that makes such
communication system successful.

1.3 Design Methodology

1
Heartbeat Monitoring System

In transmitter circuit the Heat Beat is measured by LED and LDR, then it is applied
to the microcontroller. The Microcontroller maintains the records of the measured
readings. It compares the measured heart beat with the normal readings and checks it is
within the normal range or not. If it is normal, then it keeps record of the same and the
readings in SMS(Short Messaging Service) form to the specified mobile number. The
time specified for sending message is given by the user.

2
Heartbeat Monitoring System

CHAPTER 2

SYSTEM DESCRIPTION

2.1 INTRODUCTION

Embedded systems are one of the emerging technologies which are touching
every nook and corner of the mind. “It is impossible to live without these embedded
gadgets”-says ELECTRONICS magazine. From the above statement, the liveliness of
embedded system can be understood. Data communications is one of the most rapidly
growing commercial market areas today, especially “wireless communications”. In the
past few years, wireless data communications has grown from an obscure and expensive
curiosity into a practical and affordable communication and networking technology.

The convenience of wireless is very appealing as not to deal with running cables
to and from devices in order to interconnect them, and wireless devices can be moved to
any location within the transmission range, while still being able to communicate and
broadcast data. Due to this, it is expected that wireless data communications will become
even more popular and more extensively used in the medical field. Currently the most
popular method of wireless communications is radio frequency transmission. As these
devices have a very low power consumption and power output, perhaps more importantly
devices can achieve good data transmission rates.

2.2 BLOCK DIAGRAM

8-Bit
Sensor GSM
Micro
Module Modem
controller

Transmitter

Block Diagram

3
Heartbeat Monitoring System

In the block diagram shown above, the microcontroller AT89C2051 receives the signal
from the sensors and is transmitted through the transmitter. The receiver then receives the
transmitted signal and is fed to the microcontroller. Microcontroller displays the received
signal. Here AM is used for transmission and reception of signals. The sensors include
temperature sensor and heart beat sensor. LCD display is used for displaying the data.

2.3 HEART BEAT SENSOR

This block is used to sense the heart beat with the help of an LED and an LDR. A
continuous light from the LED should fall on the LDR and the finger of the patient is to
be placed in between the LED and LDR.

The slight variation in the skin due to the heart beat is read by the LDR. The LDR output
is fed to an operational amplifier to the digital level (0 and 5) which is then fed in to the
microcontroller.

2.4 MICROCONTROLLER
The microcontroller AT89S51 is used to get the data from the decoder and send the data
over GSM Network.

2.5 GSM Modem


This GSM-Modem should be a plug and play GSM 900 / GSM 1800 / GSM 1900
modem. A direct and easy integration with RS232 and with in voltage range for the power
supply.

A SIMCOM's GSM/GPRS modem is suitable for the GSM-SMS Transceiver System.


The features of SIMCOM-Modem:
• Triband GSM GPRS modem(EGSM 900/1800/1900 MHz)
• Designed for GPRS, data, fax, SMS and voice applications
• GPRS multi-slot class 10
• GPRS mobile station class B
• Designed for GPRS, data, fax, SMS and voice applications
• Fully compliant with GSM Phase 2/2+ specifications
• Built-in TCP/IP Protocol
• Built-in RTC in the module
• AT Command based

4
Heartbeat Monitoring System

CHAPTER 3

HARDWARE DESCRIPTION

3.1 MICROCONTROLLER

The AT89S51 is a 40 pin DIP, low-voltage, high-performance CMOS 8-bit


microcomputer with 4 Kbytes of flash programmable and erasable read only memory
(PEROM).

3.1.1 Features of AT89S51

• Compatible with MCS-51 Products


• 4 Kbytes of Reprogrammable Flash Memory
• Endurance: 1,000 Write/Erase Cycles
• 2.7 V to 6 V Operating Range
• Fully Static Operation: 0 Hz to 24 MHz
• Two-Level Program Memory Lock
• 128 x 8-Bit Internal RAM
• 32 Programmable I/O Lines
• Two 16-Bit Timer/Counters
• Six Interrupt Sources
• Full Duplex UART Serial Channel
• Watchdog Timer
• Flexible ISP Programming
• Low Power Idle and Power Down Modes

3.1.2 Description

The device is manufactured using Atmel’s high density nonvolatile memory


technology and is compatible with the industry Standard MCS-51 instruction set and pin
out. By combining a versatile 8-bit CPU with flash on a monolithic chip, the Atmel
AT89S51 is a powerful microcomputer which provides a highly flexible and cost
effective solution to many embedded control applications.

5
Heartbeat Monitoring System

3.1.3 Flash Memory

Flash memory is a type of EEPROM, which has a grid of columns and rows with
a cell that has two transistors at each intersection. A thin oxide layer separates the two
transistors from each other. One of the transistor is known as the floating gate and other
as the control gate.

The floating gate’s only link to the row, or ‘word line’, is through the control gate.
As long as this link is in place, the cell has a value of ‘1’. This value can be changed to
‘0’ using the Fowler-Nordheim tunneling process.

Tunneling is used to alter the placement of electrons in the floating gate. An


electrical charge, usually 10-13 volts, is applied to the floating gate. The charge comes
from the column, or bit line, which enters the floating gate and drains to ground. This
charge causes the floating gate transistor to act like an electron gun. The excited electrons
are pushed through and trapped on the other side of the thin oxide layer, giving it a
negative charge. These negatively charged electrons act as a barrier between the control
gate and the floating gate.

A special device called cell sensor monitors the level of the charge passing
through the floating gate. If the flow through the gate is greater than 50 percent of the
charge, it has a value of ‘1’. When the charge passing through the gate drops below the 50
percent threshold, the value changes to ‘0’. A blank EPROM has all of the gates fully
open, giving each cell a value of ‘1’.

The electrons in the cells of a flash memory chip can be returned to the normal ‘1’
state by application of an electric field (a higher-voltage charge). Flash memory uses in-
circuit wiring to apply the electric field to the entire chip or to the predetermined sections
known as blocks. The targeted area of the chip is erased, which can be rewritten. Flash
memory works much faster than traditional EEPROMs because instead of erasing one
byte at a time, it erases a block or the entire chip and then rewrites it.

An ideal memory sub-system is one which has high density, can be read fast and
preserve data in non-volatile condition, and is easy to program/reprogram and cost-
effective. Different memory technologies meet one or more of these requirements very

6
Heartbeat Monitoring System

well, but have certain limitations that prevent the product from becoming a genuine
solution, especially in newer applications.

Flash memory is a non-volatile memory combining the advantages of


EPROM/EEPROM, ROM, and DRAM. There may be differences between the specific
technologies used by different manufacturers but their basic principle is same. For
example, Intel Flash memory use NOR gates, while Samsung memory uses NAND gates.

The technology used by Intel is further classified based on the core memory cell.
The first technology is the original single-bit/cell flash memory which allows a single bit
of information to be stored in each cell (1=erased and 0=programmed).

The second and the most recent technology uses a multi-level cell structure, for
example, Intel Strata Flash memory. This technology allows two bits of information to be
precisely stored in a single transistor. Programming a cell (charge placement) and reading
(sensing) must be precisely controlled in order to have four states within a single
transistor. According to Intel, the multi-level cell flash memory employs a reliable NOR-
based architecture and is ideally suited for high-density applications.

3.1.4 Pin Configuration

Figure 4.1: Pin configuration of AT89S51

3.1.5 Block Diagram

7
Heartbeat Monitoring System

Figure 4.2: Block Diagram of AT89S51

3.1.6 Pin Description of AT89S51

VCC
Supply voltage.

8
Heartbeat Monitoring System

GND
Ground.

Port 0

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

Port 1

Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to P1.7 provides internal
pull-ups. P1.0 and P1.1 requires external pull-ups. P1.0 and P1.1 also serves as the
positive input (AIN0) and negative input (AIN1), respectively, of the on-chip precision
analog comparator. The Port 1 output buffers can sink 20 mA and can drive LED displays
directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2 to
P1.7 are used as inputs and are externally pulled low, they will source current because of
the internal pull-ups. Port 1 also receives code data during Flash programming and
program verification.

Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high
by the internal pull-ups and can be used as inputs. 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 (MOVX
@ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s.

9
Heartbeat Monitoring System

During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2
emits the contents of the P2 Special Function Register.
Port 2 also receives the high-order address bits and some control signals during
Flash programming and verification.

Port 3

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

RST

Reset input. All I/O pins are reset to 1’s as soon as RST goes high. Holding the
RST pin high for two machine cycles, while the oscillator is running will reset the device.
Each machine cycle takes 12 oscillator or clock cycles.

XTAL1

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

10
Heartbeat Monitoring System

XTAL2

Output from the inverting oscillator amplifier.

3.2 HEARTBEAT SENSOR

Heart beat sensor is designed to give digital output of heat beat when a finger is
placed on it. When the heart beat detector is working, the beat LED flashes in unison with
each heart beat. This digital output can be connected to microcontroller directly to
measure the Beats Per Minute (BPM) rate. It works on the principle of light modulation
by blood flow through finger at each pulse.

3.2.1 Features
• Microcontroller based SMD design
• Heat beat indication by LED
• Instant output digital signal for directly connecting to microcontroller
• Compact Size
• Working Voltage +5V DC

3.2.2 Applications
• Digital Heart Rate monitor
• Patient Monitoring System
• Bio-Feedback control of robotics and applications

3.2.3 Using the Sensor


• Connect regulated DC power supply of 5 Volts. Black wire is Ground, Next
middle wire is Brown which is output and Red wire is positive supply. These
wires are also marked on PCB.

11
Heartbeat Monitoring System

• To test sensor you only need power the sensor by connect two wires +5V and
GND. You can leave the output wire as it is. When Beat LED is off the output is
at 0V.
• Put finger on the marked position, and you can view the beat LED blinking on
each heart beat.
• The output is active high for each beat and can be given directly to
microcontroller for
• interfacing applications.

3.2.4 The Working

The sensor consists of a super bright red LED and light detector. The LED needs to be
super bright as the maximum light must pass spread in finger and detected by detector.
Now, when the heart pumps a pulse of blood through the blood vessels, the finger
becomes slightly more opaque and so less light reached the detector. With each heart
pulse the detector signal varies. This variation is converted to electrical pulse. This signal
is amplified and triggered through an amplifier which outputs +5V logic level signal.
The output signal is also indicated by a LED which blinks on each heart beat.

Following figure shows signal of heart beat and sensor signal output graph.
Fig.2 shows actual heart beat received by detector (Yellow) and the trigger point
of sensor (Red) after which the sensor outputs digital signal (Blue) at 5V level.

12
Heartbeat Monitoring System

Fig.3 shows target pulse rates for people aged between 20 and 70. The target
range is the pulse rate needed in order to provide suitable exercise for the heart. For a 25-
year old, this range is about 140-170 beats per minute while for a 60-year old it is
typically between 115 and 140 beats per minute.

13
Heartbeat Monitoring System

3.2.5 Operation
Microcontroller Board:
The board used for the proposed project is a general purpose development board for
89S51 microcontroller. The board contents the components required the microcontroller
properly. The DIO pins of microcontroller are available on the connector.
Microcontroller uses capacitor C1 and resistor R1 for resetting the microcontroller. The
Crystal oscillator used here with 2 capacitors U1,U2 is of 11.0952MHZ. Microcontroller
also checks for data within the range heartbeat(65 to 85 ) and if the condition is not
satisfied takes the appropriate action like sending an SMS.

HEART BEAT SENSOR


The Microcontroller AT89S51 is used to sense the heart Beat.
The Red high intensity light emitted by led initially falls on LDR .This is the condition
where the heartbeat is calibrated to zero using resistor R 16. When a patient places his
finger in between LED and LDR the light is restricted by the finger .The intensity of light
penetration decreases if the blood is pumped into the finger .If the blood is not pumped
then the light intensity is high .This high and low light intensity helps to measure
heartbeat .Actually light falling on LDR cuts due to blood movement .The duration of
light disturbed is measured which gives the time duration of each heart beat pulse ,inverse
of this time gives the heartbeat count per minute .This signal is amplified in two stages
using dual operational amplifiers.R17 resistor is used to adjust the square wave pulse

14
Heartbeat Monitoring System

obtained, C4 is used as feedback capacitor .The output after amplification is obtained at


pin number 7 of OP-AMP and fed to microcontroller.

D 1

+5V
R5 D3

330E
100n

C4

8 4
IC2

7 5
R11

10K
LM 358
220E
R10

3 6

D2
C5
470n

2 1
R12

R17
D1

100K

330E
1K

R16
R13

R18
47K

100K
R15

RED LED
Finger

R14

100K
High Intensity

The heart beat is sensed with help of an LED and LDR arrangement. The LED is a high
intensity type LED. Here the LDR is the sensor. As Sensor, a photo diode or a photo
transistor can be used. The skin may be illuminated with visible (red) or infrared LEDs
using transmitted or reflected light for detection. The very small changes in reflectivity or
in transmittance caused by the varying blood content of human tissue are almost invisible.

Pulse Diagram

15
Heartbeat Monitoring System

The various noise sources may produce disturbance signals with amplitudes equal or even
higher than the amplitude of the pulse signal. Valid pulse measurement therefore requires
extensive preprocessing of the raw signal. The new signal processing approach
presented here combines analog and digital signal processing in a way that, both parts can
be kept simple but in combination, they are very effective in suppressing disturbance
signals.

The setup described here, uses a red LED for transmitted light illumination and a LDR as
detector. With only slight changes in the preamplifier circuit the same hard- and software
could be used with other illumination and detection concepts. The detectors photo
current (AC Part) is converted to voltage and amplified by an operational amplifier
(LM358).

POWER SUPPLY

+12V
+5V

IC1
D1
1 3
C1 LM7805
L1 C2
D2
1000uF/25V 2
1N4007 47uF/16V
230V 1N4007
AC D3

230/0-12V 1N4007
D4

1N4007

Figure 4.14: Power Supply

The 230 V from the ac mains is converted into 12 V by using a step down
transformer. The output of the transformer is converted into dc by the bridge rectifier and
is given to the voltage regulator .The voltage regulator (LM7805) is used to maintain a
constant output voltage of 5 V which is applied to the circuit.

16
Heartbeat Monitoring System

CHAPTER 5

SOFTWARE DESCRIPTION

5.1 FLOWCHART FOR TRANSMITTER


Start

Measure
Heartbeat

Ye Is No
s Send SMS
Normal
No Ye
s

Timer
Expired

The figure shows the software flowchart diagram of the programming. The main program
has two loops one is to check the whether the heartbeat is normal or not, and second loop
is a timer loop, for the timer.
On power ON, the microcontroller reads the pulses on the DIO. The count of pulses in
minute compared with the normal pulse count of a human. If the difference between the
count exceeds, the microcontroller send a SMS to the mobile number provided by the
user.
Similarly, the timer is set for user defined time is fired, the microcontroller sends the last
count or status to the specified mobile number.

17
Wireless Patient Monitoring System

CHAPTER 6

RESULT

The Heartbeat Monitoring System is the part of Patient Monitoring System, can be
extended to measure other parameters of patien like ECG & temperature etc.

Temperature is measured using DS1820, which gives temperature to current


conversions in 200ms and it does not require any external circuitry. Hence it is simple and
easy to measure temperature. This measured temperature is displayed over an LCD
display via microcontroller.

Heart Beat is measured by passing an high intensity red light through a finger
which is collected by LDR, amplified and displayed over an LCD display via
microcontroller.

These two measured parameters are encoded and transmitted via GSM Modem.
On receiving the readings and current status of patient, the doctor can take necessary
actions or suggest his sub-ordinates for the same.

18
Wireless Patient Monitoring System

CHAPTER 7

CONCLUSION

Biomedical engineering (BME) is the application of engineering principles and


techniques to the medical field. It combines the design and problem solving skills of
engineering with medical and biological sciences to improve patient’s health care and the
quality of life of individuals.

A medical device is intended for use in the diagnosis of disease, or in the cure,
treatment, or prevention of diseases.

Thus in Implementation of Wireless Systems for Patient Monitoring System, the


heart beat and body temperature are successfully sensed. Temperature is measured using
DS1820, where it follows on board proprietary temperature measurement technique.
Heart beat is measured using LED, LDR and operational amplifier. Hence both
parameters are displayed on a LCD display. Then both the parameters are transmitted and
displayed in a distant location.

This project will eventually reduce man power in the very near future.

19
Wireless Patient Monitoring System

CHAPTER 8

FUTURE SCOPE

• EEG, ECG and other health parameters can also be monitored.

• Continuous monitoring and future diagnosis can be performed via the same
system (TELEMEDICINE).

• More than a single patient at different places can be monitored using single
system.

20
Wireless Patient Monitoring System

CHAPTER 9

REFERENCES

[1] “THE 8051 MICROCONTROLLER ARCHITECTURE,


PROGRAMMING AND APPLICATIONS”. KENNETH
.J.AYALA (Second Edition).

[2] “THE 8051 MICROCONTROLLER AND EMBEDDED


SYSTEMS” MUHAMMAD ALI M A ZI D I , JANICE
G I L L I S P I E M A ZI D I , ( F o ur t h E d i t i o n ) .

WEBSITES

www.alldatasheets.com
www.atmel.com
www.electronicforu.com
www.8052.com

21
Wireless Patient Monitoring System

CHAPTER 10

APPENDIX

11.1 Pin Details of AT89S51 Port3

Table 11.1: Pin details of AT89S51 Port3

11.2. Pin Description of Heartbeat Monitor Module


Board has 3-pin connector for using the sensor. Details are marked on PCB as below.

Table 11.3: Pin Description of HT12E

22
Wireless Patient Monitoring System

11.3 Specifications of GSM Modem


• Triband GSM GPRS modem(EGSM 900/1800/1900 MHz)
• Designed for GPRS, data, fax, SMS and voice applications
• GPRS multi-slot class 10
• GPRS mobile station class B
• Designed for GPRS, data, fax, SMS and voice applications
• Fully compliant with GSM Phase 2/2+ specifications
• Built-in TCP/IP Protocol
• Built-in RTC in the module
• AT Command based

23
Wireless Patient Monitoring System

Chapter 11

INSTRUCTION SET

24
Wireless Patient Monitoring System

25
Wireless Patient Monitoring System

26
Wireless Patient Monitoring System

27
Wireless Patient Monitoring System

28