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.

AFE4404: AFE4404: Calibration of all three LEDS

Part Number: AFE4404

Hi, 

I am running into some trouble with the initial calibration of each LED. Right now, I am using the Ambient phase sampling as my reference for ambient cancellation for all 3 LEDs. 

I run the initCalibrationRoutine() before startup and then run the CalibrateAFE() function after every 100 samples (fs = 100Hz). What I see is the following: 

1. If I set LED_Sel = 1, which corresponds to the Green LED, the calibration routine decimates the signal such that its DC level is around 0.04V. That's around 10x lower than I expect. If I remove the initCalibrationRoutine(), then the Green LED is properly calibrated to ~0.55V DC baseline. 

2. If I set LED_Sel to either 2 or 3, I get a DC set level to ~1.1V no matter how I alter the calibration routine. 

Are there any tips or tricks to this? I am using the supplied function libraries from the EVM software. 

Additionally, I see on many threads there are very little comments on modifying the calibration routine for a 2LED mode for SPO2 monitoring. My question is why does not calling the calibration routine for each separate LED_Sel in a "for" loop not be permissible? Obviously this would be with the correct ambient sampling - for 2 LED mode we would have two ambient sampling periods which would be passed into the CalibrateAFE() function. 

  • Hi Nicholas,

    The calibration routine in AFE4404EVM supports calibration only for LED1 (i.e. Green LED).

    While writing the code, some generic template (such as LED_Sel) was used to switch between the LEDs for the debug platform. Also it was strictly used only for debug during the development of these calibration routines. 

    That being said, the final routines in AFE4404EVM supports calibration of only one LED at at time and it is fixed to LED1 ( based on the hardware for Green LED).

    We at TI do not support any kind of algorithm and encourage our customer to take these routines/codes as as starting point for their own firmware development.

    After going though these codes, if one wishes they can adapt it to support any other LED or write similar routines to support multiple LEDs.

    If you have any queries related to AFE, then please reach out to us.

    Regards,

    Prabin.

  • Hi Prabin, 

    Thanks for the swift reply. I have been editing the library to enable a three-phase calibration method to store each of the optimized parameters in a buffer and then program after calibrating each LED with the final settings. 

    In general, I have been checking the results of each LED phase with the standard issued code by TI as I modify my own separately. It seems that the code in AFE4404_Calibration.c does a good job of identifying the optimal value for the Red and Green LEDS - meaning that they still at a reasonable DC level. However, I am quite baffled that the calibration procedure for the IR phase thinks that the max gain and max led current (88mA) is the optimal value even though the mean DC output is saturated. Looking at the code in-depth it should not be setting these values to the max if we are exceeding our 90% DC threshold. Any ideas as to what I could take a look at - or even baseline experiments to ensure the code (that TI provided!) works properly. I would at least expect the algorithm to decrease the LED current or adjust the DAC offset to bring the DC level out of sat.