Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Higher Precision #81

Open
ChristinaNy opened this issue Feb 22, 2021 · 5 comments
Open

Higher Precision #81

ChristinaNy opened this issue Feb 22, 2021 · 5 comments

Comments

@ChristinaNy
Copy link

Troubleshooting checklist

  • [YES] I read the README (on master) thoroughly
  • [YES] I ran the MAX30100_Tester and I'm going to paste the output down below
  • [YES] I filled in all the details of my setup down below

Description of the issue

I am using the MAX30100_Minimal and it is working fine. However, I would like more decimals (higher precision) of my SpO2 output. Can anyone help with this regarding the pox.getSpO2() function?
I tried using a float:

Serial.print(float(pox.getSpO2()),4);

But it just put four zeroes after my SpO2 result (like 98.0000 %). What I am looking for is to get numbers like 97.5482 %.
Hope someone can help. Thank you.

Output from MAX30100_Tester example

Details of my setup

  • Arduino hardware: Arduino UNO
  • MAX30100 breakout:
  • Arduino framework version:
  • MAX30100 library version: MAX30100_Minimal
@selman-nus
Copy link

Hi, you may need to change how the getspo2 function defined in the library files. Probably it is an integer and you need to change it to float. However, even if this solves your problem by showing decimals, it doesn't mean it is more precise really. Even medical oximeters don't show decimals. So what you will be getting is just noise. I won't suggest you rely on that data for your project.

@ChristinaNy
Copy link
Author

Thank you for your help. That makes sense.
I decided to use the RAW script and calculate the values manually in Excel.

@selman-nus
Copy link

are you going to confirm your results using a medical oximeter?

@ChristinaNy
Copy link
Author

Yes I have done that. The commercial pulseox gives 99 %SpO2 and my calculations give an average of 98.2 %Sp02. Based on the uncertainties in both I conclude that these are statistically similar.
These are the formulas I use:
R = (AC of Red / DC of Red) / (AC of IR / DC of IR)
% SpO2 = 110 – 25 × R

@selman-nus
Copy link

Commercial ones generally use moving average over spo2 results to smooth the output values. So it is not like an instantaneous reading result, just be careful with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants