• 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 max30102 arduino , Max30102 arduino program , max30102 instructable , max30102 instructables , signal

This Article Has Been Shared 461 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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

  • Send Basic Push Message from Arduino ESP32 using Blynk

    How to Send Basic Push Message from Arduino ESP32 using Blynk? With Blynk like web service & library, it is easy to create such basic project.

  • ESP32 Deep Sleep Guide

    ESP32 Deep Sleep is a Complicated Topic, Yet We Tried to Make it Easy Enough to Deploy Deep Sleep in Own Project to Save Battery.

  • ESP32 Deep Sleep : Push Button Message to IBM Watson IoT

    ESP32 Deep Sleep With Push Button Message to IBM Watson IoT is an Basic Project Which Will Help Like Template to Create More Complex Projects.

  • Simple Level Shifter With Transistors (3.3V-5V)

    Earlier, we talked about the level shifter. Raspberry Pi, ESP32 etc things operate at 3.3v logic whereas, relay modules usually need near 5v TTL logic level. In our guide to control AC appliances over the internet with ESP32, you will notice that directly connecting the relay with ESP32 will not properly work – it will […]

  • Samsung Smartwatch as Proximity Switch : Part I

    We Can Use BLE of Samsung Smartwatch to Work as Proximity Switch Created With ESP32 Arduino for Automation of Lights in a Room.

Additionally, 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (21K Followers)
  • Twitter (5.3k 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

  • What You Need to Know About the Microservices March 4, 2021
  • Fix Missing/Bad FileProvider for Freshchat (Android error code 354) March 3, 2021
  • Basics of Data Protection on the Internet March 2, 2021
  • What is Standard Software February 28, 2021
  • WordPress Link to text Fragment February 27, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Pulse Oximeter with ESP32 and MAX30102," in The Customize Windows, September 16, 2020, March 5, 2021, https://thecustomizewindows.com/2020/09/pulse-oximeter-with-esp32-and-max30102/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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