Vous êtes sur la page 1sur 11

(ThisisanOlderStarterGuide)

SeeAllUpdates

PulseSensorGettingStartedGuide

Introduction:
PulseSensorisawelldesignedplugandplayheartratesensorforArduino.
Itcanbeusedbystudents,artists,athletes,makers,andgame&mobiledeveloperswhowanttoeasily
incorporateliveheartratedataintotheirprojects.Thesensorclipsontoafingertiporearlobeandplugsrightinto
Arduinowithsomejumpercables.Italsoincludesanopensourcemonitoringappthatgraphsyourpulseinreal
time.


ThePulseSensorKitincludes:
1)A24inchColorCodedCable,withaStandardConnector(0.1pitch).You'llfindthismakesiteasytoembed
thesensorintoyourproject,andconnecttoanArduino.Nosolderingisrequired.

2)AnEarClip,perfectlysizedtothesensor.Wesearchedmanyplacestofindjusttherightclip.Itcanbe
hotgluedtothebackofthesensorandeasilywornontheearlobe.

3)2VelcroDots.Theseare'hook'sideandarealsoperfectlysizedtothesensor.You'llfindthesevelcrodots
veryusefulifyouwanttomakeavelcro(orfabric)straptowraparoundafingertip.

4)3TransparentStickers.ThesecanbeusedonthefrontofthePulseSensortoprotectitfromoilyfingersand
sweatyearlobes.

5)ThePulseSensorhas3holesaroundtheoutsideedgewhichmakeiteasytosewitintoalmostanything.

LetsgetstartedwithPulseSensorAnatomy
ThefrontofthesensoristheprettysidewiththeHeartlogo.Thisisthesidethatmakescontactwiththeskin.On

thefrontyouseeasmallroundhole,whichiswheretheLEDshinesthroughfromtheback,andthereisalsoa
littlesquarejustundertheLED.Thesquareisanambientlightsensor,exactlyliketheoneusedincellphones,
tablets,andlaptops,toadjustthescreenbrightnessinlowlightsettings.TheLEDshineslightintothefingertipor
earlobe,andthesensorreadsthelightthatbouncesback.Thebackofthesensoriswheretherestoftheparts
aremounted.Weputthemtheresotheywouldnotgetinthewayoftheofthesensoronthefront.EventheLED
weareusingisareversemountLED.
Thecableisa24flatcolorcodedribboncablewithastandardfemaleheaderconnector.

REDwire=+3Vto+5V
BLACKwire=GND
PURPLEwire=signal(analogpin0[zero]insuppliedcode)

ThePulseSensorcanbeconnectedtoarduinowithjumpers,or
pluggedintoabreadboardwithmaleheaderpins.Beforeweattach
thePulseSensortotheearcliporvelcrodot,letsgetitupand
runningsoyoucanplaywithitandfindthebestplaceonyourbodyto
getagoodsignal.
Ifyoudontalreadyhavethem,youwillneedtodownloadthe

TheCodeForHardwareandSoftware
ThenyoucangetthelatestArduinoandProcessingPulseSensorsoftware:
http://pulsesensor.com/

WestronglyadvisethatyouDONOTconnectthePulseSensortoyourbodywhileyourcomputerorarduinois
beingpoweredfromthemainsACline.ThatgoesforcharginglaptopsandDCpowersupplies.Pleasebesafe
andisolateyourselffromfromthepowergrid.
ConnectthePulseSensorto:+V(red),Ground(black),andAnalogPin5(purple)onyourfavoriteArduino,or
Arduinocompatibledevice,anduploadtheA_PulseSensor_xxsketch.Afteritsdoneuploading,youshould
readilyseepin13blinkintimewithyourheartbeatwhenyouholdthesensoronyourfingertip.Ifyougripthe
sensortoohard,youwillsqueezeallthebloodoutofyourfingertipandtherewillbenosignal.Ifyouholdittoo
lightly,youwillinvitenoisefrommovementandambientlight.SweetSpotpressureonthePulseSensorwillgive
anicecleansignal.Wearealloriginalorganisms,soyoumayneedtoplayaroundandtrydifferentpartsand
pressures.Ifyouseeanintermittentblink,ornoblink,youmightbeazombieorarobot.

Tomakesure,startupProcessingonyourcomputerandruntheP_PulseSensor_xxsketch.Thisisourdata
visualizationsoftware,anditlookslikethis:

Note:Ifyougetanerroratstartupyoumayneedtomakesureyouareselectingtherightserialport.Checkthe
Troubleshootingsectionbelow.Also,youcansaveanimageofthesketchwindowbypressingSors.Youwill
findtheimage(.tif)intheSketchFolder.

