{"product_id":"heartbeat-sensor-module","title":"Heartbeat Sensor Module","description":"\u003cp\u003e\u003cspan\u003eDetects changes in infrared light shining through a fingertip.\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003eDescription\u003c\/h2\u003e\n\u003cp\u003eThe Heartbeat Sensor Module is used to experiment with detecting the heart rate of an individual by detecting changes in infrared light shining through a fingertip.\u003c\/p\u003e\n\u003ch2\u003e\u003cstrong\u003ePACKAGE INCLUDES:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003eHeartbeat Sensor Module\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003e\u003cstrong\u003eKEY FEATURES OF HEARTBEAT SENSOR MODULE:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003eInfrared (IR) transmitter\u003c\/li\u003e\n\u003cli\u003eInfrared receiver\u003c\/li\u003e\n\u003cli\u003e3.3 or 5V operation\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch3\u003eOperational Theory\u003c\/h3\u003e\n\u003cp\u003eThese sensor modules can be used to try to detect the heart rate of an individual.   It accomplishes this by shining an IR emitting LED on one side of a finger tip and detecting small changes in the received IR on the other side of the finger using a phototransistor.  The fluctuations in the transmitted IR is caused by the blood being pumped through the finger.  Commercial devices as used in doctor offices work on this same basic principal but obviously have a lot better capability.\u003cimg decoding=\"async\" class=\"alignright wp-image-11376 size-medium entered lazyloaded\" src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-300x225.jpg\" alt=\"Heartbeat Sensor Module Sensor Placement\" width=\"300\" height=\"225\" data-lazy-srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-300x225.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-768x576.jpg 768w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-249x187.jpg 249w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-400x300.jpg 400w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1.jpg 800w\" data-lazy-sizes=\"(max-width: 300px) 100vw, 300px\" data-lazy-src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-300x225.jpg\" data-ll-status=\"loaded\" sizes=\"(max-width: 300px) 100vw, 300px\" srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-300x225.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-768x576.jpg 768w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-249x187.jpg 249w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1-400x300.jpg 400w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Sensor-Placement-1.jpg 800w\"\u003e\u003c\/p\u003e\n\u003cp\u003eThe module ships with the IR transmitter and receiver folded down to avoid damage.  These element should be carefully unfolded and placed in position so that the transmitter and receiver point at each other with a snug fit on a fingertip.\u003c\/p\u003e\n\u003cp\u003eThe module is straight forward to operate.  Hook up ground and Vcc (3.3 or 5V to match the MCU) and monitor the analog output using an analog input on an MCU.   A fingertip is then placed between the IR emitter and the detector and software running on the MCU filters out the electrical noise, parses the data and spits out the heart rate (at least that is the theory!).\u003c\/p\u003e\n\u003ch3\u003eModule Connections\u003c\/h3\u003e\n\u003cp\u003eThere is a 3-pin header on the assembly.  Conveniently, the pins are marked on the back-side.  With the connector facing to the left, the top ‘S’ pin is the analog output, center pin is Vcc (3.3 or 5V) and the bottom ‘-‘ pin is ground.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003e1 x 3 Header \u003c\/strong\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cb\u003eS \u003c\/b\u003e= Analog output, connects to analog input on uC\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eCenter pin\u003c\/strong\u003e = Vcc (3.3 – 5V)\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003e‘-‘ =\u003c\/strong\u003e Ground\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003e\u003cstrong\u003eOUR EVALUATION RESULTS:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cp\u003eThese modules are interesting in concept, but can be very difficult to get meaningful information out of and so are recommended for more advanced hobbyists or those that just enjoy a good challenge.   Let’s just say that if you find yourself in an ER, you don’t want to look down and see one of these clamped to your finger.\u003c\/p\u003e\n\u003cp\u003eThe reason is that the analog output of the device tends to be swamped with 60Hz noise from the home electrical system and the amount of change due to the heartbeat can be difficult to detect with all the ambient noise.  Here are some things that can be done to improve your odds of getting a reasonable reading.\u003c\/p\u003e\n\u003col\u003e\n\u003cli\u003e As-shipped, the emitter LED and receiver are usually folded down for safe shipping.  The emitter LED needs to point at the receiver, so carefully bend the LED up and the receiver out so that the two are facing each other more or less with enough room to place the tip of a finger between them.  When running the setup with no finger in place, a lower number is better when when aligning the emitter\/receiver pair.  One of the pics shows the basic alignment that you are looking for.\u003c\/li\u003e\n\u003cli\u003eShield the sensor assembly from stray light as much as possible while taking measurements.  Turning lights off help to reduce the 60Hz flicker noise that can couple into the sensor.\u003c\/li\u003e\n\u003cli\u003eIf there is a question as to whether the IR LED is working, a cell phone camera will typically pick up the blue glow form the IR LED if it is operating.\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003cp\u003eHere is a scope capture of the module output in our setup.  The peaks within the electrical noise are the result of the heart rate being detected.  In this case, it is a little less than 60 beats per minute.  The challenge is to average the analog data to filter out the noise while detecting the peaks.\u003c\/p\u003e\n\u003cp\u003eA good hardware project would be to add some noise filter and amplification to cleanup this signal and make it more usable.  If you are looking for a more complete solution, checkout the PulseSensor down below that includes this type of noise filter and amplification as part of the module.\u003c\/p\u003e\n\u003cdiv id=\"attachment_4099\" class=\"wp-caption aligncenter\"\u003e\n\u003cimg decoding=\"async\" aria-describedby=\"caption-attachment-4099\" class=\"wp-image-4099 size-full entered lazyloaded\" src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture.jpg\" alt=\"\" width=\"705\" height=\"222\" data-lazy-srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture.jpg 705w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture-400x126.jpg 400w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture-300x94.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture-280x88.jpg 280w\" data-lazy-sizes=\"(max-width: 705px) 100vw, 705px\" data-lazy-src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture.jpg\" data-ll-status=\"loaded\" sizes=\"(max-width: 705px) 100vw, 705px\" srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture.jpg 705w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture-400x126.jpg 400w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture-300x94.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/01\/Heartbeat-Sensor-Module-Scope-Capture-280x88.jpg 280w\"\u003e\n\u003cp id=\"caption-attachment-4099\" class=\"wp-caption-text\"\u003eScope capture of module output showing a heart rate of about 60 Beats Per Minute superimposed over the electrical noise\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cp\u003eThe simple program below can be used to monitor the analog output of the device to see how it basically reacts when a finger is inserted and to verify the output is good, but it makes no attempt to calculate the heart rate from the data.  Samples are taken 10 times a second but this is arbitrary.\u003c\/p\u003e\n\u003cp\u003eTo test the module, simply connect the sensor output to any analog input on the uC (we use A0 in the example below) and apply 5V and ground to the module – then insert finger.\u003c\/p\u003e\n\u003ch3\u003eHeartbeat Sensor Module Test Program\u003c\/h3\u003e\n\u003cpre class=\"copy-the-code-target\"\u003e\u003cspan\u003e\/*\u003c\/span\u003e\n\u003cspan\u003eHeatbeat Detection Sensor Module test\u003c\/span\u003e\n\n\u003cspan\u003eBasic code reading the output of the module. \u003c\/span\u003e\n\u003cspan\u003e*\/\u003c\/span\u003e\n\u003cspan\u003eint\u003c\/span\u003e \u003cspan\u003esensorPin\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e A\u003cspan\u003e0\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e  \u003cspan\u003e\/\/ Arbitrary analog pin to connect sensor output to\u003c\/span\u003e\n\u003cspan\u003eint\u003c\/span\u003e \u003cspan\u003eperiod\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003e100\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e \u003cspan\u003e\/\/ Delay in milliseconds between readings \u003c\/span\u003e\n\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003e\/\/  Initialization\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\n\u003cspan\u003evoid\u003c\/span\u003e \u003cspan\u003esetup\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\n\u003cspan\u003e{\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003ebegin\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e9600\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e \u003cspan\u003e\/\/ the baud rate of the serial data\u003c\/span\u003e\n\u003cspan\u003e}\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003e\/\/  Main\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003evoid\u003c\/span\u003e \u003cspan\u003eloop\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\n\u003cspan\u003e{\u003c\/span\u003e\n    \u003cspan\u003estatic\u003c\/span\u003e \u003cspan\u003edouble\u003c\/span\u003e \u003cspan\u003eoldValue\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003e0\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e \u003cspan\u003e\/\/ used for averaging.\u003c\/span\u003e\n    \n    \u003cspan\u003eint\u003c\/span\u003e \u003cspan\u003erawValue\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003eanalogRead\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003esensorPin\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e \u003cspan\u003e\/\/ Value read from the analog pin.  Will be between 0-1024\u003c\/span\u003e\n    \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprintln\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003erawValue\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e \n    \u003cspan\u003edelay\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003eperiod\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e            \n\u003cspan\u003e}\u003c\/span\u003e\n\u003cbutton class=\"copy-the-code-button\" data-style=\"svg-icon\" title=\"Copy\"\u003e\u003csvg aria-hidden=\"true\" role=\"img\" class=\"copy-icon\" viewbox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\" focusable=\"false\"\u003e\u003cpath d=\"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z\"\u003e\u003c\/path\u003e\u003cpath d=\"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z\"\u003e\u003c\/path\u003e\u003c\/svg\u003e\u003c\/button\u003e\u003c\/pre\u003e\n\u003ch2\u003e\u003cstrong\u003eBEFORE THEY ARE SHIPPED, THESE MODULES ARE:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003eSample inspected and tested per incoming shipment\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cem\u003eNotes: \u003c\/em\u003e\u003c\/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003ci\u003eThis module is the same or similar to the KY-039\u003c\/i\u003e\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003chr\u003e\n\u003ch2\u003eTechnical Specifications\u003c\/h2\u003e\n\u003ctable class=\"table table-hover\" width=\"855\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003eMaximum Ratings\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e          Vcc\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e3.3 – 5V\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e          I\u003csub\u003eMax\u003c\/sub\u003e\n\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eMaximum Current Draw\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e\u0026lt; 12mA (measured)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003e Operating Ratings\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e          Wavelength\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e850-940nm (typical)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003eDimensions\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eL x W (PCB)\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e20 x 15mm (0.75 x 0.60″)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003c!----\u003e","brand":"Keszoox","offers":[{"title":"Default Title","offer_id":45683465289963,"sku":"","price":2.72,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0677\/1005\/8731\/files\/Heartbeat-Sensor-Module-1.jpg?v=1723005234","url":"https:\/\/keszooxstore.com\/products\/heartbeat-sensor-module","provider":"Keszoox","version":"1.0","type":"link"}