Introduction: Microcontroller Measures Heart Rate Through Fingertip

Heart rate is a very vital health parameter that is directly related to the soundness of the human cardiovascular system. This project describes a technique of measuring the heart rate through a fingertip using a PIC microcontroller. While the heart is beating, it is actually pumping blood throughout the body, and that makes the blood volume inside the finger artery to change too. This fluctuation of blood can be detected through an optical sensing mechanism placed around the fingertip. The signal can be amplified further for the microcontroller to count the rate of fluctuation, which is actually the heart rate.

Update: For those who are interested to replicate this project, you can use Easy Pulse sensor that covers the complete sensor and instrumentation part. Easy Pulse is a photoplethysmography-based pulse sensor using a similar circuit as described in this project.

Also check out the Arduino version of this project here.

Step 1: Sensor Assembly

The sensor unit consists of an infrared light-emitting-diode (IR LED) and a photo diode, placed side by side, and the fingertip is placed over the sensor assembly, as shown below. The IR LED transmits an infrared light into the fingertip, a part of which is reflected back from the blood inside the finger arteries. The photo diode senses the portion of the light that is reflected back. The intensity of reflected light depends upon the blood volume inside the fingertip. So, every time the heart beats the amount of reflected infrared light changes, which can be detected by the photo diode. With a high gain amplifier, this little alteration in the amplitude of the reflected light can be converted into a pulse.

Step 2: Signal Conditioning Circuit

The reflected IR signal detected by the photo diode is fed to a signal conditioning circuit that filters the unwanted signals and boost the desired pulse signal. The circuit diagram above shows the IR LED (D1) and the photo diode (D2) along with the signal conditioning circuit made of two stage operational amplifiers configured as active low pass filters. The cut-off frequencies of both the filters are set to about 2.5 Hz, and so it can measure the pulse rate up to 2.5*60 = 150 bpm. The gain of each filter is about 100, which gives the total 2-stage amplification of 10000. This is good enough to convert the weak pulsating signal into a TTL pulse. Note that at the input of each OpAmp filter stage, there is a 1 uF capacitor to block any DC component in the signal. At the output is connected a LED that will blink with heart beat. The cathode of LED gets the ground path through the collector of BC547 transistor. In order to save the battery life, the transistor is turned on for 15 seconds by PIC16F628A microcontroller while the measurement is going on. The number of pulses counted within this interval is multiplied by 4 to get actual beats per minutes (bpm).  

Step 3: Microcontroller and Display Circuit

The PIC16F628A runs at 4.0 MHz using an external crystal. The two tact switches are used for Start and Clear functions. You should rest your fingertip on the sensor assembly before pressing the Start button. You can use fore finger or middle finger for this. Once the Start button is pressed, the microcontroller turns on the BC547 transistor (in the signal conditioning circuit). This turns the IR LED on, and the LED starts blinking with the fluctuation in the blood volume inside finger arteries. After 15 seconds, the measurement is completed and the result is displayed on a 3-digit seven segment LED display.

Step 4: Device in Action


This video shows the heart rate measuring device in action.

The firmware for PIC16F628A was developed in C and compiled with mikroC Pro for PIC compiler from mikroElektronika.
You can find the source code and HEX files attached here with or can also view the program on my blog site.

Comments

author
TundeI made it! (author)2017-08-19

Thanks to the author, I implemented this design with the Codes provided. I used LM358 instead of MCP602 and I had to tune the Variable Resistor to the value that makes the IR sensor unit works fine. Major challenge is interference caused by ambient light in the environment.

HRM.jpgHRM Circuit.jpg
author
Vhonani (author)2017-07-27

kelsey.mudau@gmail.com ; is my email , may you please send me ALL the details for this project.

Thank you

author
Vhonani (author)Vhonani2017-07-27

I would really appreciate it is it were really soon.

author
Vhonani (author)2017-07-27

Hello sir. I am very fascinated with this project, may you please send me all the details, components needed and all i need to make one. i would really appreciate it if you send everything to this email kelsey.mudau@gmail.com

author
Vhonani (author)2017-07-27

Hello Sir. I am really fascinated about this, may you please send me all the details of this project. At this email: kelsey.mudau@gmail.com

author
ealtair (author)2017-06-20

Hello sir. Can you please send me full details about this project, the components needed and the pcb layout. I really need it , and thank you in advance to this email: ealtair04@gmail.com

author
Jose EuriT (author)2017-05-14

sir, can you send me details of this project.

my email is

marcosvtonin@gmail.com

Thanks

author
ArshidR (author)2017-03-24

Can you please email me the code for this project on arshidr@gmail.com

Thank you in advance

author
nityadoley (author)2017-03-20

sir please kindly can u send me details of the project.

my name is nitya doley

email-doleykainitya@gmail.com

author
MHelou (author)2017-02-20

Hello, its interesting,

Kindly Can you send me the details of this project please?

mmmhelou@hotmail.com

Thanks you

author
YogeshwariM (author)2017-02-05

Can you send mi the details of this project.. actually m doing d same n i want your project as a reference. . So please....?????
My mail is yogeshwarimane07@gmail.com
Thank you. .

author
galvakojis (author)2015-01-05

Done it, it was my first bigger project, and maybe too hard for beginner. But code is working only on PIC16F628A, but not on a PIC16F628

WP_20150105_14_40_48_Pro[1].jpg
author
Navi lnm (author)galvakojis2017-02-01

Can u please sendme the details about this project to my mail ..... i am doing this as my main project so please send me....my mail is navyvijay187@gmail.com

author
Khushall (author)galvakojis2017-01-24