Thelargemainwindowshowsrawsensordatagraphed1:1(pixel:datapoint)overtheArduinosfullADCrange
(0to1023).Thiswindowisonly400pixelstall,soitisdesignedtoautoadjustwhenthewaveformmovesoutof
thepicture.Thegroupofthreenumbersontheleftcorrespondtothepulsewaveformpeak,trough,and
amplitude.Atthetopofthescreen,asmallerdatawindowgraphsheartrateovertime.Thisgraphadvances
everypulse,andtheBeatsPerMinuteisupdatedevery10heartpulses.Thebigredheartalsopulsestothetime
ofyourheartbeat.WhenyouholdthePulseSensortoyourfingertiporearlobeor(fillinbodyparthere)you
shouldseeanicesawtoothwaveformliketheoneabove.Ifyoudont,andyouresureyourenotazombie,try
thesensorondifferentpartsofyourbodythathavecapillarytissue.Wevehadgoodresultsonthesideofthe
nose,middleoftheforehead,palm,andlowerlip.Werealldifferent,originalorganisms.Playaroundandfindthe
bestspotonyouandyourfriends.Asyouaretestingandgettingusedtothesensor.Youmayfindthatsome
fingersorpartsoffingersarebetterthanothers.Forexample,IfindthatwhenIpositionthesensorsothatthe
edgeofthePCBisatthebottomedgeofmyearlobeIgetanawesomesignal.

ArduinoandProcessingprogrammingenvironmentshere:
www.arduino.ccwww.processing.org

PreparingthePulseSensor
Beforeyoureallystartusingthesensortoomuchyouwanttoinsulttheboardfromyour(naturally)sweaty
fingers.ThePulseSensorisanexposedcircuit.Belowweshowyouhowtoinsulateit.


Usetheincludedclearroundstickertoprotectagainstshortcircuitingtheboard,orunwantednoiseinthepulse
signal.Skinoilsandsweatcancauseanoisysignal.Findthestripofthreeclearroundstickers,andpealoneoff
bydeflectingthepaperbacking.

Gentlyholditbyoneedge,andalignitwiththefaceofthesensor.


Whenyouarehappywiththewayitslinedup,squeezeitontothereallatonce!Thestickerhastokindof
stretchoverthesensorinordernottomakeawrinkle.Ifyougetawrinkle,dontworry,justpressitdownreally
hardanditshouldstick.

NowletspreparethebacksidesothesweatofyourfingertipsdontcauseshortcircuittoPulseSensorcircuitry.


AllofthesurfacemountcomponentsonthePulseSensorhaveexposedconnections,andcanbesensitiveto
sweatyfingertipsorearlobes(orotherofyourparts).Thereisariskofshortingtheboardorintroducing
unwantednoiseinthepulsesignalifyourpreferredbodypartisoilyorwet.Weexperimentedwithepxoy,and
clearliquidplasticstosealthesensorandgotmixedresults.Theproblemswithsealingthesensorarisefromthe
factthatanyclearplasticorepoxyyouusewillhaveitsownindexofrefractionwhichcanalterthefocusofthe
LEDsensor.Wewereabletogetgoodresults,butitistediousandmakesitverydifficulttodoreworkonthe
PulseSensorcircuit.Afterallthistrialanderror,wesettledonourfavoriteDIYadhesive,hotglue.

AttachingtoVelcroDot

Adabofhotglueonthebackofthesensorwillinsulateitfromsweatyfingertips,andcaneasilybepealedoffif
desired.Weusehotgluetoattachtheearcliptothebackoftheboard,anditcanalsohelptosecuretheVelcro
dot,ifneeded.Wealsoprovideafewclearroundstickersthatcanbeusedtoprotectthesensoronthefront.

AttachingtheEarClip
PlacethePulseSensorfacedown,andputadabofglueontheback.Centertheroundpartoftheearclipon
thesensorandpressitintothehotglue.Thetallestcomponentonthebackistheplasticbodyofthereverse
mountLED,anditwillkeepthemetaloftheearclipfromcontactinganyofthecomponentconnections.

Takeagoodlookatyourworkwithamagnifyingglasstobesurethatyouhaven'tmadecontactwithanyofthe
solderjoints,thenplugitinandtestit.Hotglueisalsogreatb/citmeltstheheatofthegunhead.Ifyoumakea
mistake,heattheglueupagain,andreworkit.

BatteryPowered
SincethePulseSensoronlyneedsPower,Ground,andOneAnalogInPinontheArduino,itseasytogeta
batterypoweredversion.

Troubleshooting:

ProcessingSketchgivesmeaCOMporterroratstartup.
MakesureyouarepluggedintoanArduinoboard,thatitisworkingcorrectly,andrunningourfirmware.
Checktoseeifyouhavetherightserialport.Thecodeunderlinedinredshouldmatchthecorrectport
numberintheterminalwindowatthebottomofProcessingIDE.


Ifyourestillhavingtrouble,gotohttp://processing.org/reference/libraries/serial/index.htmlformoreinfo.

IseeawaveforminProcessing,butnoblinks,andnoheartrate?
Arduinodoesalltheworkfindingheartbeatanddeterminingheartrate
Processingcodeisasimpledatavisualizer.
NOTE
Variablecalled'drop'inArduinocodemeasuresamplitudeofpulsewaveform
Ifyouseeawaveformonthevisualizer,butgetintermittentLEDblink,
changeloworhighthresholdvalue'drop'that'drop'iscomparedto.