You are on page 1of 57

CHAPTER ONE

1.0 INTRODUCTION

Currently there is a growing research interest in measuring the heart rate and temperature status

from the body, because of their importance as health parameters of the human cardiovascular

system. This countable rate from the heart is the number of heartbeats per unit of time which is

typically expressed as beats per minute (bpm) and the temperature measurement is recorded in

degree Celsius (oC). The rate of the bpm varies on parameter to parameter, like age, physical

condition and activities and the normal body temperature is about 37 oC. The average heart rate of

a healthy adult at rest is around 72 bpm. On the other hand, infants and babies have a much

higher heart rate than adult individuals which is between 80-160 bpm [ CITATION DrJ20 \l

1033 ]. However, to understand and to count the exact bpm from different subjects, it is

necessary to develop an easy to use, portable and low cost heart rate monitoring system.

Because, the measurement of heart rate is used by medical professionals to assist in the diagnosis

and tracking of medical conditions, it is very vital to measure this signs always to keep track of

the patient’s condition[ CITATION TSa08 \l 1033 ]. Heart rate indicates the soundness of

our heart and helps assessing the condition of cardiovascular system. In clinical environment,

heart rate is measured under controlled conditions like blood measurement, heart voice

measurement, and

Electrocardiogram (ECG) but it can be measured in home environment also. Our heart pounds to

pump oxygen-rich blood to our muscles and to carry cell waste products away from our muscles.

The more we use our muscles, the harder our heart works to perform these tasks- means our heart

must beat faster to deliver more blood. A heart rate monitor is simply a device that takes a

1
sample of heartbeats and computes the Beats per Minute (bpm) so that the information can easily

be used to track heart condition. The average resting human heart rate is about 70 bpm for adult

males and 75 bpm for adult females. Heart rate varies significantly between individuals based on

fitness, age and rates. Heart rate can be measured by measuring one's pulse.

Pulse measurement can be achieved by using specialized medical devices, or by merely pressing

one's fingers against an artery (typically on the wrist or the neck). It is generally accepted that

listening to heartbeats using a stethoscope, a process known as auscultation, is a more accurate

method to measure the heart rate. There are many other methods to measure heart rates like

Phonocardiogram (PCG), ECG, blood pressure wave form and pulse meters but these methods

are clinical and expensive. There are other cost-effective methods that are implemented with

sensors as proposed in and but they are susceptible to noise and movement of subject and artery.

In this project, the design and development of a low powered heart rate and temperature

measuring device is presented that provides an accurate reading of the heart rate using optical

technology and the temperature using a thermistor. The device is economic, portable, durable,

and cost effective. We incorporated the optical technology using standard Light Emitting Diode

(LED) and photo-sensor to measure the heart rate within seconds using index finger and the

temperature using one wire communication protocol. A microcontroller is programmed to count

the pulse, package it and send to the LCD display. [ CITATION PGi15 \l 1033 ]

1.1 BACKGROUND AND JUSTIFICATION OF STUDY

Health related issues and parameters are of utmost importance to man, and is essential to his

existence and influence and thus he has sought for an improved system that would be able to

capture and monitor the changes in health parameters irrespective of time and location so as to

provide for measures that will forestall abnormalities and cater for emergencies. This project
2
herein proposed presents a system that is capable of providing real time remote monitoring of the

heartbeat rate in beat per minute (BPM) and the temperature in degree Celsius ( oc) with

improvements of PC interfacing of the result which can be stored, and used for further diagnosis.

This project aims at the design and implementation of a low cost but efficient and flexible

heartbeat and temperature monitoring and wireless transmission of the obtained results to the

doctor’s office for online monitoring of each patient. The result is transmitted every minute to

update the current status of the patient under monitoring [ CITATION SGu02 \l 1033 ]

1.2 AIM AND OBJECTIVE OF THE STUDY

1.2.1 AIM OF THE STUDY

This system herein proposed is aimed at designing, implementing and installing an integrated

vital signs measurement devices into one single system that is capable of monitoring the

heartbeat rate and the temperature, of a patient simultaneously in he/she respective ward and

display the results on an LCD screen. An alarming system is also integrated into the system to

alert the doctor when any of these vital signs indicates abnormality, for quick analysis, diagnosis

and treatment.

1.2.2 OBJECTIVE OF THE STUDY

 To interface a heat beat detector module to a microcontroller.

 To interface a Thermistor temperature sensor to a microcontroller.

 To interface a 16 x 2 LCD display to a microcontroller.

 To establish communication between a microcontroller and the sensors

3
1.3 MOTIVATION

To routinely check all the mentioned vital signs from patients in a hospital or clinic might be a

cumbersome or tiresome job for health care professionals when many patients are involved.

A minute means a lot in saving human’s life. The convention or traditional routine nurse’s check

time interval on patient in hospital wards might be good enough to lose a life.

And again; in the night, when there are chances of less supervision by health care professionals,

still yet, what about during weekends, industrial action (strike) period or when lazy and I-don-

care peoples are on duty? chances are high that patients will be exposed to critical situations, and

high tendency are there to lose patients.

Having studied and considered the lapses and situations that expose patients to critical

conditions, a solution is hereby proposed that will keep the medical team in constant check of the

patient health condition virtually. The device is capable of monitoring all this vital signs (the

temperature and the heartbeat rate,) of a patient in his/her ward, and display the result on an LCD

screen. An alarming system is incorporated that will sound when an abnormal reading is

detected. These vital signs will be checked and updated every predefined interval of time.

1.4 CONTRIBUTION TO KNOWLEDGE

This project “Heartbeat Rate and Temperature Monitoring Device” has a lot of contribution

to the current technological growth in Nigeria and the world at large. But I would restrict the

contributions towards electrical and electronic technology. These contributions include:

i. Development of customized firmware for the Microcontroller Unit

ii. Development of hardware interface using Arduino mini pro based.

4
iii. Interface Arduino mini to temperature sensor, heartbeat sensor, RF transceiver. TTL

converter and PC.

iv. Design a working and neat circuit diagram using proteus software.

v. Design a customized casing.

1.5 SCOPE AND LIMITATION OF PROJECT

Recent breakthroughs in science and technological innovations have led to an unprecedented

advancement in provisions of technological solutions for the numerous problems facing

mankind. Researchers are busy leveraging on modern technology to provide better and improved

solutions commensurate to the ever increasing demands. A Heartbeat Rate and Temperature

