health monitoring wearables - rutgers school of engineering · 2020. 2. 18. · health monitoring...

16
Health Monitoring Wearables Amy Liang [email protected] Brianna Patek [email protected] Sruthi Srinivasan [email protected] Eileen Wang [email protected] Andrew Zheng [email protected] New Jersey Governor’s School of Engineering and Technology 2016 1 Abstract In today's world, the obesity epidemic has become a major concern. Proper ex- ercise is a great way to combat this is- sue. However, many people are unaware of their own limitations and put themselves at risk of over-exercising. Technology that can monitor the heart rates of individuals and inform them of when they are overex- erting themselves can protect those who ex- ercise and promote physical activity. The objective of this project was to create a wristband that would regularly check the wearer's pulse. An LCD screen allows wear- ers to input their ages to individualize the monitor's results. The screen will blink with increasing speed as the user nears their upper target threshold. An Arduino Uno was connected to the LCD Keypad Shield and a Pulse Monitor was soldered to the LCD screen. The device was sewn onto a wristband and tested using multiple sub- jects who performed exercises. Their heart rates were monitored using the device and checked manually. The comparison of both results confirms that the heart rate moni- tor is highly accurate and consistent over- all, making it a practical option for people who need assistance in exercising safely. 2 Introduction Exercise is an essential aspect of a healthy lifestyle. In order to perform at an optimal level, the cardiovascular sys- tem must be pushed to work harder dur- ing physical activity than it is accustomed. However, overexertion when exercising can lead to long term injury and potentially fa- tal heart damage. The most common in- dicator of overexertion is increased heart rate, which is measured in beats per minute (bpm). Heart rate increases during exercise to maintain homeostasis and bodily func- tions, replenishing the body's supply of oxy- gen and disposing of excess carbon dioxide. A heart rate monitor (HRM) is a device that takes a person's heartbeat signal and relays the information to the user. Medical professionals use these devices to diagnose 1

Upload: others

Post on 17-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables

Amy [email protected]

Brianna [email protected]

Sruthi [email protected]

Eileen [email protected]

Andrew [email protected]

New Jersey Governor’s School of Engineering and Technology 2016

1 Abstract

In today's world, the obesity epidemichas become a major concern. Proper ex-ercise is a great way to combat this is-sue. However, many people are unawareof their own limitations and put themselvesat risk of over-exercising. Technology thatcan monitor the heart rates of individualsand inform them of when they are overex-erting themselves can protect those who ex-ercise and promote physical activity. Theobjective of this project was to create awristband that would regularly check thewearer's pulse. An LCD screen allows wear-ers to input their ages to individualize themonitor's results. The screen will blinkwith increasing speed as the user nears theirupper target threshold. An Arduino Unowas connected to the LCD Keypad Shieldand a Pulse Monitor was soldered to theLCD screen. The device was sewn onto awristband and tested using multiple sub-jects who performed exercises. Their heartrates were monitored using the device andchecked manually. The comparison of both

results confirms that the heart rate moni-tor is highly accurate and consistent over-all, making it a practical option for peoplewho need assistance in exercising safely.

2 Introduction

Exercise is an essential aspect of ahealthy lifestyle. In order to perform atan optimal level, the cardiovascular sys-tem must be pushed to work harder dur-ing physical activity than it is accustomed.However, overexertion when exercising canlead to long term injury and potentially fa-tal heart damage. The most common in-dicator of overexertion is increased heartrate, which is measured in beats per minute(bpm). Heart rate increases during exerciseto maintain homeostasis and bodily func-tions, replenishing the body's supply of oxy-gen and disposing of excess carbon dioxide.A heart rate monitor (HRM) is a devicethat takes a person's heartbeat signal andrelays the information to the user. Medicalprofessionals use these devices to diagnose

1

Page 2: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 2 of 16

and track medical conditions, recognizingheart rate as a valuable measure of one'shealth.

The specific purpose of this researchis to accurately monitor individuals' heartrates during periods of exercise and ensurethat they are within their target heart ratezones based on their physical characteris-tics. This will be accomplished by utiliz-ing the Arduino Uno technology along withan LCD Keypad Shield screen. Dependingon the specific range that the individualsheart rate falls between during periods ofexercise, the screen will blink to alert thewearer of possible overexertion. This prod-uct will ensure that individuals who trainstrenuously, athletes included, will be pro-tected from potential heart failure that canbe damaging or even fatal.

Engineers are trying to use technologyto provide healthcare services to people in aconvenient and reliable way, largely throughthe use of e-textiles, or smart fabrics withdigital and electrical components. Productssuch as the FitBit and Garmin Vivosmartare wrist garments that focus on trackingthe user's activity level by acting as pe-dometers as well as heart rate monitors.However, these popular products are oftencriticized for being highly inaccurate, often-times up to 30 bpm off, which can be ex-tremely dangerous. While chest strap heartrate sensors monitor target heart rate zonesand alert the wearer when they are over-working themselves, these accessories areuncomfortable and do not fit people of allsizes.

