Home / Tutorials / Arduino Tutorial / How to Use the MAX30100 as Arduino Heart Rate Sensor

How to Use the MAX30100 as Arduino Heart Rate Sensor

The moment I got my hands on the MAX30100 breakout board, I was ready to create my own Arduino heart rate sensor. But building one wasn’t as easy as I thought.


First, let me try to explain how the MAX30100 measures pulse rate. The device has two LEDs, one emitting a red light, another emitting infrared light. For pulse rate, only the infrared light is needed. Both the red light and infrared light is used to measure oxygen levels in the blood. More on that later.

MAX30100 Heart Rate Sensor

When the heart pumps blood, there is an increase in oxygenated blood as a result of having more blood. As the heart relaxes, the volume of oxygenated blood also decreases. By knowing the time between the increase and decrease of oxygenated blood, the pulse rate is determined.

It turns out, oxygenated blood absorbs more infrared light and passes more red light while deoxygenated blood absorbs red light and passes more infrared light. This is the main function of the MAX30100: it reads the absorption levels for both light sources and stored them in a buffer that can be read via I2C.

But again it's not as simple as it sounds, there’s a lot of data filtering involved like how this awesome post shows.

The Simple MAX30100 Arduino Module

Now let’s create a heart rate monitor where the values are displayed through the serial port.

There are two widely available MAX30100 breakout boards in the market. If you have the GY-MAX30100 board:

Image result for max30100 purple

Then lucky you! This board is ready for use with an Arduino. Just follow this wiring setup:

Purple MAX30100 Module Arduino UNO/Nano

Just follow this wiring setup and use Raivis Strogonovs MAX30100 library. The library is quite easy to use; here’s an example sketch:

Here the heart pulse rate is displayed through the serial monitor. If you need to include the blood oxygen concentration, you only need to add this line:

The Painful MAX30100 Arduino Module

Now if you have the RCWL-0530:

MAX30100 Heart Rate Sensor

I'm afraid you have more work to do. This cheaper module has some serious design problems.

You see, this module uses this schematic:

Image result for rcwl-9183

The MAX30100 IC uses 1.8V for VDD and this particular module uses two regulators to achieve this voltage. Nothing wrong with that. However, if you look closely, the SCL and SDA pins are pulled-up via the 4.7k ohm resistors to 1.8V! This means it won't work well with microcontrollers with higher logic levels.

The solution is to remove the resistors from the board (encircled on the image below) and attach external 4.7k ohms resistors instead.

Remove these resistors from the MAX30100 module

Here's my board with the resistors removed:

MAX30100 with resistors removed

After removing the resistors, you can now connect this module to the Arduino UNO using this wiring diagram:

Arduino MAX30100 Wiring Diagram

Coding the RCWL-0530 with Arduino

For the sketch, I used this library. The library provides a couple of examples. This is the most basic sketch:

If you followed the wiring diagram and uploaded this sketch to your Arduino, the red LED on the board should light up and you will see this on the serial monitor:

This means the MAX30100 is running. All you need to do is place your finger on top of the IC (the one with the LED) and your pulse rate should be displayed.

Now if the LED is not turning on, and you are getting the FAILED message on the serial monitor, it might be a power issue. If you look at line 58 of the sketch above:

This sets the current through the LED. This is originally commented so that the LED current is the default 50 mA. Comment this out to make the current through the LED equal to 7.6 mA! This would solve the power issue.

By the way, here are the other possible values you can use on the setIRLedCurrent() function above:

Just remember that the higher the current, the brighter the LED and the deeper it reaches your skin.

Actual Setup

Here's my setup where I used an I2C LCD to display the beats/minute and SP02 levels. However, a lot of power is required for this setup so I had to use an external power supply:

Here's my Arduino Heart Rate Sensor in action:

Here is the sketch for the setup above:


Check Also

arduino rgb led tutorial

Arduino RGB LED Tutorial

A RGB LED is a special light emitting diode which can produce 16 million possible …


  1. hey, I'm following your instruction, but my max30100 my sensor doesn't work... can you help me?

  2. Hey, We followed your Instructions and set up the ckt and code but the IRD and RED doesn't glows , what to do?

  3. can i change the analog pin setup for SCL & SDA pin from MAX30100 SENSOR MODULE?

  4. Hi ,
    The display time of my data is quite slow for a few minutes to get results . I don't know reason why ? . Can you help me ? ,pls . Thank you.

  5. Thank You so much, your team drive the future.

  6. I did the program in serial monitor its running well.
    I want to know the model no of the 0x27 lcd module so that i can bye it and write the programme in the lcd display.

Leave a Reply

Your email address will not be published. Required fields are marked *