Monitoring Device is a personal monitoring device that allows one's heart rate and temperature

to be measured in real time or record the result for later study. This design has numerous

advantages as well as application but it’s also subjected to many limitations and criticisms. This

includes:

 The infrared sensor picks up signal from any object that provides frequency that

interferes with its path.

 It cannot work effectively with voltage below 5volts and interruption in power

might alter the system’s efficiency.

 There might be error in measurement due environmental conditions and other

parameters.

1.6 SYSTEM OVERVIEW

DC DATA DISPLAY
SENSORS
POWER PATIENT PROCESS

Figure 1:1: System overview


1.7 STRUCTURE OF THE REPORT

The project layout is as show below;

Chapter 1: This comprises of the introduction to the project, Background of the study, Aim and

Objectives, Motivation and the scope and limitation of the project design.

Chapter 2: Here we look at the literature review of the project design, related designs and recent

improvement and development made towards the project.

Chapter 3: This section or chapter involves the methodology, design analysis, implementation

and the engineering bill of quantity.

Chapter 4: This section discus the Test, Result, all measurement and analysis of the project and

validation of the workability.

Chapter 5: This chapter states the conclusion of the project , and recommendation.

Reference and Appendix.

6
CHAPTER TWO

LITERATURE REVIEW

2.0 INTRODUCTION

Health related issues and parameters are of utmost importance to man, and is essential to his

existence and influence and thus he has sought for an improved system that would be able to

capture and monitor the changes in health parameters irrespective of time and location so as to

provide for measures that will forestall abnormalities and cater for emergencies.

Heart rate is the number of heartbeats per unit of time, typically expressed as beats per minute.

Heart rate can vary as the body's need to absorb oxygen and excrete carbon dioxide changes

during exercise or sleep. The measurement of heart rate is used by medical professionals to assist

in the diagnosis and tracking of medical conditions. It is also used by individuals, such as

athletes, who are interested in monitoring their heart rate to acquire maximum efficiency.

Changes in lifestyle and unhealthy eating habits have resulted in a dramatic increase in incidents

of heart and vascular diseases. Furthermore, heart problems are being increasingly diagnosed on

younger patients. Worldwide, Coronary heart disease is now the leading cause of

death[ CITATION Wik17 \l 1033 ]. Thus, any improvements in the diagnosis and treatment tools

are welcomed by the medical community. In a clinical environment, heart rate is measured under

controlled conditions like blood measurement, heart beat measurement, and Electrocardiogram

(ECG). However, there is a great need that patients are able to measure the heart rate in the home

environment as well. The heart rate rises gradually during exercises and returns slowly to the rest

value after exercise. The rate at which the pulse returns to normal is an indication of the fitness

of the person. This paper presents the design and implementation of a compact and low cost

7
microcontroller-based portable system used for monitoring of heart beat on real time and alerting

about patient to a care person in real time [ CITATION Moh08 \l 1033 ].

A temperature is an objective comparative measure of hot or cold. It is measured by

a thermometer, which may work through the bulk behavior of a thermometric material, detection

of thermal radiation, or particle kinetic energy. Several scales and units exist for measuring

temperature, the most common being Celsius (denoted °C; formerly called

centigrade), Fahrenheit (denoted °F), and, especially in science, Kelvin (denoted K).

The coldest theoretical temperature is absolute zero, at which the thermal motion of atoms and

molecules reaches its minimum classically, this would be a state of motionlessness, but quantum

uncertainty dictates that the particles still possess a finite zero-point energy. In addition to this, a

real system or object can never be brought to a temperature of absolute zero by thermodynamic

means. Absolute zero is denoted as 0 K on the Kelvin scale, 273.15 °C on the Celsius scale, and

459.67 °F on the Fahrenheit scale [ CITATION TSa08 \l 1033 ].

Normal human body temperature, also known as normothermia or euthermia, is a narrow

temperature band indicating optimal health and thermoregulation. Individual body temperature

depends upon the age, sex, health, and reproductive status of the subject, the place in the body at

which the measurement is made, the time of day, the subject's state of consciousness (waking or

sleeping), activity level, and emotional state. Despite these factors, typical values are well

established: oral (under the tongue): 36.8±0.4 °C (98.2±0.72 °F), internal (rectal, vaginal):

37.0 °C (98.6 °F).

A rectal or vaginal measurement taken directly inside the body cavity is typically slightly higher

than oral measurement, and oral measurement is somewhat higher than skin measurement. Other

8
places, such as under the arm or in the ear, produce different typical temperatures. While some

people think of these averages as representing normal or ideal measurements, a wide range of

temperatures has been found in healthy people. The body temperature of a healthy person varies

during the day by about 0.5 °C (0.9 °F) with lower temperatures in the morning and higher

temperatures in the late afternoon and evening, as the body's needs and activities change. Other

circumstances also affect the body's temperature. The core body temperature of an individual

tends to have the lowest value in the second half of the sleep cycle; the lowest point, called

the nadir, is one of the primary markers for circadian rhythms. The body temperature also

changes when a person is hungry, sleepy, sick, or cold [ CITATION Ash09 \l 1033 ].

Human body temperature is of interest in medical practice, human reproduction, and athletics.

2.1 SPECIFIC TEMPERATURE CONCEPT

2.1.1 FEVER

A temperature set point is the level at which the body attempts to maintain its temperature. When

the set point is raised, the result is a fever. Most fevers are caused by infectious disease and can

be lowered, if desired, with antipyretic medications[ CITATION Kri19 \l 1033 ] .

An early morning temperature higher than 37.2 °C (99.0 °F) or a late afternoon temperature

higher than 37.7 °C (99.9 °F) is normally considered a fever, assuming that the temperature is

elevated due to a change in the hypothalamus's set point. Lower thresholds are sometimes

appropriate for elderly people. The normal daily temperature variation is typically 0.5 °C

(0.90 °F), but can be greater among people recovering from a fever [ CITATION SNB84 \l

1033 ].

9
An organism at optimum temperature is considered afebrile meaning "without fever". If

temperature is raised, but the set point is not raised, then the result is hyperthermia.

2.1.2 HYPERTHERMIA

Hyperthermia occurs when the body produces or absorbs more heat than it can dissipate. It is

usually caused by prolonged exposure to high temperatures. The heat-regulating mechanisms of

the body eventually become overwhelmed and unable to deal effectively with the heat, causing

the body temperature to climb uncontrollably. Hyperthermia at or above about 40 °C (104 °F) is