3 Background

3.1 Factors of Heart Rate

Heart rate, or pulse, is defined by themuscular contractions in the right atrium

of the heart, and is measured in heartbeatsper minute. An individual's pulse is de-pendent on the heart's pacemaker region,also known as the sinoatrial node (SAN)[1].The SAN is composed of connective tis-sue within which pacemaker cells are em-bedded. These cells generate sudden andconductive electrical impulses which in turncause the heart to contract at a certain rate,which is commonly referred to as an indi-vidual's heart rate [2].

There are a number of factors that af-fect heart rate, such as gender, age, weight,air temperature, and fitness level [3]. Whentemperature increases, the heart pumpsmore blood, leading to a slightly elevatedpulse rate. While weight is not a major fac-tor on heart rate, extreme weights can havean effect on resting heart rate; generally,youths will have a higher resting heart ratethan adults, except in the case of trainedathletes. Athletes tend to have lower rest-ing heart rates, and the rate at which pulsereturns to normal is an indication of the fit-ness of the person.

Heart rate increases directly as exer-cise intensity increases, until an individualis near their point of exhaustion at whichthe heart rate begins to level off. As pulseinches upward, it approaches one's averagemaximum heart rate (MHR) or the highestheart rate value to reach the point of ex-haustion. Subtracting one's age from 220provides one's MHR. However, this is onlyan estimation because one's actual MHRdepends on a variety of factors such asweight and fitness level in addition to age.Maximum heart rate values help approxi-mate target heart rate (THR) which helpsthe individual train at the proper intensityto maximize the benefits of their training.The lower level of the THR is 50% of themaximum heart value and the upper levelis 85% of the MHR [4].

Page 3: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 3 of 16

3.2 Hardware of Monitor

This wearable heart rate monitor uti-lizes a pulse sensor to measure the user'sheart rate, an LCD Keypad Shield screen,and an Arduino Uno circuit board. Thepulse sensor is essentially a photoplethys-mograph, a popular non-invasive techniqueto measure heart rate. In this case, thepulse sensor records the user's heart rate inmillivolts (mV), which can be representedby a photoplethysmogram, or a PPG. Lightintensity plays an important role in the me-chanics of the sensor; if the sensor receives aconstant amount of light, the signal will re-main constant around 512 mv. With morelight, the signal will increase and with lesslight, the signal will decrease. This sen-sor measures heart rate by finding consecu-tive periods of instantaneous heart beat andmeasuring the time between. This period iscalled the Inter Beat Interval (IBI). The IBIis measured by timing between momentswhen the signal passes 50% of the wave am-plitude when increasing. From there, theheart rate can be translated into beats perminute as an average of the previous 10IBIs.[5]

Figure 1: This is a LCD KeyPad Shield.[6]

The LCD Keypad Shield is designedto be compatible with the Arduino Unoboard and can be directly plugged onto theUno. The screen has a blue backlit anddisplays characters in white. The Arduino

Uno can be programmed to display mes-sages or menu items on screen, and but-tons can be used to select various options.The Arduino Uno is an ATmega328 micro-controller, or embedded controller, board.The microprocessor has fourteen input andoutput pins along with six analog inputsranging from A0 to A5. Other parts of theboard include a reset button, a power jack,ICSP header, and a 16 MHz ceramic res-onator. The board can be plugged into theUSB port of a computer and powered us-ing this connection. The Arduino Uno isprogrammed using Arduino software. Thepulse sensor, connected to an Arduino Unocircuit board, is worn on the index finger.It takes the user's heart rate and trans-lates the information to be relayed to theuser. This monitor will inform the userwhen to stop and recover in order to pre-vent overexertion through the LCD KeypadShield screen. When the user's heart rateis in the acceptable range provided by theAmerican Heart Association, the screen willappear fully lit up to reflect this. However,as the user's heart rate moves outside thetarget range, the slow blinking of the screenwill admonish the user to slow down. Fi-nally, if the heart rate approaches the max-imum threshold, calculated by subtractingthe user's age from 220, then the screen willblink quickly, alerting users to allow them-selves to recover before reaching a danger-ous and possibly fatal level.

Figure 2: This is an Arduino Uno. [7]

Page 4: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 4 of 16

4 Methodology

The methodology utilized an interfacefor the modern consumer with the purposeof monitoring heart rate. The e-textile de-sign involved the networking of an ArduinoUno with a pulse sensor, allowing it to beused for personal health care. An LCDKeyPad Shield allowed the wearers to inputtheir age in order to customize the device todetermine their respective heart rate zones.The screen of the KeyPad Shield flashed atvarying rates to alert users when they wereoverexerting themselves. The screen wasdesigned to blink rapidly when individu-als approached their maximum heart rates.The electronic components of the productwere integrated into a wearable armband,enabling portable movement for the user.It was then used by a group of people per-forming various degrees of physical activityto demonstrate its effectiveness by correctlydisplaying their heart rates and notifyingthem when to rest.

