1

I'm trying to find a code that would take the PPG signals from the MIKROE-2036 Heart Rate 3 Clicker and process the information through the Arduino Nano to find a person's Oxygen Saturation. Basically, by using this code how do I measure Oxygen Saturation from the given analog inputs from the LEDs?

This is the test code that the Arduino Nano could use, but it's more of a template:

/*
 * AFE4404 Basic Read library example.
 * https://github.com/rakshithbk/AFE4404-Library
 * 
 * On Arduino Uno -  | AFE4404 | Uno Pin
 *                   | I2C_Dat | A4
 *                   | I2C_Clk | A5
 * get_led_val() will return uint32_t values.
 * 
 * Advanced - you can modify the sample period and other
 * parameters in the library files (refer AFE4404 datasheet)
 */

#include <Wire.h>
#include <AFE_connect.h>

AFE A;

void setup() {
  Serial.begin(115200);
  Serial.println("AFE4404 basic readings -\n");
  A.init();
}

void loop() {
  Serial.print("LED 1 Val = ");
  Serial.print(A.get_led1_val());
  Serial.print("\t LED 2 Val = ");
  Serial.print(A.get_led2_val());
  Serial.print("\t LED 3 Val = ");
  Serial.print(A.get_led3_val());
  Serial.println();
}

This is the library I found that uses the Heart Rate 3 Clickers LEDs: https://github.com/rakshithbk/AFE4404-Library

2
  • The code above already measures the PPG signal. I don't know the sensor, that you have. But most likely taking just the signal from the first LED (with the corresponding function) will get you the PPG signal. I guess your real question is about how to calculate SPO2 (Oxygen Saturation) from the LED signals. Have you tried googling for that? I don't know that, so I would also just google for it. – chrisl Apr 7 at 22:11
  • @chrisl The sensor I'm using is the MIKROE-2036 Heart Rate 3 Clicker and essentially what you asked is exactly what I've been trying to look for. Basically, by using this code how do I measure Oxygen Saturation from the given analog inputs from the LEDs? I tried searching for that answer for nearly a month and haven't gotten close. – Carlos Ayy Apr 8 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.