a life-threatening medical emergency that requires immediate treatment. Common symptoms

include headache, confusion, and fatigue. If sweating has resulted in dehydration, then the

affected person may have dry, red skin [ CITATION Bod20 \l 1033 ] With fever, the body's core

temperature rises to a higher temperature through the action of the part of the brain that controls

the body temperature; with hyperthermia, the body temperature is raised without the consent of

the heat control centers.[ CITATION KSh99 \l 1033 ].

2.1.3 HYPOTHERMIA

In hypothermia, body temperature drops below that required for normal metabolism and bodily

functions. In humans, this is usually due to excessive exposure to cold air or water, but it can

be deliberately induced as a medical treatment. Symptoms usually appear when the body's core

temperature drops by 1–2 °C (1.8–3.6 °F) below normal temperature [ CITATION GCo95 \l

1033 ].

2.2 BASAL BODY TEMPERATURE

Basal body temperature is the lowest temperature attained by the body during rest (usually

during sleep). It is generally measured immediately after awakening and before any physical

10
activity has been undertaken, although the temperature measured at that time is somewhat higher

than the true basal body temperature. In women, temperature differs at various points in

the menstrual cycle, and this can be used in the long-term to track ovulation both for the purpose

of aiding conception or avoiding pregnancy. This process is called fertility awareness.

2.3 HUMAN TEMPERATURE VARIATION EFFECT

2.3.1 HOT

 44 °C (111.2 °F) or more – Almost certainly death will occur; however, people have been

known to survive up to 46.5 °C (115.7 °F).

 43 °C (109.4 °F) – Normally death, or there may be serious brain damage, continuous

convulsions and shock. Cardio-respiratory collapse will likely occur.

 42 °C (107.6 °F) – Subject may turn pale or remain flushed and red. They may become

comatose, be in severe delirium, vomiting, and convulsions can occur. Blood pressure may

be high or low and heart rate will be very fast.

 41 °C (105.8 °F) – (Medical emergency) – Fainting, vomiting, severe headache,

dizziness, confusion, hallucinations, delirium and drowsiness can occur. There may also be

palpitations and breathlessness.

 40 °C (104.0 °F) – Fainting, dehydration, weakness, vomiting, headache and dizziness

may occur as well as profuse sweating. Starts to be life-threatening.

 39 °C (102.2 °F) – Severe sweating, flushed and red. Fast heart rate and breathlessness.

There may be exhaustion accompanying this. Children and people with epilepsy may be very

likely to get convulsions at this point.

11
 38 °C (100.4 °F) – (this is classed as hyperthermia if not caused by a fever) Feeling hot,

sweating, feeling thirsty, feeling very uncomfortable, slightly hungry. If this is caused

by fever, there may also be chills.

2.3.2 NORMAL

 37 °C (98.6 °F) – Normal internal body temperature (which varies between about 36.12–

37.8 °C (97.02–100.04 °F))

2.3.3 COLD

 36 °C (97 °F) – Feeling cold, mild to moderate shivering (body temperature may drop

this low during sleep). May be a normal body temperature.

 35 °C (95 °F) – (Hypothermia is less than 35 °C (95 °F)) – Intense shivering, numbness

and bluish/grayness of the skin. There is the possibility of heart irritability.

 34 °C (93 °F) – Severe shivering, loss of movement of fingers, blueness and confusion.

Some behavioral changes may take place.

 33 °C (91 °F) – Moderate to severe confusion, sleepiness, depressed reflexes, progressive

loss of shivering, slow heartbeat, shallow breathing. Shivering may stop. Subject may be

unresponsive to certain stimuli.

 32 °C (90 °F) – (Medical emergency) Hallucinations, delirium, complete confusion,

extreme sleepiness that is progressively becoming comatose. Shivering is absent (subject

may even think they are hot). Reflex may be absent or very slight.

 31 °C (88 °F) – Comatose, very rarely conscious. No or slight reflexes. Very shallow

breathing and slow heart rate. Possibility of serious heart rhythm problems.

12
A REVIEW OF RELATED WORKS

2.4 BASED ON HEARTBEAT MONITORING

In the work “Heartbeat monitoring alert via SMS”, the heart beat rate is detected using photo

plethysmograph (PPG) technique. This signal is processed using PIC16F87 microcontroller to

determine the heart beat rate per minute. Then, it sends SMS alert to the mobile phone of

medical experts or patient's family members, or their relatives via SMS. Thus, doctors can

monitor and diagnose the patient's condition continuously and could suggest earlier precaution

for the patients themselves. This will also alert the family members to quickly attend the patient.

PPG is a simple and low-cost optical technique that can be used to detect blood volume changes

in the micro vascular bed of tissue. Frequently, it is used non-invasively to make measurements

at the skin surface. A PPG is often obtained by using a pulse oximeter which illuminates the skin

and measures changes in light absorption. Typically, a PPG tools uses an emitter-receiver pair to

determine blood flow. It consists of a matched infrared emitter and photodiode, which transmits

changes in infrared reflectance resulting from varying blood flow. A heartbeat sensor circuit

which adopted PPG technique is designed using MPLAB software [ CITATION Moh08 \l

1033 ].

As a means of making monitoring systems cost effective and flexible, the work “A Low Cost

Optical Sensor Based Heart Rate Monitoring System” was conceived by researchers. This

proposes the design and implementation of a single Microcontroller based heart rate measuring

13
device that integrates most of the key features of the aforementioned devices and models. The

device is compact in size, energy efficient, portable, capable of data storage and well suited for

communicating with an external remote device via Bluetooth and cellular communication in case

of a medical emergency or routine. It is based on a single Microcontroller chip that utilizes

change in amount of reflection of light sensed by a photo transistor. A photo transistor is used to

sense the reflected light. Signal received by the photo transistor is very weak and perturbed by

high frequency noise. In order for this signal to be processed in Microcontroller, it is needed to

eliminate undesired noise. Furthermore, the signal level is to be raised to a satisfactory level so

that the spikes coming from the transistor during each time the heart beats can be distinguished

properly by the Microcontroller. After noise being properly attenuated, the signal is fed to the

Microcontroller where the data processing is done by converting the analog signal to digital

signal. This device has been developed with significant operational conformity with its

commercial counterparts. It is designed to respond during medical emergencies via Bluetooth

and cellular communication. Furthermore, it can store bulk of data and can also be made

