magic monitor

Upload: abdul-lateef

Post on 13-Jul-2015

211 views

Category:

Documents


0 download

TRANSCRIPT

MAGIC MONITORBiomedical Engineering Department

INDEXChapter 1 Chapter 2

SUBJECTABSTRACT INTRODUCTION ECG2.1. Introduction 2.2. Medical View 2.3. Electric activity of heart 2.4. Cardiac waveform 2.5. ECG Electrodes 2.6. ECG Leads 2.6.1. Limb Leads 2.6.2. Augmented Leads 2.7. Characteristic of ECG signal 2.8. Specification of ECG signal 2.9. Hardware Implementation 2.9.1. Block Diagram 2.9.2. Sensing Electrodes 2.9.3. Lead Selector 2.9.4. High pass filter 2.9.5. Instrumentation Amplifier 2.9.6. Low Pass Filter 2.9.7. Notch Filter 2.9.8. DC Shift 2.9.9. Microcontroller 2.9.10. PCB Circuit 2.9.11. Our Real Board 2.10. kinds of problems 2.11. ECG signal problems

page6 8 11 12 14 18 22 25 27 28 30 32 33 34 34 34 36 36 37 39 40 40 41 42 44 45 48

1

Chapter 3

BLOOD PRESSURE MONITORING3.1. Introduction and Medical background 3.2. How to measure blood pressure? 3.2.1. The aneroid monitor 3.2.2. The digital Blood pressure monitor 3.2.3. The finger/wrist blood pressure monitors 3.2.4. Using catheters in blood pressure measurement 3.2.5. Why replacing the mercury sphygmomanometers? 3.2.6. Oscillometric methods 3.3. Theory of operation of most pressure devices 3.4. Hardware Implementation 3.4.1. Block Diagram 3.4.2. Pressure Sensor 3.4.3. Hardware Diagram 3.4.4. Hardware Component 3.5. Blood pressure circuit 3.5.1. Simulation circuit 3.5.2. PCP circuits 3.5.3. Our circuit board 3.6. Software Design 3.6.1. Code 3.6.2. Flow chart 3.7. User Manual 3.8. Safety

49 50 53 53 54 54 55 65 57 58 61 61 61 64 66 69 69 76 78 79 79 81 84 86 87 88 89 92 92 92 93 94 95 98 98 99 100 100 101 104 106 107 107 107 108 109 110 110 111 111

Chapter 4

PULSE OXIMETER4.1. Introduction 4.2. What does a pulse oximeter measure? 4.3. The Affecting Factors on Pulse Oximeter Reading 4.3.1. Patient factor 4.3.2. External factor 4.4. Skin Integrity Issues Associated with Pulse Oximetry 4.5. How Can We Calculate SPO2? 4.6. Pulse Oximeter Sensor 4.7. Hardware Implementation 4.7.1. Block Diagram 4.7.2. Simulation Circuit 4.7.3. LED Driving Circuit 4.7.4. Current to voltage converter 4.7.5. Filtration 4.7.6. PCB circuit 4.7.7. Our Real Board 4.8. Software Design 4.8.1. Microcontrooler 4.8.2. Code 4.8.3. Flow chart

Chapter 5

TEMPERATURE5.1. Introduction 5.2. Normal body temperature 5.3. Locations of body temperature measurement 5.3.1. How to take an Oral temperature?

2

5.3.2. How to take a rectal temperature? 5.3.3. How to take an armpit (axillarys) temperature? 5.3.4. How to take an ear temperature? 5.4. Abnormalities in body temperature 5.4.1. Hypothermia 5.4.2. Hyperthermia 5.5. Hardware Implementation 5.5.1. Circuit Diagram 5.5.2. Temperature Sensor 5.5.3. Microcontroller 5.5.4. 7-Segment Display

112 113 113 113 113 115 117 117 118 119 120

Chapter 6

DISPLAYING DATA & PLOTTING SIGNAL6.1. Displaying data 6.1.1. Design of 7-Segments 6.1.2. Concept and visual structure 6.1.3. Programmed 7-Segments 6.1.4. Display data on each module 6.2. Plotting signal 6.2.1. How plotting signal on Graphic LCD? 6.2.2. Circuit of Graphic LCD

121 122 122 123 123 125 126 127 129

Chapter 7

SERIAL COMMUNICATION7.1. Protocol 7.2. RS232 Level Conversion 7.3. PCB Circuit

130 132 133 135 136 137 137 138 139 140 144 145 146 146 147 148 148 149 150 166

Chapter 8

COMPUTER INTERFACE8.1. Display Monitor Data on PC 8.1.1 Read and Display input data 8.1.2. Plot ECG signal 8.2. Send Data to E-Mail 8.3. GUI

Chapter 9

MOBILE TECHNOLOGY9.1. System data flow 9.1.1. Client server protocol 9.1.2. HTTP protocol 9.2. Java Platform, Micro Edition 9.2.1. Mobile devices 9.3. Software Requirements Specification 9.4. Domain Requirements

Chapter 10

DATASHEETS REFERENCES

3

Our Project, MAGIC ICU Monitor, is made to measure and observe different Vital signs using various electronic components in addition to diagnose some cardiovascular diseases by analyzing the data being measured. The aim of this advance ICU monitor is to give physicians in the ICU a pre-idea about diagnosis of the case & suggested emergency required. Our project measure blood pressure, pulse oximeter, human body temperature & detect ECG signal and display all this parameters.

4

There are 4 basic stages in our project ,the Hardware circuits stage , the software stage ,display stage and finally new technology stage (SENDING DATA VIA MAIL & MOBILE).

5

Our Project mainly consists of 5 separate hardware circuits 1. ECG Monitoring 2. Pressure Monitoring 3. Pulse Oximetry 4. Temperature Monitoring 5. Serial Interface each circuit connected to a Microcontroller to be processed ,then to serial circuit which connect modules data to Computer to be displayed and sending to mobile

6

and different mails with the help of a Java implemented program and matlap program ,as shown in the following block diagram :Temp. Circuit Pressure Circuit

SpO2 Circuit ECG Circuit

PCSerial circuit mobile

The development of intensive care units made the care for more seriously sick patients possible. It allowed utilizing more technically oriented tools to monitor and get information instantly about any changes of the patient's physiological parameters and developed new strategies to save life. On the other hand it raised ethical and professional issues related to some patients who had untreatable medical conditions or those who sustained unsalvageable damage to their vital organs. These units are special units where the effort is concentrated in one locality in the hospital and where the care of patients who are deemed recoverable but who need supervision and need or likely to need specialized techniques by skilled personnel. Among this specialized technique we can enumerate continuous artificial ventilation, supporting the circulation, management of chock and respiratory dialysis. The utilization of this unit in the management of critical ill patient improved the outcome by reduction in expected mortality up to 60%. The Units have the following major characteristics: (1) space, equipment and working staff and (2) continuous service and care all around the clock 24 hours including all the following: instantaneous monitoring of cardiovascular parameter, respiratory function, renal function and the nervous system status. These settings are not seen in any other place in the hospital. The patient's categories that can benefit from this unit are 1-Patients of myocardial infarction who usually need continuous cardiovascular monitoring.7

2-Patients who needs artificial ventilation, cardiovascular support 3-Patients with major metabolic disturbances like patient with uncontrolled diabetes mellitus or patient after major abdominal surgeries. 4- Patients with major trauma like patients with head injuries, chest injuries and other multiple injuries. 5-Disaster medicine victims who are affected by multiple injuries. So, what do we get from the ECG and ICU Monitoring? 1. A feedback to control the oxygen supplay To the patient (in our design we will control stepper motor instead of ventilator) 2. Heart rate monitoring To differentiate between several states of different diseases giving wide view of the patient state during time of observation 3. Arrhythmias a. Supraventricular arrhythmias b. Ventricular arrhythmias 4. Disorders in the activation sequence a. Atrioventricular conduction defects (blocks) b. Bundle-branch block c. Wolff-Parkinson-White syndrome 5. Increase in wall thickness or size of the atria and ventricles a. Atrial enlargement (hypertrophy) b. Ventricular enlargement (hypertrophy) 6. Myocardial ischemia and infarction a. Ischemia b. Infraction If a coronary artery is occluded, the transport of oxygen to the cardiac muscle is decreased, causing an oxygen debt in the muscle, which is called ischemia. Ischemia causes changes in the resting potential and in the repolarization of the muscle cells, which is seen as changes in the T-wave. If the oxygen transport is terminated in a certain area, the heart muscle dies in that region. This is called an infarction.8

to doctors

An infarct area is electrically silent since it has lost its excitability. According to the solid angle theorem the loss of this outward dipole is equivalent to an electrical force pointing inward. With this principle it is possible to locate the infarction. (Of course, the infarct region also affects the activation sequence and the volume conductor so the outcome is more complicated.) In our search for the needs of ICU monitors and what biosignals should be in our mind to observe we find this research by the Department of Surgery, Division of Vascular Surgery, Loyola University Medical Center The purpose of this study was to develop criteria by which selected patients can be observed.. From this research we find out what biosignals should be observed And they are: ECG, Heart Rate, Temperature, Blood pressure and SPO2. For our parameters that we manage to detect SPO2, Heart Rate, Temperature and Blood pressure in addition to ECG of course The normal ranges of these parameters are (in case of adult male 180 cm tall, 85 kg weight, and 40 to 45 years old): SPO2 Heart Rate Temperature Blood pressure it should be higher than 90 % from 60 to 100 bpm 37 C ideal case normal range from 36 to 38 C normal range of systolic pressure from 100 to 140 mmHG AND normal range of Diastolic pressure from 70 to 90 mmHG

