bio medical monitoring system

47
DC MOTOR SPEED & DIRECTION CONTROL A Mini project report submitted in partial fulfillment of the requirements for the award of degree of BACHELOR OF TECHNOLOGY in ELECTRONICS AND COMMUNICATION ENGINEERING by B.JAYA SRI DIVYA (08331A0421) G.KANTHI REKHA B.ANUSHA (08331A0449) (08331A0411) A.TEJITHA (08331A0402) Under the esteemed guidance of Smt. G.VIMALA KUMARI, M.Tech. Assistant Professor Department of Electronics and Communication Engineering M.V.G.R. College of Engineering DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING 1

Upload: dilip-kumar-divi

Post on 03-Dec-2014

127 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bio Medical Monitoring System

DC MOTOR SPEED & DIRECTION CONTROL

A Mini project report submitted

in partial fulfillment of the requirements for the award of degree of

BACHELOR OF TECHNOLOGYin

ELECTRONICS AND COMMUNICATION ENGINEERINGby

B.JAYA SRI DIVYA(08331A0421)

G.KANTHI REKHA B.ANUSHA (08331A0449) (08331A0411) A.TEJITHA (08331A0402)

Under the esteemed guidance of Smt. G.VIMALA KUMARI, M.Tech.

Assistant ProfessorDepartment of Electronics and Communication Engineering

M.V.G.R. College of Engineering

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

ENGINEERINGMAHARAJ VIJAYARAM GAJAPATHIRAJ

COLLEGE OF ENGINEERING(Approved by AICTE, New Delhi, Permanently Affiliated to Jawaharlal Nehru

Technological University, Kakinada, Accredited by NBA & NAAC ‘A’ grade by UGC)VIZIANAGARAM

2008-2012

1

Page 2: Bio Medical Monitoring System

DEPARTMENT OF ELECTRONICS AND COMUNICATIONENGINEERING

CERTIFICATE

This is to certify that mini project report entitled “Heartbeat and Temperature

Monitoring System” being submitted by G.Harshini, G.KanthiRekha,

B.Anusha, A.Tejitha bearing Regd. No.s 08331A0447, 08331A0449,

08331A0411, 08331A0402 in partial fulfillment for the award of the degree of

Bachelor of Technology in Electronics and Communication Engineering is a

record of bonafide work done by them under my supervision during the academic

year 2011-2012.

(Project guide) (Head of the Department)

Smt.G.VIMALA KUMARI Sri. R.RAMANA REDDY

Assistant Professor , Professor, Head of the Dept,

Dept. of E.C.E , Dept. of E.C.E ,

M.V.G.R.College of Engineering , M.V.G.R.College of Engineering,Vizianagaram. Vizianagaram.

2

Page 3: Bio Medical Monitoring System

ACKNOWLEDGEMENTS

We wish to express our deep sense of gratitude to Smt G.Vimala Kumari, M.Tech

AssistantProfessor E.C.E Department for her wholehearted co-operation, unfailing inspiration

and valuable guidance. Throughout the project work, her useful suggestions, constant

encouragement has given a right direction and shape to our learning. Really, we are indebted

to her for his excellent and enlightened guidance.

We consider it as privilege to express our deepest gratitude to Sri R.Ramana Reddy,

Professor and Head of the Department for his valuable suggestions and constant motivation

that greatly helped the seminar work to get successfully completed.

We sincerely thank all the members of the staff of the Department of Electronics &

Communication Engineering for their sustained help in our pursuits.

We thank Dr.K.V.L.Raju, Principal, for extending his utmost support and cooperation

in providing all the provisions for the successful completion of the project.

With great solemnity and sincerity, we offer our profuse thanks to our management,

MANSAS for providing all the resources to complete our seminar successfully.

We thank all those who contributed directly or indirectly in successfully carrying out

this work.

G.HARSHINI (08331A0447)

G.KANTHIREKHA (08331A0449)

B.ANUSHA (08331A0411)

A.TEJITHA (08331A0402)

3

Page 4: Bio Medical Monitoring System

ABSTRACT

The diverse fields of electronics and communication have witnessed an unprecedented

growth over the past three decades. The advancements that have been made during these years