conveniently portable. In the work titled “Microcontroller Based Heart Beat Monitoring and

Alerting System”. It explains how a single-chip microcontroller can be used to analyze heart beat

rate in real-time. In addition, it allows doctors to get the heart beat and location of the patient by

GSM every twenty-four hours. It can also be used to control patients or athletic person over a

long period. The system reads store and analyses the heartbeat repetitively in real-time

[ CITATION MJB87 \l 1033 ]. The hardware and software design are oriented towards a

single-chip microcontroller-based system, hence minimizing the size. The hardware design is

based on an embedded system implementation using the PIC16F877 (a 40 bit) microcontroller

from microchip. This system consists of Microcontroller (PIC16F877A), heart beat sensor, GSM

14
modem, GPS receiver. For measuring Heartbeat, input is taken from the finger. Heart beat sensor

will generate digital pulse corresponding to each beat. This pulse is counted by interfacing heart

beat sensor to microcontroller to pin no. 15(TICKL) and programming the microcontroller in

counter mode. After counting of pulse for one minute, value of heart beat will be displayed on

LCD and if value is beyond the normal range then location of patient will be messaged to doctor

or health attendant personnel using GSM [ CITATION GBo05 \l 1033 ].

Figure 0:2.1: HEARTBEAT MONITORING SYSTEM

2.5 BASED ON WIRELESS SYSTEM

The approach of this project is to design an automatic wireless health monitoring system. The

objective is to monitor the temperature and heartbeat of the patient’s body which should be

displayed to the doctor using NRF technology. In hospitals, the monitoring of the patients’ health

is done by the staff members of the hospital. The temperature and heart rate of the patient’s body

is checked constantly and a record of it is kept. The required components used in this system

15
include a power supply, ATmega328 microcontroller, a temperature ATmega328 microcontroller

is used as a CPU for monitoring the temperature of the patient’s body. The working of this

proposed health monitoring system can be explained with the help of a block diagram. This

block diagram includes a power supply block that supply power to the whole circuit, and a

temperature sensor is used to sense the temperature and heartbeat of a patient’s body. The circuit

diagram of the automatic wireless health monitoring system mainly includes transmitter section

and receiver section. In the TX section, the temperature and heart beat sensor is used to detect

the temperature and heartbeat of the patient’s body and the data which are sensed by the sensor is

sent to ATmega328. The transmitted information can be encoded into serial data over the air

through nRF module and the temperature of the patient’s body values is displayed on the LCD

display using an antenna arranged at the end of a transmitter and the data from the transmitter is

transmitted to the receiver end[ CITATION Vik17 \l 1033 ].

2.6 BASED ON TEMPERATURE MEASUREMENT

Temperature monitoring is employed in various applications, including temperature, pressure,

flow rate, capacity, acceleration, and so on. According to the quantities, distribution and detected

frequency of the monitored objects, there are different monitoring methods to acquire the

measurements. A research has introduced a remote wireless monitoring system applied in the

building construction to get the concrete temperature. The system can be real time and multi-

regional access to information without the limits of distance between the monitored object and

the monitor. This system consists of PC monitor and multi terminal and all the devices must be

located within GSM and SMS network. The system has two ways to access the information from

remote terminals. First is using hand phone to check real-time monitoring information and
16
second is to visit the PC monitor to access all monitoring information through the internet

[ CITATION Pat92 \l 1033 ].

Another research has elaborate that temperature monitoring will give a big impact on logistic

management and production flow management. China is the leading country to implement the

temperature monitoring for logistic such as production, storage, transportation, marketing and

consumption. One example called a Cold Chain which is supply the chain system in temperature

management. It ensures that the core requirements of maintaining low-temperature environment

for the purpose of maintaining perishable goods quality, so it has higher requirements than the

general logistics system at room temperature. Temperature changes will be recorded in the RFID

tags with temperature sensors for the quality and meticulous, real-time management of the fresh

products. In order to develop this we based proposed model, some comparison on previous

project that similar with Web-Based Temperature Monitoring has been made. There are three

different research projects selected and analyzed in order to get an idea that has been included in

this project.

Figure 2.2: SCHEMATIC OF A TEMPERATURE SENSOR SYSTEM

17
2.7 TEMPERATURE SENSOR CHARACTERISTICS

Temperature is a physical property of a system that underlies the common notions of hot and

cold, something that is hotter generally has the greater temperature. To measure temperature, a

device like a sensor is used. A sensor is a device that measures a physical quantity and converts

it into a signal which can be read by an observer or by an instrument. For example, a mercury

thermometer converts the measured temperature into expansion and contraction of a liquid which

can be read on a calibrated glass tube. For accuracy, all sensors need to be calibrated against

known standards. Sensors that measure very small changes must have very high sensitivities.

There are also innumerable applications for sensors of which most people are never aware.

Applications include cars, machines, aerospace, medicine, manufacturing and robotics. For

environmental temperature, the sensor that usually used to indicate the temperature is biological

sensor. Big differences exist between different temperature sensor or temperature measurement

device types. Using one perspective, it can be simply classified into two groups, contact and non-

contact [ CITATION Tho21 \l 1033 ].

2.7.1 CONTACT SENSOR

Contact temperature sensors measure its own temperature. One infers the temperature of the

object to which the sensor is in contact by assuming or knowing that the two are in thermal

equilibrium, that is, there is no heat flow between them. Temperatures of surfaces are especially

tricky to measure by contact means and very difficult if the surface is moving. It is wise to be

very careful when using such sensors on new applications. Surface temperature measurement

18
problem can be solved in many cases through the use of non-contact sensors. It’s almost ideal for

those types of applications and use for many industrial plants worldwide in great numbers.

2.7.2 NON-CONTACT SENSOR

The use of non-contact displacement technologies in the field of precision measurement is

rapidly growing. This is due to many factors however; two of the main drivers are the users need

to measure much more accurately which is to sub-micron or even nanometer resolutions and its

need to measure against difficult surfaces or surfaces that cannot be touched during the

measurement process, For example silicon, glass, plastics, miniature electronic components,

medical components and even food-based surfaces. This rapid growth has pushed the

development of new technologies and also the adaptation of exist technologies to meet the new

measurement requirements and to improve measurement accuracies and resolutions. Therefore, it

is important to understand the strengths and limitations of each noncontact measurement

principle when selecting the correct sensor technology for the measurement task.

2.8 REVIEW OF THE HEARTBEAT RATE AND TEMPERATURE

