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.

OPT3101: Calibration Questions

Part Number: OPT3101

Hello,

I have some questions regarding calibration of OPT3101 chip.

1. If I do Xtalk Illumination calibration, there is no need for Xtalk electrical calibration as this is included in illumination xtalk right?

2. XTALK_FILT_TIME_CONST has large impact on measured iPhase and qPhase in Calibration. If I program a smaller value to XTALK_FILT_TIME_CONST (calculated 4) than default (8) iPhase and qPhase can get so large that they can not be scaled down to 16bit anymore (as ILLUM_XTALK_REG_SCALE max is 7). Can I leave this value on default or is there any issues then?

3. There is only one ILLUM_XTALK_REG_SCALE register for ILLUM_DAC_L and ILLUM_DAC_H. So when using HDR mode I have to scale to fit the largest ILLUM_XTALK_REG_SCALE from HDR0 and HDR1 and have compromises in accuracy?

4. If I do offset calibration at a certain distance, it can happen that if an object come close to the sensor the phase value will go below 0 and jump to a high number. Is there any recommended way to prevent this? Add own offset or recalculate if it goes below 0?

Thanks

Regards

Urs

  • Hi Urs,

    1) Yes, but the xtalk temp coefficient may be harder to obtain if internal xtalk is not zeroed out first. If you do internal and illum xtalk together then internal xtalk cannot be performed and zeroed out before taking the temp coefficients. You can try with them together and check that the temp xtalk is obtainable. If you run into problems getting the coefficients you may need to separate them. When calibrating our EVM we did internal and illum xtalk separately because of this.

    2) I'm a little confused on this question. Do you mean that when XTALK_FILT_TIME_CONST is 4 the I and Q are too large, but when XTALK_FILT_TIME_CONST is 8 they are not? XTALK_FILT_TIME_CONST should not affect the value of I and Q unless the time constant is less than the correct calculated value and the I and Q have not yet settled. If this is the case I'm wondering if the calculated value is incorrect. Could you share the calculation you did to get this value? The recommended time const calculation is only dependent on the frame rate: xtalkFilterTau = np.int(np.ceil(10 - np.log2(averageFrames))) (taken from the varaiableSetup.py script from our EVM software). If the xtalk I and Q are too big regardless of time constant then we have another problem which is that the crosstalk is itself too high.

    3) That is correct

    4) The reason that is it jumping to the max distance for closeup is that the OPT3101 is reading a negative distance slightly below zero and the reading is wrapping around. This is likely caused by one of the calibrations (e.g. temp or nonlinearity) being slightly off and pushing the reading from 0 to negative. This can be fixed by checking these calibrations to see which is off and correcting it. Barring updating the calibration, a simple way to fix this is to read the data coming out of phase as a signed instead of unsigned number. That will half distance, but display the negative value instead. Another option is to check for this wraparound case (for example checking amplitude and LED current to know that the object is not actually far away) and then treating the negative number as zero.

    Best,

    Alex
  • Hi Alex,

    thank you for your answers.

    I will try to make internal xtalk calibration separately. But at room temperature it shouldn't make any big difference if I understood correctly? Right now I do only illumination xtalk calibration and only write to the xPHASE_XTALK_REG_HDRxx registers and nothing to the xPHASE_XTALK_INT_REG registers.

    2) Yes I mean exactly this. With smaller XTALK_FILT_TIME_CONST I get constantly higher numbers in iPhase and qPhase. My calculation is about the same:

    uint8_t xtalkFilterTau = ceil(10-log2(opt3101Config.NUM_AVG_SUB_FRAMES + 1));

    and I actually wait 20 Tau for everything to settle and get decent accuracy. waitTime = 20*pow(2, xtalkFilterTau)*frameTimeMs; with frameTimeMs = 0.25*(opt3101Config.NUM_AVG_SUB_FRAMES + 1)

    What should be a good value for low Xtalk? I get around 170k for iPhase and 180k for qPhase as an example on the prototypes.

    Best,

    Urs

  • Hi Urs,

    For checking if xtalk is good you can use the formula sqrt((IPhase/2^9)^2+(QPhase/2^9)^2)*1.646 to get the xtalk magnitude. A good xtalk magnitude value is no higher than 200 for illumination crosstalk only. This does not include internal crosstalk. If you do internal and illumination separately then a good value is 200 or less. Using your values I am getting 796, which seem high even though you are including internal crosstalk.

    Best,

    Alex