{"id":10253,"date":"2015-05-06T14:42:16","date_gmt":"2015-05-06T18:42:16","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=10253"},"modified":"2015-05-08T09:03:15","modified_gmt":"2015-05-08T13:03:15","slug":"arduino-heart-rate-meter-seven-segment-led-display","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/arduino-heart-rate-meter-seven-segment-led-display\/","title":{"rendered":"Arduino measures heart beat rate from fingertip"},"content":{"rendered":"<p>The <a href=\"http:\/\/embedded-lab.com\/blog\/?p=1671\" target=\"_blank\"><strong>PIC16F628A based heart rate meter<\/strong><\/a> is one of the most popular projects published on Embedded Lab. In this article, I am going to show how to replicate the same project using a simpler platform like Arduino. The Arduino heart rate meter will use <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/arduino-development-board-with-on-board-sd-slot\/\" target=\"_blank\"><strong>Arduino Uno<\/strong><\/a>, <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/easy-pulse-plugin-an-arduino-pulse-sensor\/\" target=\"_blank\"><strong>Easy Pulse Plugin<\/strong><\/a>, and <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/spi-4-digit-seven-segment-led-display\/\" target=\"_blank\"><strong>4-digit SPI seven segment LED display module<\/strong><\/a>. It computes the heart beat rate by processing the analog pulse signal output from the <strong>Easy Pulse Plugin<\/strong> sensor and displays it on the seven segment display module. The heart beat rate is refreshed every ~3 sec.<\/p>\n<div id=\"attachment_10315\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10315\" rel=\"attachment wp-att-10315\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10315\" class=\"size-full wp-image-10315\" alt=\"ss\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter1Title.jpg\" width=\"585\" height=\"483\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter1Title.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter1Title-550x454.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-10315\" class=\"wp-caption-text\">Heart beat rate meter using Arduino and Easy Pulse Plugin<\/p><\/div>\n<p><!--more--><\/p>\n<p><em><strong>What will you need?<\/strong><\/em><\/p>\n<p>The following things are required to build this project.<\/p>\n<p>1. <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/arduino-development-board-with-on-board-sd-slot\/\" target=\"_blank\"><strong>Arduino Uno<\/strong><\/a> or any other compatible board. I am using <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/arduino-development-board-with-on-board-sd-slot\/\" target=\"_blank\"><strong>Crowduino Uno SD board<\/strong><\/a> for this project.<\/p>\n<p>2. <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/easy-pulse-plugin-an-arduino-pulse-sensor\/\" target=\"_blank\"><strong>Easy Pulse Plugin<\/strong><\/a> : A pulse sensor based on Photoplethysmography principle. It directly plugs on to the left-side headers of Arduino Uno.<\/p>\n<p>3. <a href=\"https:\/\/www.tindie.com\/products\/rajbex\/spi-4-digit-seven-segment-led-display\/\" target=\"_blank\"><strong>4-digit serial seven segment display<\/strong><\/a>: It is a MAX7219 based serial segment LED display that is easy to interface with Arduino using only 3 I\/O pins.<\/p>\n<p>4. Few male-to-female jumper cables.<\/p>\n<p><em><strong>Connecting things<\/strong><\/em><\/p>\n<p>The hardware setup of this project is pretty simple and straightforward. Here are the instructions to be followed for setting up the connections between Arduino, Easy Pulse Plugin, and the display.<\/p>\n<ul>\n<li>On Easy Pulse Plugin module, place the 2-pin shunt jumpers JP1 and JP2 to 5V and A0 positions, respectively. This configuration will allow the module to use the 5V power supply from the Arduino Uno board and connect the pulse output signal to the Arduino&#8217;s A0 ADC channel, when it is plugged in to the Arduino Uno board.<\/li>\n<li>Insert the fingertip pulse sensor jack to the 3.5mm stereo socket on the Easy Pulse Plugin board. Make sure it is inserted well as shown in the picture below.\u00a0Then plugin the sensor module on to the left headers of the Arduino Uno board such that the A0 and A1 pins of the sensor module go into the A0 and A1 analog pins of the Arduino.<\/li>\n<\/ul>\n<div id=\"attachment_10318\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10318\" rel=\"attachment wp-att-10318\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10318\" class=\"size-full wp-image-10318\" alt=\"ss\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter13.jpg\" width=\"585\" height=\"449\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter13.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter13-550x422.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-10318\" class=\"wp-caption-text\">Easy Pulse Plugin module inserted into Arduino headers<\/p><\/div>\n<div id=\"attachment_10264\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10264\" rel=\"attachment wp-att-10264\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10264\" class=\"size-medium wp-image-10264\" alt=\"asas\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/EasyPulsePluginBoard21-550x324.jpg\" width=\"550\" height=\"324\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/EasyPulsePluginBoard21-550x324.jpg 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/EasyPulsePluginBoard21.jpg 720w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><p id=\"caption-attachment-10264\" class=\"wp-caption-text\">The sensor jack is 3.5mm stereo audio type and should be inserted well into the jack<\/p><\/div>\n<ul>\n<li>Connect the 4-digit seven segment LED display to Arduino Uno as follows:<\/li>\n<\/ul>\n<div id=\"attachment_10329\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10329\" rel=\"attachment wp-att-10329\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10329\" class=\"size-full wp-image-10329\" alt=\"Connections between Arduino Uno and 7-segment display module\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/05\/wiring.png\" width=\"585\" height=\"174\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/05\/wiring.png 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/05\/wiring-550x163.png 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-10329\" class=\"wp-caption-text\">Connections between Arduino Uno and 7-segment display module<\/p><\/div>\n<ul>The following picture shows the complete setup of this project.<\/p>\n<li>\n<p><div id=\"attachment_10316\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10316\" rel=\"attachment wp-att-10316\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10316\" class=\"size-full wp-image-10316\" alt=\"ss\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter11.jpg\" width=\"800\" height=\"479\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter11.jpg 800w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter11-550x329.jpg 550w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-10316\" class=\"wp-caption-text\">Complete setup of this project<\/p><\/div><\/li>\n<li>Load the project sketch to the Arduino board using Arduino IDE. You can download the Arduino sketch for this project from the link below.<\/li>\n<li>Wear the sensor on your index fingertip as shown in the picture below. Sit on a chair with your hand resting on some support. The heart rate meter will display the heart beat rate in <em>beats per minute<\/em> (bpm) on the seven segment LED module. If Arduino didn&#8217;t receive any pulse signal from the sensor, it will display &#8216;EEEE&#8217; on the seven segment as an error message. Otherwise, the heart beat rate is refreshed every 3 seconds.<\/li>\n<\/ul>\n<p><em><strong>Troubleshooting<\/strong><\/em><\/p>\n<p>If you keep seeing &#8216;EEEE&#8217; on display, that means that the Arduino is not receiving a good pulse signal from the sensor. You can try a couple different things like make sure the sensor jack is plugged in well and increase the gain of the instrumentation amplifier on Easy Pulse Plugin board by turning the potentiometer counter-clockwise.<\/p>\n<p><strong>Arduino Software<\/strong><\/p>\n<p>The pulse signal processing software loaded into Arduino works the same way as described in our <a href=\"http:\/\/embedded-lab.com\/blog\/?p=8183\" target=\"_blank\"><strong>chipKIT based pulse meter project<\/strong><\/a> which follows the following steps in computing the heart beat rate. Three consecutive peaks are identified in the photoplethysmography output signal using the principle of differentiation (finding maxima where the curve changes the slope from positive to negative), and the spacing (time interval) between the peaks can give the frequency of heart beat.<\/p>\n<p><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10353\" rel=\"attachment wp-att-10353\"><strong>Download Arduino Sketch<\/strong><br \/>\n<\/a><\/p>\n<div id=\"attachment_10347\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10347\" rel=\"attachment wp-att-10347\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10347\" class=\"size-full wp-image-10347\" alt=\"Algorithm for computing pulse rate\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/01\/algorithm.jpg\" width=\"584\" height=\"625\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/01\/algorithm.jpg 584w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/01\/algorithm-550x588.jpg 550w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-10347\" class=\"wp-caption-text\">Algorithm for computing pulse rate<\/p><\/div>\n<div id=\"attachment_10358\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10358\" rel=\"attachment wp-att-10358\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10358\" class=\"size-medium wp-image-10358\" alt=\"Arduino computes heart beat rate by detecting three consecutive peaks in the pulse signal\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/05\/PPG_Waveform2-550x266.png\" width=\"550\" height=\"266\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/05\/PPG_Waveform2-550x266.png 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/05\/PPG_Waveform2.png 707w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><p id=\"caption-attachment-10358\" class=\"wp-caption-text\">Arduino computes heart beat rate by detecting three consecutive peaks in the pulse signal<\/p><\/div>\n<div id=\"attachment_10317\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=10317\" rel=\"attachment wp-att-10317\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10317\" class=\"size-full wp-image-10317\" alt=\"ss\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter12.jpg\" width=\"585\" height=\"413\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter12.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/04\/PulseMeter12-550x388.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-10317\" class=\"wp-caption-text\">Pulse rate is refreshed in every 3 seconds<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The PIC16F628A based heart rate meter is one of the most popular projects published on Embedded Lab. In this article, I am going to show how to replicate the same project using a simpler platform like Arduino. The Arduino heart rate meter will use Arduino Uno, Easy Pulse Plugin, and 4-digit SPI seven segment LED display module. It computes the heart beat rate by processing the analog pulse signal output from the Easy Pulse Plugin sensor and displays it on the seven segment display module. The heart beat rate is refreshed every ~3 sec.<\/p>\n","protected":false},"author":1,"featured_media":10258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150],"tags":[1165,1166,469],"class_list":["post-10253","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino-2","tag-arduino-heart-rate-meter","tag-easy-pulse-plugin","tag-pulse-sensor"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/10253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=10253"}],"version-history":[{"count":20,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/10253\/revisions"}],"predecessor-version":[{"id":10359,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/10253\/revisions\/10359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/10258"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=10253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=10253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=10253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}