MONITORING DEVICE

Having reviewed some basic designs of heartbeat detection and temperature measurement, we

hereby utilize the advantages offered by the designs and make out a way to remove or at least to

a great extent modify the limitations they offer thereby improving the efficiency as well as the

reliability of the project designed in this context. Such modifications include

 Improved power consumption to a minimal level.

19
 Improving the efficiency of each vital sign measure.

 Integrate the two systems (pulse rate and temperature measurement) together

 The heartbeat and the temperature measurement are done simultaneously.

 Providing control and timely rescue of any critical situation.

 Designing a low cost biomedical monitoring system for both local and advanced

hospitals

20
Chapter 3: METHODOLOGY AND IMPLEMENTATION

3.1 INTRODUCTION

This section of the project deals with the approach and methods that are used in the

implementation of the project “Biomedical Monitoring System”. It reviews the various sections

that are put together to make up the entire project system. It also lays emphasis on the various

calculations that are carried out in the implementation of the project and the various diagrams

and designs required for the design. It also shows the water model employed in this project and

the flow chart used.

3.2 PROJECT MODEL: WATERFALL MODELLING TOOL

The waterfall model is a sequential design process, used in software and hardware development

processes, in which progress is seen as flowing steadily downwards (like a waterfall) through the

phases of conception, initiation, analysis, design, construction, testing, production/

implementation and maintenance. The waterfall development model originates in

the manufacturing and construction industries: highly structured physical environments in which

after-the-fact changes are prohibitively costly, if not impossible. Because no formal software

development methodologies existed at the time, this hardware-oriented model was simply

adapted for software development

There basically two forms of waterfall model; namely: waterfall model with feedback and

waterfall without feedback. The formal makes room for return signal while the later does not but

21
both demonstrate how the implementation of the design was carried out. The diagrams below

(figure 3.1 and 3.2) show a layout of the two forms of waterfall model.

Figure 0:3.1:Feedback Waterfall model

22
Figure 3.2 Non feedback waterfall model

3.2.1 METHODOLOGY WATERFALL

A feedback waterfall is adopted in this project. The different stages of implementations are show

in the waterfall below;

Figure 3.3: The Waterfall of the project

1. System and software requirements: captured in a product requirements document

2. Analysis: resulting in models, schema, and business rules

3. Design: resulting in the software architecture

4. Coding: the development, proving, and integration of software

5. Testing: the systematic discovery and debugging of defects


23
6. Operations/Acceptance: the installation, migration, support, and maintenance of complete

systems

Thus the waterfall model maintains that one should move to a phase only when it’s proceeding

phase is reviewed and verified.

