Skip to content

Commit

Permalink
Merge pull request #5 from killercode/master
Browse files Browse the repository at this point in the history
Fix to issue #4
  • Loading branch information
jeffmer authored May 21, 2020
2 parents dae55a3 + 19cd2fd commit 3d767a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MAX30102.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*
* j.n.magee 15-10-2019
*/
#ifndef MAX30102_H
#define MAX30102_H
#include <arduino.h>

#define MAX30105_ADDRESS 0x57
Expand Down Expand Up @@ -68,3 +70,4 @@ class MAX30102{
} sense; //Circular buffer of readings from the sensor

};
#endif
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ The red led pulses once per heart beat. The PPG display is updated every 50ms.

### Software

**Needed library**
In order to build this to the ATTiny85 you need to install the library ATTinyCore
This core can be installed using the boards manager. The boards manager URL is:

http://drazzy.com/package_drazzy.com_index.json

File->Preferences on a PC, or Arduino->Preferences on a Mac, enter the above URL in "Additional Boards Manager URLs
Tools -> Boards -> Boards Manager... *If using 1.6.6, close boards manager and re-open it (see below)
Select "ATTinyCore by Spence Konde" and click "Install".

**Driver issue -** The Maxim max30102 sensor used is mounted on a MH-ET LIVE breakout board. The Maxim datasheet for the max30102 implies but does not state explicitly that LED1 is Red and LED2 is Infrared (IR), however, if the amplitude of LED1 is set to zero, the red led (as depicted in the *place finger*) picture remains lit, while if LED2 is set to zero, the red led is extinguished. The obvious conclusion is that LED1 is IR and LED2 is Red (i.e. swapped) which also works when computing blood oxygen - see below. I mention this as the most common driver used in Arduino projects for the max30102 is the Sparkfun 3010x driver which clearly identifies LED1 with Red and LED2 with IR. This may be true for the max30105 device mounted on the Sparkfun board but does not seem to apply to the max30102 on the MH-ET-LIVE board.

**Spo2 calculation** *"SpO2 stands for peripheral capillary oxygen saturation, an estimate of the amount of oxygen in the blood. More specifically, it is the percentage of oxygenated haemoglobin (haemoglobin containing oxygen) compared to the total amount of haemoglobin in the blood (oxygenated and non-oxygenated haemoglobin)."*
Expand Down

0 comments on commit 3d767a9

Please sign in to comment.