4.1 Brainstorming

The LilyPad Arduino is a very versatiletechnology, commonly used in the field of e-textiles. The main purpose of this projectwas to integrate the LilyPad into a wearablegarment that helps the user monitor theirhealth. Although there were a variety of op-tions for programming the LilyPad, the pri-mary goal was to prevent injury and harmto the user. There was discussion aboutcreating a device that would help wearersuse proper form when weightlifting, exer-cising, or playing tennis, because the Lily-Pad is so adaptable. In order to accomplishthis, an accelerometer as well as a gyroscopewould have been used to assist the user inmaintaining correct technique to prevent in-jury. Another idea considered was usingthe LilyPad to program an impact sensor

that would indicate where the human bodyendured the most pressure, informing usersof injured areas or concussions. Upon con-ducting further research, it was discoveredthat overexertion when exercising is a veryserious issue that has long term and poten-tially fatal consequences, so ultimately theconsensus was to use the LilyPad Arduinowith a Pulse Sensor and LED lights to makea device that monitors heart rate and noti-fies the users when they are working them-selves too hard.

4.2 Research on Heart Rate

After settling on the idea of the heartrate monitor, the next stage was learningmore about the factors of heart rate and thedangers of overexertion. Researching wasthe most important step in providing a solidfoundation for the project. The researchfor the project was twofold: one aspect fo-cused on learning about the science behindtarget heart rate zones as well as the dan-gers of overexertion while the other facet ofthe research centered on learning about theLilyPad hardware and how to program it inconjunction with the pulse sensor and LEDlights. After compiling sufficient research,the background and introduction of the pa-per were written.

4.3 Ideal Workings of theMonitor

Originally, the LilyPad Arduino andthe LED lights seemed to be the most fitand ideal combination to create a success-ful heart rate monitor. To complete thisproject, other items, such as a LCD screen,wristbands, and Pulse Sensor, were neces-sary. The LilyPad, with its compact andlightweight nature, would be integrated intoa wristband that users could wear while

Page 5: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 5 of 16

participating in any strenuous physical ac-tivity. The Pulse Sensor would then runfrom the circuit board to the users index fin-ger, collecting data and sending them to theArduino to be displayed on the LCD screen.When the users heart rate was in the targetrange determined by the American HeartAssociation, the green LED would light up,signaling that the user could continue withhis or her activity. However, as the heartrate elevates to a dangerous level, a yel-low LED would light up to warn the user ofpossible overexertion. If the heart rate ap-proaches the user's maximum threshold, de-termined by subtracting the users age from220, the red LED would light up to tell thewearer to stop and recover to prevent per-manent damage. This way, the user couldmonitor his or her heart rate while exercis-ing to prevent overexertion.

As time went on, obstacles appearedthat made switching to using the LCDscreen instead of the LED lights the bestoption. An Arduino Uno board also provedto be a better choice than the LilyPad. TheArduino Uno and Pulse Sensor were at-tached to the wristbands, as seen in Fig-ure 3, while the LCD screen was used toallow users to input variable factors, suchas age, into the device, as seen in Figure 3.The plan adapted and developed into us-ing the LCD Keypad Shield as the mediumthrough which users could track their heartrate status.

Figure 3: This is the beginning screen ofthe heart rate monitor.

4.4 Software Behind Monitor

Aside from the hardware issues of themonitor, the programming of the Pulse Sen-sor was the main challenge of the project.The original sample code from the com-pany that made the Pulse Sensor was down-loaded into Arduino, but it kept outputtingS0 as the pulse. Therefore, a different pro-gram was tested to measure the raw datacollected from the Pulse Sensor, which isin millivolts. The data in millivolts wouldthen have to be converted into beats perminute, following a similar computationmethod to the one found in the originalsample code. Instead of programming theentire code from scratch with the raw data,it was easier and more time efficient to iden-tify and correct the errors in the samplecode.

The first troubleshooting method thegroup tested was to switch from the LilyPadArduino to the Arduino Uno, because theoriginal sample code for the Pulse Sensorwas written for the Arduino Uno. Certainbuilt-in functions, such as the TCCR2Aand TCCR2B were not compatible with theLilyPad Arduino, which is why the heartrate was never displayed properly. As soonas this problem was identified and resolved,the sample code worked and the rest of thecoding developed at a much faster pace.

The next step in the process was col-lecting user input through the LCD KeyPadShield. A function with a series of ”if state-ments” was used to read the supplied agefrom the buttons on the LCD shield. Theup and down buttons add and subtract tenyears, respectively, while the right and leftbuttons add and subtract one year, respec-tively. The select button then sends the in-formation to the Arduino Uno board, whichcan then calculate the maximum heart rateas well as the upper and lower bounds ofthe target heart rate zone, as defined by

Page 6: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 6 of 16

the American Heart Association. The max-imum heart rate is equal to 220 minus age.The lower bound is 50% of the maximumheart rate, and the upper bound is 85% ofthe maximum heart rate. The Pulse Sen-sor reads the heart rate and displays thepulse in beats per minute on the first lineof the LCD KeyPad Shield screen through avoid function that consistently updates ev-ery 40 milliseconds. The heart rate is sentto another void function that displays theheart rate zone that the user is currentlyin, as seen in Figure 4. Zone 1 indicatesa heart rate below the lower bound of thetarget heart rate zone, Zone 2 indicates aheart rate in the target heart rate zone,Zone 3 indicates a heart rate above the up-per bound of the target heart rate zone,and Zone 4 indicates a heart rate above themaximum heart rate. The specific zone isthen printed on the second line of the LCDKeyPad Shield. The rate at which the textblinks also corresponds to the danger levelof the heart rate. The text was programmedto not blink when the user is in Zone 1and 2, but as the pulse nears the maxi-mum heart rate in Zone 3 and 4, the texton screen blinks more rapidly as a warningfor the user.

Figure 4: This is the heart rate monitor inaction.

4.5 Construction of WearableDevice

A SainSmart LCD 1802 LCD KeypadShield was mounted on top of an ArduinoUno, with connection being provided by theheaders. The integrated electronic was thensewn onto a standard athletic wristband bythe screw holes on the base of the Arduinoboard. The device would be powered us-ing a 9V battery pack, enabling portableand wireless movement for the user. Thepack was similarly attached to the wrist-band to prevent disconnection from the Ar-duino. The Pulse Sensor was modified withan adjustable velcro strap to maintain con-stant pressure and reading for the heartmonitoring device. The length of the wiresof the Pulse Sensor provide easy reach forthe individual.

Soldering was utilized as a techniqueto permanently bind the wires of the PulseSensor to the analog pins on the LCD Key-pad Shield. The solder holds the metallicparts together and allows an electrical cur-rent to flow. The purple wire was used toreplace the A5 analog pin, the black wirewas soldered to ground, and the red wirewas soldered to the 5V. The three color-coded wires of the Pulse Sensor cable werefirst cut and then stripped as preparationfor the soldering. The A5 analog pin wasremoved by heating up the pin with thesoldering iron and then using pliers to re-move it from the board. Then, the purplewire was inserted into the space and sol-dered using the soldering wire and iron topermanently attach it. The black and redwires were twisted around the ground and5V, respectively, to allow for easier accessusing the soldering iron. They were thensoldered using the same method as men-tioned above.

Page 7: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 7 of 16

5 Results and Discussion

5.1 Data Testing Accuracy ofthe Monitor

Characterization and testing of theheart rate monitor was conducted by com-paring the device's accuracy to standardmethods. Pulse was measured from thewrist for 15 seconds and converted intobeats per minute (bpm). For the proof-of-concept study, two subjects of ages 16 to25 completed the study. The exercise per-formed in each trial of the investigation wasa one-minute agility drill, which enabled forcontinual monitoring of the readings fromthe device. It was ascertained that eachsubject began at their resting heart rate forconsistency.

Figure 5: This is a graph of the results ofSubject 1 testing the monitor.

Figure 6: This is a graph of the results ofSubject 2 testing the monitor.

Figure 5 depicts the comparison of thepulse sensor measurements and the actualpulse reading of a test subject with a rest-ing heart rate of 97 bpm. Figure 6 de-picts the same study of an individual witha resting heart rate of 72 bpm. The tra-jectory of the curves in the graphs matchthe expected cardiovascular system trendsduring and following a short period of in-tense cardio. In the subsequent minutesfollowing the burst of exercise, the differ-ence in heart rate drops in shorter ranges.This fluctuation in heart range was testedto exhibit that the device can accurately op-erate in all ranges. A direct comparison ofthe data shows that the measurements fromthe pulse sensor differs from actual readingsby an average of 3.40 bpm. This matchesthe designed purpose of the research, of thegoal of developing a more sensitive heartrate monitoring system than current wear-ables that exist on the market today. Theaverage standard deviation of the measure-ments in Figures 5 and 6 was 3.38 bpm.The two trials show that the wearable de-vice is not only accurate in its measurementof heart rate, but also very consistent in itsreadings, having a small margin of error.

5.2 Shortcomings and Unex-pected Results Through-out Project