Various modified waterfall models (including Royce's final model), however, can include slight

or major variations on this process. These variations included returning to the previous cycle

after flaws were found downstream or returning all the way to the design phase if downstream

phases deemed insufficient.

3.3. FACTORS CONSIDERED IN SELECTING WATERFALL MODEL

In this project, we adopted the feedback waterfall method because of the nature of sophistication,

implementation and maintenance of the system. Waterfall model maintains that one should move

to a phase only when it’s proceeding phase is reviewed and verified. It is a sequential design

process, used in software development process, in which the progress is seen as flowing steadily

downwards (like a waterfall) though the phases of conception, initiation, analysis, design,

construction, testing, production/implementation and maintenance. It is easily understandable

and contains explainable phases.

3.3.1 ADVANTAGES OF WATERFALL MODEL:

The following benefits can be deriving in selecting this model which was considered appropriate

and well matches for the project.

24
1. It will enable faster project implementation

2. It will provide better planning for the project

3. It will improve the development and knowledge based approach on this project

4. It will provides easy understanding of each phases

5. It will provide cheaper ways of fixing problems found in the stages

3.3.2 INFORMATION COLLECTION

This is the approach followed to collect information relating to the project: the available methods

of data collections are mentioned.

(a) Google and Google scholar

(b) Questionnaires

(c) Library

(d) Internet source

(e) Reading journals

(f) Interview

(g) observation

(h) Textbooks

3.4 SYSTEM REQUIREMENT

The design of this project “Biomedical Monitoring System” comprises of different module

(parts) brought together to form the overall design. Each of these module is made up of discrete

25
components that are joined together to achieve a particular purpose. The system is sub divided

into different phases/units. Each unit or phase performs a specific task and when integrated

forms the Biomedical Monitoring System.

Phase 1: The Measurement Units.

Phase 2: Networking and Communication System unit.

Phase 3: Alarm and Display System Unit

This phase involves taking the measurements of the vital signs from the patient through the

sensors and packing the data for transmission. The diagram below illustrates the interfacing

between the patient and the device.

Figure 3.4: The block diagram of the measurement unit

26
3.4.1 HEARTBEAT DETECTION

The pulse rate is a measurement of the heart rate, or the number of times the heart beats per

minute. As the heart pushes blood through the arteries, the arteries expand and contract with the

flow of the blood. This technology measures the pulses rate of the patient as the heart bumps

blood to the body system every minute and updates the micro controller and then communication

system. The normal pulse for healthy adults’ ranges from 60 to 100 beats per minute.

Figure 3.5: A sample of heartbeat detection

3.4.2 TEMPERATURE MEASUREMENT

The normal body temperature can range from 97.8 degrees F (or Fahrenheit, equivalent to 36.5

degrees C, or Celsius) to 99 degrees F (37.2 degrees C) for a healthy adult[ CITATION

Bhu20 \l 1033 ]. This technology measures the temperature condition of the patient every

defined time interval and updates the user end display and network is also updated with current

data of the patient.

27
Figure 3.6: A sample of temperature measurement

3.5 ALARM AND DISPLAY SYSTEM

This phase involves the display and alarming system. The transmitted data is received and the

results are displayed on the monitor. In a case of urgent need, the doctor on call will be alerted

through an alarming system (buzzer), the alert will also indicate on the screen the patient’s

award, bed number and the vital sign in critical state. The block diagram is shown below: In this

project only one bed number was used.

3.6 HARDWARE ANALYSIS

The main component for the hardware design that produce a complete Biomedical Monitor

System are the power supply, microcontroller, heartbeat sensor, temperature sensor, RF

transceivers, TTL converter, and a PC.

28
3.6.1 THE POWER SUPPLY

The power supply for the system is obtained from a DC 9volt battery at the transmitter side. A

5volt regulator (7805) was used to keep the voltage output to the system at 5volt, since the

maximum voltage required by the controller is 5volt.

REGULATOR
7805

1 3 5VOLT
VI VO
GND
2

TO THE TRANSMITTER CIRCUIT

B? C?
9V 100u
GROUND

Figure 3.10: power supply unit

3.6.2 THE MICROCONTROLLER

The Arduino Pro Mini is a microcontroller board based on the ATmega328 (datasheet). It has 14

digital input/output pins (of which 6 can be used as PWM outputs), 8 analog inputs, an on-board

resonator, a reset button, and holes for mounting pin headers. A six pin header can be connected

to an FTDI cable or Spark fun breakout board to provide USB power and communication to the

board.
29
The Arduino Pro Mini is intended for semi-permanent installation in objects or exhibitions. The

board comes without pre-mounted headers, allowing the use of various types of connectors or

direct soldering of wires. The pin layout is compatible with the Arduino Mini.

There are two version of the Pro Mini. One runs at 3.3V and 8 MHz, the other at 5V and

16 MHz.

Figure: 3.11: Atmega 328 Microcontroller

FEATURES

Microcontroller ATmega328

Operating Voltage 3.3V or 5V (depending on model)


30
Input Voltage 3.35 -12 V (3.3V model) or 5 - 12 V (5V model)

Digital I/O Pins 14 (of which 6 provide PWM output)

Analog Input Pins 8

DC Current per I/O Pin 40 mA

Flash Memory 32 kB (of which 0.5 kB used by bootloader)

SRAM 2 kB

EEPROM 1 kB

Clock Speed 8 MHz (3.3V model) or 16 MHz (5V model)

POWER

The Arduino Pro Mini can be powered with an FTDI cable or breakout board connected to its six

pin header, or with a regulated 3.3V or 5V supply (depending on the model) on the Vcc pin.

There is a voltage regulator on board so it can accept voltage up to 12VDC. If you're supplying

unregulated power to the board, be sure to connect to the "RAW" pin on not VCC.

The power pins are as follows:

 RAW. For supplying a raw voltage to the board.

 VCC. The regulated 3.3 or 5-volt supply.

 GND. Ground pins.

MEMORY

31
The ATmega328 has 32 kB of flash memory for storing code (of which 0.5kB is used for the

bootloader). It has 2 kB of SRAM and 1kBs of EEPROM (which can be read and written with

the EEPROM library).

INPUT AND OUTPUT

Each of the 14 digital pins on the Pro Mini can be used as an input or output, using  pin

Mode, digital Write(), and digital Read() functions. They operate at 3.3 or 5 volts (depending on

the model). Each pin can provide or receive a maximum of 40 mA and has an internal pull-up

resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized

functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.

These pins are connected to the TX-0 and RX-1 pins of the six pin header.

 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low

value, a rising or falling edge, or a change in value. See the attach Interrupt() function for

details.

 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write() function.

 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,

which, although provided by the underlying hardware, is not currently included in the

Arduino language.

 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH

value, the LED is on, when the pin is LOW, it's off.

32
The Pro Mini has 8 analog inputs, each of which provides 10 bits of resolution (i.e. 1024

different values). Four of them are on the headers on the edge of the board; two (inputs 4 and 5)

on holes in the interior of the board. The analog inputs measure from ground to VCC.

Additionally, some pins have specialized functionality:

 I2C: A4 (SDA) and A5 (SCL). Support I2C (TWI) communication using the Wire library.

There is another pin on the board:

 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset

button to shields which block the one on the board.

COMMUNICATION

The Arduino Pro Mini has a number of facilities for communicating with a computer, another

Arduino, or other microcontrollers. The ATmega328 provides UART TTL serial

communication, which is available on digital pins 0 (RX) and 1 (TX). The Arduino software

includes a serial monitor which allows simple textual data to be sent to and from the Arduino

board via a USB connection. A Software Serial library allows for serial communication on any

of the Pro Mini's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software

includes a Wire library to simplify use of the I2C bus; see the reference for details. To use the

SPI communication, please see the ATmega328 datasheet.

PROGRAMMING

33
The Arduino Pro Mini can be programmed with the Arduino software (download). For details,

see the reference and tutorials. The ATmega328 on the Arduino Pro Mini comes pre-burned with

a bootloader that allows you to upload new code to it without the use of an external hardware

programmer. It communicates using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the ATmega328 with an external programmer;

see these instructions for details.

3.6.3 THE HEARTBEAT DETECTION TECHNOLOGY

This technology involves using an infrared transceiver to measure the pulses rate of the patient as

the heart bumps blood to the body system. The sensor consists of an IR light emitting diode

transmitter and an IR photo detector acting as the receiver. The IR light passes through the

tissues. Variations in the volume of blood within the finger modulate the amount of light incident

on the IR detector. In this design, both the IR transmitter and receiver placed on the same plane

and the finger functioned as a reflector of the incident light. The IR receiver monitors the

reflected signal. Here, an infrared LED (OPB100EZ) and phototransistor

(OPB100SZ) is used as sensor device. Figure 2(a) presents the circuit design of the sensor and

Figure 2(b) shows how the sensor working using fingertip.

34
Figure 3.12 (a): Infrared transceiver

Figure 3.12 (b): Infrared transceiver with finger

Filtering process is required to remove the undesirable noises. The weak nature of the IR signal

and the noise affecting on it, requires the implementation of a range of filters and differential

amplifiers. The signal conditioning circuit consists of two identical active low pass filters with a

cut-off frequency of about 2.5 Hz.

Cut Off Frequency =1/2πRfCf = 1/2×3.1416×68K×1uF=2.34 Hz;

Where, Rf=R1=R4=68KΩ and Cf=C1 =C3=1μf.

This indicates that the maximum measurable heart rate is about 150 bpm. The gain of each filter

stage is set to 11, giving the total amplification of about 121.

Gain of each stage=1+Rt/Ri =1 + 680KΩ/68KΩ=11;

Where, Rt=R2=R5=680KΩ and Ri=R3=R6=68KΩ. A 1 uF capacitor at the input of each stage is

used to block the dc component in the signal. The equations for calculating gain and cutoff

frequency of the active low pass filter are shown in the circuit diagram in Figure 3. The two

stage amplifier/filter provides sufficient gain to boost the weak signal which is 3-4 mV and

35
coming from the IR sensor unit, and convert it into a pulse. This pulse is counted by

microcontroller. Then an LED is used which blinks each time when the heart beat is detected.

Figure 3.13: Complete circuit diagram for Heartbeat detection

3.6.4 TEMPERATURE MEASUREMENT TECHNOLOGY

This technology involves using a temperature sensor (DS18B20) to measure the temperature

condition of the patient. DS18B20 is a digital temperature sensor that uses one wire

communication to communicate with the microcontroller a 4.7kohms resistor was used to pull

the wire up to Vcc and the wire was connected to pin 10 of the microcontroller.

36
Figure 3.14: Temperature sensor (one wire communication)

3.7 THE COMPLETE CIRCUIT DIAGRAM ANALYSIS

Figure 3.19 (a) shows the circuit diagram of the transmitter used while figure 3.1 (b) shows the

circuit diagram of the receiver unit.

37
Figure 3.19 Complete circuit diagram

38
3.8 BILL OF ENGINEERING MANAGEMENT AND EVALUATION

Table 3.1: Bill of Engineering Management and Evaluation

S/No Components Quantity Unit price(₦) Total price(N)

1 Nrf24l01 4 100 400

2 Atmega328 1 3000 3000

3 100uf 3 50 150

4 TIP41c 1 200 200

6 Battery 1 200 200

7 Light indicator 1 50 50

10 DS18b20 2 1000 2000

13 Regulator 1 150 150

The 14 Soldering lead 1 200 200

total 15 Soldering flux 1 150 150

16 Jumper wire 1 100 100


sum of
17 IR transceiver 1 1000 1000
seven
18 Vero board 1 300 300

19 TOTAL 7900

thousand nine hundred naira was used in the design and implementation of the project device

39
CHAPTER 4 - TEST, MEASUREMENT AND ANALYSIS

4.0 TESTS, RESULTS AND ANALYSIS

4.1 INTRODUCTION

The previous chapter of this project analyzed the design principles for the proposed project and

the design has to be followed up with implementation. This chapter analyzes the construction of

the project based on tests carried out to ensure proper operation of the design, the results from

the tests and discussions of liable problems that occurred during the construction, test and

observation made.

4.2 TESTS

This section deals with the testing of each component, each section or sub unit of the design as

described in chapter 3 and the testing of the whole after integration of the individual sub unit.

 Firstly, each component for the design was tested with the use of multi-meter to confirm

their workability.

 After soldering the component on the Vero-board, test was carried out in the following

order.

 At the power supply unit, using a multi-meter the 7805 output was read.

 Test of the microcontroller unit to ensure that the microcontroller works accordingly. The

test is conducted by using an oscilloscope to check the oscillation circuit of the project.

40
 The circuit design is then read with the multi-meter to confirm continuity to ensure

correct signal flow.

 The system was tested based on the proposed project aims and object.

 The transmission and the receiving section were tested.

 Two patients (A and B) were test.

4.3 MEASUREMENT AND ANALYSIS OF RESULT

After the above-mentioned tests and measurements, the following results were obtained.

Power test:

Table 4.1: Power test:

s/n Voltage (v) 5v regulator (v) 3.3v regulator (v)


1 Input voltage 9 4.97
2 Output voltage 4.97 3.28

41
Table 4.2: Patient A’s test result

Figure 4.3: Graph of Patient A’s Heartbeat result displayed on the PC

42
Figure 4.3: Graph of Patient A’s Temperature result displayed on the PC

Figure 4.4: Graph of Patient A’s Heartbeat and Temperature result

From the graphs above, it’s observed that patient A has a normal heartbeat rate and temperature

condition; therefore; it can be concluded that patient A is healthy.

43
Table 4.3: Patient B’s test result

Figure 4.3: Graph of Patient B’s Heartbeat result displayed on the PC

44
Figure 4.3: Graph of Patient B’s Temperature result displayed on the PC

Figure 4.3: Graph of Patient B’s Heartbeat and Temperature result

45
From the graphs above, it’s observed that patient B has an abnormal heartbeat rate and

temperature condition; therefore; it can be concluded that patient B is not healthy, and needs

urgent attention.

4.4 CASING

The casing refers to the external housing of the project. The casing used for this project is

fabricated using plastic sheets by making the outer housing for the project. The external

dimension for the project is a 10x20mm case for the transmitter and 10x10mm case for the

receiver, with provisions made for the termination points of the inputs, switch and the TTL serial

converter (USB output). The casing for the project can be illustrated by the project photography

illustrated in the appendix of the project.

46
CHAPTER 5 - CONCLUSION AND RECOMMENDATION

5.1 INTRODUCTION

Experimental results have shown acceptable range with actual heartbeat rates and temperature

condition. Finally, this handheld system has proven to be an excellent system for the end user.

However, further improvement is expected with the upgraded module to improve and simplify

the system for the users.

5.2 CONCLUSION

The system developed here is user friendly and efficient. The result and output is a simple count

that depends on the IR sensors and one wire temperature sensor. However, there are a few

limitations of the system and its specifications. The IR pulse sensor considers the environmental

factors and produces a value, so the pulse sensor should be carefully guarded against such. This

can be overcome with more expertise calibration of the system and further research being done.

The IR sensors though correctly detects changes in the blood flow thus making sure that the

increment operator in the microcontroller program code work efficiently to produce the final

result. It is also cost effective and easy to build. There is very little requirement of understanding

the system before using it, thus making it easy, helpful and less time consuming.

47
5.3 RECOMMENDATION

This project, though a prototype design, is recommended for use at the home for certain

individuals who are prone to cardiac arrests or any form of cardio-vascular infection/disease.

Patients who occasionally develop an excessive body temperature can as well make use of this

device to help them to know their temperature status at a given instant. Athletes, footballers,

cyclists and all those who involve themselves with tedious activities can also make use of this

device. For future development, the device can be reconfigured and interfaced with the futuristic

5G and Space-X Star-link satellite based broadband for marked additions and improvement to

the system capabilities.

Having carried out this project design using some basic designs of heartbeat detection and

temperature measurement, we hereby state that the following features have been realized and

some modifications are also recommended to perfect the system

 Improved power consumption to a minimal level.

 Improved efficiency of each vital sign measure.

 Integrated the two systems (pulse rate and temperature measurement) together

 The simultaneous measurement of the heartbeat and temperature.

Some improvements that can be made on the project to perfect it more include:

48
 To provide an online access to the results obtained with 5G and Space-X Star-

Link

Technology.

 Interfacing more vital signs together (Heartbeat rate, Temperature, Respiratory

rate, Blood pressure, Heart Rhythm and Blood Oxygen level).

 Creating a data base for the result.

 Making the design more concise.

References

[1 M. Dr. Jasmine Shaikh, "MedicineNet.com," 25 06 2020. [Online]. Available:

] http://www.medicinenet.com/what is a good heart rate for my age/article.htm.

[Accessed 12 05 2021].
[2 S. K. E. K. e. a. T. Samaras, "Transtelephonic Electrocardiographic

] Transmission in the Preparticipation Screening of Athletes," vol. 2008, no. 10,

pp. 6-9, 2008.


[3 D. P. D. T. e. a. P. Giovas, "Transmission of Electrocardiograms from a moving

] ambulance," vol. IV, pp. 5-7, 2015.


[4 S. G. a. M. Cronin, "Mobile Application Development with SMS and the SIM

] Toolkit," McGraw-Hill, NewYork, N.Y, 2002.


[5 Wikipedia, "List of causes of death by rate," The International Statistical

49
] Classification of Diseases and Related Health Problems (ICD) for (WHO),

September 2017. [Online]. Available:

https://en.wikipedia.org/wiki/List_of_causes_of_death_by_rate. [Accessed 02

June 2021].
[6 M. B.-S. a. M. B. Mohamed Fezari, "Microcontroller Based HeartRate

] Monitor," The International Arab Journel of Information Technology, vol. V,