resulted in the application of electronics and communication in various walks of life. The usage of

electronic instruments with advanced techniques yields accurate results. One such avenue where

electronic instruments are extensively used is in biomedical instrumentation in hospitals. Various

biomedical instruments are used in hospitals to monitor the health condition of patient regularly.

The readings of instrument like ECG, blood pressure, pulse rate, respiratory system, sugar

etc. should be monitored and when any abnormality occurs in these readings, it should

immediately be taken to notice of the doctor. The quicker the problem of the patient is reported,

the sooner the doctor will attend the patient. Any time lapse leads to graver situations.

Though it sounds fairly simple, numerous drawbacks exist in this phenomenon. Firstly, a

person should constantly monitor the readings. There are the situations where the person does not

observe the readings crossing the safe limit or the threshold. But as soon as he finds that the

readings are not normal or the reading crosses a certain safe limit, then he should report to the

concerned doctor. Inevitably some delay will be there as some time is needed by the person to

report the problem to the doctor. This puts the life of the patient in risk. It is noteworthy that this

is normal procedure that we cross in our daily lives.

For more versatile medical applications, this project can be improvised, by incorporating

blood pressure monitoring systems, dental sensors and annunciation systems, thereby making it

useful in hospitals as a very efficient and dedicated patient care system.

CONTENTS

Chapter Description Pageno

CERTIFICATE

ACKNOWLEDGEMENTS i

ABSTRACT ii

4

Page 5: Bio Medical Monitoring System

CONTENTS iv

LIST OF FIGURES vii

LIST OF APPENDICES viii

1. INTRODUCTION 1

1.1 Measurement of Body Temperature 1

1.2 Heart Beat Monitor system 1

1.3 Block Diagram of Patient Monitoring System 1

1.3.1 Description 1

2. OVERVIEW OF MICRO CONTROLLER 3

2.1 Features 3

2.2 Description 3

2.3 Pin Diagram and Pin Description 4

2.4 Block Diagram 6

2.5 Serial Programming Algorithm 9

3. COMPONENTS USED 10

3.1 LCD (HITACHI 16*2) 11

3.2 Components for power supply circuit 11

3.2.1 LM7805 11

3.3 Components for Heart Beat Monitor system 123.3.1 LDR (Light Dependent Resistor) 12

3.3.2 Differential amplifier (LM358) 13

3.4 Components for temperature measuring system 133.4.1 DS1621 (temperature sensor) 14

4. CIRCUITS AND DESCRIPTION 19

4.1 Power Supply Circuit 19

4.1.1 Filtering Unit 20

4.1.2 Voltage Regulators 20

4.2 Interfacing of LCD with ATMEL89C2051 20

4.3 Heart Beat measuring system 21

4.3.1 Circuit 21

5

Page 6: Bio Medical Monitoring System

4.3.2 Description 21

4.4 Temperature measuring system 22

4.4.1 Circuit 22

4.4.2 Description 23

5. SOFTWARE IMPLEMENTATION 25

5.1 Algorithm 25

5.2 Flow chart 26

FUTURE SCOPE 27 RESULTS 28 CONCLUSION 29

REFERENCES 30

LIST OF FIGURES

Fig no Description pageno

1.1 Basic block diagram 4

2.1 Pin Diagram of AT89C2051 6

2.2 Block Diagram of AT89C2051 8

3.1 Pin diagram of LCD 12

3.2 LM7805 pin assignment 12

3.3 Light dependent resistor 13

3.4 Structure of LDR 13

3.5 Getting data from analog world 16

4.1 Power supply circuit 19

4.2 Interfacing microcontroller with LCD 21

4.3 Heart beat sensor circuit 21

4.4 Temperature measurement system 23

5.1 Flow chart of entire system 27

6

Page 7: Bio Medical Monitoring System

LIST OF APPENDICES

Page

APPENDIX-I Software code 32

APPENDIX-II Datasheets 54

Chapter-1

INTRODUCTION

1.1 Measurement of Body Temperature

7

Page 8: Bio Medical Monitoring System

Temperature of the patient can be measured using a normal temperature sensor like LM35.

This sensor is a passive transducer and its resistance depends on the heat being applied on it. This

sensor produces a temperature equivalent in analog form. As the microcontroller work only on

digital data the analog data must be converted to digital data using an analog to digital converter

(ADC).thus we can provide a particular threshold to the temperature by providing the digital

equivalent of the temperature.

1.2 Heart Beat Monitor system

The patient’s heart beat rate is monitored using a heart beat monitoring circuitry which can

sense the patient’s pulse rate. This circuitry mainly uses LM358 which is a dual differential

amplifier and an LDR (Light Dependent Resister), whose resistance depends on the amount of light

that is induced on it

1.3 Block Diagram of Patient Monitoring System

1.3.1 Description

The major blocks of the system comprises of:

1) Power Supply: The circuit gets energized through this power supply block

2) Sensors: These convert the real time parameters like temperature, humidity, ECG etc into

electrical equivalent.

3) Micro Controller: This unit measures various parameters and sends required signals to LCD unit

and Buzzer unit.

4) LCD: the LCD is used to display various messages and abnormality conditions, various

parameters measured by the micro controller.

5) Buzzer: This is used to alert the user by a beep sound when ever any parameter crosses the safer

limit.

8

Page 9: Bio Medical Monitoring System

Fig 1.1: Basic block diagram

9

Page 10: Bio Medical Monitoring System

Chapter-2

OVERVIEW OF MICRO CONTROLLER

2.1 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

2.2 Description:

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-51 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.

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 saves the RAM contents but freezes the

oscillator disabling all other chip functions until the next hardware reset.

10

Page 11: Bio Medical Monitoring System

2.3 Pin Diagram and Pin Description

Fig 2.1: Pin Diagram of AT89C52

VCC : Supply voltage.

GND: Ground.

Port 1: The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide

internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the

positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision

analog comparator. The Port 1 out-put 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 (IIL)

because of the internal pull-ups. Port 1 also receives code data during Flash programming

and verification.

Port 3: Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pull-

ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is not

accessible as a general-purpose I/O pin. The Port 3 output buffers can sink 20 mA. 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

AT89C2051 as listed below:

11

Page 12: Bio Medical Monitoring System

PORT PIN ALTERNATE FUNCTIONS

P 3.0 RXD (serial input port)

P 3.1 TXD (serial output port)

P 3.2 INT0 (external interrupt 0)

P 3.3 INT1 (external interrupt 1)

P 3.4 T0 (timer 0 external input)

P 3.5 T1 (timer 1 external input)

Port 3 also receives some control signals for Flash programming and verification.

RST: Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST

pin high for two machine cycles while the oscillator is running resets 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.

XTAL2: Output from the inverting oscillator amplifier.

Oscillator Connections:

Note: C1, C2 = 30 pF ± 10 pF for Crystals = 40 pF ± 10 pF for Ceramic Resonators

12

Page 13: Bio Medical Monitoring System

2.4 Block Diagram:

Fig 2.2: Block Diagram of AT89C2051

2.5 Serial Programming Algorithm:

To program the AT89C2051, the following sequence is recommended.

1 Power-up sequence: Apply power between VCC and GND pins Set RST and XTAL1 to GND

2 Set pin RST to “H” Set pin P3.2 to “H”

3 Apply the appropriate combination of “H” or “L” logic levels to pins P3.3, P3.4, P3.5, P3.7 to

select one of the programming operations shown in the PEROM Programming Modes table.

To Program and Verify the Array:

13

Page 14: Bio Medical Monitoring System

4 Apply data for Code byte at location 000H to P1.0 to P1.7.

5 Raise RST to 12V to enable programming.

6 Pulse P3.2 once to program a byte in the PEROM array or the lock bits. The byte-write cycle

is self-timed and typically takes 1.2 ms.

7 To verify the programmed data, lower RST from 12V to logic “H” level and set pins P3.3 to

P3.7 to the appropriate levels. Output data can be read at the port P1 pins.

8 To program a byte at the next address location, pulse XTAL1 pin once to advance the internal

address counter. Apply new data to the port P1 pins.

9 Repeat steps 6 through 8, changing data and advancing the address counter for the entire 2K