While the LilyPad is normally usedfor wearables because of its lightweight andtransformable nature, in order to create theheart rate monitor, the Arduino Uno wasused instead. There were a multitude ofproblems encountered when trying to pro-gram the Pulse Sensor with the LilyPad.After numerous attempts to tweak the sam-ple code to produce an accurate outputin beats per minute, the group decided toswitch the hardware and try the experiment

Page 8: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 8 of 16

with the Arduino Uno. The initial sam-ple code for the Pulse Sensor was writtenfor the Uno and a few of the Pulse Sen-sor's built in functions such as the TCCR2Aand TCCR2B were not compatible with theLilyPad. Additionally, the Uno was morecompatible with the LCD screen and thePulse Sensor because the LilyPad did nothave enough usable ports to sustain both,while the Arduino Uno was capable. Al-though the Uno was less aesthetically pleas-ing and was not initially purposed for e-textiles, the primary objective was to designa working prototype of a wearable heartrate monitor. In the future, the device willbe adapted for the LilyPad; however, forthe time being, the Arduino Uno is the bestand most logical alternative to the LilyPadArduino.

One of the greatest obstacles the groupfaced was getting the pulse sensor to readconsistently. The beats per minute wouldvary greatly from one measurement to thenext, and since the data was collected everytwo milliseconds, the data produced exhib-ited random jumps and abnormal spikes inheart rate. In order to make the data morereliable and to attempt to eliminate out-liers, the program collects 200 heart ratemeasurements and averages them beforeprinting the results. Although the data isnow produced every 400 milliseconds, or 0.4seconds, which is less frequent than before,the numbers are more reliable and consis-tent.

Additionally, the group experimentedwith the pulse sensor itself to find a wayto make the numbers more consistent andaccurate. Since the pulse sensor is a LEDlight, the finger placement on the sensor isessential to the accuracy of the data col-lected. A slight change in the angle orpressure of finger placement can alter thereadings significantly. In order to maintaina stable positioning of the finger, a Velcro

strap and a metal clip were tested. Themetal clip clamped down too tightly, andthe heart rates collected for different userswere much higher than expected. Mean-while, the Velcro strap is adjustable and,if attached at the correct tightness, pro-duces more accurate readings. The groupalso tested different locations to wear thepulse sensor, such as the finger, earlobe,and wrist, and determined that the fin-ger, specifically the pointer finger, is themost accurate when compared to the ac-tual pulse. Lastly, it was proposed that thesoldering may have caused some discrepan-cies in the data. The replaced soldered pinfrom the heart rate sensor is slightly thin-ner than the original pin, which weakens theconnection. The extra space may be a rea-son for the imprecision and jumping aroundof values, so the Lockheed Martin mentorssuggested adding more solder to solidify theconnection. Overall, the pulse sensor readsmuch more accurately and precisely now,but additional improvements can be madein the future.

The device, developed using the Ar-duino Uno, is unfortunately not yet prac-tical for everyday wear. The Arduino Unois a bulkier electronic circuit than the Ar-duino LilyPad, which was the original prod-uct to be utilized. Both the Arduino Unoand the LCD Keypad Shield were connectedand then sewed onto an exercise wristband,but due to the size of the circuit board,it was not possible to conceal the boardwithin the wristband without compromis-ing the functionality of the product. An-other shortcoming related to the aestheticvalue of this product is the fact that neitherthe wires of the pulse sensor nor the vel-cro finger strap were concealed within theband. In the future, these different partsof the monitor would need to be integratedinto a product where they would not be vis-ible to users. However, the current device

Page 9: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 9 of 16

is just a prototype.

5.3 Limitations Faced WhileCreating the Monitor

Because heart rate zones are age-dependent, the final product is designed toaccommodate individuals of all ages. Ac-cording to the American Heart Association,maximum heart rate (MHR) is determinedby subtracting age from 220 and their tar-get heart rate zones are 50 and 85 percent,respectively, of their MHR. Although any-one can use the product at their leisure, thedevice was not tested on a sample grouprepresentative of different age categories.The test subjects were are all adolescentsbetween the ages of 16 and 20. Unfortu-nately, there was not much access to po-tential test subjects older or younger than20 years of age, so extensive testing was pri-marily focused on a single age group. Thus,the data collected does not account for olderadults and younger children.

Although the uniqueness of this wear-able stems from its ability to prevent usersfrom overexerting themselves, none of thetest subjects were performing physical ac-tivity strenuous enough for their heart ratesto cross the upper threshold of their targetzones. During testing, the device never hadthe opportunity to alert the wearers whentheir heart rates were getting too high.Although the monitor accurately trackedheart rate, its alert feature was never used.

5.4 Equations Involved inHeart Rate Monitor

There were multiple equations perti-nent to establishing individualized targetheart rate zones. Maximum heart rate isfound using the formula 220-their age. Thelower bound of their target heart rate zone

