Protocentral / AFE4490_Oximeter

This pulse oximetry shield from ProtoCentral uses the AFE4490 IC to enable your Arduino to measure heart rate as well as SpO2 values.
https://www.protocentral.com/biomedical/996-afe4490-pulse-oximeter-shield-kit-for-arduino-642078949425.html
Other
46 stars 27 forks source link

Getting very less SPO2 values #4

Open prasanpro opened 7 years ago

prasanpro commented 7 years ago

Dear Protocentral,

I bought the spo2 shield recently and followed the instructions given in this git. Processing graph output values always shows values in range of 60 to 70. A normal healthy person like I should get values in 94+ range. I came across this section after a brief look at processing code:

` AvgYdata[arrayIndex] = (float)receivedVoltage_RED; AvgZdata[arrayIndex] = (float)receivedVoltage_IR; value1 = (float)( AvgYdata[arrayIndex] - averageValue(AvgYdata)); value2 = (float)( AvgZdata[arrayIndex] - averageValue(AvgZdata)); ydata[arrayIndex] = value1; zdata[arrayIndex] = value2;

    float RedDC = (float) averageValue(AvgYdata);
    float IrDC = (float) averageValue(AvgZdata);

    arrayIndex++;
    if (arrayIndex == pSize)
    {  
      arrayIndex = 0;
      time = 0;
      RedAC = s.SPO2_Value(ydata);
      IrAC = s.SPO2_Value(zdata);
      float value = (RedAC/abs(RedDC))/(IrAC/abs(IrDC));

      /********  Emprical Formalae  *********/
      //float SpO2 = 10.0002*(value)-52.887*(value) + 26.817*(value) + 98.293;
      //  float SpO2 =((0.81-0.18*(value))/(0.73+0.11*(value)));

      float SpO2=110-25*(value);

      SpO2 = (int)(SpO2 * 100);
      SpO2 = SpO2/100;
      oxygenSaturation.setText(SpO2+"");`
  1. Is there any issue in the code or the hardware? Please rectify this issue.
  2. Further, the values are not consistent. Sometimes there is big difference between two consecutivve values. Is there any special care needed for finger position.
adelalfusail commented 6 years ago

do you fix this problem or not