100% found this document useful (1 vote)
1K views

Arduino Based Heart Rate Monitor Project

This document describes an Arduino-based heart rate monitor project. The project uses a heartbeat sensor module connected to an Arduino to detect heartbeats and calculate the heart rate in beats per minute. It displays the measured heart rate on an LCD screen. The heartbeat sensor detects changes in blood flow with each heartbeat. The Arduino reads pulses from the sensor and uses the timing between pulses to calculate the rate. Buttons allow starting measurement and resetting the displayed value.

Uploaded by

Maged Alqubati
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views

Arduino Based Heart Rate Monitor Project

This document describes an Arduino-based heart rate monitor project. The project uses a heartbeat sensor module connected to an Arduino to detect heartbeats and calculate the heart rate in beats per minute. It displays the measured heart rate on an LCD screen. The heartbeat sensor detects changes in blood flow with each heartbeat. The Arduino reads pulses from the sensor and uses the timing between pulses to calculate the rate. Buttons allow starting measurement and resetting the displayed value.

Uploaded by

Maged Alqubati
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

6/10/2016

ArduinoBasedHeartRateMonitorProject

ArduinoBasedHeartRateMonitorProject

HeartbeatMonitorProjectusingArduino

Heartrate,bodytemperatureandbloodpressuremonitoringareveryimportantparametersofhuman
body.Doctorsusevariouskindofmedicalapparatuslikethermometerforcheckingfeverorbody
temperature,BPmonitorforbloodpressuremeasurementandheartratemonitorforheartrate
measurement.Inthisproject,wehavebuiltanArduinobasedheartbeatmonitorwhichcountsthe
numberofheartbeatsinaminute.Herewehaveusedaheartbeatsensormodulewhichsensesthe
heartbeatuponputtingafingeronthesensor.

WorkingofHeartbeatMonitorProject
Workingofthisprojectisquiteeasybutalittlecalculationforcalculatingheartrateisrequired.Thereare
severalmethodsforcalculatingheartrate,butherewehavereadonlyfivepulses.Thenwehave
calculatedtotalheartbeatinaminutebyapplyingthebelowformula:
http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

1/7

6/10/2016

ArduinoBasedHeartRateMonitorProject

Five_pusle_time=time2time1
Single_pulse_time=Five_pusle_time/5
rate=60000/Single_pulse_time
wheretime1isfirstpulsecountervalue
time2islistpulsecountervalue
rateisfinalheartrate.
Whenfirstpulsecomes,westartcounterbyusingtimercounterfunctioninarduinothatismillis().And
takefirstpulsecountervalueformmillis().Thenwewaitforfivepulses.Aftergettingfivepulseswe
againtakecountervalueintime2andthenwesubstarcttime1fromtime2totakeoriginaltimetakenby
fivepulses.Andthendividethistimeby5timesforgettingsinglepulsetime.Nowwehavetimefor
singlepulseandwecaneasilyfindthepulseinoneminute,deviding600000msbysinglepulsetime.
Rate=600000/singlepulsetime.

InthisprojectwehaveusedHeartbeatsensormoduletodetectHeartBeat.Thissensormodule
containsanIRpairwhichactuallydetectheartbeatfromblood.Heartpumpsthebloodinbodywhichis
calledheartbeat,whenithappensthebloodconcentrationinbodychanges.Andweusethischangeto
makeavoltageorpulseelectrically.
CircuitDiagramandExplanation
Circuitofheartbeatmonitorisshownbelow,whichcontainsarduinouno,heartbeatsensormodule,
resetbuttonandLCD.ArduinocontrolswholetheprocessofsystemlikereadingpulsesformHeartbeat
sensormodule,calculatingheartrateandsendingthisdatatoLCD.Wecansetthesensitivityofthis
http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

2/7

6/10/2016

ArduinoBasedHeartRateMonitorProject

sensormodulebyinbuiltpotentiometerplacedonthismodule.

Heartbeatsensormodulesoutputpinisdirectlyconnectedtopin8ofarduino.VccandGNDare
connectedtoVccandGND.A16x2LCDisconnectedwitharduinoin4bitmode.ControlpinRS,RW
andEnaredirectlyconnectedtoarduinopin12,GNDand11.AnddatapinD4D7isconnectedtopins
5,4,3and2ofarduino.Andonepushbuttonisaddedforresettingreadingandanotherisusedtostart
thesystemforreadingpulses.Whenweneedtocountheartrate,wepressstartbuttonthenarduino
startcountingpulsesandalsostartcounterforfiveseconds.Thisstartpushbuttonisconnectedtopin7
andresetpushbuttonisconnectedtopin6ofarduinowithrespecttoground.
ProgramDescription
IncodewehaveuseddigitalreadfunctiontoreadoutputofHeartBeatsensormoduleandmillis()
fuctionforcalculatingtimeandthencalculateHeartRate.

http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

3/7

6/10/2016

ArduinoBasedHeartRateMonitorProject

Beforethiswehaveinitiazedallthecomponentsthatweusedinthisproject.

andherewehavepullupthepushbuttonlinebyusingsoftwarepullup.

Code:
#include<LiquidCrystal.h>
LiquidCrystallcd(12,11,5,4,3,2)
intin=8
intReset=6
intstart=7
intcount=0,i=0,k=0,rate=0
unsignedlongtime2,time1
unsignedlongtime
byteheart[8]=
{
0b00000,
http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

4/7

6/10/2016

ArduinoBasedHeartRateMonitorProject

0b01010,
0b11111,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000
}
voidsetup()
{
lcd.createChar(1,heart)
lcd.begin(16,2)

lcd.print("HeartBeat")
lcd.write(1)
lcd.setCursor(0,1)
lcd.print("Monitering")
pinMode(in,INPUT)
pinMode(Reset,INPUT)
pinMode(start,INPUT)
digitalWrite(Reset,HIGH)
digitalWrite(start,HIGH)
delay(1000)
}
voidloop()
{
if(!(digitalRead(start)))
{
k=0
lcd.clear()
lcd.print("Pleasewait.......")
while(k<5)
{
if(digitalRead(in))
{
if(k==0)
time1=millis()
k++
http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

5/7

6/10/2016

ArduinoBasedHeartRateMonitorProject

while(digitalRead(in))
}
}
time2=millis()
rate=time2time1
rate=rate/5
rate=60000/rate
lcd.clear()
lcd.print("HeartBeatRate:")
lcd.setCursor(0,1)
lcd.print(rate)
lcd.print("")
lcd.write(1)
k=0
rate=0
}
if(!digitalRead(Reset))
{
rate=0
lcd.clear()
lcd.print("HeartBeatRate:")
lcd.setCursor(0,1)
lcd.write(1)
lcd.print(rate)
k=0
}
}
Video:

http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

6/7

6/10/2016

ArduinoBasedHeartRateMonitorProject

http://circuitdigest.com/microcontrollerprojects/heartbeatmonitorprojectusingarduino

7/7

You might also like