no. 4, pp. 153-157, 2008.


[7 A. A. Tahat, "Body temperature and electrocardiogram monitoring using an

] SMS-based telemedicine system," 2009 4th International Symposium on

Wireless and Pervasive Computing, ISWPC 2009, no. March 2009, pp. 6-7,

2009.
[8 C. W. M. M. Krista O'Connell, "Everything you need to know about fever," 22

] July 2019. [Online]. Available: https://www.healthline.com/health/how-to-

break-a-fever#takeaway. [Accessed 25 May 2021].


[9 N. G. L. G. K. C. e. a. S.N Blair, "Physical fitness and incidence of

] hypertension in healthy normotensive men and women," JAMA, vol. IV, no.

252, pp. 487-490, 1984.


[1 "Body temperature in adults," nhs.uk, 06 April 2020. [Online]. Available:

0] https://www.nhs.uk/conditions/body temperature/. [Accessed 25 May 2021].


[1 K.Shimizu, "Telemedicine by Mobile Communication, IEEE Engineering in

1] Medicine," Biology Magazine, vol. IV, no. 18, pp. 32-44, 1999.

50
[1 L. a. B. L. G. Coyle, "Home Telecare for the Elderly," Journal of Telemedicine

2] and Telecare, vol. I, pp. 183-185, 1995.


