MAX30105 Particle and Pulse Ox Sensor Hookup Guide

Pages
Contributors: Nate
Favorited Favorite 9

Advanced Functions

The MAX30105 is highly configurable, and there are a large number of functions exposed in the library to the user. Checkout the MAX30105.h file for all the functions, but here are the major ones. Read the MAX30105 datasheet for more information.

The library supports the following functions:

  • .begin(wirePort, i2cSpeed) - If you have a platform with multiple I2C ports, pass the port object when you call begin. You can increase the I2C speed to 400kHz by including I2C_SPEED_FAST when you call .begin() as well.
  • .setup() - Initializes the sensor with various settings. See the Example 2 for a good explanation of the options.
  • .getRed() - Returns the immediate red value
  • .getIR() - Returns the immediate IR value
  • .getGreen() - Returns the immediate Green value
  • .available() - Returns how many new samples are available
  • .readTemperature() - Returns the temperature of the IC in C
  • .readTemperatureF() - Returns the temperature of the IC in F
  • .softReset() - Resets everything including data and configuration
  • .shutDown() - Powers down the IC but retains all configuration
  • .wakeUp() - Opposite of shutDown
  • .setLEDMode(mode) - Configure the sensor to use 1 (Red only), 2 (Red + IR), or 3 (Red + IR + Green) LEDs
  • .setADCRange(adcRange) - Set ADC to be at 2048, 4096, 8192, or 16384
  • .setSampleRate(sampleRate) - Configure the sample rate: 50, 100, 200, 400, 800, 1000, 1600, 3200

Interrupts

  • .getINT1() - Returns the main interrupt group
  • .getINT2() - Returns the temp ready interrupt

Enable/disable individual interrupts. See page 13 and 14 of the datasheet for an explanation of each interrupt:

  • .enableAFULL()
  • .disableAFULL()
  • .enableDATARDY()
  • .disableDATARDY()
  • .enableALCOVF()
  • .disableALCOVF()
  • .enablePROXINT()
  • .disablePROXINT()
  • .enableDIETEMPRDY()
  • .disableDIETEMPRDY()

FIFO

The MAX30105 has a 32 byte FIFO. This allows us do other things on our microcontroller while the sensor is taking measurements. See Example 6 for an explanation of how to poll the FIFO.

  • .check() - Call regularly to pull data in from sensor
  • .nextSample() - Advances the FIFO
  • .getFIFORed() - Returns the FIFO sample pointed to by tail
  • .getFIFOIR() - Returns the FIFO sample pointed to by tail
  • .getFIFOGreen() - Returns the FIFO sample pointed to by tail