Professional Documents
Culture Documents
PROJECT
PROJECT
BACKGROUND:
From medical workers manually checking patients' pulses to the introduction of
computerized heart rate monitors, the history of heart rate monitors has been revolutionary.
These monitors were once only used in clinical settings, but they are now widely used in both
consumer and medical applications. Heart rate monitoring is significant since it is one of the
most important markers of cardiovascular health. Frequent monitoring helps preventative
healthcare initiatives by enabling early abnormality discovery.
Additionally, by guaranteeing safe workout intensities, heart rate monitors are essential for
enhancing fitness regimens. With cutting-edge tools like electrocardiography (ECG), they aid
in the diagnosis and treatment of heart disorders. Continuous heart rate monitoring has
benefits beyond medicine in that it helps people reduce stress and enhance their general
health. Sensors are the foundation of how heart rate monitor’s work.
COMPONENTS:
1. Arduino UNO
2. OLED
3. PULSE SENSOR
4. BUZZER
5. VERO BOARD
6. JUMPER WIRES
THEORY:
ARDUINO:
Arduino is an open-source platform (Often
referred as Micro-controller) used for building
electronics projects. Arduino consists of both a
Programmable hardware and a software which
is used to over write the Arduino Programmable
Hardware by using language Which in terms
called embedded C and C.
PULSE SENSOR:
A pulse sensor is a device used to measure the
heart rate (pulse) of an individual. It typically
works by detecting the pulsatile component of
blood flow in peripheral blood vessels, usually
the fingertip.
The working of the Pulse/Heart beat sensor is
very simple.The sensor has two sides, on one side
the LED is placed along with an ambient light
sensor and on the other side we have some
circuitry. This circuitry is responsible for the
amplification and noise cancellation work. The
LED on the front side of the sensor is placed over
a vein in our human body. This can either be your
Finger tip or you ear tips, but it should be placed
directly on top of a vein.Now the LED emits light
which will fall on the vein directly. The veins will
have blood flow inside them only when the heart
is pumping, so if we monitor the flow of blood we can monitor the heart beats as well. If the
BUZZER:
A buzzer is an electroacoustic device
that produces sound when an electrical
signal is applied to it. It is a simple form
of a transducer that converts electrical
energy into mechanical vibrations,
resulting in audible sound waves.
Connections:
1. Connect the positive (+) terminal of
the buzzer to one of the digital output
pins on the Arduino.
2. Connect the negative (-) terminal of
the buzzer to the Arduino's GND
(ground) pin.
VERO BOARD:
A vero board, also referred to as a
stripboard or perfboard, is a versatile
circuit prototyping platform commonly
used in electronics. The board is
characterized by a grid of perforations
or holes arranged in rows and columns.
One side of the board features copper
strips, usually organized horizontally,
connecting the holes. These copper strips
allow for the creation of electrical
connections between components. The
opposite side of the board typically
consists of an insulating material,
ensuring electrical isolation between the
copper strips.
When assembling a circuit on a vero board, electronic components like resistors, capacitors,
and integrated circuits are mounted by inserting their leads into the holes. The leads are
• Similarly connect the VCC Pin of OLED Display to Arduino 3.3V pin and GND
to GND. Connect its SDA & SCK pins to Arduino A4 & A5 pins respectively.
WORKING OF CIRCUITRY:
Pulse Sensor:
The pulse sensor works by emitting an Infra-Red signal from an IR-Diode onto the skin. Just
underneath the skin, there are capillaries carrying blood. Every time heart pumps there is a
small increase in blood flow/pressure. This swells the capillaries slightly, this slightly more
filled capillary reflects more infra-red than at times when the heart is not giving your blood a
“push”. An Infra-detector on the device senses the different reflected IR levels. Some simple
comparator circuitry converts this into a voltage signal which we can read with the Arduino
Analog inputs.
OLED Address:
Since the OLED used here is an I2C OLED, so it has a particular device address. To find
the I2C address first scan the OLED with the I2C Scanner program. Normally the OLED
Display has a device address of 0x3C or 0X3D.
if((value<LowerThreshold)&(BPMTiming)) BeatComplete=true;
oled.writeFillRect(0,50,128,16,BLACK); oled.setCursor(0,50);
Department Of Biomedical Engineering
Sir Syed University of Engineering and Technology, Karachi.
oled.print("BPM:");
oled.print(BPM);
oled.display();
a++;
}
Adafruit_SSD1306 oled(128, 64); // create our screen object setting resolution to 128x64 int
a=0;
int lasta=0;
int lastb=0;
int LastTime=0;
int ThisTime;
bool BPMTiming=false;
bool BeatComplete=false;
int BPM=0;
#define UpperThreshold 560
#define LowerThreshold 530 void setup() {
oled.begin(SSD1306_SWITCHCAPVCC, OLED_Address);
oled.clearDisplay();
oled.setTextSize(2);
}
void loop()
{
if(a>127)
{
oled.clearDisplay(); a=0;
lasta=a;
}
ThisTime=millis();
int value=analogRead(0);
oled.setTextColor(WHITE);
int b=60-(value/16);
oled.writeLine(lasta,lastb,a,b,WHITE);
lastb=b;
lasta=a;
if(value>UpperThreshold)
{
if(BeatComplete)
{
BPM=ThisTime-LastTime; BPM=int(60/(float(BPM)/1000)); BPMTiming=false;
BeatComplete=false; tone(8,1000,250);
}
if(BPMTiming==false)
{
LastTime=millis();
BPMTiming=true;
if((value<LowerThreshold)&(BPMTiming)) BeatComplete=true;
oled.writeFillRect(0,50,128,16,BLACK);
oled.setCursor(0,50);
oled.print("BPM:");
oled.print(BPM);
oled.display();
Department Of Biomedical Engineering
Sir Syed University of Engineering and Technology, Karachi.
a++;
}
In the setup function, the OLED display is initialized. The oled.begin function configures the
display, and oled.clearDisplay clears any existing content on the screen. oled.setTextSize
sets the text size to 2.
Now, let's go through the loop function step by step:
Drawing on OLED: If the counter 'a' exceeds 127 (the width of the OLED display), it
clears the display and resets the counter. The 'oled.writeLine' function is employed to draw a
line on the OLED display, representing the ECG wave. The coordinates are determined based
on the counter 'a' and the analog sensor value ('value').
Heartbeat Detection: The analog sensor value is read and stored in the variable 'value'. If
'value' is above the 'UpperThreshold', it indicates a heartbeat. If a complete heartbeat
('BeatComplete') is detected, the heart rate (BPM) is calculated based on the time between the
current and last heartbeat. The 'tone' function is utilized to produce an audible indication.
BPM Timing: If 'BPMTiming' is not active, it records the current time as the starting point
for BPM calculation.
BPM Calculation and Display: The heart rate (BPM) is calculated based on the time
between heartbeats. The BPM value is then displayed on the OLED screen.
Updating OLED Display: The lower part of the OLED display is cleared ('oled.writeFillRect') to
update the BPM value. The BPM value is printed on the display. Incrementing Counter: The
counter 'a' is incremented for the next iteration.
1) We recently undertook a project to create a heart rate monitor featuring an ECG wave
using components such as a Pulse Sensor, Arduino Uno, OLED display, and a buzzer. The
journey began by gathering all the necessary materials, including jumper wires and a
breadboard. We meticulously connected the Pulse Sensor to the Arduino Uno, linking VCC
to 5V, GND to GND, and the signal output to Analog Pin A0.
2) Moving on, established connections for the OLED display, attaching SDA to Analog Pin
A4, SCL to Analog Pin A5, VCC to 5V, and GND to GND. The Buzzer followed, with its
positive end connected to Digital Pin 8 and the negative end to the Arduino's GND.
3) For a more permanent connection, we decided to solder the wires. Setting up a well-
ventilated and well-lit workspace, tinned the wire tips and carefully connected them to their
respective pins on each component using a soldering iron. Heat shrink tubing provided
insulation, ensuring secure connections and minimizing the risk of short circuits.
4) The next step involved assembling the components on the breadboard, ensuring a tidy
layout and confirming the stability of connections. With the hardware in place, installed the
Arduino IDE on my computer and integrated the necessary libraries for the OLED display.
5) Taking the Arduino code from reference (https://www.arduino.cc/) and adjusted it as per
the requirement, verified it, and uploaded it to the Arduino Uno. Opening the Serial Monitor
allowed me to observe any debug information.
6) Upon powering on the Arduino Uno and placing the Pulse Sensor on my fingertip, the
OLED display vividly showcased heart rate and ECG wave representations. The added
auditory dimension from the buzzer further enriched the experience.
7) To fine-tune the project, we adjusted the code and thresholds for calibration, aligning
them with the unique characteristics of my Pulse Sensor. After ensuring the correct pin
usage, we reached a satisfying outcome.
8) In the final phase of the project, we took the initiative to secure the components within a
project enclosure, providing a polished appearance to the hardware circuit. To ensure a more
permanent and robust setup, we decided to transition from the breadboard to a vero board.
The soldering process onto the vero board demanded careful attention to detail.
After selecting an appropriately sized vero board, we meticulously replicated the circuit layout
from the breadboard. The soldering iron was employed to heat the copper pads, and with
precision, we affixed each component securely in place.
9) Throughout the process, paid close attention to wire routing, insulating adjacent traces, and
double-checking connections for potential issues like solder bridges or cold joints. The
soldered components were then firmly secured to the vero board, providing stability and
durability to the assembly. Thorough testing of the circuit was conducted before proceeding
to the final step of integrating the vero board into the project enclosure. This integration was
OBSERVATION TABLE:
The addition of an audible component through the buzzer further enriched the user
experience, synchronizing with each detected heartbeat and adding an extra layer of
engagement to the monitoring process. The transition from a temporary breadboard setup to a
more permanent solution on a vero board, coupled with meticulous soldering, significantly
enhanced the stability and reliability of the hardware circuit. This shift contributes to a more
enduring solution suitable for long-term use.
The integration of the vero board into a project enclosure serves both practical and aesthetic
purposes. The carefully executed placement ensures easy access to external components
while presenting a tidy and organized appearance. Throughout the development, the
calibration of the Arduino code played a pivotal role in achieving precise and meaningful
monitoring results. Adjustments to thresholds and timing parameters were made to fine-tune
the system, contributing to its overall accuracy.
In essence, the results attained underscore the success of the heart rate monitor project,
emphasizing the importance of meticulous attention to details during construction, soldering
processes, and coding phases. The cohesive integration of hardware and software
components has culminated in a functional, reliable, and user-friendly heart rate monitoring
system with an ECG wave display.
RANGE OF RESOURCES:
For the engineering activity involving the creation of a heart rate monitor with an ECG wave
display, a diverse range of resources was harnessed to ensure the project's success. The
collective expertise of the project team, which included two people, played a crucial role in
conceptualizing, designing, and implementing the heart rate monitoring system.
Financial resources were allocated for the project, covering the procurement of essential
components such as
700Rs Pulse Sensors
550Rs OLED displays
50Rs for buzzer with a total budget of 1300 units of currency
The infrastructure, both physical and technological, provided the necessary support for the
project, including dedicated workspaces, soldering equipment, power supplies, and
computers for coding tasks. A wealth of tangible materials, from jumper wires and a
breadboard to the actual electronic components, formed the building blocks of the heart rate
monitor. Access to relevant information, spanning knowledge about the Pulse Sensor's
OUR EXPERIENCE:
Our exploration of the relevant principles and laws necessary for implementing the heart rate
monitor project was a recent endeavour, providing us with a foundation of knowledge. While
we had a conceptual roadmap outlining the steps to achieve our desired outcome, there were
instances where we found ourselves second-guessing certain decisions along the way. This
experience prompted us to engage in a continuous process of evaluation and refined
prediction, enhancing our ability to foresee potential outcomes. The need to
navigate uncertainties and make informed decisions at various points in the project
contributed to a more nuanced understanding of the subject matter. Overall, this experience
fostered a dynamic learning environment, where our theoretical understanding intersected with
the practical challenges of constructing a heart rate monitor with an ECG wave display.