is determined by taking 50% of their MHRand the upper limit is found by taking 85%of their MHR. These equations were essen-tial for programming the Arduino Uno totrack heart rates for all people.

5.5 Comparisons to ExistingTechnologies

The proposed heart rate monitor isboth fairly accurate and consistent in com-parison to similar existing devices on themarket, like the Fitbit SurgeTM (Surge)and Fitbit Charge HRTM (Charge HR) fit-ness trackers. Both the Surge and theCharge HR struggle with giving accurateand reliable results, as highlighted in astudy done by Edward Jo and Brett A.Dolezal. It was discovered that both devicesvary greatly when used on a large group oftest subjects as they exercise. During mod-erate to intense exercise, the Charge HRrecorded heart rates that were off by an av-erage of 15.5 bpm when compared to theECG; similarly, the Surge displayed resultsthat were different by an average of 22.8bpm.[8] Because the danger of overexertionis most present during moderate or intenseexercise, it is critical that users be able toaccurately monitor their own heart rates sothey know when to stop and recover. Whilethe Fitbit fitness trackers are unreliable tofulfill this job, the heart rate monitor proto-type is more consistent, giving results thatare within 3.4 bpm of the heart rate takenmanually. Therefore, the prototype is moreaccurate and thus is better suited for help-ing users keep track of their heart rates andlimitations when exercising.

6 Conclusion

A wearable heart rate monitor was cre-ated to help all users exercise in a safe and

Page 10: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 10 of 16

effective way. The device, which consistsof a wrist band with an LCD screen anda Velcro finger strap, successfully displaysthe heart rate of the user and calculatesthe heart rate zone of the user based onthe age supplied. The heart rate monitoris very accurate when compared to someof the other heart rate monitoring prod-ucts currently on the market, such as theFitbit. Since there have been recent law-suits against the accuracy of such prod-ucts, it is clear that more accurate wearableheart rate monitors are needed. Overexer-tion during exercise is an extremely dan-gerous, even potentially fatal, yet avoidablerisk for athletes. Excessive sustained ex-ercise may lead to musculoskeletal trauma,cardiovascular stress, and stiffening of theartery walls. Because it is a huge incon-venience to manually keep track of heartrate during a workout, a wearable heart ratemonitor, such as the one made in this study,should be used to prevent such injuries andmaintain heart health.

In order to improve upon this productin the future, the device could be made wa-terproof so that swimmers and other ath-letes can monitor their heart rates whilstin the water. Further improvements onthis design could be made in terms of thelook of the device. The electronic compo-nents of the device, including the pulse sen-sor wires and the Arduino Uno circuit it-self, could be concealed within the fabricof the wristband. The zone number dis-play may be too subtle for users who arenot constantly checking the screen, so ei-ther LEDs, sounds, or vibrations could beincorporated. Also, in the future, an appcould be developed that can connect to thepulse monitor in order to save one's resultsand track progress over a certain time pe-riod. Future work related to this researchcould be done on the many variables thatcan influence heart rate, including weight

and gender, and then integrated into thecode for the heart rate monitor in order toget more accurate results that are cateredspecifically to the wearer.

7 Acknowledgements

We would like to thank our men-tors from Lockheed Martin, Joe Gross-mann, Bruno Janota, Dan Moskowitz, MikeVanezis, and Shawn Vettom for assistingus with this research project. We wouldalso like to thank our Residential Teach-ing Assistant, Kristian Wu, for her guid-ance throughout this process. We are grate-ful to Dean Ilene Rosen and Dean JeanPatrick Antoine for giving us this oppor-tunity. Finally, we would like to acknowl-edge the sponsors of the New Jersey Gov-ernor's School of Engineering and Tech-nology: Rutgers, the State University ofNew Jersey, Rutgers School of Engineering,Lockheed Martin, South Jersey Industries,and Printrbot.

References

[1] M. Valentini and G. Parati, ”VariablesInfluencing Heart Rate”, Progress inCardiovascular Diseases, vol. 52, no. 1,pp. 11-19, 2009.

[2] M. Baruscotti and R. Robinson, ”Elec-trophysiology and pacemaker functionof the developing sinoatrial node”, AJP:Heart and Circulatory Physiology, vol.293, no. 5, pp. H2613-H2623, 2007.

[3] ”Target Heart Rates”, Heart.org,2016. [Online]. Available:http://www.heart.org/HEARTORG/HealthyLiv-ing/PhysicalActivity/FitnessBasics/Target-Heart-Rates-UCM-

Page 11: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 11 of 16

434341-Article.jsp.V4p1RldllsM. [Ac-cessed: 16- Jul- 2016].

[4] ”Physiology Psychology: Cardiovascu-lar Factors”, Physiology Psychology:Cardiovascular Factors Montana StateUniversity-Bozeman, 2016.

