{"id":18863,"date":"2020-12-27T13:53:17","date_gmt":"2020-12-27T13:53:17","guid":{"rendered":"https:\/\/electropeak.com\/learn\/?p=18863"},"modified":"2023-08-06T13:36:47","modified_gmt":"2023-08-06T13:36:47","slug":"interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino","status":"publish","type":"post","link":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/","title":{"rendered":"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"18863\" class=\"elementor elementor-18863\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-13695d6e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"13695d6e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1e5cc75\" data-id=\"1e5cc75\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-49503f1c elementor-widget elementor-widget-heading\" data-id=\"49503f1c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">MAX30102 Heart Rate Module Features <\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c161a46 elementor-widget elementor-widget-text-editor\" data-id=\"4c161a46\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>MAX30102 sensor is used to detect blood oxygen and heart rate. First, infrared radiation is sent and reflected by hitting the finger, and then the amount of oxygen in the blood is determined by measuring the wave amplitude. Heart rate is also obtained by analyzing the time series response of this radiation.<br \/>The <b>MAX30102<\/b> is an integrated module compatible with the Arduino and STM32. It integrates a red LED with an infrared LED, a photoelectric detector, an optical device, and a low noise electronic circuit for ambient light suppression. Heart rate and blood oxygen data are also transmitted to the Arduino or other microcontrollers via<b> I2C communication<\/b>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c2c5cfd elementor-widget elementor-widget-image\" data-id=\"c2c5cfd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTg4NjcsInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLmpwZyJ9\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module.jpg\" class=\"attachment-large size-large wp-image-18867\" alt=\"MAX30102 Heart Rate Module\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module.jpg 600w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-400x400.jpg 400w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3b940e6 elementor-widget elementor-widget-text-editor\" data-id=\"3b940e6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You can download the datasheet of this\u00a0module\u00a0here.\u202f\u00a0<\/p><p><div class='w3eden wpdm_package_shortcode'><!-- WPDM Link Template: Call to Action 3 -->\n\n<div class=\"well c2a3\">\n    <div class=\"media\">\n        <div class=\"mr-3\" align=\"left\">\n            <img decoding=\"async\" class=\"wpdm_icon\" alt=\"Icon\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/plugins\/download-manager\/assets\/file-type-icons\/pdf.svg\" \/>\n        <\/div>\n        <div class=\"media-body\">\n            <h3 class=\"media-heading\" style=\"padding-top: 0px;border:0px;margin: 0 0 5px 0;font-size:12pt;\">\n                <a style=\"font-weight: 700\" href=\"https:\/\/electropeak.com\/learn\/download\/max30102-heart-rate-module-datasheet\/\">MAX30102 Heart Rate Module Datasheet<\/a>\n                <span style=\"font-size:8pt;font-weight:300\" class=\"text-muted ml-4\">\n                    <i class=\"fas fa-hdd mr-1\"><\/i> 938.00 KB\n                    <i class=\"ml-3 far fa-arrow-alt-circle-down mr-1\"><\/i> 1725 downloads\n                <\/span>\n            <\/h3>\n            &#8230;\n        <\/div>\n        <div class=\"ml-3\" align=\"right\">\n            <a class='wpdm-download-link download-on-click btn btn-primary '  rel='nofollow' href='#' data-downloadurl=\"https:\/\/electropeak.com\/learn\/download\/max30102-heart-rate-module-datasheet\/?wpdmdl=18877&#038;refresh=6aad18ceae8a61789728974\">Download<\/a>\n        <\/div>\n    <\/div>\n\n<\/div>\n<style>\n    .well.c2a3 .btn {\n        padding: 11px 30px;\n        font-size: 11pt;\n    }\n\n    .well.c2a3 .media-body {\n        font-size: 11pt;\n    }\n\n    .well.c2a3 .wpdm_icon {\n        height: 42px;\n        width: auto;\n    }<\/style>\n<\/div><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75c8bc40 elementor-widget elementor-widget-heading\" data-id=\"75c8bc40\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">MAX30102 Heart Rate Module Pinout<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-11993a09 elementor-widget elementor-widget-text-editor\" data-id=\"11993a09\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This sensor has 8 pins. 4 pins are more useful:<\/p><ul><li><strong>VCC:<\/strong> Module power supply \u2013 3 to 5 V<\/li><li><strong>GND<\/strong>: Ground<\/li><li><strong>SCL<\/strong>: I2C clock bus<\/li><li><strong>SDA<\/strong>: I2C data bus<\/li><\/ul><p>You can see pinout of this module in the image below.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ef0534b elementor-widget elementor-widget-image\" data-id=\"ef0534b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Pinout.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module-Arduino-Pinout\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTg4NjgsInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLUFyZHVpbm8tUGlub3V0LmpwZyJ9\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Pinout.jpg\" class=\"attachment-large size-large wp-image-18868\" alt=\"MAX30102 Module Pinout\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Pinout.jpg 800w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Pinout-533x400.jpg 533w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3bce754d elementor-widget elementor-widget-heading\" data-id=\"3bce754d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Required Materials<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-89d1f0d elementor-widget elementor-widget-image\" data-id=\"89d1f0d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Required-Materials.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module-Arduino-Required-Materials\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTg4NjksInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLUFyZHVpbm8tUmVxdWlyZWQtTWF0ZXJpYWxzLmpwZyJ9\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"800\" height=\"667\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Required-Materials.jpg\" class=\"attachment-large size-large wp-image-18869\" alt=\"\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Required-Materials.jpg 800w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Required-Materials-480x400.jpg 480w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Required-Materials-768x640.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-db7647f elementor-widget elementor-widget-heading\" data-id=\"db7647f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Hardware Components<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1bf5479d elementor-widget elementor-widget-html\" data-id=\"1bf5479d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"table-2\">\r\n<table width=\"100%\" class=\"zebra\">\r\n<tbody>\r\n<tr>\r\n\t<td width=\"70%\">Arduino UNO R3 \r\n<\/td>\r\n\t<td class=\"center\" width=\"10%\">\u00d7<\/td>\r\n    <td class=\"center\" width=\"10%\">1<\/td>\r\n\t<td class=\"center\" width=\"10%\"><a href=\"https:\/\/electropeak.com\/arduino-uno-r3-original\" target=\"_blank\"><i class=\"fa fa-shopping-cart\" style=\"\"><\/i><\/a><\/td>\r\n<\/tr>\r\n<tr>\r\n\t<td width=\"70%\">MAX30102 Pulse Heart Rate Module  \r\n<\/td>\r\n\t<td class=\"center\" width=\"10%\">\u00d7<\/td>\r\n    <td class=\"center\" width=\"10%\">1<\/td>\r\n\t<td class=\"center\" width=\"10%\"><a href=\"https:\/\/electropeak.com\/max30102-blood-oxygen-wrist-heart-rate-pulse-detection-sensor-module-compatible-with-uno-r3-stm32\" target=\"_blank\"><i class=\"fa fa-shopping-cart\" style=\"\"><\/i><\/a><\/td>\r\n<\/tr>\r\n<tr>\r\n\t<td width=\"70%\">Male to Female jumper wire \r\n<\/td>\r\n\t<td class=\"center\" width=\"10%\">\u00d7<\/td>\r\n    <td class=\"center\" width=\"10%\">1<\/td>\r\n\t<td class=\"center\" width=\"10%\"><a href=\"https:\/\/electropeak.com\/10cm-40p-male-to-female-jumper-wire\" target=\"_blank\"><i class=\"fa fa-shopping-cart\" style=\"\"><\/i><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3da5f2e elementor-widget elementor-widget-heading\" data-id=\"3da5f2e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Software Apps<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-367b0b07 elementor-widget elementor-widget-html\" data-id=\"367b0b07\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"table-2\">\r\n<table width=\"100%\" class=\"zebra\">\r\n<tbody>\r\n\r\n<tr>\r\n\t<td width=\"90%\">Arduino IDE<\/td>\r\n\t<td class=\"center\" width=\"10%\"><a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" target=\"_blank\"><i class=\"fa fa-info\" style=\"\"><\/i><\/a><\/td>\r\n<\/tr>\r\n\r\n\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6880a0e4 elementor-widget elementor-widget-heading\" data-id=\"6880a0e4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Interfacing MAX30102 Sensor with Arduino<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3b058dc elementor-widget elementor-widget-heading\" data-id=\"3b058dc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Step 1: Circuit<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2d131f9f elementor-widget elementor-widget-text-editor\" data-id=\"2d131f9f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The following circuit shows how you should connect Arduino to MAX30102 module. Connect wires accordingly.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-354f8821 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"354f8821\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-1d8099ac\" data-id=\"1d8099ac\" data-element_type=\"column\" data-e-type=\"column\" data-settings=\"{&quot;background_background&quot;:&quot;gradient&quot;}\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-11b572ac elementor-view-stacked elementor-widget__width-auto elementor-absolute elementor-shape-circle elementor-widget elementor-widget-icon\" data-id=\"11b572ac\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;}\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-pen\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6cd6c645 elementor-widget elementor-widget-heading\" data-id=\"6cd6c645\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Note<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6fbc69a6 elementor-widget elementor-widget-text-editor\" data-id=\"6fbc69a6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You can use a bread board and pin header to connect module to interface wires, or you can solder pin header to module.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-9bce59a elementor-widget elementor-widget-image\" data-id=\"9bce59a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Circuit-1.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module-Arduino-Circuit\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjcxNDgsInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLUFyZHVpbm8tQ2lyY3VpdC0xLmpwZyJ9\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"500\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Circuit-1.jpg\" class=\"attachment-large size-large wp-image-27148\" alt=\"\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Circuit-1.jpg 600w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Circuit-1-480x400.jpg 480w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2473f46 elementor-widget elementor-widget-heading\" data-id=\"2473f46\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Step 2: Installing Library<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-302cd12 elementor-widget elementor-widget-text-editor\" data-id=\"302cd12\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Go to Library manager and search <strong>Max30<\/strong>, then install <strong>SparkFun Max301x<\/strong>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-32f2b24 elementor-widget elementor-widget-image\" data-id=\"32f2b24\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Library.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module-Arduino-Library\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTg4NzMsInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLUFyZHVpbm8tTGlicmFyeS5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"444\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Library.png\" class=\"attachment-large size-large wp-image-18873\" alt=\"\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Library.png 789w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Library-600x338.png 600w\" sizes=\"(max-width: 789px) 100vw, 789px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-7310527b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7310527b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-6824f7ba\" data-id=\"6824f7ba\" data-element_type=\"column\" data-e-type=\"column\" data-settings=\"{&quot;background_background&quot;:&quot;gradient&quot;}\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5c45e3a6 elementor-view-stacked elementor-widget__width-auto elementor-absolute elementor-shape-circle elementor-widget elementor-widget-icon\" data-id=\"5c45e3a6\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;}\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"far fa-lightbulb\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-13c32f22 elementor-widget elementor-widget-heading\" data-id=\"13c32f22\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Tip<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4cb15a0e elementor-widget elementor-widget-text-editor\" data-id=\"4cb15a0e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"mpc-alert mpc-transition mpc-typography--mpc_preset_13 mpc-inited\" data-cookie=\"mpc-alert-15265-0\" data-id=\"mpc_alert-905f330f8226f56\"><div class=\"mpc-alert__content\"><p>If you need more help with installing a library on Arduino, read this tutorial:\u00a0<a href=\"https:\/\/electropeak.com\/learn\/how-to-install-an-arduino-library\/\"><em>How to Install an Arduino Library<\/em><\/a><\/p><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-ff7ccf7 elementor-widget elementor-widget-heading\" data-id=\"ff7ccf7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Step 3: Code for Heart Rate Detection <\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-02d024c elementor-widget elementor-widget-text-editor\" data-id=\"02d024c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Upload the following code to your Arduino. This code displays your heart rate graphically in the serial monitor.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-930d0cd elementor-widget elementor-widget-html\" data-id=\"930d0cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class=\"line-numbers lang-arduino\"><code>   \/*\r\n MAX30102- Heart Rate Pulse Detection-Module\r\n Home&lt;iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&amp;#8220;Home&amp;#8221; &amp;#8212; Electropeak\" src=\"https:\/\/electropeak.com\/learn\/embed\/#?secret=TxwP1tJuq2\" data-secret=\"TxwP1tJuq2\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"&gt;&lt;\/iframe&gt;\r\n\r\n Based on Arduino Library Example\r\n*\/\r\n#include &lt;Wire.h&gt;\r\n#include \"MAX30105.h\"\r\n\r\nMAX30105 particleSensor;\r\n\r\nvoid setup()\r\n{\r\n Serial.begin(115200);\r\n Serial.println(\"Initializing...\");\r\n\r\n \/\/ Initialize sensor\r\n if (!particleSensor.begin(Wire, I2C_SPEED_STANDARD)) \/\/Use default I2C port, 400kHz speed\r\n {\r\n Serial.println(\"MAX30105 was not found. Please check wiring\/power. \");\r\n while (1);\r\n }\r\n Serial.println(\"connected\");\r\n\r\n \/\/Setup to sense a nice looking saw tooth on the plotter\r\n byte ledBrightness = 0x1F; \/\/Options: 0=Off to 255=50mA\r\n byte sampleAverage = 8; \/\/Options: 1, 2, 4, 8, 16, 32\r\n byte ledMode = 3; \/\/Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green\r\n int sampleRate = 100; \/\/Options: 50, 100, 200, 400, 800, 1000, 1600, 3200\r\n int pulseWidth = 411; \/\/Options: 69, 118, 215, 411\r\n int adcRange = 4096; \/\/Options: 2048, 4096, 8192, 16384\r\n\r\n particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth, adcRange); \/\/Configure sensor with these settings\r\n\r\n \/\/Arduino plotter auto-scales annoyingly. To get around this, pre-populate\r\n \/\/the plotter with 500 of an average reading from the sensor\r\n\r\n \/\/Take an average of IR readings at power up\r\n const byte avgAmount = 64;\r\n long baseValue = 0;\r\n for (byte x = 0 ; x &lt; avgAmount ; x++)\r\n {\r\n baseValue += particleSensor.getIR(); \/\/Read the IR value\r\n }\r\n baseValue \/= avgAmount;\r\n\r\n \/\/Pre-populate the plotter so that the Y scale is close to IR values\r\n for (int x = 0 ; x &lt; 500 ; x++)\r\n Serial.println(baseValue);\r\n}\r\n\r\nvoid loop()\r\n{\r\n Serial.println(particleSensor.getIR()); \/\/Send raw data to plotter\r\n}\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e6940ee elementor-widget elementor-widget-text-editor\" data-id=\"e6940ee\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In the first part, you have to add related library to program. Next, in the setup loop, the data transfer rate is 115,200. You should set this number in the Serial plotter as well. Sampling is done at a 400 kHz frequency.<\/p>\n<p>Finally, the results appear in the Serial Plotter as follows. As you can see the heart rate fluctuates:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-86c8f27 elementor-widget elementor-widget-image\" data-id=\"86c8f27\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result1.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module-Arduino-Result1\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTg4NzUsInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLUFyZHVpbm8tUmVzdWx0MS5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"387\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result1.jpg\" class=\"attachment-large size-large wp-image-18875\" alt=\"\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result1.jpg 800w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result1-600x290.jpg 600w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result1-768x372.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-365a03f elementor-widget elementor-widget-heading\" data-id=\"365a03f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Step 4: Code for Blood Oxygen detection<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2a11546 elementor-widget elementor-widget-text-editor\" data-id=\"2a11546\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Upload the following code to your Arduino. This code displays your blood oxygen in the serial monitor.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7c3136c elementor-widget elementor-widget-html\" data-id=\"7c3136c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class=\"line-numbers lang-arduino\"><code>    \/*\r\n  MAX30102- Blood Oxyge -Module\r\n  https:\/\/electropeak.com\/learn\/\r\n\r\n  Based on Arduino Library Example\r\n*\/\r\n\r\n\r\n#include &lt;Wire.h&gt;\r\n#include &quot;MAX30105.h&quot;\r\n#include &quot;spo2_algorithm.h&quot;\r\n\r\nMAX30105 particleSensor;\r\n\r\n#define MAX_BRIGHTNESS 255\r\n\r\n#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)\r\n\/\/Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in 32-bit format\r\n\/\/To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-bit data.\r\nuint16_t irBuffer[100]; \/\/infrared LED sensor data\r\nuint16_t redBuffer[100];  \/\/red LED sensor data\r\n#else\r\nuint32_t irBuffer[100]; \/\/infrared LED sensor data\r\nuint32_t redBuffer[100];  \/\/red LED sensor data\r\n#endif\r\n\r\nint32_t bufferLength; \/\/data length\r\nint32_t spo2; \/\/SPO2 value\r\nint8_t validSPO2; \/\/indicator to show if the SPO2 calculation is valid\r\nint32_t heartRate; \/\/heart rate value\r\nint8_t validHeartRate; \/\/indicator to show if the heart rate calculation is valid\r\n\r\nbyte pulseLED = 11; \/\/Must be on PWM pin\r\nbyte readLED = 13; \/\/Blinks with each data read\r\n\r\nvoid setup()\r\n{\r\n  Serial.begin(115200); \/\/ initialize serial communication at 115200 bits per second:\r\n\r\n  pinMode(pulseLED, OUTPUT);\r\n  pinMode(readLED, OUTPUT);\r\n\r\n  \/\/ Initialize sensor\r\n  if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) \/\/Use default I2C port, 400kHz speed\r\n  {\r\n    Serial.println(F(&quot;MAX30105 was not found. Please check wiring\/power.&quot;));\r\n    while (1);\r\n  }\r\n\r\n  Serial.println(F(&quot;Attach sensor to finger with rubber band. Press any key to start conversion&quot;));\r\n  while (Serial.available() == 0) ; \/\/wait until user presses a key\r\n  Serial.read();\r\n\r\n  byte ledBrightness = 60; \/\/Options: 0=Off to 255=50mA\r\n  byte sampleAverage = 4; \/\/Options: 1, 2, 4, 8, 16, 32\r\n  byte ledMode = 2; \/\/Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green\r\n  byte sampleRate = 100; \/\/Options: 50, 100, 200, 400, 800, 1000, 1600, 3200\r\n  int pulseWidth = 411; \/\/Options: 69, 118, 215, 411\r\n  int adcRange = 4096; \/\/Options: 2048, 4096, 8192, 16384\r\n\r\n  particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth, adcRange); \/\/Configure sensor with these settings\r\n}\r\n\r\nvoid loop()\r\n{\r\n  bufferLength = 100; \/\/buffer length of 100 stores 4 seconds of samples running at 25sps\r\n\r\n  \/\/read the first 100 samples, and determine the signal range\r\n  for (byte i = 0 ; i &lt; bufferLength ; i++)\r\n  {\r\n    while (particleSensor.available() == false) \/\/do we have new data?\r\n      particleSensor.check(); \/\/Check the sensor for new data\r\n\r\n    redBuffer[i] = particleSensor.getRed();\r\n    irBuffer[i] = particleSensor.getIR();\r\n    particleSensor.nextSample(); \/\/We're finished with this sample so move to next sample\r\n\r\n    Serial.print(F(&quot;red=&quot;));\r\n    Serial.print(redBuffer[i], DEC);\r\n    Serial.print(F(&quot;, ir=&quot;));\r\n    Serial.println(irBuffer[i], DEC);\r\n  }\r\n\r\n  \/\/calculate heart rate and SpO2 after first 100 samples (first 4 seconds of samples)\r\n  maxim_heart_rate_and_oxygen_saturation(irBuffer, bufferLength, redBuffer, &amp;spo2, &amp;validSPO2, &amp;heartRate, &amp;validHeartRate);\r\n\r\n  \/\/Continuously taking samples from MAX30102.  Heart rate and SpO2 are calculated every 1 second\r\n  while (1)\r\n  {\r\n    \/\/dumping the first 25 sets of samples in the memory and shift the last 75 sets of samples to the top\r\n    for (byte i = 25; i &lt; 100; i++)\r\n    {\r\n      redBuffer[i - 25] = redBuffer[i];\r\n      irBuffer[i - 25] = irBuffer[i];\r\n    }\r\n\r\n    \/\/take 25 sets of samples before calculating the heart rate.\r\n    for (byte i = 75; i &lt; 100; i++)\r\n    {\r\n      while (particleSensor.available() == false) \/\/do we have new data?\r\n        particleSensor.check(); \/\/Check the sensor for new data\r\n\r\n      digitalWrite(readLED, !digitalRead(readLED)); \/\/Blink onboard LED with every data read\r\n\r\n      redBuffer[i] = particleSensor.getRed();\r\n      irBuffer[i] = particleSensor.getIR();\r\n      particleSensor.nextSample(); \/\/We're finished with this sample so move to next sample\r\n\r\n      \/\/send samples and calculation result to terminal program through UART\r\n      Serial.print(F(&quot;red=&quot;));\r\n      Serial.print(redBuffer[i], DEC);\r\n      Serial.print(F(&quot;, ir=&quot;));\r\n      Serial.print(irBuffer[i], DEC);\r\n\r\n      Serial.print(F(&quot;, HR=&quot;));\r\n      Serial.print(heartRate, DEC);\r\n\r\n      Serial.print(F(&quot;, HRvalid=&quot;));\r\n      Serial.print(validHeartRate, DEC);\r\n\r\n      Serial.print(F(&quot;, SPO2=&quot;));\r\n      Serial.print(spo2, DEC);\r\n\r\n      Serial.print(F(&quot;, SPO2Valid=&quot;));\r\n      Serial.println(validSPO2, DEC);\r\n    }\r\n\r\n    \/\/After gathering 25 new samples recalculate HR and SP02\r\n    maxim_heart_rate_and_oxygen_saturation(irBuffer, bufferLength, redBuffer, &amp;spo2, &amp;validSPO2, &amp;heartRate, &amp;validHeartRate);\r\n  }\r\n}\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-25a3a8e elementor-widget elementor-widget-text-editor\" data-id=\"25a3a8e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this code, adding the library as well as adjusting the speed and data transfer rate is done. Notice that the calculation of blood oxygen begins after pressing a desired button.<\/p><p>The results are as follows. As you can see blood oxygen has measured 96.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-41bf703 elementor-widget elementor-widget-image\" data-id=\"41bf703\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result2.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"MAX30102-Module-Arduino-Result2\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTg4NzYsInVybCI6Imh0dHBzOlwvXC9lbGVjdHJvcGVhay5jb21cL2xlYXJuXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMlwvTUFYMzAxMDItTW9kdWxlLUFyZHVpbm8tUmVzdWx0Mi5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"409\" src=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result2.jpg\" class=\"attachment-large size-large wp-image-18876\" alt=\"\" srcset=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result2.jpg 800w, https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/MAX30102-Module-Arduino-Result2-600x307.jpg 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aa0279b elementor-widget elementor-widget-text-editor\" data-id=\"aa0279b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>By following these steps, you can successfully interface the MAX30102 Pulse Oximeter Heart Rate Module with Arduino to detect blood oxygen and heart rate accurately.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>MAX30102 Heart Rate Module Features MAX30102 sensor is used to detect blood oxygen and heart rate. First, infrared radiation is sent and reflected by hitting the finger, and then the amount of oxygen in the blood is determined by measuring the wave amplitude. Heart rate is also obtained by analyzing the time series response of [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":18864,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[939,932],"tags":[4439],"platform":[1071],"bytype":[1075],"difficulty":[1077],"related_products":[4395],"class_list":["post-18863","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-health-fitness","category-sensors","tag-heartbeat","platform-arduino","bytype-hookup-guides","difficulty-beginner","related_products-sen-22-005"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino<\/title>\n<meta name=\"description\" content=\"Learn How to interface a MAX30102 Pulse Oximeter Heart Rate Module with Arduino. using MAX30102 Module example code, circuit, pinout library\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino\" \/>\n<meta property=\"og:description\" content=\"Learn How to interface a MAX30102 Pulse Oximeter Heart Rate Module with Arduino. using MAX30102 Module example code, circuit, pinout library\" \/>\n<meta property=\"og:url\" content=\"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/\" \/>\n<meta property=\"og:site_name\" content=\"Electropeak\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-27T13:53:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-06T13:36:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/sen-22-005-teaser.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Amir Mohammad Shojaei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amir Mohammad Shojaei\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/\"},\"author\":{\"name\":\"Amir Mohammad Shojaei\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#\\\/schema\\\/person\\\/b6791ba5e680550ef96ffd3dc0deef0c\"},\"headline\":\"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino\",\"datePublished\":\"2020-12-27T13:53:17+00:00\",\"dateModified\":\"2023-08-06T13:36:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/\"},\"wordCount\":453,\"commentCount\":22,\"publisher\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/sen-22-005-teaser.jpg\",\"keywords\":[\"Heartbeat\"],\"articleSection\":[\"Health &amp; Fitness\",\"Sensors\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/\",\"url\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/\",\"name\":\"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/sen-22-005-teaser.jpg\",\"datePublished\":\"2020-12-27T13:53:17+00:00\",\"dateModified\":\"2023-08-06T13:36:47+00:00\",\"description\":\"Learn How to interface a MAX30102 Pulse Oximeter Heart Rate Module with Arduino. using MAX30102 Module example code, circuit, pinout library\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#primaryimage\",\"url\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/sen-22-005-teaser.jpg\",\"contentUrl\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/sen-22-005-teaser.jpg\",\"width\":1200,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#website\",\"url\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/\",\"name\":\"Electropeak\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#organization\",\"name\":\"ElectroPeak\",\"url\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/logo-electropeak-v3-square.png\",\"contentUrl\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/logo-electropeak-v3-square.png\",\"width\":620,\"height\":620,\"caption\":\"ElectroPeak\"},\"image\":{\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/electropeak.com\\\/learn\\\/#\\\/schema\\\/person\\\/b6791ba5e680550ef96ffd3dc0deef0c\",\"name\":\"Amir Mohammad Shojaei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/54d81bf4a61f2888c819800b5cb6a21edde77548aecfa482296630407308d209?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/54d81bf4a61f2888c819800b5cb6a21edde77548aecfa482296630407308d209?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/54d81bf4a61f2888c819800b5cb6a21edde77548aecfa482296630407308d209?s=96&d=mm&r=g\",\"caption\":\"Amir Mohammad Shojaei\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino","description":"Learn How to interface a MAX30102 Pulse Oximeter Heart Rate Module with Arduino. using MAX30102 Module example code, circuit, pinout library","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/","og_locale":"en_US","og_type":"article","og_title":"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino","og_description":"Learn How to interface a MAX30102 Pulse Oximeter Heart Rate Module with Arduino. using MAX30102 Module example code, circuit, pinout library","og_url":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/","og_site_name":"Electropeak","article_published_time":"2020-12-27T13:53:17+00:00","article_modified_time":"2023-08-06T13:36:47+00:00","og_image":[{"width":1200,"height":900,"url":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/sen-22-005-teaser.jpg","type":"image\/jpeg"}],"author":"Amir Mohammad Shojaei","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Amir Mohammad Shojaei","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#article","isPartOf":{"@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/"},"author":{"name":"Amir Mohammad Shojaei","@id":"https:\/\/electropeak.com\/learn\/#\/schema\/person\/b6791ba5e680550ef96ffd3dc0deef0c"},"headline":"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino","datePublished":"2020-12-27T13:53:17+00:00","dateModified":"2023-08-06T13:36:47+00:00","mainEntityOfPage":{"@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/"},"wordCount":453,"commentCount":22,"publisher":{"@id":"https:\/\/electropeak.com\/learn\/#organization"},"image":{"@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/sen-22-005-teaser.jpg","keywords":["Heartbeat"],"articleSection":["Health &amp; Fitness","Sensors"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/","url":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/","name":"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino","isPartOf":{"@id":"https:\/\/electropeak.com\/learn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#primaryimage"},"image":{"@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/sen-22-005-teaser.jpg","datePublished":"2020-12-27T13:53:17+00:00","dateModified":"2023-08-06T13:36:47+00:00","description":"Learn How to interface a MAX30102 Pulse Oximeter Heart Rate Module with Arduino. using MAX30102 Module example code, circuit, pinout library","breadcrumb":{"@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#primaryimage","url":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/sen-22-005-teaser.jpg","contentUrl":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2020\/12\/sen-22-005-teaser.jpg","width":1200,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/electropeak.com\/learn\/interfacing-max30102-pulse-oximeter-heart-rate-module-with-arduino\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/electropeak.com\/learn\/"},{"@type":"ListItem","position":2,"name":"Interfacing MAX30102 Pulse Oximeter Heart Rate Module with Arduino"}]},{"@type":"WebSite","@id":"https:\/\/electropeak.com\/learn\/#website","url":"https:\/\/electropeak.com\/learn\/","name":"Electropeak","description":"","publisher":{"@id":"https:\/\/electropeak.com\/learn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/electropeak.com\/learn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/electropeak.com\/learn\/#organization","name":"ElectroPeak","url":"https:\/\/electropeak.com\/learn\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/electropeak.com\/learn\/#\/schema\/logo\/image\/","url":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2026\/07\/logo-electropeak-v3-square.png","contentUrl":"https:\/\/electropeak.com\/learn\/wp-content\/uploads\/2026\/07\/logo-electropeak-v3-square.png","width":620,"height":620,"caption":"ElectroPeak"},"image":{"@id":"https:\/\/electropeak.com\/learn\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/electropeak.com\/learn\/#\/schema\/person\/b6791ba5e680550ef96ffd3dc0deef0c","name":"Amir Mohammad Shojaei","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/54d81bf4a61f2888c819800b5cb6a21edde77548aecfa482296630407308d209?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/54d81bf4a61f2888c819800b5cb6a21edde77548aecfa482296630407308d209?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/54d81bf4a61f2888c819800b5cb6a21edde77548aecfa482296630407308d209?s=96&d=mm&r=g","caption":"Amir Mohammad Shojaei"}}]}},"_links":{"self":[{"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/posts\/18863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/comments?post=18863"}],"version-history":[{"count":19,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/posts\/18863\/revisions"}],"predecessor-version":[{"id":27166,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/posts\/18863\/revisions\/27166"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/media\/18864"}],"wp:attachment":[{"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/media?parent=18863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/categories?post=18863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/tags?post=18863"},{"taxonomy":"platform","embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/platform?post=18863"},{"taxonomy":"bytype","embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/bytype?post=18863"},{"taxonomy":"difficulty","embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/difficulty?post=18863"},{"taxonomy":"related_products","embeddable":true,"href":"https:\/\/electropeak.com\/learn\/wp-json\/wp\/v2\/related_products?post=18863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}