How to Wire MAX30100 Heart Rate Monitor With Arduino Microcontroller

Introduction: How to Wire MAX30100 Heart Rate Monitor With Arduino Microcontroller

About: something about yourself so our community can get to know you! ??

This is the MAX300100 breakout board that reads heart rate or pulse oximetry. The chip has an integrated optical sensor that derives its reading from emitting two wavelength of light from the two LED’s then measures the absorbance of pulsing blood through a photodetector. The signal is processed by a low noise analog signal processing unit and communicated to the Microcontroller through the i2C Interface.

The MAX30100 operates from 1.8v and 3.3v voltage input and can be powered down through software with negligible standby current, permitting the power supply to remain connected at all times. The device is suitable for wearable devices like smart watch, medical monitoring equipment’s, fitness assistant and smart suits. Required Components Arduino Microcontroller, ESP8266 (Arduino IDE Integrated), Teensy MCU (TeensyDuino Integrated),Buzzer / Alarm (Optional)LCD / OLED i2C Display (Optional)Solder Less BreadboardJumper Wire

Step 1: Source Code

#include #include #include #include #include #include #include #define REPORTING_PERIOD_MS 500 /* PulseOximeter is the higher level interface to the sensor That offers: > Beat Reporting > Heart Pulse Rate Calculation > SP02 OXIDATION LEVEL Calculation */ PulseOximeter pox; const int numReadings=10; float filterweight=0.5; uint32_t tsLastReport = 0; uint32_t last_beat=0; int readIndex=0; int average_beat=0; int average_SpO2=0; bool calculation_complete=false; bool calculating=false; bool initialized=false; byte beat=0; void onBeatDetected() //Calls back when pulse is detected { viewBeat(); last_beat=millis(); } void viewBeat() { if (beat==0) { Serial.print("_"); beat=1; } else { Serial.print("^"); beat=0; } } void initial_display() { if (not initialized) { viewBeat(); Serial.print("14CORE | MAX30100 Pulse Oximeter Test"); Serial.println("--------------------------------------"); Serial.println("Place place your finger on the sensor"); Serial.println("--------------------------------------"); ; initialized=true; } } void display_calculating(int j){ viewBeat(); Serial.println("Measuring"); for (int i=0;i<=j;i++) { Serial.print(". "); } } void display_values() { Serial.print(average_beat); Serial.print("| Bpm "); Serial.print("| SpO2 "); Serial.print(average_SpO2); Serial.print("%"); } void calculate_average(int beat, int SpO2) { if (readIndex==numReadings) { calculation_complete=true; calculating=false; initialized=false; readIndex=0; display_values(); } if (not calculation_complete and beat>30 and beat<220 and SpO2>50) { average_beat = filterweight * (beat) + (1 - filterweight ) * average_beat; average_SpO2 = filterweight * (SpO2) + (1 - filterweight ) * average_SpO2; readIndex++; display_calculating(readIndex); } } void setup() { Serial.begin(115200); pox.begin(); pox.setOnBeatDetectedCallback(onBeatDetected); } // Make it sure that you need to call update as fast as possible void loop() { pox.update(); if ((millis() - tsLastReport > REPORTING_PERIOD_MS) and (not calculation_complete)) { calculate_average(pox.getHeartRate(),pox.getSpO2()); tsLastReport = millis(); } if ((millis()-last_beat>10000)) { calculation_complete=false; average_beat=0; average_SpO2=0; initial_display(); } }

Step 2: Download Codes

Downloads Source Code | Txt File

Download the MAX30100 Code Libraries | Zip

Download the MAX30100 Datasheet | Pdf

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    3 Discussions


    2 years ago

    Could you show me how to connect and read data by using Raspberry?

    Thank you very much!

    Jana Shree
    Jana Shree

    2 years ago

    I have a max30100 is not responding to the I2C scanner code
    I have checked my code with other I2C devices the cord works fine but with max30100 it is not working
    what problem do I have?? please help
    thanks in advance

    My I2C code,
    // --------------------------------------
    // i2c_scanner
    // Version 1
    // This program (or code that looks like it)
    // can be found in many places.
    // For example on the forum.
    // The original author is not know.
    // Version 2, Juni 2012, Using Arduino 1.0.1
    // Adapted to be as simple as possible by user Krodal
    // Version 3, Feb 26 2013
    // V3 by louarnold
    // Version 4, March 3, 2013, Using Arduino 1.0.3
    // by user Krodal.
    // Changes by louarnold removed.
    // Scanning addresses changed from 0...127 to 1...119,
    // according to the i2c scanner by Nick Gammon
    // Version 5, March 28, 2013
    // As version 4, but address scans now to 127.
    // A sensor seems to use address 120.
    // Version 6, November 27, 2015.
    // Added waiting for the Leonardo serial communication.
    // This sketch tests the standard 7-bit addresses
    // Devices with higher bit address might not be seen properly.


    void setup()

    while (!Serial); // Leonardo: wait for serial monitor
    Serial.println("\nI2C Scanner");

    void loop()
    byte error, address;
    int nDevices;


    nDevices = 0;
    for(address = 1; address {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    error = Wire.endTransmission();

    if (error == 0)
    Serial.print("I2C device found at address 0x");
    if (address
    Serial.println(" !");

    else if (error==4)
    Serial.print("Unknown error at address 0x");
    if (address
    if (nDevices == 0)
    Serial.println("No I2C devices found\n");

    delay(5000); // wait 5 seconds for next scan


    2 years ago

    Can I use wrist to measure heart rate using MAX30100 ?