bytes array or until the end of the object file is reached.

10 Power-off sequence: set XTAL1 to “L” set RST to “L” Turn VCC power off

Data Polling: The AT89C2051 features Data Polling to indicate the end of a write cycle. During a

write cycle, an attempted read of the last byte written will result in the complement of the writ-ten

data on P1.7. Once the write cycle has been completed, true data is valid on all outputs, and the next

cycle may begin. Data Polling may begin any time after a write cycle has been initiated.

Ready/Busy: The Progress of byte programming can also be monitored by the RDY/BSY output

signal. Pin P3.1 is pulled low after P3.2 goes High during programming to indicate BUSY. P3.1 is

pulled High again when programming is done to indicate READY.

Program Verify: If lock bits LB1 and LB2 have not been programmed code data can be read back

via the data lines for verification:

1 Reset the internal address counter to 000H by bringing RST from “L” to “H”.

2 Apply the appropriate control signals for Read Code data and read the output data at the port

P1 pins.

3 Pulse pin XTAL1 once to advance the internal address counter.

4 Read the next code data byte at the port P1 pins.

5 Repeat steps 3 and 4 until the entire array is read. The lock bits cannot be verified directly.

Verification of the lock bits is achieved by observing that their features are enabled.

Chip Erase: The entire PEROM array (2K bytes) and the two Lock Bits are erased electrically by

using the proper combination of control signals and by holding P3.2 low for 10 ms. The code array

is written with all “1”s in the Chip Erase operation and must be executed before any non-blank

memory byte can be re-programmed.

14

Page 15: Bio Medical Monitoring System

Reading the Signature Bytes: The signature bytes are read by the same procedure as a nor-mal

verification of locations 000H, 001H, and 002H, except that P3.5 and P3.7 must be pulled to a logic

low. The values returned are as follows. (000H) = 1EH indicates manufactured by Atmel (001H) =

21H indicates 89C2051

15

Page 16: Bio Medical Monitoring System

Chapter-3

COMPONENTS USED

3.1 LCD (HITACHI 16*2):

Frequently, an 8052 program must interact with the outside world using input and output

devices that communicate directly with a human being. One of the most common devices attached

to an 8052 is an LCD display. Some of the most common LCDs connected to the 8052 are 16x2

and 20x2 displays. This means 16 characters per line by 2 lines and 20 characters per line by 2

lines, respectively.

The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus.

The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-

bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for

the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control

lines plus the 8 lines for the data bus). The three control lines are referred to as EN, RS, and RW.

The EN line is called "Enable." This control line is used to tell the LCD that you are sending

it data. To send data to the LCD, your program should make sure this line is low (0) and then set the

other two control lines and/or put data on the data bus. When the other lines are completely ready,

16

Page 17: Bio Medical Monitoring System

bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this

varies from LCD to LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a

command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1),

the data being sent is text data which should be displayed on the screen. For example, to display the

letter "T" on the screen you would set RS high.

The RW line is the "Read/Write" control line. When RW is low (0), the information on the

data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or

reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write

commands--so RW will almost always be low.

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected

by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,

DB4, DB5, DB6, and DB7.

3.2 Components for power supply circuit:

The main component that is used in power supply circuit:

LM7805

3.2.1 LM7805

The LM78XX series of three terminal positive regulators are available in the TO-220 package

and with several fixed output voltages, making them useful in a wide range of applications. Each

type employs internal current Limiting, thermal shut down and safe operating area protection,

making it essentially indestructible. If adequate Heat sinking is provided; they can deliver over 1A

output current. Some of the features are:

Output Current up to 1A

Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24

Thermal Overload Protection

Short Circuit Protection

17

Page 18: Bio Medical Monitoring System

Output Transistor Safe Operating Area Protection

3.3 Components for Heart Beat Monitor system:

The main components that are used in heart beat monitoring system are:

LDR(Light Dependent Resistor)

Differential amplifier (LM358)

3.3.1 LDR (Light Dependent Resistor):

LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits.

Normally the resistance of an LDR is very high, sometimes as high as 1000000 ohms, but when

they are illuminated with light resistance drops drastically.

Fig3.3: Light Dependent Resistor