9

-:Introduction 2.1Electrocardiography or ECG is a important diagnostic tool for Veterinary.Medicine10

.ECGs measure the electrical activity of the heartThe heart shoulders the responsibility for pumping blood throughout the entire human circulatory system. The circulatory system delivers much needed oxygen and nutrients to the organs and tissues of the body, and then returns depleted blood to the heart and the lungs for regeneration. This perpetual cycle represents the scientific essence of human life. On an average day, the heart will "beat", i.e. expand and contract, nearly 100,000 times, while pumping about 2000 gallons of .blood. In a 70-year lifetime, a normal heart will beat more than 2.5 billion times Given the arduous physical demands placed on the human heart, it should come as no surprise that heart disease represents one of society's gravest health risks. Essentially, heart disease is present when the pumping and circulatory functions .described above encounter interference Although heart disease comes in myriad forms, its variations can be grouped into two basic categories. "Congenital" heart disease involves organ defects that are inborn or existent at birth. These defects may impede the flow of blood in the heart or in the vessels near it. Furthermore, the defects may cause blood to flow through the heart in abnormal patterns. "Congestive" heart failure, on the other hand, doesn't necessarily involve inborn organ defects. Rather, this condition is present when the heart's pumping function is restricted by an underlying medical condition that has developed over time, such as clogged arteries or high blood .pressure Congenital and congestive forms of heart disease take an enormous toll on society. As noted previously, the heart's pumping action supplies the body with the oxygen and nutrient-rich blood it needs in order to function properly. Persons plagued by early and middle stage heart disease suffer from a shortage of these life-sustaining elements. Thus, such persons often tend to feel weak, fatigued, .and short of breath As the American Heart Association notes, basic daily activities such as walking, climbing stairs, and carrying groceries can begin to feel like insurmountable tasks .for patients suffering within this category While the productivity and lifestyle-related losses that stem from early and middle stage heart disease are quite substantial, the terrifying impact of this health condition is most clearly illustrated by the experiences of those suffering .at the end-stage of the disease

11

Each year, nearly 1,000,000 people die from complications of cardiovascular disease. Indeed, according to some experts, heart disease kills as many persons as nearly all other causes of death combined. Because of the substantial strain that heart disease places on society, physicians, scientists and policy makers have, for decades, devoted significant amounts of time and resources to combating its effects. Furthermore, numerous health organizations have undertaken efforts to better educate the public about demonstrable linkages between heart disease and personal choices regarding diet and lifestyle. Despite these efforts, however, a large segment of the population lives with hearts that have been severely .damaged by heart disease, and thus face imminent death The first known step, in whatever heart-related problems, is to see the patients Electrocardiograph as a non-invasive inspection tool to notice some of the heart problems such as blocks, fibrillationetc, as will be shown on the text. Before getting deep into the equipment itself it is preferably to know a brief overview .about the heart anatomy and physiology

:Medical Overview 2.2:Location of the heart

12

The heart is located in the chest between the lungs behind the sternum and above the diaphragm. It is surrounded by the pericardium. Its size is about that of a fist, and its weight is about 250-300 g. Located above the heart is the great vessels: the superior and inferior vena cava, the pulmonary artery and vein, as well as the aorta. The aortic arch lies behind the heart. The esophagus and the spine lie .further behind the heart

Anatomy of the heartThe heart is one of the most important organs in the entire human body. It is really nothing more than a pump, composed of muscle which pumps blood throughout the body, beating approximately 72 times per minute of our lives. The heart pumps the blood, which carries all the vital materials which help our bodies function and removes the waste products that we do not need. For example, the brain requires oxygen and glucose, which, if not received continuously, will cause it to loose consciousness. Muscles need oxygen, glucose and amino acids, as well as the proper ratio of sodium, calcium and potassium salts in order to .contract normally

13

The glands need sufficient supplies of raw materials from which to manufacture the specific secretions. If the heart ever ceases to pump blood the body begins to .shut down and after a very short period of time will die Like any other muscle in the human body, it contracts and expands. Unlike skeletal muscles, however, the heart works on the "All -or-Nothing Law". That is, each times the heart contracts it does so with all its force. In skeletal muscles, the principle of "gradation" is present. The pumping of the heart is called the .Cardiac Cycle, which occurs about 72 times per minute

:valves

Heart

the heart are The walls of three layers, made up of while the cavity is divided into four parts. There are two upper chambers, called the right and left atria, and two lower chambers, called the right and left ventricles. The Right Atrium, as it is called, receives blood from the upper and lower body through the superior vena cava and the inferior vena cava, .respectively, and from the heart muscle itself through the coronary sinus The right atrium is the larger of the two atria, having very thin walls. The right atrium opens into the right ventricle through the right atrioventicular valve (tricuspid), which only allows the blood to flow from the atria into the ventricle, but not in the reverse direction. The right ventricle pumps the blood to the lungs .to be reoxygenated The left atrium receives blood from the lungs via the four pulmonary veins. It is smaller than the right atrium, but has thicker walls. The valve between the left atrium and the left ventricle, the left atrioventicular valve (bicuspid), is smaller than the tricuspid. It opens into the left ventricle and again is a one way valve.14

The left ventricle pumps the blood throughout the body. It is the Aorta, the .largest artery in the body, which originates from the left ventricle

as a pump moving The heart works our bodies to nourish blood around in every cell. Used blood, that is blood that has already been to the cells and has given up its nutrients to them, is drawn from the body by the right half of the .heart, and then sent to the lungs to be reoxygenated Blood that has been reoxygenated by the lungs is drawn into the left side of the heart and then pumped into the blood stream. It is the atria that draw the blood .from the lungs and body, and the ventricles that pump it to the lungs and body The output of each ventricle per beat is about 70 ml. In a trained athlete this amount is about double. With the average heart rate of 72 beats per minute the heart will pump about 5 liters per ventricle, or about 10 liters total per minute. This is called the cardiac output. In a trained athlete the total cardiac output is about 20 liters. If we multiply the normal, non-athlete output by the average age of 70 years, we see that the cardiac output of the average human heart over a life .time would be about 1 million liters

15

SystoleThe contraction of the cardiac muscle tissue in the ventricles is called systole. When the ventricles contract, they force the blood from their chambers into the arteries leaving the heart. The left ventricle empties into the aorta and the right ventricle into the pulmonary artery. The increased pressure due to the contraction .of the ventricles is called systolic pressure

DiastoleThe relaxation of the cardiac muscle tissue in the ventricles is called diastole. When the ventricles relax, they make room to accept the blood from the atria. The decreased pressure due to the relaxation of the ventricles is called diastolic .pressure

Electrical activity of the heart 2.3:Cardiac muscle cellEach mechanical heartbeat is triggered by an action potential which originates from a rhythmic pacemaker within the heart and is conducted rapidly throughout16

