MAX30102 Heart Rate and Pulse Oximetry Sensor Not Working - LED Light not turning on and Error Messages

Hi!

I am trying to use the MAX30102 Sensor to gather pulse and blood oxygen saturation readings with an Arduino Uno. I am running my program on a Windows 11.

I first tried running an Example 1 code from the SparkFun MAX3010x Pulse and Proximity Sensor Library.

/*
  MAX30105 Breakout: Output all the raw Red/IR/Green readings
  By: Nathan Seidle @ SparkFun Electronics
  Date: October 2nd, 2016
  https://github.com/sparkfun/MAX30105_Breakout

  Outputs all Red/IR/Green values.

  Hardware Connections (Breakoutboard to Arduino):
  -5V = 5V (3.3V is allowed)
  -GND = GND
  -SDA = A4 (or SDA)
  -SCL = A5 (or SCL)
  -INT = Not connected

  The MAX30105 Breakout can handle 5V or 3.3V I2C logic. We recommend powering the board with 5V
  but it will also run at 3.3V.

  This code is released under the [MIT License](http://opensource.org/licenses/MIT).
*/

#include <Wire.h>
#include "MAX30105.h"

MAX30105 particleSensor;

#define debug Serial //Uncomment this line if you're using an Uno or ESP
//#define debug SerialUSB //Uncomment this line if you're using a SAMD21

void setup()
{
  debug.begin(9600);
  debug.println("MAX30105 Basic Readings Example");

  // Initialize sensor
  if (particleSensor.begin() == false)
  {
    debug.println("MAX30105 was not found. Please check wiring/power. ");
    while (1);
  }

  particleSensor.setup(); //Configure sensor. Use 6.4mA for LED drive
}

void loop()
{
  debug.print(" R[");
  debug.print(particleSensor.getRed());
  debug.print("] IR[");
  debug.print(particleSensor.getIR());
  debug.print("] G[");
  debug.print(particleSensor.getGreen());
  debug.print("]");

  debug.println();
}

Here is a schematic of my connections:

Sensor --> Arduino
VIN --> 5V
GND --> GND
SDA (Green) --> A4
SCL (Yellow) --> A5

Whenever I try to run the code, the red light for the sensor does not turn on and I receive these messages in the serial monitor.
"Initializing..."
"Basic Readings Example"
"MAX30102 not found. Please check wiring/power."

I recognize that the code gets stuck within the first few lines of the void setup, but I don't understand why.

I am confused at from where the backwards "??" are coming from, since there are nowhere in the code:

I also sometimes get errors in my code, but often times when I upload the sketch the errors disappear, without having made any changes:

exit status 1 
'class MAX30105' had no member named 'setup'; did you mean 'setBit'?

I have tried replacing the above 'setup' with 'setBit', but then I get a reverse error stating:

'class MAX30105' had no member named 'setBit'; did you mean 'setup'?

I was tried soldering some of the pins, to see if that would help the connection issue. I also swapped my Arduino Uno to see if it was a problem with the board. Additionally, in speculation that I may have ruined the sensor in my poor attempts to solder it, I replaced the soldered sensor with a new unsoldered one. I also replaced my USB cable, however, all these attempts were to no avail and there is still no sign of activity from the sensor. A few weeks ago, I did wiggle around the Power and SCL jumper wires connected to the sensor and saw the LED flicker briefly, but haven't seen it since. I used my multimeter to check the voltage of the jumper wires on the Arduino, the pins on the sensor, and the jumper wires connecting to the sensor but all read the same at all three locations.

VIN - 5.0 V
SDA - 4.8 V
SCL - 4.8 V

I have tried three different variations of code that I found online, which also didn't work. (I am not posting them here for the sake of simplicity). I read online of someone facing a similar issue, but once they substituted their board with a Nano, then suddenly the LED turned on. I tested this with a Nano Every (mistakenly ordered an Every instead of a regular Nano, so take these results with a grain of salt I recognize this result may not be reliable since the boards aren't exactly the same) and still I came across the same errors, and some more (which I am again not including since I am new to the Nano Every and would rather prefer to stick with the Arduino Uno.)

Here are some more pictures if this may help:

Please excuse my poor job of soldering - prime example of a skill that is easier said than done ....

I have read about how there are issues with the MAX30100 due to the placement and connections of the pull up resistors within the board, that requires one to rewire the circuit for it to work. I ruled this out as a source of error, since I am using the newer MAX30102 version, but I am including this information here for the sake of thoroughness.

Does anyone have suggestions on what I could be doing wrong and what changes I should try out?

All help would be greatly appreciated. Thank you in advance!

Some hints

  1. Make sure that you have connected SDA to SDA and SCL to SCL.
  2. Soldering of the connectors is NOT optional
  3. One of the examples that comes with the IDE is an I2C scanner. Run that with your MAX30102 connected; it should find your board and give you an address.

I can't help you further as I don't havethe board.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

Kindly follow all the instructions suggested by sterretje. Also make sure that you have properly installed the "MAX30105.h" library.

Sorry, the soldering MUST be done correctly. Adafruit and Sparkfun have good tutorials.

Study them, then practice on discarded PCBs, and keep trying until you get it right.

Somewhere before "setup" there is an out-of-place word (OR CHARACTER) causing the compiler to think "setup" is a parameter rather than a function. [edit] I think "Serial" is a keyword, and not allowed as a token[/edit]

Ref:
MAX3010x Pulse Oximeter Modules (Part 1) | DevXplained

Afterthought:
YES, I do know the wiring is equivalent.

My primary response was to just provide URL from manuf on currently available models, etc.

For communicating with the sensor we need to import an Arduino Library. There are already some libraries for different sensors out of the MAX3010x sensor family, but none that I found has support for all of them. For this reason I decided to create one for the purpose of this tutorial.

I changed the connections for the SDA and SCL then tested the I2C Scanner for my soldered sensor and received the following messages.

When I changed the power connection to 3.3 V, I saw the full message.

On the other hand, when the power was connected to 5V then the message was stuck at "Scanning..."

This pattern was repeated when I changed the connections back to A4 and A5 as I had originally, just to see if there would be any noticeable effect.

I also tested the I2C Scanner on the unsoldered sensor and saw the full message at both measures for power (3.3V and 5V) and for both connections (A4 & A5, and SDA & SCL)

I'm not sure if this discrepancy sheds any significant light on the issue, but I just wanted to note down my observations

Yes, I believe that I have them correctly installed. Is there another way to check for this?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.