3.3.1.1 Features of the light sensor:

The Light Dependent Resistor (LDR) is made using the semiconductor Cadmium

Sulphide (CdS).

The light falling on the brown zigzag lines on the sensor causes the resistance of the

device to fall. This is known as a negative co-efficient. There are some LDRs that

18

Page 19: Bio Medical Monitoring System

work in the opposite way i.e. their resistance increases with light (called positive

coefficient).

The resistance of the LDR decreases as the intensity of the light falling on it increases.

Incident photons drive electrons from the valence band into the conduction band.

Fig3.4: Structure of Light Dependent Resistor.

3.3.1.2 Functional Description:

An LDR and a normal resistor are wired in series across a voltage. Depending on which is

tied to the 5V and which to 0V, the voltage at the point between them, call it the sensor node,

will either rise or fall with increasing light. If the LDR is the component tied directly to the

5V, the sensor node will increase in voltage with increasing light.

The LDR's resistance can reach 10 k ohms in dark conditions and about 100 ohms in

full brightness

The circuit used for sensing light in our system uses a 10 kΩ fixed resistor which is

tied to +5V. Hence the voltage value in this case decreases with increase in light

intensity.

3.3.2 Differential amplifier (LM358):

The LM358/LM358A, consists of two independent, high gain, internally frequency

compensated operational amplifiers which were designed specifically to operate from a single

power supply over a wide range of voltage. Operation from split power supplies is also possible and

the low power supply current drain is independent of the magnitude of the power supply voltage.

Application areas include transducer amplifier, DC gain blocks and all the conventional OP-AMP

19

Page 20: Bio Medical Monitoring System

circuits which now can be easily implemented in single power supply systems. Some of the features

are:

Internally Frequency Compensated for Unity Gain

Large DC Voltage Gain: 100dB

Wide Power Supply Range:

LM258/LM258A, LM358/LM358A: 3V~32V (or ±1.5V ~ 16V)

Input Common Mode Voltage Range Includes Ground

Large Output Voltage Swing: 0V DC to Vcc -1.5V DC

Power Drain Suitable for Battery Operation.

3.4 Components for temperature measuring system:

The main component for temperature measuring system is:

DS1621(temperature sensor)

3.4.1 DS1621 (temperature sensor)

A) Features:

Temperature measurements require no external components

Measures temperatures from -55°C to +125°C in 0.5°C increments. Fahrenheit

equivalent is -67°F to 257°F in 0.9°F increments

Temperature is read as a 9-bit value (2-byte transfer)

Wide power supply range (2.7V to 5.5V)

Converts temperature to digital word in 1 second

Thermostatic settings are user definable and nonvolatile

Data is read from/written via a 2-wire serial interface (open drain I/O lines)

Applications include thermostatic controls, industrial systems, consumer products,

thermometers, or any thermal sensitive system

8-pin DIP or SO package (150mil and 208mil)

20

Page 21: Bio Medical Monitoring System

B) Description:

The DS1621 Digital Thermometer and Thermostat provides 9-bit temperature readings,

which indicate the temperature of the device. The thermal alarm output, TOUT, is active when the

temperature of the device exceeds a user-defined temperature TH. The output remains active until

the temperature drops below user defined temperature TL, allowing for any hysteresis necessary.

User-defined temperature settings are stored in nonvolatile memory so parts may be

programmed prior to insertion in a system. Temperature settings and temperature readings are all

communicated to/from the DS1621 over a simple 2-wire serial interface.

C) Pin Diagram and Pin Description:

Fig 3.5: Pin Diagram of DS1621

SDA - 2-Wire Serial Data Input/Output

SCL - 2-Wire Serial Clock

GND - Ground

TOUT - Thermostat Output Signal

A0 - Chip Address Input

A1 - Chip Address Input

A2 - Chip Address Input

VDD - Power Supply Voltage

21

Page 22: Bio Medical Monitoring System

Chapter-4

CIRCUITS AND DESCRIPTION

4.1Power Supply Circuit:

Fig 4.1: power supply circuit

4.1.1 Filtering Unit:

Filter circuits which usually capacitor is acting as a surge arrester always follow. This