the organ to produce a coordinated contraction. As with other electrically active tissues (e.g., nerves and skeletal muscle), the myocardial cell at rest has a typical transmembrane potential, Vm, of about 80 to 90 mV with respect to .surrounding extracellular fluid The cell membrane controls permeability to a number of ions, including sodium, potassium, calcium, and chloride. These ions pass across the membrane through specific ion channels that can open (become activated) and close (become inactivated). These channels are therefore said to be gated channels and their opening and closing can occur in response to voltage changes (voltage gated .(channels) or through the activation of receptors (receptor gated channels The variation of membrane conductance due to the opening and closing of ion .channels generates changes in the transmembrane (action) potential over time When cardiac cells are depolarized to a threshold voltage of about 70 mV (e.g., by another conducted action potential), there is a rapid depolarization that is .caused by a transient increase in fast sodium channel conductance Then there is an initial repolarization that is caused by the opening of a .potassium channel After that there is an approximate balance between inward-going calcium current and outward-going potassium current, causing a plateau in the action potential .and a delay in repolarization This inward calcium movement is through long-lasting calcium channels that .open up when the membrane potential depolarizes to about 40 mV Repolarization is a complex process and several mechanisms are thought to be important. The potassium conductance increases, tending to repolarize the cell via a potassium-mediated outward current. In addition, there is a time-dependent .decrease in calcium conductivity which also contributes to cellular repolarization Finally, the resting condition is characterized by open potassium channels and the .negative transmembrane potential

17

The Conduction System of the HeartLocated in the right atrium at the superior vena cava is the sinus node (sinoatrial or SA node) which consists of specialized muscle cells. The SA nodal cells are self-excitatory, pacemaker cells. They generate an action potential at the rate of (about 60 to 100 beats per minute), from the sinus node, activation propagates throughout the atria, but cannot propagate directly across the boundary between atria and ventricles . The atrioventricular node (AV node) is located at the boundary between the atria and ventricles; it has an intrinsic frequency of (about 40 to 50 beats per minute). However, if the AV node is triggered with a higher pulse frequency, it follows this higher frequency. In a normal heart, the AV node provides the only conducting path from the atria to the ventricles. Thus, under normal conditions, .the latter can be excited only by pulses that propagate through it Propagation from the AV node to the ventricles is provided by a specialized conduction system. Proximally, this system is composed of a common bundle, called the bundle of His. More distally, it separates into two bundle branches propagating along each side of the septum, constituting the right and left bundle branches. (The left bundle subsequently divides into an anterior and posterior branch.) Even more distally the bundles ramify into Purkinje fibers that diverge .to the inner sides of the ventricular walls Propagation along the conduction system takes place at a relatively high speed once it is within the ventricular region, but prior to this (through the AV node) .the velocity is extremely slow

18

From the inner side of the ventricular wall, the many activation sites cause the formation of a wavefront which propagates through the ventricular mass toward .the outer wall This process results from cell-to-cell activation. After each ventricular muscle region has depolarized, repolarization occurs. Repolarization is not a propagating phenomenon, and because the duration of the action impulse is much shorter at the epicardium (the outer side of the cardiac muscle) than at the endocardium (the inner side of the cardiac muscle), the termination of activity appears as if it .were propagating from epicardium toward the endocardium

Location in the heart

Event

Time [[ms

-ECG Conduction terminology velocity [[m/s

Intrinsic frequency [[1/min

19

SA node atrium, Right Left AV node

impulse generated (* depolarization depolarization arrival of impulse bundle of His departure of bundle impulse branches activated Purkinje fibers activated endocardium activated Septum Left ventricle depolarization depolarization epicardium Left ventricle depolarization Right depolarization ventricle repolarization epicardium repolarization Left ventricle Right repolarization ventricle endocardium Left ventricle

0 5 85 50 125 130 145 150 175 190 225 250 400

P P P-Q interval

0.05 0.8-1.0 0.8-1.0 0.02-0.05 1.0-1.5 1.0-1.5 3.0-3.5 (axial) 0.3 0.8 (transverse)

70-80

20-40

QRS

600 T

0.5

:(Cardiac

Waveform (electrocardiogram 2.420

An electrocardiogram abbreviated as EKG or ECG is a test that measures the electrical activity of the heartbeat. With each beat, an electrical impulse (or wave) travels through the heart. This wave causes the muscle to squeeze and pump blood from the heart. A normal heartbeat on ECG will show the timing of .the top and lower chambers The right and left atria or upper chambers make the first wave called a P wave" following a flat line when the electrical impulse goes to the bottom chambers. The right and left bottom chambers or ventricles make the next wave called a QRS complex." The final wave or T wave represents electrical .recovery or return to a resting state for the ventricles

:P WaveThe sinoatrial node initiates atrial depolarization, producing the P wave on the electrocardiogram. Although the atria are anatomically two distinct chambers, electrically they act almost as one. They have relatively little muscle and generate a single, small P wave. P wave amplitude rarely (2.5 mm) (0.25 mV). The .(duration of the P wave should not exceed (0.12 s

21

:PR intervalAfter the P wave there is a brief return to the isoelectric line, resulting in the PR segment. During this time the electrical impulse is conducted through the atrioventricular node, the bundle of His and bundle branches, and the Purkinje .fibres The PR interval is the time between the onset of atrial depolarization and the onset of ventricular depolarization, and it is measured from the beginning of the P wave to the first deflection of the QRS complex, whether this is a Q wave or an .(R wave. The normal duration of the PR interval is (0.120.20 s

:QRS complexThe QRS complex represents the electrical forces generated by ventricular depolarization. With normal intraventricular conduction, depolarization occurs in an efficient, rapid fashion. The duration of the QRS complex is measured in the .(lead with the widest complex and should not exceed (0.10 s

:ST segmentThe isoelectric period (ST segment) It starts at the J point (junction between the .QRS complex and ST segment) and ends at the beginning of the T wave

22

The ST segment is important in the diagnosis of ventricular ischemia or hypoxia because under those conditions, the ST segment can become either depressed or .elevated (It has duration of 0.08 to 0.12 sec (80 to 120 ms .

:T WaveThe T wave represents ventricular repolarization and is longer in duration than .depolarization The T wave should generally be at least 1/8 but less than 2/3 of the amplitude of .the corresponding R wave; T wave amplitude rarely exceeds 10 mm

Interval: T QThe QT interval is measured from the beginning of the QRS complex to the end of the T wave. A normal QT interval is usually about 0.40 seconds. The QT interval as well as the corrected QT interval is important in the diagnosis of long .QT syndrome and short QT syndrome The Q-T interval represents the time for both ventricular depolarization and repolarization to occur and therefore roughly estimates the duration of an average ventricular action potential The QT interval varies based on the heart rate, and various correction factors .have been developed to correct the QT interval for the heart rate23

The most commonly used method for correcting the QT interval for rate is the : one formulated by Bazett Bazett's formula is .(QTc): QTc = QT/RR (seconds)

:The U WaveAnother wave -the U wave - is recorded immediately following the T wave and before the P wave. The U wave remains rather mysterious but is thought to represent a final stage of repolarization of unique ventricular cells in the midmyocardium. The U wave will most often orient in the same direction as the T wave with amplitude less than 2 mm

:ECG Electrode 2.5The basic function of the electrodes is to convert a physical parameter into an electrical output. It is necessary to remember that the metal in the electrodes is not responsible for conducting the electrical changes in the body; hence the .electrodes must have a transducer The function of the transducer is to convert biological information into a quantifiable electrical signal. This transducer interface is provided using an electrode-electrolyte interface. There is also another interface with the skin involved in the acquisition of the bio-potential. The skin has three layer: Epidermis (This is the top layer of the skin which is actually dead cells from the layer below), Dermis and the Subcutaneous Layers. Since the epidermis makes contact with the Electrodes it is the only layer of interest when looking at the .acquisition of Bio-Potentials

24

To understand the underlying problems with Bio-Potential electrodes it is necessary to obtain an electrical model of the contact between the electrodes and the skin.

Having obtained the electrical model of the interface between the skin and the electrode it is possible to see the problems that can occur. If the patient moves and then the electrode moves the charge distribution changes and the ECG signal is messed up. If this happen the measurement gets corrupted and the patient could die.

The silver/silver chloride (Ag/AgCl) electrode is electrochemically stable and is thus most widely used. An electrode is usually constructed by elec-trolyzing a

25

silver plate as an anode in an aqueous solution of sodium chloride to form a film of AgCl on the surface of the silver. The reaction is Ag + Cl AgCl + e. Often a transparent electrolyte gel containing chloride ions as the principle anion is used. The gel also allows for good contact between the skinelectrode interfaces.

.A typical surface electrode used for ECG recording is made of Ag/AgCl (The electrodes are attached to the patients skin and can be easily removed

2.6 ECG leadsThe word lead has two meanings in electrocardiography: it refers to either the wire that connects an electrode to the electrocardiograph, or (more commonly) to a combination of electrodes that form an imaginary line in the body along which the electrical signals are measured.. In fact, a 12 lead electrocardiograph usually only uses 10 wires/electrodes.

26

A lead records the electrical signals of the heart from a particular combination of recording electrodes which are placed at specific points on the patient's body. When a depolarization wavefront (or mean electrical vector) moves toward a positive electrode, it creates a positive deflection on the ECG in the corresponding lead.

When a depolarization wavefront (or mean electrical vector) moves away from a positive electrode, it creates a negative deflection on the ECG in the corresponding lead.

When a depolarization wavefront (or mean electrical vector) moves perpendicular to a positive electrode, it creates an equiphasic (or isoelectric) complex on the ECG. It will be positive as the depolarization wavefront (or mean electrical vector) approaches (A), and then become negative as it passes by (B).

There are two types of leadsunipolar and bipolar. The former have an indifferent electrode at the center of the Einthovens triangle at zero potential. The direction of these leads is from the center of the heart radially outward and includes the precordial (chest) leads and limb leads VL, VR, & VF.

27

2.6.1 Limb lead:Leads I, II and III are the so-called limb leads because at one time, the subjects of electrocardiography had to literally place their arms and legs in buckets of salt water in order to obtain signals for Einthovens string galvanometer. they form the basis of what is known as Einthovens triangle.[3] Eventually, electrodes were invented that could be placed directly on the patients skin. Even though the buckets of salt water are no longer necessary, the electrodes are still placed on the patients arms and legs to approximate the signals obtained with the buckets of salt water. They remain the first three leads of the modern 12 lead ECG.

Lead I is a dipole with the negative (white) electrode on the right arm and the positive (black) electrode on the left arm.

28

Lead II is a dipole with the negative (white) electrode on the right arm and the positive (red) electrode on the left leg.

Lead III is a dipole with the negative (black) electrode on the left arm and the positive (red) electrode on the left leg.

2.6.2 Augmented limb leads:Leads aVR , aVL, and aVF are augmented limb leads. They are derived from the same three electrodes as leads I, II, and III. However, they view the heart from different angles (or vectors) because the negative electrode for these leads is a modification of Wilson's central terminal, which is derived by adding leads I, II, and III together and plugging them into the negative terminal of the EKG machine.

29

Lead aVR or "augmented vector right" has the positive electrode (white) on the right arm. The negative electrode is a combination of the left arm (black) electrode and the left leg (red) electrode, which "augments" the signal strength of the positive electrode on the right arm.

Lead aVL or "augmented vector left" has the positive (black) electrode on the left arm. The negative electrode is a combination of the right arm (white) electrode and the left leg (red) electrode, which "augments" the signal strength of the positive electrode on the left arm.

Lead aVF or "augmented vector foot" has the positive (red) electrode on the left leg. The negative electrode is a combination of the right arm (white) electrode and the left arm (black) electrode, which "augments" the signal of the positive electrode on the left leg.

30

The augmented limb leads aVR, aVL, and aVF are amplified in this way because the signal is too small to be useful when the negative electrode is Wilson's central terminal. Together with leads I, II, and III, augmented limb leads aVR, aVL, and aVF form the basis of the hexaxial reference system, which is used to calculate the heart's electrical axis in the frontal plane.

2.7 ECG Signal Characteristics:The amplitude of the ECG signal as measured on the skin ranges from 0.1 mV to 4 mV. The frequency extends from 0.05 Hz to 150 Hz. Physiological signals like the ECG differ from artificial signals in that they are not reproducible from one time segment to another. They are more statistical in nature and have larger variations in signal characteristics than, say, a signal generator output. The human body acts like the midpoint of a capacitive divider between one or more power lines and ground. Thus, common-mode voltages as high as 20V p-p can be superimposed on the body. Eliminating this source of noise is one of the major tasks of an ECG amplifier. Fortunately, the ECG signals are differential signals while the power line voltages are common-mode, so the noise can be reduced with differential amplifiers.

31

In emergencies when the heart stops beating ventricular fibrillation), a commonly used procedure is to apply a voltage pulse of about 5 kV p-p with a 5-ms duration to synchronize the neural stimulus of the heart's muscle mass and bring it back to normal operating conditions. Because of the high voltages needed to defibrillate a patient, the inputs of the ECG circuit must be protected. Other sources of noise are electrosurgery devices, which are used in operating rooms as electronic scalpels. These devices contain high-frequency currents in the megahertz range. The high current density at the tip of the electrode coagulates the protein, thereby stopping bleeding. The ECG module must provide additional filtering against this high-frequency noise.

ECG Application:The following bandwidths are used for different applications in ECG a. Clinical Bandwidth for standard 12-Lead ECG [0.05-100 Hz] b. Monitoring Application for Intensive Care Unit (ICU) [0.50 - 50 Hz]. It is used to detect rhythm disturbances (i.e. arrhythmias). The restricted bandwidth attenuates higher frequency noise caused by muscle contractions (EMG noise) and the lower frequency noise caused by motion of electrodes (baseline changes). c. Heart Rate Meter it is a band pass filter centered at 17Hz with selectivity (Q) of about 3 to 4. Such filter passes the frequencies of the QRS complex while rejecting noise including non-QRS waves in the ECG signal such as the P and T waves. This bandwidth maximizes the signal-to-noise-ratio (SNR) for detecting the QRS complex. d. Late Potentials Measurement - Bandwidth up to 500 Hz is used to measure late potentials. Late potentials are small higher-frequency events that occur in the ECG following the QRS complex.

2.8 Specification of ECG signal:Because the electrocardiograph is widely used as a diagnostic tool and there are several manufacturers of this instrument, standardization is necessary. Standard requirements for electrocardiographs have been developed over the years.

32

Specification Input signal dynamic range Dc offset voltage Slew rate Frequency response Input impedance at 10 Hz Dc lead current Return time after lead switch Overload voltage without damage Risk current at 120 V

Value mV 5 mV 300 mV/s 320 to 150 0.05 Hz M 2.5 0.1 s1 V 5000 10

2.9 Hardware Implementation2.9.1 Block diagramAnalog System Design and Criteria: We will work on Monitoring Application using frequency on the range between 0.05 to 100 Hz and using the three lead Wire ECG system which used in emergency departments, telemetry monitoring, and during medical procedures.33

General block diagram:

2.9.2 Sensing electrodes:They have the function of sensing the signal from the body to the ECG device. All electrodes can be represented by a battery in series with a parallel resistor and capacitor. The battery represents the polarization voltage produced by active and reference electrode materials being in contact with an electrolyte, the saline solution of body fluid.

Advantages of disk electrode: 1. Painless 2. Nonirritating

34

3. Reliable 4. Reversible

2.9.3 Lead selector:They have the function of select the wanted leads that we want to show there signal. It is made by using analog multiplexer (4052) that has multi input ((x0,x1,x2,x3)(y0,y1,y2,y3)) and one output (X,Y) is selected by selection lines(A,B).

35

2.9.4 High Pass Filter:The implemented high pass filter is passive high pass filter. The corner frequency is calculated at 0.05 Hz from the equation (f =1\2RC.) Substituting the value of C=1 f, then the value of R=3.3 m. We used two high pass filter before the instrumentation for each input signal.

36

2.9.5 Instrumentation Amplifier (Preamplifier Stage):The differential input single1ended output instrumentation amplifier is one of the most versatile signal Processing amplifiers available. It is used for precision amplification of differential dc or ac signals while rejecting large values of common mode noise. By using integrated circuits, a high level of performance is Obtained at minimum cost.

We will use Instrumentation Amplifier AD524 for reject noise and amplify the signal from the sensor electrodes, which typically falls in the 1 mV range, by a factor of 1000. The AD524 is chosen as it is a high precision amplifier commonly used in bioelectronics, featuring a measured CMRR of at least 90dB, a low cost, a max supply current of 1.3 mA and a wide power supply range (2.3V to 18V & -2.3V to 18V). It is also easy to use rather than its higher performance than five Operational Amplifiers IA design.

37

The low power and signal accuracy are also important factors when choosing such an amplifier. This is due to its very low input bias current (1.0 nA) and offset voltage (50 V), respectively.

Common mode rejection ratio (CMRR)Is the ability of an amplifier to reject noisebymeansof differential pair, the higher the CMRR the best performance the amplifier is acceptable range of CMRR is about 80:100 dB , the CMRR value is Inversely related to the operating frequency the higher the frequency the lower CMRR. Common mode rejection ratio (CMRR) is used as a measure of the quality of a balanced circuit.

38

2.9.6 Low Pass Filter:The passive low pass filter has a corner frequency is calculated to be 100Hz from the equation ( f =1\2RC) Substituting the value of C=100nf then the value of R=18 kohm

39

2.9.7 Notch filter:Notch filter is used to reject the 50Hz noise that comes from the power line around the circuit.

2.9.8 DC shift:After filtering and amplification, the data is ready to be digitized by the ADC. The ADC requires the signal it is sampling to be completely in the positive voltage range. The summing amplifier is used to achieve this and its topology is shown below.

40

2.9.9 Micro-control (with built-in A\D converter):We used micro-control with built in A\D converter to convert the detected analog signal to digital signal that is processed in micro so the signal can be displayed on graphic LCD and can be sent by USB port.

41

2.9.10 PCB Circuit:-

42

43

One lead circuit

3 lead Circuit

44

2.9.11Our Real Board

45

2.10 Signal problems:The following section describes common signal quality problems with suggested solution

46

47

48

2.11 Kinds of noise:ECG signal may be corrupted by various kind of noise. 1. Power line interference:50HZ from the power main. 2. Electrode contact noise: variable contact between the electrode and the skin 3. Change in the electrode1 skin impedance 4. Electromagnetic interference from other electronic device. 5. Noise coupled from other electronic devices

49

50

3.1 Introduction and Medical backgroundVocal definitions:Pressure is a force exerted over an area. All fluids in a closed container exert a pressure on the walls of the container, called hydrostatic pressure. Blood Pressure: the pressure that the blood exerts on the walls of the arteries in the body. It is a hydrostatic pressure. Systolic Pressure: the maximum pressure on the arteries during contraction of the heart when blood is pumped out. Diastolic Pressure: the lowest pressure on the arteries right before the next ventricular contraction (while the blood is moving out of the arteries). Normal ranges for blood pressure in adult humans are: Systolic between 90 and 135 mm Hg (or 90 and 135 Torr, 12 to 18 kPa) Diastolic between 50 and 90 mm Hg (or 50 and 90 Torr, 7 to 12 kPa)

51

Pulse: a wave of pressure caused by the contraction of the heart, which pumps blood out into an artery. Therefore, there is one pulse for every heart beat. The pressure of this wave is represented by the difference between systolic and diastolic pressure.

How is blood pressure measured?In humans, blood pressure is measured using a device called a sphygmomanometer. First the cuff is placed over the elbow and pressure is increased until it is greater than the systolic pressure. When this happens, the arteries collapse and no blood can flow out of them. Then the pressure is slowly released until it is equal to systolic pressure. At this point, blood can flow through the arteries once again. This is when a pulse can be heard. The reading on the sphygmomanometer now is the systolic pressure. Pressure is slowly released until the point where the pulse cannot be heard. This reading is the diastolic pressure. This is the most used way in measuring the blood pressure till the 90th where new digital and electronic systems were introduced.

52

Why blood pressure is measured this way?Blood pressure acts like a wave, with max points and min points. It's measured using systolic and diastolic pressure because it's only way to account for the range of pressure between contraction and relaxation. We use mm Hg because it's more convenient than using mm water. The blood pressure in humans is measured at the elbow because it is basically at the same level as the heart. Therefore, the pressure at the elbow should be the same as the pressure at the heart.

What affects the blood pressure?For each animal, blood pressure is determined by its height, shape, weight, body structure, age, and amount of activity. The pressure in blood vessels changes as a function of the distance between the heart and the tissue you're concerned with. Tissues pumping blood up have to fight against the force of gravity to push it up.

What affects systolic pressure?The systolic pressure is determined by the amount of blood (stroke volume) being forced into the aorta and arteries with each contraction of the heart and also by the force of contraction. An increase in either of the two will increase the systolic pressure. Also, if the arterial wall becomes stiffer, the vessels won't be able to distend with the increased blood volume and the systolic pressure is increased.

What affects diastolic pressure?53

If there is increasing constriction in the arteries, this will impede blood flowing out of the arterial system to the capillaries, and the diastolic pressure will rise. Also, the resistance is reduced, more blood will flow out of the arterial system and so diastolic pressure will fall. The diastolic pressure also depends on the level of the systolic pressure, the elasticity of the arteries and the viscosity of the blood. Changes in the heart rate will also affect diastolic pressure: with a slower heart rate, the diastolic pressure will be lower as there is a greater time for blood to flow out of the arteries, and vice versa.

Why should I monitor my blood pressure at home?For persons with hypertension, home monitoring allows your physician to monitor how much your blood pressure changes during the day, and from day to day. This may also help your physician determine how effectively your blood pressure medication is working.

3.2 How to measure blood pressure:Either an aneroid monitor, who has a dial gauge and is read by looking at a pointer, or a digital monitor, in which the blood pressure reading flashes on a small screen can be used to measure blood pressure.

3.2.1 The aneroid monitor:

54

The aneroid monitor is less expensive and easier to manage than the digital monitor. The cuff is inflated by hand by squeezing a rubber bulb. Some units even have a special feature to make it easier to put the cuff on with one hand. However, the unit can be easily damaged and become less accurate. Because the person using it must listen for heartbeats with the stethoscope, it may not be appropriate for the hearing impaired.

3.2.2 The digital Blood pressure monitor

55

The digital monitor is automatic, with the measurements appearing on a small screen. Because the recordings are easy to read, this is the most popular blood pressure measuring device. It is also easier to use than the aneroid unit, and since there is no need to listen to heartbeats through the stethoscope, this is a good device for hearing impaired patients. One disadvantage is that body movements or an irregular heart rate can change the accuracy. These units are also more expensive than the aneroid monitors.

3.2.3 The finger/wrist blood pressure monitors

Tests have shown that finger and/or wrist blood pressure devices are not as accurate in measuring blood pressure as other types of monitors. In addition, they are more expensive than the other monitors.

Before you measure your blood pressure:56

Rest for three to five minutes without talking before taking a measurement. Sit in a comfortable chair, with your back supported and your legs and ankles uncrossed. Sit still and place your arm, raised level with your heart, on a table or hard surface. Wrap the cuff smoothly and snugly around the upper part of your arm. The cuff should be sized to fit smoothly, while still allowing enough room for one fingertip to slip under it. Be sure the bottom edge of the cuff is at least one inch above the crease in your elbow. It is also important, when taking blood pressure readings, that you record the date and time of day you are taking the reading, as well as the systolic and diastolic measurements. This will be important information for your physician to have. Ask your physician or another healthcare professional to teach you how to use your blood pressure monitor correctly. Have the monitor routinely checked for accuracy by taking it with you to your physician's office. It is also important to make sure the tubing is not twisted when you store it and keep it away from heat, to prevent cracks and leaks. Proper use of your blood pressure monitor will help you and your physician in monitoring your blood pressure.

3.2.4 Using catheters in blood pressure measurement:

The most accurate means for measuring blood pressure is directly within an artery (intra-arterial) using a catheter. But because this method is invasive, it is neither practical nor appropriate for repeated measurements in non-hospital settings, or for large-scale public health screenings. In addition, different methods for measuring blood pressure can produce different readings. The57

guidelines for diagnosing and treating hypertension are based upon measurements made using the mercury-filled sphygmomanometer, not upon intra-arterial measurement of blood pressure. The usual method of measurement, therefore, is a noninvasive means that uses a sphygmomanometer, which includes either a column of mercury or pressure registering gauge. With this technique, the flow of blood is temporarily stopped by an inflated cuff that is wrapped around the upper arm and that puts pressure on the main artery in the arm. Blood flow is then gradually restarted as the user slowly deflates the cuff. An examiner uses a stethoscope to listen for sounds, called Korotkoff sounds that can be heard when the blood begins flowing again through the artery and that change in tone and volume while the cuff is deflated. Blood pressure is typically measured in units of millimeters of mercury, and represents the force of blood against the blood vessel wall. The first number, called the systolic pressure, represents the highest blood pressure that occurs each time the heart beats. The second number, called the diastolic pressure, is the lowest pressure that occurs when the heart relaxes between two beats. The Korotkoff sounds are used to identify a person's systolic and diastolic blood pressure readings. Both numbers are important because when either is elevated, so is the risk of developing heart and blood problems. According to the National Heart, Lung, and Blood Institute, a blood pressure reading consistently higher than 140/90 is a sign that the blood pressure needs to be brought under control. The typical adult blood pressure is 120/80 or lower, but readings vary depending on age and other factors. The mercury sphygmomanometer is simple, easy to read, and requires no readjustment. It has been validated in many clinical circumstances against the direct method of measurement through the artery.

3.2.5 Why replacing the mercury sphygmomanometers?The push to replace mercury sphygmomanometers began in June 1998, when the Environmental Protection Agency and the American Hospital Association agreed to limit the amount of mercury waste from hospitals as much as possible by 2005. Other organizations, over time, have joined the effort. Mercury is a silver-colored metallic element that is liquid at room temperature and tends to break into tiny, highly mobile droplets when spilled. These droplets vaporize and can contaminate the atmosphere. Precautions must be taken to limit the inhalation, ingestion or absorption of mercury in case of a

58

spill or breakage. Exposure to mercury from sphygmomanometers used in healthcare settings is extremely rare. Modern mercury sphygmomanometers are available in models that prevent accidental spillage of mercury. And, there have been only a few isolated cases of illness in children from mercury toxicity related to broken glass thermometers. The FDA, which regulates blood pressure devices, requires companies to show that new monitors are substantially equivalent to models already on the market. They also must demonstrate accuracy through a clinical validation study. There are two alternative types of blood pressure measuring instruments being marketed. Aneroid devices, which have no liquid, use metal that acts like a spring to measure blood pressure. These have a round compass-like face that is attached to a cuff and accompanied by a stethoscope, and are commonly used in physicians' offices. Electronic devices measure pressure by converting the readings into measurable electronic waves. Electronic instruments include in-home blood pressure monitoring devices as well as the small stations often seen at drug stores where people place their arms through a mechanical cuff. These use physical measurements and mathematical formulas to calculate pressure. Electronic monitors were originally designed for use during surgery and in emergency room settings. They are not commonly used by physicians to diagnose or to monitor hypertension. The two crucial considerations for substituting aneroid and electronic units for mercury instruments are calibration and validation. Calibration is a way to make sure that measurements begin from zero--much like when a scale is balanced before it is stepped on to measure body weight. If the starting mark is above or below zero, the final measurement will be inaccurate. Validation ensures that the instrument can take accurate measurements over a wide range of blood pressures, ages and clinical conditions. The FDA also is concerned that aneroid and electronic devices may not be regularly calibrated, potentially making these devices prone to erroneous readings. Regardless of the type of device used to measure blood pressure, selecting appropriately sized cuffs is critical. The appropriate cuff width is based on the diameter of the upper arm. Taking blood pressure measurement with a cuff that's too narrow could overestimate blood pressure, while too wide a cuff can underestimate the pressure. Inappropriately low blood pressure, or clinical shock, is a medical emergency. Inappropriately high blood pressure can indicate hypertension.

3.2.6 Oscillometric methods

59

Oscillometric methods are used in long-term measurement as well as in clinical practice. The equipment is functionally the same as for the auscultatory method, but with an electronic pressure sensor (transducer) fitted in the cuff to detect blood flow, instead of using the stethoscope and the expert's ear. In practice, the manometer is a calibrated electronic device with a numerical readout of blood pressure, instead of a mercury tube; calibration must be checked periodically. In most cases the cuff is inflated and released by an electrically operated pump, and it may be fitted on the wrist (elevated to heart height), although the upper arm is preferred. Oscillometric measurement requires less skill than auscultatory, and is suitable for use by non-trained staff and for automated patient monitoring. The cuff is inflated to a pressure in excess of the systolic blood pressure. The pressure is then gradually released over a period of about 30 seconds. When blood flow is nil (cuff pressure exceeding systolic pressure) or unimpeded (cuff pressure below diastolic pressure), cuff pressure will be essentially constant. When blood flow is present, but restricted, the cuff pressure, which is monitored by the pressure sensor, will vary periodically in synchrony with the cyclic expansion and contraction of the brachial artery, i.e., it will oscillate. The cuff pressure at which oscillations start is the systolic pressure; pressure when oscillations cease is diastolic pressure. In practice the different methods do not give identical results; an algorithm and experimentally obtained coefficients are used to adjust the oscillometric results to give readings which match the auscultatory as well as possible. Some equipment uses computer-aided analysis of the instantaneous blood pressure waveform to determine the systolic, mean, and diastolic points. The term NIBP, for Non-Invasive Blood Pressure, is often used to describe oscillometric monitoring equipment.

3.3 Theory of operation of most pressure monitor systemsMeasuring a person's blood pressure is a routine part of every physical exam. The results can predict long-term health risks, assess suitability for certain physical activities, help manage many types of medical problems, and determine eligibility for insurance. The procedure is done to screen for high blood pressure (hypertension), a major risk factor for serious conditions, such as stroke and kidney failure. The safety of the current "gold standard" instrument used to60

measure blood pressure, the mercury-filled sphygmomanometer however is being called into question due to the environmental health risks associated with mercury. At the same time, medical experts fear that the mercury gauges may be replaced by less accurate devices without consideration for the health risks that could follow. Although the environmental concerns are serious, the Food and Drug Administration believes that mercury sphygmomanometers are still useful medical devices.

The Mean arterial pressure (MAP)It is a term used in medicine to describe a notional average blood pressure in an individual. It is defined as the average arterial pressure during a single cardiac cycle.

, where CO is cardiac output SVR is systemic vascular resistance CVP is central venous pressure CVP is usually small enough to be neglected in this formula.

61

At normal resting heart rates MAP can be approximated using the more easily measured systolic and diastolic pressures, SP and DP: Or equivalently Where PP is the pulse pressure, SP DP At high heart rates MAP is more closely approximated by the arithmetic mean of systolic and diastolic pressures because of the change in shape of the arterial pressure pulse. MAP is considered to be the perfusion pressure seen by organs in the body. It is believed that a MAP of greater than 60 mmHg is enough to sustain the organs of the average person under most conditions. If the MAP falls significantly below this number for an appreciable time, the end organ will not get enough blood flow, and will become ischemic. The MAP will play an important rule in out design as we will demonstrate next .

3.4 Our pressure monitors system:First we would like to refer to that we have chosen the oscillometric method. This method is employed by the majority of automated noninvasive devices. A limb and its vasculature are compressed by an encircling, inflatable compression cuff. The blood pressure reading for systolic and diastolic blood pressure values are read at the parameter identification point. The simplified measurement principle of the oscillometric method is a measurement of the amplitude of pressure change in the cuff as the cuff is inflated from above the systolic pressure. The amplitude suddenly grows larger as the pulse breaks through the occlusion. This is very close to systolic pressure. As the cuff pressure is further reduced, the pulsation increase in amplitude reaches a maximum and then diminishes rapidly. The index of diastolic pressure is taken where this rapid transition begins. Therefore, the systolic blood pressure (SBP) and diastolic blood pressure (DBP) are obtained by identifying the region where there is a rapid increase then decrease in the amplitude of the pulses respectively. Mean arterial pressure (MAP) is located at the point of maximum oscillation.

62

3.4 Hardware Implementation:Selecting a blood pressure method:The oscillometric method can be incorporated into our project design. Because this method is capable of turning pressure readings into a digital signal; we want to build a unit that uses a microcontroller to analyze the information. We want to use a Pulse/oxygen sensor to detect the changes in blood flow through the artery. It is major modification to the oscillometric methods researched. The basic design will consist of a microcontroller, pressure sensor, squeezer, automatic inflation system and associated hardware.

3.4.1 Designing our blood pressure monitor(Block Diagram)The Microcontroller will receive 2 signals one from the pressure monitor & one from the oscillations amplifier circuit where these two signals will be saved on an EEPROM and then the MAP will be calculated and utilizing it, the systolic and the diastolic pressures will be calculated then the output will be displayed .The digital output will be stored and sent to the main computer for analysis during a blood pressure reading. Now lets take a look at the system in block diagram:

63

Now lets take a look at the important blocks in our design:

3.4.2The pressure sensor MPXV5050GPWe checked several pressure sensors for our project. We wanted to find a sensor that can read pressure from 0 to 180 mmHg (0 to 3.48 lb/in) to be able to calibrate it by the aid of a mercury sphygmomanometer. This pressure range is determined from measurements taken by doctors and clinicians for blood pressure. Our sensor must have a fast response to small pressure changes. It needs to be greater than the average heart rate. The fast response will enable our design better accuracy for the blood pressure and amplitude of the heartbeat. The sensor we decided to use for our design is the integrated pressure sensor by Motorola (MPXV5050).

Advantages of the Motorola (MPXV5050):It is designed to use with a microcontroller. It is a silicon pressure sensor design to measure pressure from 0 to 7.25psi. It requires a voltage supply of 5Vdc. The sensor needs a supply current of 7mAdc. The full scale output of the sensor is typically 4.7Vdc. The full scale span is around 4.5Vdc. Accurate and contains internal amplification. It is (+/-) 2.5% of the full scale span. The level of sensitivity, which is another advantage, is 90mV/kPa. The response time is 1ms which is very important for blood pressure monitoring.64

Disadvantages of the MPX5050:The MPXV5050 is not available in Egypt and is expensive; the part price can be checked on the Freescale official site: Solution to this disadvantage: The MPXV5050 was available as a free sample but not anymore. So we contacted the technical support and made an agreement with a freescale representative who shipped us a package of 5 sensors for free, we only had to pay for the shipping and the taxes fees in return to a copy of our pressure monitor prototype.

MPXV5050GP description:Its an integrated silicon pressure sensor on chip signal conditioned, temperature compensated and calibrated. The MPX5050 series piezoresistive transducer is a stateoftheart monolithic silicon pressure sensor designed for a wide range of applications, but particularly those employing a microcontroller or microprocessor with A/D inputs. This patented, single element transducer combines advanced micromachining techniques, thinfilm metallization, and bipolar processing to provide an accurate, high level analog output signal that is proportional to the applied pressure.

65

The MPXV5050GP series pressure sensor operating characteristics and internal reliability and qualification tests are based on use of dry air as the pressure media. Media, other than dry air, may have adverse effects on sensor performance and longterm reliability.

LAYOUT OPTIMIZATIONIn mixed analog and digital systems, layout is a critical part of the total design. Often, getting a system to work properly depends as much on layout as on the circuit design. The following discussion covers some general layout principles, digital section layout and analog section layout.

3.4.3-Hardware diagram:Usually when the doctor measures the patients blood pressure, he will pump the air into the cuff and the stethoscope the listen to the sounds of the blood in the artery of the patients arm. At the start, the air is pumped to be above the systolic value. At this point, the doctor will hear nothing through the stethoscope. After the pressure is release gradually, at some point, the doctor will begin to hear the sound of the heart beats. At this point, the pressure in the cuff corresponds to the systolic pressure.66

After the pressure decreases further, the doctor will contain hearing the sound (with different characteristics). And at some point, the sounds will begin to disappear. At this point, the pressure in the cuff corresponds to the diastolic pressure. To perform a measurement, we use a method called oscillometric .the air will be pumped into the cuff to be around 20mmHg above average systolic pressure (about 120 mmHg for an average). After that the air will be slowly released from the cuff causing the pressure in the cuff decrease. As the cuff is slowly deflated, we will be measuring the tiny oscillation in the air pressure of the arm cuff. The systolic pressure will be the pressure at which the pulsation starts to occur. We will use the MUC to detect the point at which this oscillation happens and then record the pressure in the cuff. Then the pressure in the cuff will decrease further. The diastolic pressure will be taken at the point in which the oscillation starts to disappear.

The diagram above shows how our device is operated. The user will use buttons to control the operations of the whole system. The MCU is the main component that controls all the operations such as motor and valve control, A/D conversion, and calculation, until the measurement is completed. The results then are output through and LCD screen for the user to see. -Analog circuit:

67

The pressure sensor produces the output voltage proportional to the applied differentional input pressure. The output voltage of the pressure sensor ranges from 0.2 to 4.7V. But for our application, we want to pump the arm cuff to only 170mmHg. Then the signal from the DC component will be passed on to the band-pass filter. The filter is designed to have large gain at around 1- 4 Hz and to attenuate any signal that is out of the pass band. The AC component from the band-pass filter is the most important factor to determine when to capture the systolic/diastolic pressures. The final stage is the AC coupling stage. We use two identical resistors to provide a DC bias level at approximately 2.5 volts. The 47 micro farad capacitor is used to coupling only AC component of the signal so that we can provide the DC bias level independently.

3.4.4-Hardware parts:Pressure sensor:We use the MPXV5050GP [built in amplifier] pressure sensor to sense the pressure from the arm cuff. The pressure sensor produces the output voltage proportional to the applied differentional input pressure. We connect the tube from the cuff to the input of the sensor. By this way, the output voltage will be proportional to the difference between the pressure in the cuff and the air pressure in the room.

Band-pass filter:The band-pass filter stage is designed as a cascade of the two active band-pass filters. The reason for using 2 stages is that the overall band-pass stage would provide a large gain and frequency response of the filter will have sharper cut off than using only single stage. This method will improve the signal to noise ratio of the output.

68

Band pass Filter Stage

First Band-pass filter:The lower frequency cutoff is The higher frequency cutoff is The mid-band gain of the first filter is

Second Band-pass filter:The lower frequency cutoff is69

The higher frequency cutoff is The mid-band gain of the first filter is AC coupling stage: The ac coupling stage is used to provide the DC bias level. We want the DC level of the waveform to locate at approximately half Vdd, which is 2.5 volt.

AC coupling stage for DC bias level Given this bias level, it is easier for us to process the AC signal using the on-chip ADC in the microcontroller. The AC output from this stage will be passed on to the analog-to-digital converter in pic16f877A microcontroller. The image from the laboratory bench is shown in this figure. We can see that it is very nice and clean.

AC Waveform70

But the pressure signal before filtrationas follow:

3.5 Blood pressure Circuits: 3.5.1 Simulation Ciruit:

71

Power supply: Motor-----------------------------------------5V

Pressure sensor---------------------------5V72

Micro control -----------------------------5V Valve----------------------------------------5V

Amplifier ------------------------------5V, -5V

So our power supply generate 5v & -5 v

Bush button: Is used to start the program when connect pin RC0 of the MCU with ground . Pull-up resistor: is used to keep 5V on pin no 15 (RC0) when the push button is not depressed(not open)5o v lt R 0N B/ T I R1 B R2 B R3 G B/ M P R4 B R5 B R6 G B/ C P R7 G B/ D P R0 1 S / 1 K C/ OO CI T T R 1 1 SC P C/ OI C2 T / R 2 C1 C/ P C R 3 C/ C C/ K L S S R 4 DS A C/ I D S/ R5 D C/ O S R6 X K C/ / TC R7 X T C/ / RD R 0 S0 D/ P P R 1 S1 D/ P P R 2 S2 D/ P P R 3 S3 D/ P P R 4 S4 D/ P P R 5 S5 D/ P P R 6 S6 D/ P P R 7 S7 D/ P P P 1 F7A I 6 87 C 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 1 5 1 6 1 7 1 8 2 3 2 4 2 5 2 6 1 9 2 0 2 1 2 2 2 7 2 8 2 9 3 0

U 11 3 1 4 2 3 4 5 6 7 8 9 1 0 1 OC/ L I S1 K C N OC/ L OT S2 K U C R0 N A/ 0 A R1 N A/ 1 A R2 N/ RFCRF A/ 2 E- V E A V / R3 N/ RF A/ 3 E+ A V R4 0 KCOT A/ C I 1 U T / R5 N/ S 2 U A/ 4 / OT A SC R0 N/ D E/ 5 A R R1 N/ R E/ 6 A W R2 N/ S E/ 7 A C ML / p / H CR p V V T

R 11k 0

Microcontroller: It is the brain of the device, we selected PIC16F877A. This type has internal A/D converter. It operates on 5V DC to control each part in the device.

73

Oscillator: It is used to detect the required time for performing one order by microcontroller.

Oscillator circuit is formed of two 33 PF capacitors and crystal 4MHZ which produces 1 micro second for one order.

Pins no 13, 14 in microcontroller is connected to the o/p of oscillator circuit.

Pressure Sensor: Type: MPX5050GP, it is operated on 5V. Is used to detect the air pressure inside the cuff in relation with analog voltage.74

The o/p of the pressure sensor (MPX5050GP) at pin no 3, 4 is connected to the MCU which is the pin of A/D converter.

Valve: Type: KSVP, it operates on 5V. It is normally opened and when it receives a pulse from micro control, it is closed.. This valve is used to leakage air inside the cuff for small time this lead to decrease pressure. Pin no 20 (RD1) is connected to I/P pin of valve of MCU. Pin no 20 (RD1) of MCU is connected to the base of the transistor (2n2222) which is used as a switch to supply 5V to the motor when O/P of pin no 20 is 5V.

75

Motor: It is used to pump air inside the cuff thus increasing pressure. Pin no 19 (RD0) of MCU is connected to the base of transistor Q3 (2n2222) which is used as a switch to supply 6v to the motor when O/P of pin no 19 is 5v.

76

7 Segment :

We use two 7 seg above one for displaying systolic blood pressure (ex. 112) and another one for diastolic blood pressure (ex. 80)

Band pass filter:

77

Operational amplifier 2 x 1:

78

3.5.2 PCB Circuit:

79

Microcontroller circuit

80

Motor & Valve Driver Filter circuit 3.5.3 Our circuit board:

81

3.6 Software design:82

-Design for the operating control: The block diagram for the operating control is consisted of a total of 7 states. We first start at the ON state where the program waits for the user to push the START button of the device. Once the START button has been pushed, the measurement process begins by inflating the hand cuff. While the cuff is being inflated, if the user feels very uncomfortable or painful, he/she can push (hold) the RESET button to stop the motor, quickly deflate the cuff and stop the measurement. This will ensure that the safety of the user is well maintained while using the device. Anyhow, if the cuff-inflating procedure goes smoothly. The air will be pumped into the cuff until the pressure inside the cuff reaches 170mmHg after that the motor will be stopped and the air will be slowly released from the cuff. NOTE: orifice release air all the time Again, at this point, the user can abort the process by pressing RESET button. Once the MCU has obtained the values of systolic, diastolic. The valve will be open to release air from the cuff quickly. Then, it will report the result of the measurement by displaying the obtained data on the LCD screen. After that if the RESET button is pushed the program will return to the RESET state again waiting for the next measurement. -Design for the measuring: Once the motor pumps the air into the cuff until the pressure exceeds 170mmHg, the motor then stops pumping more air and the cuff is deflated through the orifice. The pressure in the cuff starts decreasing approximately linearly in the time. At this point, the program enters the measurement mode. The MCU will looks at the AC signal through the ADC2 pin and determines the systolic, diastolic pressure values of the user respectively. For this project, we perform the measurement using the oscillometric method, in which the program monitors the tiny pulsations of the pressure in the cuff; the state diagram of the measurement is shown in this figure.

3.6.1 Code:Once the motor pumps the air into the cuff until the pressure exceeds 170 mmHg, the motor then stops pumping more air and the cuff is deflated through the orifice. The pressure in the cuff starts decreasing approximately linearly in time.

83

At this point, the program enters the measurement mode. The MCU will looks at the AC signal through the ADC2 pin and determines the systolic, diastolic pressure values of the user respectively....... For this project, we perform the measurement using the oscillometric method, in which the program monitors the tiny pulsations of the pressure in the cuff.

1-systolic pressure measurement:After the motor pump the pressure up to 170mmHg which is approximately more than the systolic pressure of normally healthy people, the cuff starts deflating and the program enters SYS_MEASURE state. In this stage, the program will looks at the AC waveform from ADC2 pin. When the pressure in the cuff decreases to a certain value, the blood begins to flow through the arm. At this time if we look at the oscilloscope, we will see the onset of the oscillation. The systolic pressure can be obtained at this point. The way we program this is that we set a threshold voltage of 4V for the AC waveform. At the start, there is no pulse and the voltage at the ADC2 pin is constant at approximately 2.5V. Then when the pressure in the cuff decreases until it reaches the systolic pressure value, the oscillation starts and grows. We then count the number of pulses that has maximum values above the threshold voltage. If the program counts up to 4, the program enters the Sys_cal state. At this state, the program records the DC voltage from pin ADC1. Then it converts this DC voltage value to the pressure in the cuff to determine the systolic pressure of the patient.

2-Diastolic Pressure Measurement:After the systolic Measure state is determined, the program enters the Dias Measure state. In this state, the program is still sampling the signal at every 40 millisecond. We then define the threshold for the diastolic pressure. While the cuff is deflating, at some point before the pressure reaches diastolic pressure, the amplitude of the oscillation will decrease. To determine the diastolic pressure, we record the DC value at the point when the amplitude of the oscillation decreases to below the threshold voltage. After the program finishes calculating the diastolic pressure, it will display the information acquired from the measurement on the LCD. Then the program84

will open up the valve and the cuff will deflate quickly. The measurement is now finished.

3.6.2 Flow chart:

85

86

87

3.7 User manual:Important facts about blood pressure and self-measurement: -blood pressure is the pressure of the blood flowing in the arteries generated by the pumping of the heart. Two values, the systolic value and the diastolic values, are always measured. -permanently high blood pressure values can damage your health and must be treated by your doctor! -always discuss your values with your doctor and tell him/her if you have noticed anything unusual or feel unsure. Never rely on single blood pressure readings. -there are many causes of excessively high blood pressures values. Your doctor will explain them in more detail and offer treatment where appropriate. Besides medication, relaxation techniques, weight loss and exercise can also lower your blood pressure -under no circumstances should you alter the dosages of any drugs prescribed by your doctor! -depending on physical exertion and condition, blood pressure is subject to wide fluctuation as the day progresses. You should therefore take your measurements in the same quiet conditions and when you feel relaxed! Take at least two measurements per day, one in the morning and one in the evening. -it is quite normal for two measurements taken in quick succession to produce significantly different results. -deviations between measurements taken by your doctors or in the pharmacy and those taken at home are quite normal, as these situations are completely different. Several measurements: provide a much clearer picture than just one single measurement. Leave a small break: of at least 15 seconds between two measurements. If you are pregnant, you should monitor your blood pressure very closely as it can change drastically during this time. How do I evaluate my blood pressure?? Table for classifying blood pressure values in adults in accordance with the world health organization (WHO) Data in mmHg:

88

1 2 3 4 5 6

Range Blood pressure too low Blood pressure optimum Blood pressure normal Blood pressure slightly high Blood pressure too high Blood pressure far too high Blood pressure dangerously high

systolic 180

Diastolic 110

Recommendation Consult your doctor Self-check Self-check Consult your doctor Seek medical advice Seek medical advice Urgently seek medical advice

The higher value is the one that determines the evaluation. Checklist for taking a reliable measurement: 1-avoid activity, eating or smoking immediately before the measurement. 2-sit down for at least 5 minutes before the measurement and relax. 3-always measure on the same arm. 4-remove close-fitting garments from the upper arm. To avoid constriction, shirt sleeves should not be rolled up-they do not interfere with the cuff if they are laid flate. 5-always ensure the cuff is positioned correctly 6-press the on/off button to start the measurement . 7- The cuff will not pump up automatically ,relax don`t move and dont tense your arm muscles until the measurement result is displayed . breathe normally and dont talk.

89

3.9- Safety in design:Since this is a medical instrumentation device, the safety of the user is the first concern to us. The cuff while driven by a 5 volts motor can squeeze the arm really hard and cause injury if being used improperly. So in our device we have 3 levels of security, making sure that the operation can be aborted by the user at anytime.

The first safety design:Is to The microcontroller is programmed in the way such that if the pressure in the cuff is greater than 160 mmHg, the motor will stop. For most people, the pressure at 160 mmHg will only cause a little discomfort to the arm. This design makes sure that the pressure inside the cuff will never exceed the maximum limit of 160 mmHg.

The second safety design:Is to provide an emergency button for the user. While the motor is pumping and the cuff is being inflated, if the user encounters too much discomfort or pain, he/she can press this button to stop the operation immediately. The motor will be stopped and the valve will be opened to release the air out of the cuff. However, we still think that only a pushbutton is not enough for the safety of the user. This is because the emergency button still relies on the operating system of the program in the MCU. Even though we have no bug in our program, if something goes wrong with the MCU or the button connections, there is a possibility that the emergency button becomes unusable. So we agree that we must have another switch that controls the device physically. This switch must be able to disconnect the circuit from the power supply immediately. This way it is certain that the user will be able to stop the operation even when the emergency button does not work. And this switch is the on-off power switch that we have on the device. Other than the cuff and motor concerns, our project is very safe to use because it is very well packaged in a plastic enclosure. The device is run by low-voltage (9 volts) battery which cannot cause any major harm to human body.90

91

4.1 INTRODUCTIONThe oxygenation and deoxygenating of blood is a process rarely considered, but occurs with every breath. When someone breaths air in from the atmosphere, about 20% of what they breathe is oxygen. The oxygen rich air travels down to the lungs where it is exchanged across a membrane into oxygen depleted hemoglobin. The oxygenated hemoglobin then flows through the arterial system to the heart where it is distributed throughout the body to the tissues. In the tissues the oxygen is used up, and the byproduct, or waste, carbon dioxide, is then carried back through the venous system, through the heart, then back to the lungs where the carbon dioxide can be expelled from the body by exhaling. This process occurs with every breath someone takes and is illustrated in Figure 1

92

.When someone lacks sufficient oxygen in their blood supply they are said to

have hypoxia. There are varying degrees of hypoxia based on how low the oxygen levels in the blood are. The symptoms are not easily detected, especially in cases of acute hypoxia. The more subtle effects of hypoxia are poor judgment and loss of motor function. Hypoxia can, however, be deadly since, by definition, not enough oxygen is being transported from the bloodstream to the tissues of the body. The most sensitive tissue to hypoxia in the body is the brain. The condition that occurs when the brain does not receive enough oxygen is called cerebral hypoxia. Five minutes is all it takes for a brain cell to die in the absence of oxygen. If the hypoxia lasts for prolonged periods it can lead to coma, seizures, and even brain death. In brain death, basic life functions such as breathing, blood pressure, and cardiac function arepreserved, but there is no consciousness or response to the world around. The four main variations of hypoxia include stagnant hypoxia, hypemic hypoxia, histotoxic hypoxia, and hypoxic hypoxia. Stagnant hypoxia occurs when the blood flow is restricted to an area of the body cutting off the oxygen supply. An example of this is when someone is cramped for a while and their foot falls asleep. Hypemic hypoxia occurs when the functional hemoglobin count is low, thus not having enough hemoglobin to transport the oxygen throughout the body. Histotoxic hypoxia occurs when tissue cells become poisoned and cant properly use the oxygen. This might occur due to carbon monoxide poisoning. Hypoxic hypoxia occurs due to lack of oxygen available to breathe in. This occurs at high altitudes and is of major concern to pilots. There are physiological causes for hypoxia, one of which is due to complications during anesthesia. During anesthesia there can be many factors that can occur to induce the onset of hypoxia. They include: low cardiac output, pulmonary edema, pulmonary embolism, airway obstruction, and endobroncial intubation among others . There are many times when it would be useful to be able to monitor the blood oxygen levels in a person to catch and treat hypoxia before its effects can harm the individual. These situations include: in the operating room during anesthesia in case something unexpected goes wrong, in the post operating room where the patient will be recovering, in an ambulance while being transported to the hospital after a cardiac or pulmonary episode, and in the neonatal care unit to closely monitor a newborns vital signs. By having a device to monitor the93

oxygenated hemoglobin levels, the physician is put at an advantage over any possible complications. It is for these reasons that pulse oximetry has become more prominent.

4.2 What does a pulse oximeter measure?1. The oxygen saturation of haemoglobin in arterial blood - which is a measure of the average amount of oxygen bound to each haemoglobin molecule. The percentage saturation is given as a digital readout together with an audible signal varying in pitch depending on the oxygen saturation. 2. The pulse rate - in beats per minute, averaged over 5 to 20 seconds. Pulse oximetry is accomplished by implementing the Beer-Lambert Law, which, in this case, relates the concentration of oxygen in the blood to the amount of light absorbed when transmitted through the blood. The absorption of the light transmitted through the medium can be calculated using the Beer-Lambert Law as follows:

Where IOUT is the intensity of the light transmitted through the medium, IIN is the intensity of the light going into the medium, and A is the absorption factor. There are different light absorption levels for oxygenated and deoxygenated hemoglobin at different wavelengths as can be seen in Figure 2. Traditionally, pulse oximeters make use of red (=660nm) and infrared light (=940nm) to determine then percentage of oxygenated hemoglobin present in the arterial system. These two wavelengths are chosen because, at 660 nm, deoxygenated hemoglobin has a higher absorption, whereas at 940 nm, oxygenated hemoglobin has a higher absorption. Once the absorption levels are detected, it is possible to determine the ratio of the absorption between the deoxygenated and oxygenated hemoglobin at the different wavelengths.

94

Figure 2. Absorption levels of oxygenated and deoxygenated blood at different wavelengths

The measurements taken by the pulse oximeter demonstrate the shape of a pulsatile waveform as seen in Figure 3. This pulsatile waveform has both AC and DC components in it. The DC components are comprised of the absorption from the nonpulsing arterial blood, the venous and capillary blood, as well as from scattering and absorption due to the tissue and bone. These components are always constant and rest on one another as shown in the figure. The AC component of the figure 3 is the pulsatile waveform that we are interested in. This waveform represents the pulsing of the blood in the arteries and each individual pulse can be seen, representative of the heart rate.

95

This waveform is gathered for both light frequencies, in this case infrared and red light. In order to obtain the pulse oximeter saturation (Sp02), these AC and DC components from each of the wavelengths need to be measured and taken as a ratio as follows:

This ratio is then used in a calibration curve based on studies of healthy individuals to determine the Sp02. This value will end up being a percentage which will tell the physician whether or not everything is as it is supposed to be. A normal saturation level is between 87-97%. [9] This method of measuring the Sp02 has been shown to be accurate to within 2.5%.

4.3 Factors That Affect Pulse Oximetry Readings

4.3.1 Patient Factors:1- Patients with carbon monoxide poisoning, smoke inhalation, or cigarette smoking may have inaccurately increased SaO2 readings that reflect the sum of oxyhemoglobin and carboxyhemoglobin saturations.Such patients may be suffering from hypoxemia (lack of oxygen in the blood) without producing abnormal readings on pulse oximetry. 2- Conditions such as

96

hypercapnea (is a condition where there is too much carbon dioxide (CO2) in the blood ) decrease oxygen affinity, making oxygen more available to the cells. hypocapnea (is a state of reduced carbon dioxide in the blood and usually results from deep or rapid breathing) increase oxygen affinity 3- oxyhemoglobin is less able to release the oxygen molecules at the tissue level. 4- Anemia (hemoglobin less then 5mg/dL) prevent accurate pulse oximetry measurement. 5- Blood pressure, when the patient's blood pressure is low, the oximeter has difficulty differentiating the light wavelengths of arterial blood.

4.3.2 External Factors :1- Lighting (e.g., surgical lights, bilirubin lights, infrared radiant warmers). 2- Patient movement/motion artifacts ( including shivering ) . 3- Non-pulsatile substances that absorb light: (e.g., nail polish, false nails, dried blood, heavy skin pigmentation/tattoos). 4- Intravascular compounds that absorb light at the same wavelengths as hemoglobin (e.g., dyes like methylene blue, indocyanine green, or indigo carmine). 5- Finger thickness , Skin pigmentation (dark skin may affect-evidence inconsistent) . Patients who require oxygen based on an O2 saturation measurement : We know that normal range is higher than 93 % , if this ratio is reduced so the patient require oxygen supply .

4.4 Skin Integrity Issues Associated with Pulse OximetryMechanisms of Injury :

EquipmentSensor overheating can also occur due to short circuits between wires in the sensor lead.14 If insulation over the light-emitting diode (LED) portion of the sensor is damaged or missing, the sensors electrical components may contact the97

patients skin. An electrochemical burn at the site may result, caused by lowvoltage direct-current tissue electrolysis. Further, the protective cover over the LED may become damaged, allowing the sensor to overheat.

Patient Conditiona - Decreased blood flow t