[5] ”Pulse Sensor Amped”,World Famous Electronicsllc., 2016. [Online]. Available:http://pulsesensor.com/pages/pulse-sensor-amped-arduino-v1dot1. [Ac-cessed: 16- Jul- 2016].

[6] ”Arduino Compatible LCDKeypad Shield”, FastTech,2016. [Online]. Available:https://www.fasttech.com/product/1094600-lcd1602-arduino-compatible-lcd-keypad-shield. [Accessed: 16- Jul-2016].

[7] A. Chalkley, ”The Absolute Be-ginner’s Guide to Arduino”, Fore-front.io, 2013. [Online]. Available:http://forefront.io/a/beginners-guide-to-arduino/. [Accessed: 16- Jul- 2016].

[8] E. Jo and B. Dolezal, ”Validation ofthe Fitbit Surge and Charge HR Fit-ness Trackers”, 2016.[Accessed: 16- Jul-2016].

Page 12: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 12 of 16

APPENDIX

The final code in the programming language Arduino is presented below:

// Sensor variable// Pulse Sensor (purple wire) connected to analog pin A5

int pulsePin = A5;// Averaging variables

int avgCounter = 0;int runningPulse = 0;

// Age input variablesint age;int ageCounter = 0;int ageflag = 0;

// Volatile Variables, used in the interrupt service routine!volatile int BPM;

// int that holds raw Analog in 0. updated every 2mSvolatile int Signal;

// Holds the incoming raw datavolatile int IBI = 600; // holds the time interval between beats! Must be seeded!volatile boolean Pulse = false; // ”True” when User’s live heartbeat is detected.volatile boolean QS = false; // Becomes true when Arduoino finds a beat.void setup() {

Serial.begin(115200);interruptSetup(); // Sets up to read Pulse Sensor signal every 2mS

}void loop() { // Calls function to get age from user input

if (ageflag == 0) { // Only collects age onceage = getage();ageflag = 1;

}if (QS == true) { // A Heartbeat Was Found

averagingOutputWhenBeatHappens(); // A Beat Occurs, call averaging functionLCDBPM(BPM); // Function to print the BPM on the LCD screenLCDdisplay(age, BPM); // Function to print zone number on the LCD screenQS = false; // Reset the Quantified Self flag for next time

}delay(20); // Take a break}void averagingOutputWhenBeatHappens() {

avgCounter = avgCounter + 1;runningPulse = runningPulse + BPM;if (avgCounter == 200) { // Reads 200 beats before average BPM is calculated

BPM = runningPulse / avgCounter;avgCounter = 0;

Page 13: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 13 of 16

runningPulse = 0;}

}volatile int rate[10]; // Array to hold last ten IBI valuesvolatile unsigned long sampleCounter = 0; // Used to determine pulse timingvolatile unsigned long lastBeatTime = 0; // Used to find IBIvolatile int P = 512; // Used to find peak in pulse wave, seededvolatile int T = 512; // Used to find trough in pulse wave, seededvolatile int thresh = 525; // Used to find instant moment of heart beat, seededvolatile int amp = 100; // Used to hold amplitude of pulse waveform, seededvolatile boolean firstBeat = true; // Seeds rate array so we start with reasonable BPMvolatile boolean secondBeat = false; // Seeds array so we start with reasonable BPMvoid interruptSetup() { // Initializes Timer2 to throw an interrupt every 2mS.

TCCR2A = 0x02; // Disable PWM on pins 3 and 11, and go into CTC modeTCCR2B = 0x06; // Don’t force compare, 256 prescalerOCR2A = 0X7C; // Set the top of the count to 124 for 500Hz sample rateTIMSK2 = 0x02; // Enable interrupt on the match between Timer2 and OCR2Asei(); // Make sure global interrupts are enabled

}// Timer 2 Service Routine// Timer 2 makes sure to take a reading every 2 milliseconds

ISR(TIMER2 COMPA vect) { //Triggered when Timer2 counts to 124cli(); // Disable interrupts while we do thisSignal = analogRead(pulsePin); // Read the Pulse SensorsampleCounter += 2; // Keep track of the time in mS with this variableint N = sampleCounter - lastBeatTime; // Monitor the time since last beat

// find the peak and trough of the pulse waveif (Signal < thresh && N > (IBI / 5) * 3) { // Waits 3/5 of last IBI

if (Signal < T) { // T is the troughT = Signal; // Keep track of lowest point in pulse wave

}}if (Signal > thresh && Signal > P) { // Thresh condition helps avoid noise

P = Signal; // P is the peak} // Keep track of highest point in pulse wave// Signal surges up in value every time there is a pulseif (N > 250) { // Avoid high frequency noise

if ( (Signal > thresh) && (Pulse == false) && (N > (IBI / 5) * 3) ) {Pulse = true; // Set the Pulse flag when we think there is a pulseIBI = sampleCounter - lastBeatTime; // Measure time between beats in mSlastBeatTime = sampleCounter; // Keep track of time for next pulseif (secondBeat) { // If this is the second beat, if secondBeat == TRUE

secondBeat = false; // Clear secondBeat flagfor (int i = 0; i ≤ 9; i++) { // Seed running total to get realistic BPM

rate[i] = IBI;

Page 14: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 14 of 16

}}if (firstBeat) { // If it’s the first time we found a beat, if firstBeat == TRUE

firstBeat = false; // Clear firstBeat flagsecondBeat = true; // Set the second beat flagsei(); // Enable interrupts againreturn; // IBI value is unreliable so discard it

}// Keep a running total of the last 10 IBI valuesword runningTotal = 0; // Clear the runningTotal variablefor (int i = 0; i ≤ 8; i++) { // Shift data in the rate array