capacitor is also called as a decoupling capacitor or a bypassing capacitor, is used not only to

‘short’ the ripple with frequency of 100Hz to ground but also to leave the frequency of the DC to

appear at the output. A load resistor R1 is connected so that a reference to the ground is maintained.

1000μf/25v: for the reduction of ripples from the pulsating.

10μf/63v: for maintaining the stability of the voltage at the load side.

O.01μf: for bypassing the high frequency disturbances.

4.1.2 Voltage Regulators:

The primary purpose of a regulator is to aid the rectifier and filter circuit in providing

a constant DC voltage to the device. Power supplies without regulators have an inherent problem

of changing DC voltage values due to variations in the load or due to fluctuations in the AC liner

voltage. With a regulator connected to the DC output, the voltage can be maintained within a close

22

Page 23: Bio Medical Monitoring System

tolerant region of the desired output. IC7805 and IC7905 are used in this project for providing +5v

and -5v DC supply.

4.2 Interfacing of LCD with ATMEL89C52:

This process of interfacing follows certain steps:

resetting the LCD,

initializing the LCD,

sending commands to the LCD,

sending data to the LCD,

sending data as a string

4.3 Heart Beat measuring system:

4.3.1 Circuit:

P1

10

0k

R1

10

0k

P2

10

0k

R2

1k

R3

47

kC

1 4

70n

R4

10

k

C2 100n

L1

FR

1

LE

D1

CQ

X35

A

R5

22

0

8

7

3

2

LM 358

4

5

6

1

A

+5v

FINGER

HEART BEAT MONITOR

Fig 4.2: heart beat sensor circuit

23

Page 24: Bio Medical Monitoring System

4.3.2Description:

In heart beat sensor circuit an operational amplifier is used for the amplification purpose,

also we have an high power LED, which throws light on a LDR(light dependent resistor), used in

this circuit. Initially, when the light falls on LDR it has low resistance value and when the light is

not falling on LDR, it has high resistance value, when the finger is placed in between LED and

LDR, we know our heart pumps the blood, when the blood is coming to the finger the density is

high in the process and hence the light is effected but when the blood goes go back that time the

density is very less and hence light falls clearly on LDR, this feature of light falling and not falling

based on the blood flow every time is amplified by the operational amplifier.

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 phototransistor 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.

The various noise sources may produce disturbance signals with amplitudes equalor even

higher than the amplitude of the pulse signal. Valid pulse measurement thereforerequires 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 disturbancesignals.

The setup described here, uses a red LED for transmitted light illumination and aLDR as

detector. With only slight changes in the preamplifier circuit the same hard- andsoftware 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).

4.4 Temperature measuring system

4.4.1 Circuit:

24

Page 25: Bio Medical Monitoring System

R1

10k

R2

10k

R3

47k

C1

1u

C3 1u

C2 1u

P1 1

0k

L1

DS 1621

1

2

3

4

8

7

6

5

AT89C2051

1

2

3

4

5

6

7

8

9

10 11

12

13

14

15

16

17

18

19

20

1 2 3 4 5 6 11 12 13 14 15 16

16x2 LCD

A

12MHz

+5v

Fig 4.3: temperature measurement system

4.4.2Description:

The major blocks of the temperature measuring system are:

1) Temperature sensor (DS1621)

The microcontroller AT89C2051 is used to sense the heart beat and body

temperature. The temperature was sensed by using a temperature sensor IC DS1621. It has

an in-built temperature sensor circuitry and analog to digital converter. The micro

controller also displays the heart beat and Body temperature on an LCD display. The Body

temperature and heart beat was splitted into nibbles and fed to the encoder IC. The encoder

IC will send the data to the transmitter.

DS 1621 is the temperature sensor. It uses onboard proprietary temperature

measurement technique for temperature measurement. When a patient holds his finger

around DS1621, the temperature is sensed in 200 ms and that temperature is converted into

its equivalent cuurent and fed to the microcontroller. Microcontroller uses program which

25

Page 26: Bio Medical Monitoring System

helps to display the heart beat and temperature over an LCD. LCD displays both

temperature and heart beat in 2 lines. Resistor P1 is used for brightness control of LCD.