[1 M. a. M. W. P. M.J. Burke, "The Accuracy and Reliability of Commercial

3] Heart rate Monitor," vol. XXI, no. 1, pp. 29-32, 1987.


[1 G. Bodic, "Mobile Messaging Technologies and Services," John Wiley & Sons,

4] West Sussex, 2005.


[1 ,. A. Y. T. P. D. G. Vikramsingh R. Parihar, "Heartbeat and Temperature

5] Monitoring System for Remote Patients using Arduino," International Journal

of Advanced Engineering Research and Science (IJAERS), vol. IV, no. 5, 2017.
[1 U. H. a. B. C. F. Patel, "A Computer-Based , Automated , Telephonic System

6] to Monitor Patient Progress in the Home Setting," Journal of Medical Systems,

vol. XVI, no. 2, pp. 101-112, 1992.


[1 T. Pretty, "Contact And Non-Contact Varieties Of Temperature Sensors," 2021.

7] [Online]. Available:

https://www.streetdirectory.com/travel_guide/140403/technology/contact_and_

non_contact_varieties_of_temperature_sensors.html. [Accessed 25 May 2021].


[1 B. Panchal, "What is a normal body temperature?," Holland & Barrett, 20

8] November 2020. [Online]. Available: https://www.hollandandbarrett.com/the-

health-hub/conditions/heart-health/circulation/what-is-a-normal-body-

temperature/. [Accessed 1 June 2021].

51
APPENDICES

Transceiver Program

#include <LiquidCrystal.h>

#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for

most acurate BPM math

#include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground

Library

const int PulseWire = 0; // 'S' Signal pin connected to A0

const int LED13 = 13; // The on-board Arduino LED

int Threshold = 550; // Determine which Signal to "count as a beat" and

which to ignore

PulseSensorPlayground pulseSensor; // Creates an object

const int rs = 3, en = 4, d4 = 5, d5 = 6, d6 = 7, d7 = 8;

52
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

int ThermistorPIN = A1;

double temp;

double myCelsius;

int x;

int sensorValue = 0; // value read from the pot

int outputValue = 0; // value output to the PWM (analog out)

double Thermistor(int RawADC) {

long Resistance; double Temp;

Resistance = 10000.0 * ((1024.0 / RawADC) - 1);

Temp = log(Resistance);

53
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp

* Temp * Temp));

Temp = Temp - 273.15; // Convert Kelvin to Celsius

return Temp; // Return the Temperature

void setup() {

lcd.begin(16, 2);

Serial.begin(9600);

pulseSensor.analogInput(PulseWire);

pulseSensor.blinkOnPulse(LED13); // Blink on-board LED with heartbeat

pulseSensor.setThreshold(Threshold);

// Double-check the "pulseSensor" object was created and began seeing a signal

if (pulseSensor.begin()) {

Serial.println("PulseSensor object created!");

54
}

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(" BIOMEDICAL MO- ");

lcd.setCursor(0, 1);

lcd.print("NITORING SYSTEM ");

delay(3500);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("System Loading..............");

delay(2000);

lcd.clear();

55
}

void loop() {

temp = Thermistor(analogRead(ThermistorPIN)) + 3;

int myBPM = pulseSensor.getBeatsPerMinute(); // Calculates BPM

x = x + 1;

lcd.setCursor(0, 0);

lcd.print("Heartbeat: ");

lcd.setCursor(10, 0);

lcd.print(myBPM);

lcd.setCursor(13, 0);

lcd.print("BPM");

lcd.setCursor(0, 1);

lcd.print("Tempera.: ");

56
lcd.setCursor(9, 1);

lcd.print(temp);

lcd.setCursor(14, 1);

lcd.print("*C)");

delay(200);

57

You might also like