Professional Documents
Culture Documents
Faculty of Engineering
Project:
Under supervision:
Dr. Ashraf Wahba
Submitted by:
2020-2021
1
Table of Contents
Contents
Abstract ................................................................................................................................... 5
Chapter 1 ................................................................................................................................. 6
Introduction and Background ..................................................................................................... 6
1.1 An Overview of the cholesterol ............................................................................................. 7
1.1.1 CHOLESTEROL .................................................................................................................. 7
1.1.2 Cholesterol measurement................................................................................................ 10
1.1.3 Needing of cholesterol test .............................................................................................. 11
1.2 An Overview of the pulse oximetry ...................................................................................... 14
1.2.1 OXYGEN ......................................................................................................................... 14
1.2.2 OXYGEN TRANSPORT TO THE TISSUES ............................................................................... 15
1.2.3 OXYGEN SATURATION ..................................................................................................... 17
1.2.4 Tests to measure patient's oxygen levels ........................................................................... 19
1.2.5 Diaphragmatic Breathing: ................................................................................................ 26
Chapter 2 ............................................................................................................................... 28
Principle Overview .................................................................................................................. 28
2.1 Infrared radiation .............................................................................................................. 29
2.2.1 Near-infrared light .......................................................................................................... 30
2.3 oxygen Saturation and the idea of pulse oximeter ................................................................. 31
2.4 Physical properties used in pulse oximetry ........................................................................... 33
2.5 Calibration Adjustment ...................................................................................................... 43
2.6 Problems with pulse oximeter ............................................................................................. 47
2.7 Idea of non-invasive cholesterol level measurement.............................................................. 54
Chapter 3 ............................................................................................................................... 55
Design Overview ..................................................................................................................... 55
Design and circuits of device .................................................................................................. 56
Our project includes two parts: ............................................................................................. 56
1) pulse oximeter................................................................................................................. 56
Every part has its circuit, and its components. ......................................................................... 56
3.1 Pulse oximeter: ................................................................................................................. 56
Preparation: Pulse Oximetry .................................................................................................. 57
3.1.1 Block diagram: ................................................................................................................ 58
2
3
4
Abstract
oxygen saturation, and cholesterol are important parameters
in the human body that measured to show if their levels are
normal or not. the abnormal levels of them are a sign of some
diseases. the common biomedical measurement of these
parameters is done by invasive methods that use blood
samples taken from the body, then Some procedures are
applied on these samples to analyze them and determine the
levels of the parameters in them. these methods have some
disadvantages like it may be painful, increases risk for
inflammation, and it is impractical for patients requiring
multiple checks a day, and those engaged in manual activities.
the aim of the project is to avoid these disadvantages by using
a non-invasive method to check the normality of the two
parameters levels in the blood. near-infrared (NIR) was used
to detect the changes in the two parameters by using one
device that was designed and programmed to achieve this
aim.
5
Chapter 1
Introduction and Background
6
1.1 An Overview of the cholesterol
1.1.1 CHOLESTEROL
Every cell of the body has cholesterol and each of it has important
natural functions. It is produced by the body and can also come from
food. It appears as waxy and fat-like. As cholesterol is oil-based, so it
does not mix with the blood, which is water-based. It is therefore
transported around the body in the blood by lipoproteins [1][3].
The functions of cholesterol are to contribute to the structure of cell
walls, makes up digestive bile acids in the intestine, allows the body to
produce vitamin D and enables the body to make certain hormones. It
also constructs and preserves membranes; it controls membrane
fluidity over the range of physiological temperatures. The hydroxyl
group on cholesterol work together with the polar head groups of the
membrane phospholipids and sphingolipids, while the bulky steroid and
the hydrocarbon chain are rooted in the membrane, alongside the
nonpolar fatty-acid chain of the other lipids. Through the contact with
the phospholipids fatty-acid chains, cholesterol rises membrane
packing, which decreases membrane fluidity [2].
to keep LDL levels low because high levels of LDL show that there is
much more cholesterol in the bloodstream than necessary, therefore
growing the risk of heart disease [3], HDL or High-density lipoprotein is
considered the "good" cholesterol. HDL is manufactured by the liver to
carry cholesterol and other lipids (fats) from tissues and organs back to
the liver for reprocessing or degradation. High levels of HDL are a good
indicator of a healthy heart. It is because less cholesterol is available in
the blood to attach to blood vessels that cause plaque formation [1].
Fig [1].Atherosclerosis
LDL levels. Also known as the "bad" cholesterol, LDL is the main source
of blockages in the arteries.
HDL levels. Considered the "good" cholesterol, HDL helps get rid of
"bad" LDL cholesterol.
Total cholesterol. The combined amount of low-density lipoprotein
(LDL) cholesterol and high-density lipoprotein (HDL) cholesterol in
patient's blood.
Triglycerides A type of fat found in patient's blood. According to some
studies, high levels of triglycerides may increase the risk of heart
disease, especially in women [14].
VLDL levels. Very low-density lipoprotein (VLDL) is another type of
"bad" cholesterol. Development of plaque on the arteries has been
10
linked to high VLDL levels. It's not easy to measure VLDL, so most of the
time these levels are estimated based on triglyceride measurements
[14].
HDL (Good)
Cholesterol Level HDL Cholesterol Category
1.2.1 OXYGEN
Human beings depend on oxygen for life. All organs require oxygen for
metabolism but the brain and heart are particularly sensitive to a lack
of oxygen. Shortage of oxygen in the body is called hypoxia. A serious
shortage of oxygen for a few minutes is fatal. During anesthesia,
patients’ airways may become obstructed, their breathing may
become depressed, their circulation may be affected by blood loss or
an abnormal heart rhythm or the anesthetic equipment may develop
a problem such as an accidental disconnection or obstruction of the
14
pulse oximetry
Oxygen is carried around in patient's red blood cells by a molecule
called haemoglobin. Pulse oximetry measures how much oxygen the
haemoglobin in patient's blood is carrying. This is called the oxygen
saturation and is a percentage (scored out of 100). It’s a simple,
painless test which uses a sensor placed on patient's fingertip or
earlobe. People with a lung condition may have a blood oxygen level
lower than normal, so pulse oximetry can help to diagnose if there is a
problem. The more the lungs are damaged, the more likely there is to
be a problem with oxygen uptake. Pulse oximetry can also be used to
measure to how badly a person’s lungs are affected.
during a pulse oximetry test, patient will have a small device clipped
to patient's finger or earlobe, called an oximeter. This gadget shines
light through patient's fingertip or earlobe. It works out how much
oxygen is in patient's blood. The oximeter display shows the
percentage of oxygen in patient's blood. For someone who’s healthy,
the normal blood oxygen saturation level will be around 95–100%. If
20
the oxygen level is below this, it can be an indicator that there is a lung
problem. People with low oxygen level may need additional oxygen or
other treatment. patient's health care professional will discuss this
with you.
A blood gas test is used to measure more accurately how much oxygen
and carbon dioxide there is in patient's blood. The test is called:
an arterial blood gas test if the sample is taken from patient's
wrist
a capillary blood gas test if the sample is collected from patient's
earlobe
A blood gas test is used to check how well patient's lungs are working
and whether they’re able to exchange oxygen and carbon
dioxide efficiently. It can be used to see if patient need oxygen
therapy.
during a blood gas test, the tester will take a small sample of patient's
blood. They will normally take this by using a needle and a syringe in
one of the arteries of patient's wrist. Or they may take blood from the
inside of patient's elbow. Sometimes, they will use some local
anaesthetic.
Some hospitals check blood gas by taking a blood sample from
patient's earlobe.
patient's tester will put a special cream on patient's earlobe that
helps increase blood flow. This makes patient's ear go red and
21
feel hot.
The blood vessels in patient's ear lobe will then contain about
the same amount of oxygen as blood taken from patient's artery.
After a few minutes the tester can take a sample by pricking the
earlobe and catching the blood droplet that forms. This isn’t
painful - it’s similar to the way blood sugar levels can be checked
from a pinprick on the fingertip.
The earlobe method can’t usually be used if patient need to have the
test when patient is unwell (such as when you’re admitted to hospital
with a flare-up of COPD symptoms).
What will the results look like?
The results will be a set of readings showing
oxygen
carbon dioxide
acidity / alkalinity (pH)
Abnormal results may mean patient's body is not getting enough
oxygen or is not getting rid of enough carbon dioxide.
A high level of carbon dioxide may mean that patient's breathing is
shallow at night and patient may benefit from using a ventilator device
at home.
Some people with very low oxygen levels may benefit from
using oxygen therapy. A long-term oxygen therapy assessment is a set
of tests to measure the levels of oxygen in patient's blood to see if they
22
Some people who don’t need to use oxygen all the time can benefit
from oxygen when they exert themselves. This is called ambulatory
oxygen. This is only beneficial in people whose oxygen levels fall
significantly when they walk. If patient's oxygen levels are low and
patient need to be started on oxygen therapy, patient's blood
gases will be checked again while patient are breathing in extra
oxygen. The oxygen is delivered by small see-through tubes known as
nasal cannulae or a face mask covering the nose and mouth. This check
will help work out how much oxygen patient need to improve the level
of oxygen in patient's blood [15].
23
Hypoxic challenge (fitness-to-fly) test
The hypoxic challenge test simulates the conditions inside the cabin of
an aero plane during a flight. That means you’ll be
breathing reduced levels of oxygen, just as patient would on a
plane. It’s sometimes called a fitness-to-fly test, though it only covers
the question of whether oxygen is needed. It’s used to see if patient
will need oxygen while patient is flying. If patient live with a lung
condition, patient's oxygen levels may be lower than normal. During a
flight, the oxygen level in the cabin air is only around 15%, compared
to 21% at sea level. This means that during flight patient's blood
oxygen levels can fall even further, to a level where there is a risk of
heart problems or other complications. This can be avoided by having
oxygen in flight. The results will help decide if patient will need extra
oxygen when patient fly. If patient is planning a flight, ask patient's
health care professional if patient need this test well in advance. This
will help patient plan patient's trip [15].
there is a right way to breathe, but most people don’t practice it.
Patients with limited lung capacity often fall into the habit of taking
short, shallow breaths into their chest. If a person’s chest rises as they
take a breath, it is a likely indicator of improper breathing. A proper
breath will draw air into the lungs, pushing the diaphragm down and
visibly expanding the belly. This is why diaphragmatic breathing is also
called “belly breathing.” Follow these steps to engage in deep,
diaphragmatic breathing:
1) Sit up straight, with one hand on the stomach and the other on
the chest.
2) Inhale slowly and deeply through the nostrils, feeling the
stomach expand with each full, diaphragmatic breath.
3) Exhale slowly out of the mouth.
4) Repeat six or more times each minute for up to 15 minutes.
Upping your daily intake of soluble fiber can decrease Trusted Source
low-density lipoprotein (LDL) cholesterol.
3 .Exercise:
Walking, jogging, biking, and swimming are all exercises that can help
lower cholesterol, especially if you do them three times per week or
more.
4 .Cut down on your alcohol intake:
Cutting down on beer, wine, and liquor can be a simple first step to
lowering your cholesterol.
5 .Try fish oil supplements
Fish oil supplements contain omega 3-chain fatty acids. These acids
may help lower triglycerides.
6 .Take a garlic supplement:
28
2.1 Infrared radiation
b)
c)
d)
fig [2] [ a) The oxygen saturation is therefore 0 %. b) Here, 8 of the 16
Hb have oxygen. The oxygen saturation is therefore 50 %. c) Similarly
for 75 %, d) when all the Hb have oxygen, the saturation is 100 %.]
32
So in summary, oxygen saturation tells you the percentage of the total
hemoglobin that is carrying oxygen [21].
into the probe. Above the finger are the light sources that emit light.
In the finger is an artery which carries the blood the pulse oximeter is
interested in and a vein through which the blood leaves the finger.
Below the finger is the light detector [21].
The light emitted from the source has to travel through the artery. The
light travels in a shorter path in the narrow artery and travels through
a longer path in the wider artery (paths are shown as green lines
below). Though the concentration of Hb is the same in both arteries,
the light meets more Hb in the wider artery, since it travels in a longer
path. Therefore, longer the path the light has to travel, more is the
light absorbed. This property is described in a law in physics called
35
“Lambert’s Law”.
Lambert’s Law: Amount of light absorbed is proportional to the length
of the path that the light has to travel in the absorbing substance.
37
We can repeat the same demonstration using deoxy Hb. Again notice,
how like oxy Hb, Deoxy Hb absorbs different amount of light at
different wavelengths.
Now let us see the absorbance graph of oxy Hb and the absorbance
graph of deoxy Hb together so you can compare them. Note how each
of them absorbs light of different wavelengths very differently.
Now look at the oxy Hb absorbance graph again, but this time paying
attention to the wavelengths of light used in pulse oximeters. You will
see that oxy Hb absorbs more infrared light than red light.
39
Below is the graph that shows the absorbance of deoxy Hb. It is seen
from the graph that deoxy Hb absorbs more Red light than Infrared
light.
40
Using this ratio, the pulse oximeter can then work out the oxygen
saturation.
Early on, we discussed how the pulse oximeter uses Beer’s and
Lambert’s Law (absorbance depends on concentration and path
length) as part of its factors that it uses to compute oxygen saturation.
Unfortunately, there is a problem. In physics, the Beer and Lambert
law have very strict criteria to be accurate. For an example, the light
that goes through the sample should go straight through like the lights
rays in the image below [21].
However, in real life, this does not happen. Blood is not a neat red
liquid. Instead, it is full of various irregular objects such as red cells etc.
This makes the light scatter, instead of going in a straight line.
Therefore, Beer and Lamberts Law cannot be applied strictly [21].
43
Because Beer and Lamberts law cannot be applied strictly, there would
be errors if they were used to directly calculate oxygen saturation. A
solution to this is to use a “calibration graph” to correct for errors. A
test pulse oximeter is first calibrated using human volunteers. The test
pulse oximeter is attached to the volunteer and then the volunteer is
asked to breath lower and lower oxygen concentrations. At intervals,
arterial blood samples are taken. As the volunteers blood desaturates,
direct measurements made on the arterial blood are compared
simultaneously with the readings shown by the test pulse oximeter.In
this way, the errors due to the inability of applying Beers and Lamberts
law strictly are noted and a correction calibration graph is made.
However, in order to not harm the volunteers, the oxygen saturation
is not allowed to drop below about 75 – 80 % [21].
On the other hand, the pulse oximeter knows that any absorbance that
is not changing, must be due to non pulsatile things such as skin and
other “non arterial” tissues.
Problem of movement
When you think of problems associated with pulse oximeters it is
important to remember that the signal that is analyzed is really tiny.
As explained before, it is only about 2 % of the total light that is
analyzed.
47
Which such a small signal, it is easy to see how errors can occur. Pulse
oximeters are very vulnerable to motion, such as a patient moving his
hand. As the finger moves, the light levels change dramatically. Such a
poor signal makes it difficult for the pulse oximeter to calculate oxygen
saturation [21].
results [21].
Problem of too much ambient light
As discussed before, in addition to the light from the LEDs, ambient
(room) light also hits the detector. For good functioning of the pulse
oximeter, the strength of the LED light falling on the detector should
be good when compared with the strength of the ambient light falling
on the detector [21].
If the ambient light is too strong, the LED light signal gets “submerged”
in the noise of the ambient light. This can lead to erroneous readings.
49
Therefore, it is important to minimize the amount of ambient light
falling on the detector. One can try and move away strong sources of
room light. One can also try and cover the pulse oximeter probe and
finger with a cloth etc.
The 100 % saturation in the above example tells us that the patient is
getting enough oxygen. However, it does not tell you that the patient
is getting too much oxygen (hyperoxia). Oxygen, while necessary for
life, can be harmful if given in excess. Therefore, other means (e.g.
arterial blood gas) have to be used to detect hyperoxia [21].
Problem of calibration
As mentioned before, pulse oximeters are calibrated using humans.
This means that low saturations may not be accurate.
52
Problem of Colored dyes and nail polish
The dye, methylene blue, if in the patient's circulation, will artificially
lower the displayed oxygen saturation. Finger nail polish can affect the
accuracy of saturation determination [21].
54
Chapter 3
Design Overview
55
Design and circuits of device
Our project includes two parts:
1) pulse oximeter
2) Non-invasive cholesterol sensor
Every part has its circuit, and its components.
Our device uses two LEDs for the 660nm and 940nm wavelengths.
These are alternated on/off, and the Arduino records the result from
the detector on the opposite side of the finger from the LEDs. The
detector signal for both LEDs pulses in time with the heartbeat of the
patient. The signal can thus be divided into two portions: a DC portion
(representing the absorbance at the specified wavelength of
57
1. The path length (b) for both LEDs is the same, causing it to drop out of
the equation
2. An intermediate ratio (R) is used. R =
(AC640nm/DC640nm)/(AC940nm/DC940nm)
3. Molar Absorption coefficients are constants. When divided, they can
be replaced with a generic fit factor constant. This causes a slight loss
in accuracy, but seems to be pretty standard for these devices.
3.1.3 Components
-Arduino Uno
-Photodiode
-47 nF Capacitor
-Wires
Arduino
Where RR was the resistance that used to limit current on the near-
infrared light, VS was the voltage of power supply, VRED was the bias
voltage of red light and IRED was the bias current of red light. The
power supply (Vs) from Arduino Nano 3.0 port was 5 Volts.
From the description of the near infrared LED light, it showed that
there would be VIR was 1 Volt and IIR was 20 milli amperes when
substitute in equation (1), the resistance R1 was 200 ohms. From the
description of the red LED light, it showed that there would be VRED
was 3 Volts and IRED was 20 milli amperes when substitute in equation
(2), the resistance R2 was 100 ohms.
Therefore, the resistances R1 and R2 used in a sensor circuit were 200
ohms and 100 ohms. For the light receiver used a photodiode that
received light energy and changed into a voltage by using the current
to voltage converter in part A1.
63
The current to voltage converter was used zero voltage biasing and
requires a Vout of 5 millivolts, the current of a photodiode (Id) was 1
nano-ampere, and the resistance in the circuit was calculated by the
Ohm law. Therefore, the resistance in current to voltage circuit R3 was
5 Mega ohms.
The processing part used the high pass filter which was used cut off
frequency 0. 5 Hertz, and a capacitor (C2) has capacitance 1 microfarad.
The resistance R4 was calculated by equation (3).
From the signal amplifier circuit in part B1 obtained the input voltage
(Vin) was 5 millivolts by determining the output voltage from non-
inverting amplifier circuit Vout in positive was 2 volts because the
circuit used a single- phase of the power supply is positive and the
voltage gain (Av) was 400. The current was used in op-amp was
calculated by equation (4).
65
Where IB(max) = 300 nano-amperes, therefore the current in equation
(4) was 30 microamperes. The design required Ri = R6 and Rf = R5
resistance R5 and R6 was calculated by Ohm’ s law and the voltage gain
as equation (5) and (6).
In the low pass filter in part B1 used to cut off frequency 2. 5 Hertz
and a capacitor (C3) has capacitance 1 microfarad. The resistance R5
in the circuit was 60 k and the capacitance was calculated by
equation (7).
Ring of sensors
and
photodiodes
LCD
75
Further Ideas for future:
76
References
77
[1] Freeman MW, Junge C. "Understanding cholesterol: the
good, the bad, and the necessary. In: The Harvard Medical
School Guide to Lowering patient's Cholesterol", New York, US:
McGraw-Hill, 2005.
[10] Huff, T., & Jialal I. (2019). Physiology, Cholesterol. [Updated 2019
Mar 13]. In: StatPearls [Internet].
Treasure Island (FL): StatPearls Publishing; 2019 Jan-. Available from:
https://www.ncbi.nlm.nih.gov/books/NBK470561/
https://medlineplus.gov/lab-tests/cholesterol-levels/.
[15] Tests to measure patient's oxygen levels. British Lung
Foundation. (2021, July 19). https://www.blf.org.uk/support-for-
you/breathing-tests/tests-measure-oxygen-levels.
Atherosclerosis. 263:e159
[21] how equipment works .com. how equipment works com. (n.d.).
https://www.howequipmentworks.com/pulse_oximeter/.
[22] Ben, N. and, & Instructables. (2020, July 28). Arduino Pulse
Oximeter. Instructables. https://www.instructables.com/Arduino-
Pulse-Oximeter/.
81
APPENDIX
Arduino control code of pulse oximeter and cholesterol
senor:
#include <LiquidCrystal.h>
void setup() {
// put your setup code here, to run once:
pinMode(A2,INPUT);
Initialize_Serial_Monitor(BUAD_RATE);
Initialize_LCD(16, 4);
Print_Welcome_Message();
Initialize_Components_Cholesterol();
Turn_On_Transmitter_Cholesterol();
Set_Analog_Reference_Pulse();
Initialize_Pulse_Components();
}
84
void loop() {
// put your main code here, to run repeatedly:
//Pulse_Function();
lcd.clear();
lcd.setCursor(2, 0);
lcd.print("SpO2 = ");
lcd.setCursor(10, 0);
lcd.print(Pulse_Function());
//Cholesterol_Function();
Serial.print(Cholesterol_Function());
Serial.println(" mg/dL");
lcd.setCursor(0, 1);
lcd.print("Cholesterol Lvl = ");
lcd.setCursor(10, 2);
lcd.print(Cholesterol_Function());
delay(250);
}
}
void Initialize_LCD(char rows, char columns)
{
lcd.begin(rows, columns);
}
void Print_Welcome_Message(void)
{
lcd.setCursor(4, 0);
lcd.print("Cholesterol");
lcd.setCursor(8, 1);
lcd.print("&");
lcd.setCursor(7, 2);
lcd.print("Pulseoxmeter");
lcd.setCursor(10, 3);
lcd.print("Project");
delay(5000);
}
void Set_Analog_Reference_Pulse(void)
{
analogReference(INTERNAL); //Sets Reference to 1.1V
}
86
void Initialize_Pulse_Components(void)
{
pinMode(LED_RED, OUTPUT);
pinMode(LED_IR, OUTPUT);
pinMode(detectorPin, INPUT); //Sets detectorPin as an input pin
}
float Pulse_Function(void)
{
beginning: //Tag for "goto"
while(redVal == irVal)
87
continue;
if(redVal > redAC)
redAC = redVal; //Makes redAC the max value for the red LED
redDC = 1024;
irAC = 0;
irDC = 1024;
return SpO2;
// lcd.clear();
// lcd.setCursor(2, 0);
// lcd.print("SpO2 = ");
// lcd.setCursor(10, 0);
// lcd.print(int(SpO2));
// //delay(50);
// Serial.print(rVal);
// Serial.print(",");
// Serial.println(SpO2); //Prints rVal and Sp02 to the serial
monitor/plotter
}
}
digitalWrite(LED_RED, HIGH);
}
else
{
digitalWrite(LED_RED, LOW);
digitalWrite(LED_IR, HIGH);
}
delay(stabilityDelay);
return analogRead(detectorPin);
}
void Initialize_Components_Cholesterol(void)
{
pinMode(RED_LED,OUTPUT);
pinMode(IR_LED,OUTPUT);
pinMode(PHOTO_DIODE,INPUT);
}
void Turn_On_Transmitter_Cholesterol(void)
{
digitalWrite(RED_LED,HIGH);
90
digitalWrite(IR_LED,HIGH);
}
float Cholesterol_Function(void)
{
for(uint8 i = 0 ; i < 6 ; i++)
{
Photo_Diode_Reading[i] = analogRead(A1);
Serial.println(Photo_Diode_Reading[i]);
}
for(uint8 i = 0 ; i < 4 ; i++)
{
Cholesterol_Level_Pure += Photo_Diode_Reading[i];
Cholesterol_Level_Pure = Cholesterol_Level_Pure/24;
91
//if((Photo_Diode_Reading[i] >= 100 && Photo_Diode_Reading[i] <=
200) && (Photo_Diode_Reading[i+1] >= 100 &&
Photo_Diode_Reading[i+1] <= 200) && (Photo_Diode_Reading[i+2] >=
100 && Photo_Diode_Reading[i+2] <= 200))
//{
//Cholesterol_Level_Pure = (Photo_Diode_Reading[i] +
Photo_Diode_Reading[i+1] + Photo_Diode_Reading[i+2]) / 3;
//break;
//}
//else
//{
//Cholesterol_Level_Pure = 0;
//}
}
if(Cholesterol_Level_Pure == 0)
92
{
Cholesterol_Level = 0;
}
else
{
Cholesterol_Level = (PARAMETER_1 *
Power(Cholesterol_Level_Pure,3)) - (PARAMETER_2 *
Power(Cholesterol_Level_Pure,2)) + (PARAMETER_3
*Cholesterol_Level_Pure ) + PARAMETER_4;
}
return Cholesterol_Level;
//Serial.print(Cholesterol_Level);
//Serial.println(" mg/dL");
//delay(500);
}
93