Hello
If u really made it plZ snd me code and pcb layout....To my mail--- khushlingayat25@gmail.com

author
Ishuu abi (author)galvakojis2017-01-06

sir,can u please send me this poject details to my mail id ishuuabi@gmail.com

author
VidyaC4 (author)galvakojis2016-12-14

could you please send me the programming commands of this project.

mail it to viddu_cm@yahoo.com

author
chinmays14 (author)galvakojis2016-10-07

sir can you please send mi the source code and if possible please provide me entire details, mail id- chinmayshinde95.co.in@gmail.com

author
Vipulv5 (author)galvakojis2016-04-04

hello brother if u had really made it then plz mail me full details at .

vipulverma266@gmail.com

author
ImaniA1 (author)Vipulv52016-05-03

hello did you get the details on microcontroller measures heart rate through finger tip and if so can you please send me the details my email is imaniamani10@yahoo.com

author
ShaileshS17 (author)galvakojis2016-04-23

Nice

author
mbaydoun (author)galvakojis2016-03-20

Hi

Can you send me the code for the project. Thanks.

author
vinay0745 (author)galvakojis2015-09-29

Hey i have a question have made the IR led at the sensor on/off(blinking) for few secs or just kept on ???

author
galvakojis (author)vinay07452015-09-29

keep on, your blood pressure will "imitate the blinking"

author
vinay0745 (author)galvakojis2015-12-12

what is the logic used to calculate heart rate ?

author
IqramR1 (author)galvakojis2015-11-29

did u have the source code and the schematic??i want it please iqramkyoya@gmail.com

author
galvakojis (author)IqramR12015-11-30

yes, but everything is in subscription

author
bungasakura (author)galvakojis2015-10-17

hello sir ! do u have any kind of project details? can u send to me

bungatulip6617@rocketmail.com

tq sir..

author
derekgabs (author)galvakojis2015-09-16

good day sir, can you please send me the pcb layout that you made im kind of new to this project. please help me.

email add: derek.gabs@gmail.com

author
mniloy (author)galvakojis2015-03-10

hello sir, i am going to do this project for my final year project submission. can you please mail me the details and source code for this project? it will help me a lot.

my mail id mitraniloy@gmail.com.

thanks in advance.

author

Good Day Sir!

Can you give me the pcb layout of your project.??? :)

And the simulation of this project if you don't mind.

Hope to reply as soon as possible.

Thank You so MUCH.

GODBLESS.

This is my e-mail address.

skyweak0024@gmail.com

author

Good Day Sir!

Can you give me the pcb layout of your project.??? :)

And the simulation of this project if you don't mind.

Hope to reply as soon as possible.

Thank You so MUCH.

GODBLESS.

This is my e-mail address.

skyweak0024@gmail.com

author
akram44444 (author)galvakojis2015-01-30

my dear .. plz connect this project but it not work >> i was using pic16f628a

but it not work !!

plz send me the source code and all names of all components and explain to me how you connect the circuit on akrm33766@yahoo.com

or on facebook https://www.facebook.com/akram44444

author
Diamond2017 (author)2017-01-30

Hi, Can you please send me the project with all details and source code.

My e-mail is : diana20120101@gmail.com

author
KhadijaD2 (author)2017-01-29

Can you please send me full details about this project, the component needed, the code source. I really need it , and thank you in advance to this email: kadi0dal@gmail.com

author
keerthuuu (author)2017-01-27

I'm doing project in this domain..so please send me the pdf regarding this project to the following mail id navyvijay187@gmail.com..

author
mateosmetko17 (author)2017-01-25

can you please send me the source code and if possible please provide me entire details, and hookup? email: mateo.smetko1802@gmail.com

author
adimattur (author)2017-01-17

Dear sir

please send me the project detiles to my email id

aditya.avadhani.mattur@gmail.com

mobile number : 9483560138

Sir
I am intrested in the project of ROBOTICS and BIOMEDICAL INSTRUMENT
please send me any project on the above topic to my email .

Thank you

author
suganyaravi (author)2016-11-03

Hi Sir,

How do upload program to micro controller pic16f628a...please reply me

suganyaravi67@gmail.com

author
vcente.capio.1 (author)2016-09-29

what software did you use to program the pic16f628a?

author
ssdjustin (author)2016-09-21

Please send me the project requirement....

author
ajay chavan (author)2016-09-21

hey plz send more report abt this project .......

author
LovelyP7 (author)2016-07-12

Is it possible that we can add in the program that it can measure heart rate without resetting? I mean, it can measure continuously and update the display every time it measures.

author
LovelyP7 (author)LovelyP72016-07-12

Your reply would mean so much to me since I'll be doing this as a final project. Thanks in advance. if you want to email me, lovelypacz@gmail.com .

author
kavyashree14 (author)2016-07-11

hey

plz send d complete report of dis project..with d source code as m in urgent need of a project

email id-kavya1495@gmail.com

author
kavyashree14 (author)2016-07-11

hey

plz send d complete report of dis project..with d source code as m in urgent need of a project

email id-kavya1495@gmail.com

author
bargav234 (author)2016-07-07

hii can u send me the code for this project

my email is : bargav234@gmail.com

author
bargav234 (author)2016-07-07

hii can u send me the code for this project

my email is : bargav234@gmail.com

author
mohammad8sabah (author)2016-06-29

Hi

Can you send me the code for the project???

Hope to reply as soon as possible.

Thank You so much.

my email is : m.hasanlu93@yahoo.com

author

can u send me all files if u recived it ?

author
mostafa 11 (author)mostafa 11 2016-07-05

mostafagad9090@gmail.com