Skip to content

Commit

Permalink
description for SpO2 formula is improved
Browse files Browse the repository at this point in the history
  • Loading branch information
coniferconifer authored May 31, 2022
1 parent 676602d commit 48c27d5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ESP32_MAX30102_simple-SpO2_plotter-BLE/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,22 @@ It is possible to wakeup ESP32 by touching the screen.


## Tips:
- Used argorithm
- Used algorithm

DC component of IR and RED data (average) is calculated by digital low pass filter and subtracted from raw data to get AC components.
Then, square root means of AC component of RED and IR are calculated for every 100 samples.
The DC components of IR and RED are obtained by inputting the raw data into a low-pass filter.
The AC components of IR and RED are calculated by subtracting the DC components from the raw data.
The square root mean of the AC components of IR and RED is calculated for every 100 samples.

SpO2 is calculated as
```
R=((square root means of RED/ RED average )/((square root means of IR)/IR average))
SpO2 = -23.3 * (R - 0.4) + 100
```
The last formula is read from the graph in https://ww1.microchip.com/downloads/en/Appnotes/00001525B.pdf
A linear approximation is made by reading values from 0.4 to 1 on the x-axis of the graph in https://ww1.microchip.com/downloads/en/Appnotes/00001525B.pdf
or https://ww1.microchip.com/downloads/jp/AppNotes/00001525B_JP.pdf
This is because a linear approximation of SpO2 from 100 to about 80 is sufficient for practical purposes.
A SpO2 below 80 is a difficult value for survival.



Expand Down

0 comments on commit 48c27d5

Please sign in to comment.