This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/AFE4404SW-LINUX: Question about AFE 4404 in one LED mode.

Part Number: AFE4404SW-LINUX
Other Parts Discussed in Thread: AFE4404

Tool/software: TI-RTOS

Hello E2E experts,

I'm using AFE4404 to read the heartrate at wrist. I'm trying to set it on one LED only. I'm trying the code on this post to init the afe4404 setting,

 

        reg_write(9, 0);
        reg_write(1, 80);
        reg_write(10, 399);
        reg_write(2, 399);
        reg_write(21, 400);
        reg_write(22, 406);
        reg_write(13, 407);
        reg_write(14, 866);
        reg_write(54, 1);
        reg_write(55, 0);
        reg_write(5, 1);
        reg_write(6, 0);
        reg_write(23, 867);
        reg_write(24, 873);
        reg_write(15, 874);
        reg_write(16, 874);
        reg_write(3, 1);
        reg_write(4, 0);
        reg_write(7, 1);
        reg_write(8, 0);
        reg_write(25, 875);
        reg_write(26, 881);
        reg_write(17, 882);
        reg_write(18, 882);
        reg_write(11, 1);
        reg_write(12, 0);
        reg_write(27, 883);
        reg_write(28, 889);
        reg_write(19, 890);
        reg_write(20, 890);

        reg_write(29, 39999);
        reg_write(30, 0x000103);
        reg_write(32, 0x008003);
        reg_write(33, 0x000003);
        reg_write(58, 0x000000);
        reg_write(34, 0x000F00);      //only LED 2 is on (green)
        reg_write(35, 0x124218);
        reg_write(41, 0x2);
        reg_write(49, 0x000020);
        reg_write(57, 0);
        reg_write(50, 5475);
        reg_write(51, 39199);

and I got the following result,

The data is valid when zoomed in (I can see the heart pulses). The dropping values happen when I change the sensor location (from my finger tip to front writst to back wrist). Does it look normal? Why are the y-axis changing from ~140,000 to ~20,000 when the sensor location is changed from finger tip to wrist?

Another side question, is the maximum current I can set for a LED is 5 mA? Is there any way I can increase the current over 5mA?

Best,

Henry

  • Hi Henry,

    Change in the level is expected as you change the sensor location. When you change the sensor location the reflected light from the skin will change depending on the skin tone, skin thickness and the location of blood vessel. If you want the same level as the previous one, you have to increase the current.
    Regarding the LED current, I am assuming you meant 50mA.
    In AFE4404 you can supply up to 100mA by setting "ILED_2X" bit.

    Regards,
    Prabin
  • Thanks Prabin,

    it seems that in the code above, the "ILED_2X" bit aldready set to 1.
    Last question, my LED current is set to (48x2)mA, but when the sensor is not directly attached to skin (i.e. when it's place on a wrist band), the distance between the sensor and skin is about 2-3mm, and the data I recorded in this scenario has a lot of noises (not as good as when it's directly placed on skin). Do you know any other settings I can twist to have a better result? We think if we can average out adc values (i.e. 4 values each time), the noises would be dramatically reduced. Could you suggest any way that I could modify the code to do it?

    Thanks,
    Henry

  • Hi Henry,

    When you have 2-3mm separation between the sensor and the skin, you might get ambient light ( due to indoor lighting) as the noise.
    Are you looking at LED data or LED-AMB data? LED-AMB data might be better option.
    If you are interested in taking averaged of the ADC values, you can use "Decimation Mode". This is described in section 8.4.6 of the datasheet. If you set the decimation factor = 4, you will get average of 4 ADC samples, so your effective data rate will be PRF/4.

    Regards,
    Prabin
  • Thank you so much Prabin for your suggestion.

    One last question before I close this post. Do you know what data rate that code generates? If I want to change to different data rate (i.e. 250 sample/s, 300 sample/s,. etc.) what registers and values I need to modify?

    Thanks,
    Henry
  • Hi Huy,

    You have to change PRPCT, PDNCYCLESTC and PDNCYCLEENDC registers when you change the data rates.

    Regards,
    Prabin