Pulse Oximeter Experiment

Introduction

This experiment demonstrates how to use a pulse oximeter to measure heart rate and blood oxygen levels with Arduino.

Pulse Oximeter Sensor

Components Needed

Circuit Setup

  1. Connect the pulse oximeter sensor to the Arduino using the specified pins (usually VCC, GND, SCL, and SDA for I2C).

The pulse oximeter measures the heart rate and blood oxygen saturation levels by emitting light through the finger and measuring the reflected light.

Pulse Oximeter Circuit Setup

Code for Pulse Oximeter

Upload the following code to your Arduino to read the pulse and oxygen levels:


#include 
#include 
#include 

Adafruit_PulseOximeter pox;

void setup() {
  Serial.begin(9600);
  if (!pox.begin()) {
    Serial.println("Couldn't find Pulse Oximeter sensor");
    while (1);
  }
}

void loop() {
  if (pox.update()) {
    Serial.print("Heart Rate: ");
    Serial.print(pox.getHeartRate());
    Serial.print(" bpm, Oxygen Saturation: ");
    Serial.print(pox.getSpO2());
    Serial.println(" %");
  }
  delay(1000);
}
            

Explanation

The pulse oximeter works by passing light through the finger and detecting how much of the light is absorbed by the blood, which gives readings for blood oxygen saturation and heart rate.

Troubleshooting