Microcontroller uses capacitor C1 and resistor R3 for resetting the microcontroller. The

crystal oscillator used here is of 11.0952 MHZ. Microcontroller also checks for data with the

range heart beat(65 to 85) and temperature(25 to 40C). if the condition is not satisfied the

buzzer of 12v is switched ON using a driver transistor.

 

26

Page 27: Bio Medical Monitoring System

Chapter-5

SOFTWARE IMPLEMENTATION

5.1 Algorithm

STEP 1: Reset the LCD using the subroutine RESETLCD4.

STEP 2: Initialize the LCD using the subroutine LCD_INIT

STEP 3: Now measure the temperature

STEP 4:The measured temperature is in hexa decimal format. Convert that hexa decimal to BCD

format

STEP 5: Now if the temperature is not in between 27 and 40 degrees then alert the system.

STEP 6: If the temperature is within the range then measure the heart beat

STEP 7: If the heart beat is not in between 67 and 80 then alert the system

STEP 8: Now display the heart beat and temperature on LCD

5.2 FLOW CHART

27

Page 28: Bio Medical Monitoring System

28

Page 29: Bio Medical Monitoring System

FUTURE SCOPE

In spite of the improvement of communication link and despite all progress in advanced

communication technologies , There is still very few functioning commercial Wireless

Monitoring Systems, which are most off-line, and there are still a number of issues to deal

with. Therefore, there is a strong need for investigating the possibility of design and

implementation of an interactive real-time wireless communication system. In our project, a

generic real-time wireless communication system was designed and developed for short and

long term remote patient-monitoring applying wireless protocol. The primary function of this

system is to monitor the temperature and Heart Beat of the Patient and the Data collected by

the sensors are sent to the Microcontroller. The Microcontroller transmits the data over the air

and it is decoded and fed to Microcontroller, which is then displayed over the LCD display. If

there is a dangerous change in patient's status an alarm is also sounded.

In this project, only two parameters are monitored and this project can be enhanced to

monitor more parameters with additional changes in hardware and software.

Higher end micro controllers like PIC with some DSPs can be used to improve the processing

capabilities, signal handling capabilities etc.

Other physiological parameters can be measured with an addition of sensors to the

microcontroller.

29

Page 30: Bio Medical Monitoring System

RESULTS

FIG: Showing the Output of Heart Beat Sensor and Input of Microcontroller

30

Page 31: Bio Medical Monitoring System

CONCLUSION

The present trend in automation of every part of life has brought great boom in field of

embedded system .This is our small and sincere attempt to implement our knowledge in electronics

and communication field in embedded system .We had successfully utilized the concepts of digital

communication, linear Integrated chip application, microcontroller in building a Patient Body

Temperature and Heart Beat Monitoring System.

In this system we had successfully embedded the task of acquiring the data from the

sensors and converted them into digital format. This digital data has been sent to he corresponding

micro controller.

The required source code had been implemented in assembly language and KIEL compiler

was used for compiling, debugging and generating required machine code in HEX format, which

was used for the operation of microcontroller.

The system is designed to continuously sense the temperature, heart beat rate and saline

bottle level of a patient and deliver the data for continuous monitoring. In the earlier tests the

system worked well in real time with small errors which are further rectified and the performance

of the system was satisfactory. The results obtained were as per design and the power consumption

level was optimum which made this system portable and handy.

31

Page 32: Bio Medical Monitoring System

REFERENCES

A. TEXT BOOKS

1. BIO-MEDICAL INSTRUMENTATION AND MEASUREMENTS

By L.Cromwell and F.J. Weibell, E.A.Pfeiffer.

2. LINEAR INTEGRATED CIRCUITS By D.Roy Chowdary.

3. THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS

By Mazidi & Mazidi.

B. WEBSITES

1. www.8051forum.com

2. www.efy.com

3. www.alldatasheet.com

32

Page 33: Bio Medical Monitoring System

LIST OF APPENDICES

APPENDIX-I

Software Code

APPENDIX-II

33

Page 34: Bio Medical Monitoring System

34

Page 35: Bio Medical Monitoring System

35

Page 36: Bio Medical Monitoring System

36