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