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.

AFE4403 ADC Output Problem

Other Parts Discussed in Thread: AFE4403

Hi you guys,

I am trying to read out the ADC value ( LEDCNTRL register - 0x22 adress ) converted by AFE. The setting of AFE registers that I programmed is based on the GUI  as below. 
But it seems to be that the ADC value doesn't change as much as it is expected when I change the brightness lighting to the SFH7050 sensor, therefore I think it doesn't work properly OR I missed something necessary to make it work.

This is my setting, and I am sure that the AFE registers have already been set successfully.

#define AFE4403_CONTROL0 0x000000
#define AFE4403_LED2STC 0x0017C0
#define AFE4403_LED2ENDC 0x001F3E
#define AFE4403_LED2LEDSTC 0x1770
#define AFE4403_LED2LEDENDC 0x1F3F
#define AFE4403_ALED2STC 0x000050
#define AFE4403_ALED2ENDC 0x0007CE
#define AFE4403_LED1STC 0x000820
#define AFE4403_LED1ENDC 0x000F9E
#define AFE4403_LED1LEDSTC 0x0007D0
#define AFE4403_LED1LEDENDC 0x000F9F
#define AFE4403_ALED1STC 0x000FF0
#define AFE4403_ALED1ENDC 0x00176E
#define AFE4403_LED2CONVST 0x000006
#define AFE4403_LED2CONVEND 0x0007CF
#define AFE4403_ALED2CONVST 0x0007D6
#define AFE4403_ALED2CONVEND 0x000F9F
#define AFE4403_LED1CONVST 0x000FA6
#define AFE4403_LED1CONVEND 0x00176F
#define AFE4403_ALED1CONVST 0x001776
#define AFE4403_ALED1CONVEND 0x001F3F
#define AFE4403_ADCRSTSTCT0 0x000000
#define AFE4403_ADCRSTENDCT0 0x000005
#define AFE4403_ADCRSTSTCT1 0x0007D0
#define AFE4403_ADCRSTENDCT1 0x0007D5
#define AFE4403_ADCRSTSTCT2 0x000FA0
#define AFE4403_ADCRSTENDCT2 0x000FA5
#define AFE4403_ADCRSTSTCT3 0x001770
#define AFE4403_ADCRSTENDCT3 0x001775
#define AFE4403_PRPCOUNT 0x001F3F
#define AFE4403_CONTROL1 0x000101
#define AFE4403_SPARE1 0x000000
#define AFE4403_TIAGAIN 0x000000
#define AFE4403_TIA_AMB_GAIN 0x004002
#define AFE4403_LEDCNTRL 0x0114FF 
#define AFE4403_CONTROL2 0x000000
#define AFE4403_SPARE2 0x000000
#define AFE4403_SPARE3 0x000000
#define AFE4403_SPARE4 0x000000
#define AFE4403_RESERVED1 0x000000
#define AFE4403_RESERVED2 0x000000
#define AFE4403_ALARM 0x000000
#define AFE4403_LED2VAL 0x000000
#define AFE4403_ALED2VAL 0x000000
#define AFE4403_LED1VAL 0x000000
#define AFE4403_ALED1VAL 0x000000
#define AFE4403_LED2_ALED2VAL 0x000000
#define AFE4403_LED1_ALED1VAL 0x000000
#define AFE4403_DIAG 0x000000
#define AFE4403_CONTROL3 0x008000
#define AFE4403_PDNCYCLESTC 0x000000
#define AFE4403_PDNCYCLEENDC 0x000000

 Thanks all very much !

  • Hello,

    Could you let me know which register bits you modify to change the brightness of the SFH7050 sensor?
    Are you using LED1 (IR), LED2 (Red) or LED3 (Green)?
    When you change the brightness, do you visually notice the brightness change on the LED?

    There are 6 ADC result registers (Reg addr: 2Ah - 2Fh). Which ADC register are you reading?
  • Dear Praveen Aroul,

    I modified the brightness of the SFH7050 sensor's Green Led by changing the value writing to the LEDCNTRL-0x22 register.
    Now I use ONLY Green Led. And after changing the brightness programmatically, I do visually notice the change of the brightness on the LED.
    I want to read out the 2Ah register.

    Up to now I have not measured HB yet, I just used the hand to wave around the sensor in the purpose of hoping seeing some changes in the ADC value, but nope, in the other hand, if I use AFE EVM, I will see the change clearly on the GUI.

    Thank you very much for your such a quick response !
  • Could you provide the ADC values across the LED current settings?
  • Hi Praveen Aroul,

    Three of the ADC values I were trying collecting as below:
    When the register LEDCNTRL (0x22) = 0x0114FF, the ADC values that I collected is drawn as below:
    The value is approximated around 12500.
    drive.google.com/.../view

    When the register LEDCNTRL (0x22) = 0x8A7F, the value doesn't change.
    drive.google.com/.../view

    When the register LEDCNTRL (0x22) = 0, the value also doesn't change.
    drive.google.com/.../view

    Thank you very much !
  • Hi Praveen Aroul,

    And the schematic I attached here

  • User,

    The Vfb for the green LED is about 3V, so you will need a larger voltage than 3.3V to supply the LED. To do this, you need to replace the 3.3V you have on the green LED to be LED_DRV_SUP. See the parametric spec on page 6 of the datasheet.
  • Hi Amy Schnoor,

    I take the Vfb for the green LED directly connect to the power supply 3.3V and it is lighting very well.
    The problem now is that, I think the ADC is not working properly. The value converted by it doesn't very over the brightness's change.
    I think the problem is the ADC ref voltage, but I cannot find any information related to ADC reference voltage in datasheet.

    Thank you very much !
  • User,

    Could you switch to using the red LED by changing CONTROL 3 register to 0x00, but keep all other conditions the same as you sweep the currents? The means as you sweep the currents you'll only be changing the LSB of the LEDCNTRL register. Let us know if you still see an issue.

    One other question: In your previous post from Mar 10 I notice you included some waveforms and I noticed there were some peaks. Could you explain where those are coming from?
  • Hi Amy Schnoor, I did switch to the red LED by changing CONTROL 3 register to 0x00, and keep all other conditions the same and sweep the current but the LED doesn't light.

    In my previous post, there are some peaks in the wave, actually the peaks is just the suddenly change signal while I re-programming the microcontroller without stopping the GUI to drawing the graph.

    I am wondering that whether the problem is the ADC reference voltage, I didn't see TI datasheet mention about it.

    Thank you very much !
  • User,

    On page 8 in the spec table it shows the ADC full scale voltage as +/-1.2V. And on page 20 the functional block diagram shows it as well. If you measure the voltage on the BG pin (pin#7) it should be 1V.

    Also, for your reference we have an FAQ that you can refer to as well. Link below:

    e2e.ti.com/.../369445