rate[i] = rate[i + 1]; // And drop the oldest IBI valuerunningTotal += rate[i]; // Add up the 9 oldest IBI values

}rate[9] = IBI; // Add the latest IBI to the rate arrayrunningTotal += rate[9]; // Add the latest IBI to runningTotalrunningTotal /= 10; // Average the last 10 IBI valuesBPM = 60000 / runningTotal; // How many beats can fit into a minute? that’s BPM!QS = true; // Set Quantified Self flag

// QS FLAG IS NOT CLEARED INSIDE THIS ISR}

}if (Signal < thresh && Pulse == true) { // When values are going down, the beat is

overPulse = false; // Reset the Pulse flag so we can do it againamp = P - T; // Get amplitude of the pulse wavethresh = amp / 2 + T; // Set thresh at 50% of the amplitudeP = thresh; // Reset these for next timeT = thresh;

}if (N > 2500) { // If 2.5 seconds go by without a beat

thresh = 512; // Set thresh defaultP = 512; // Set P defaultT = 512; // Set T defaultlastBeatTime = sampleCounter; // Bring the lastBeatTime up to datefirstBeat = true; // Set these to avoid noisesecondBeat = false; // When we get the heartbeat back

}sei(); // Enable interrupts} // End isr#include<LiquidCrystal.h>LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);// Displays the heart rate in BPM on the first line of the LCD screenvoid LCDBPM(int BPMDisplay) {

lcd.begin(16, 2);

Page 15: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 15 of 16

lcd.setCursor(0, 0);lcd.print(BPMDisplay);

}#include<LiquidCrystal.h>// Calculates the ranges of the zones based on the inputted age and prints the zone

number to the second row of the LCD shieldvoid LCDdisplay(int ageDisplay, int BPMDisplay) {// Calculates the heart rate zones as defined by the American Heart Association

int maxheartrate = 220 - ageDisplay;int targetlowerbound = maxheartrate * 0.50;int targetupperbound = maxheartrate * 0.85;int displayflag = 0;lcd.setCursor(0, 1);if (BPMDisplay < targetlowerbound) { // HR is lower than 50% of max HRlcd.print(”Zone 1”);}else if (BPMDisplay ≥ targetlowerbound && BPM ≤ targetupperbound) { //

Heart rate is between 50% and 85% of the max heart ratelcd.print(”Zone 2”);}else if (BPMDisplay > targetupperbound) { // HR is above 85% of max heart ratelcd.print(”Zone 3”); // Screen blinks every seconddelay(1000);lcd.clear();delay(1000);}else if (BPMDisplay > maxheartrate) { // HR is above the max heart ratelcd.print(”Zone 4! WARNING!”); // Screen blinks every 500 millisecondsdelay(500);lcd.clear();delay(500);}

}#include <LiquidCrystal.h>// Reads the age inputted from the buttons on the LCD shieldint readkey;int flag = 1;int getage() {

lcd.begin(16, 2);lcd.print(”Enter your age: ”);while (flag) {

lcd.setCursor(0, 2);readkey = analogRead(0);if (readkey < 50) { // right button: +1 ageCounter = ageCounter + 1;

delay(500);

Page 16: Health Monitoring Wearables - Rutgers School of Engineering · 2020. 2. 18. · Health Monitoring Wearables Page 3 of 16 3.2 Hardware of Monitor This wearable heart rate monitor uti-lizes

Health Monitoring Wearables Page 16 of 16

lcd.print(ageCounter);}else if (readkey < 200) { //up button: +10

ageCounter += 10;delay(500);lcd.print(ageCounter);

}else if (readkey < 380) { //down button: -10

if (ageCounter > 10) {ageCounter -= 10;delay(500);lcd.print(ageCounter);

}}else if (readkey < 650) { // left button: -1

if (ageCounter > 0) {ageCounter = ageCounter - 1;delay(500);

}lcd.print(ageCounter);

}else if (readkey < 900) { // select button: end

lcd.clear();flag = 0;

}}

return ageCounter;}