• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Pulse Oximeter with ESP32 and MAX30102

By Abhishek Ghosh September 16, 2020 9:01 pm Updated on September 20, 2020

Pulse Oximeter with ESP32 and MAX30102

Advertisement

The MAX30100 IC is an integrated pulse oximetry module two LEDs, a photodetector, optimized optics, and low-noise analogue signal processing designed for the wearable devices and medical devices. The MAX30102 IC is an upgrade to The MAX30100 and The MAX30101 IC. Here is the datasheet of MAX30102 (website of MAXIM). The PDF will give you the outlook of the working principle of the thing. Practically the work in Arduino world is joining the things, installing the libraries and testing the codes. There is little complexity.

The basic question can be “Which MAX30102 module to purchase?” Unfortunately, the answer is not easy. I found the one build/sold by Maker Focus (or it can be its clone). This is the photograph of that thing :

Pulse Oximeter with ESP32 and MAX30102

The build quality of this module looks better than the rest available. The cheapest version with green colour PCB has an error in the circuit design. The story to cover-up that error by the Chinese manufacturer is quite funny :

Advertisement

---

Vim
1
https://reedpaper.wordpress.com/2018/08/22/pulse-oximeter-max30100-max30102-how-to-fix-wrong-board/

How much fun it is, that kind of “error” makes the module far from being perfect. This is the problem with the Chinese manufacturers. I hope that the module built/sold by Maker Focus is of better quality. You need to compare the reading with a standard device for fine-tuning. But if the circuit design is “fixed” in the mentioned way, no code on this earth can fix it. He has a piece of scary information:

Everything I said below applies equally to the new MAX30102 modules and old modules with discontinued MAX30100 chip since they are assembled on the same boards.

The one build/sold by Maker Focus is not known to him. BUT, the Maxim max30102 sensor used is mounted on a MH-ET LIVE breakout board and datasheet does not state that LED1 is Red and LED2 is Infrared (IR). LED1 should be IR and LED2 is Red – which means the things are swapped. We are using the library for Sparkfun’s hardware, not of these things. This is another point which you probably need to check/rectify.

As usual, we will use the Arduino IDE for ESP32. If we can succeed with the basic test, we can easily transfer the data over the internet. Most of the snippets on the internet are for MAX30100 IC, not MAX30102 IC. MAX30102 IC is more sensitive and code should not differ much. The MAX30102 build/sold Maker Focus supports the Arduino library named “Sparkfun MAX3010x Pulse and Proximity Sensor Library” :

Vim
1
https://github.com/sparkfun/SparkFun_MAX3010x_Sensor_Library

The connection is easy, we will use 3v3, GND, pin 21 and pin 22 :

ESP32’s 3v3 will connect to ==>MAX30102’s Vin
ESP32’s GND will connect to ==>MAX30102’s GND
ESP32’s SDA (21) will connect to ==> MAX30102’s SDA
ESP32’s SCL (22) will connect to ==> MAX30102’s SCL

The test code for the above thing is :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <Wire.h>
#include "MAX30105.h"
 
MAX30105 particleSensor; // initialize MAX30102 with I2C
 
void setup()
{
  Serial.begin(115200);
  while(!Serial); //We must wait for Teensy to come online
  delay(100);
  Serial.println("");
  Serial.println("MAX30102");
  Serial.println("");
  delay(100);
  // Initialize sensor
  if (particleSensor.begin(Wire, I2C_SPEED_FAST) == false) //Use default I2C port, 400kHz speed
  {
    Serial.println("MAX30105 was not found. Please check wiring/power. ");
    while (1);
  }
  // I have changed the ledbrightness
  byte ledBrightness = 255; //Options: 0=Off to 255=50mA
  byte sampleAverage = 1; //Options: 1, 2, 4, 8, 16, 32
  // I have changed the ledmode
  byte ledMode = 3; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green
  int sampleRate = 400; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200
  int pulseWidth = 69; //Options: 69, 118, 215, 411
  int adcRange = 16384; //Options: 2048, 4096, 8192, 16384
 
  particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth, adcRange); //Configure sensor with these settings
}
 
void loop() {
  particleSensor.check(); //Check the sensor
  while (particleSensor.available()) {
      // read stored IR
      Serial.print(particleSensor.getFIFOIR());
      Serial.print(",");
      // read stored red
      Serial.println(particleSensor.getFIFORed());
      // read next set of samples
      particleSensor.nextSample();      
  }
}

When a finger will be placed on the sensor of MAX30102 module (use something like a rubber band, tape, or velcro), then the printout to the Arduino serial plotter should show.

You can further modify your thing following these guides (adapt for ESP32) :

Vim
1
2
3
4
5
https://create.arduino.cc/projecthub/gatoninja236/open-source-pulse-oximeter-for-covid-19-4764c5?f=1
https://create.arduino.cc/projecthub/jeffreymagee/attiny85-pulse-oximeter-and-photoplethysmograph-e3f907?ref=similar&ref_id=329610&offset=0
https://github.com/jeffmer/tinyPulsePPG
https://github.com/Protocentral/Pulse_MAX30102
https://www.instructables.com/id/Pulse-Oximeter-With-Much-Improved-Precision/

My intention to write this article was for making the readers ready for the next IoT projects. ESP32 itself has no use for just local testing/playing/building. Why I am “playing” so the late phase of the pandemic with SpO2 can be a question. Actually there was a hackthathon by IBM covering COVID-19. Giving ready-to-use hints would not be fair.

Tagged With https://thecustomizewindows com/2020/09/pulse-oximeter-with-esp32-and-max30102/ , esp32 mx30100 , max30102 arduino , Max30102 arduino program , max30102 esp32 , max30102 instructable , max30102 instructables , signal
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Pulse Oximeter with ESP32 and MAX30102

  • IoT Based Pulse Oximeter With ESP32, MAX30102 and IBM Watson IoT

    Pulse oximeters are in use since long during an operation, in intensive care, in the emergency room and other places such as in unpressurized aircraft. The COVID-19 pandemic made pulse oximetry technology for the consumers. Most of the finger pulse oximeters in the market lack BLE and Wi-Fi. There are only a few finger pulse […]

  • ESP32 MAX30102 Pulse Oximeter Code

    In the previous guide of MAX30102, we have shown a test code with the MAX30102 module build/sold by Maker Focus mounted on a MH-ET LIVE breakout board. Our two challenges are – ESP32 is not exactly same as Arduino UNO and the good looking MH-ET LIVE breakout board is not same as the MAX30102 module […]

  • Arduino Pulse Sensor Guide : Modules And DIY Pulse Sensor

    This Arduino Pulse Sensor Guide Explains Various Ready To Use Pulse Sensor Modules And How To Build DIY Pulse Sensor From Electronic Parts.

  • How to Control Multiple Relays With Single Arduino ESP32?

    Before How to Control Multiple Relays With Single Arduino ESP32 Testing, You Need to Learn How to Create Multiple MQTT Channels & Fetch Data.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • How to Restrict Certain Posts or Categories In WordPress by CountryJune 6, 2023
  • Influence of Digitization on Procurement : Part 1June 6, 2023
  • How We Can Show Apple Icon, Windows Logo on Website TextJune 5, 2023
  • What is Google Bard? How it WorksJune 5, 2023
  • How to Create a PHP Installer Script to Create Tables in MySQL DatabaseJune 4, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT