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 Issue

Part Number: OPT3101

I tried to do calibration with the TOF sensor, 

This is the internal crosstalk, illumination crosstalks I got, with photodiode covered, and I store them into registers 2F, 30, 31, 32 accordingly.

----------------------
Crosstalk Class Report 0
----------------------
I=-13819
Q=1998
xtalkScale=0
illumXtalk=0
illumScale=0
illumDac=0
tmain=0
tillum=0
shiftIllumPhase=0
commonScale=0
Magnitude=
----------------------

----------------------
Crosstalk Class Report 1
----------------------
I=-22995
Q=19589
xtalkScale=0
illumXtalk=1
illumScale=0
illumDac=2
tmain=2320
tillum=2461
shiftIllumPhase=0
commonScale=0
Magnitude=
----------------------

----------------------
Crosstalk Class Report 2
----------------------
I=-16560
Q=10523
xtalkScale=0
illumXtalk=1
illumScale=2
illumDac=1
tmain=2320
tillum=2461
shiftIllumPhase=0
commonScale=0
Magnitude=
----------------------

Later I do the phase offset calibration, with the photodiode uncovered, and I store the values into registers 42, 51 accordingly.

-------------------------
Phase Offset Class Report-1
-------------------------
phaseOffset=46267
referenceDistanceInCodes=0
illumScale=0
illumDac=0
illumDCdac=0
freqCount=16384
shiftIllumPhase=0
data=
-----------------------

-------------------------
Phase Offset Class Report 2
-------------------------
phaseOffset=15637
referenceDistanceInCodes=0
illumScale=2
illumDac=1
illumDCdac=0
freqCount=16384
shiftIllumPhase=0
data=
-----------------------

Then I started to do frame capture, but the phase reading is very unstable, jumping between zero to 65,000, when I tried to move my hand in front of the sensor.

The phase reading is stable but not correct, around 14,000, when nothing is in front of the sensor.

I did not do temperature and ambient calibration, and have disabled those corrections.

  • Hi Alex,

    This is a separate question.

    Now the register read write are ok.

    Previously I think is hardware problem.

    Thanks.

  • Hi,

    Okay, understood. There still seems like there may be something wrong with the data. Why is the magnitude is not printed?

    We have actually just released an update to the SDK to the web. Would you be able to upgrade to the current version? I would suggest using the launchpad calibration option (see included users guide) for the most straightforward process. The current version also has some bug fixes for the later calibrations you will need to do eventually. The process you are using should work fine for calibrating crosstalk and phase offset, but I think it will be easier to support the current version of the SDK.

    Best,

    Alex

  • Hi Alex,

    For the magnitude, previously I did not set the linker flag for printf_float on my compiler.
    But even I have set that, it still cannot print out double, so I change the magnitude to float.

    So these are the crosstalk reports:

    ----------------------
    Crosstalk Class Report 0
    ----------------------
    I=-14517
    Q=2100
    xtalkScale=0
    illumXtalk=0
    illumScale=0
    illumDac=0
    tmain=0
    tillum=0
    shiftIllumPhase=0
    commonScale=0
    Magnitude=48.19
    ----------------------
    
    ----------------------
    Crosstalk Class Report 1
    ----------------------
    I=-22176
    Q=18431
    xtalkScale=0
    illumXtalk=1
    illumScale=0
    illumDac=2
    tmain=2314
    tillum=2458
    shiftIllumPhase=0
    commonScale=0
    Magnitude=92.54
    ----------------------
    
    ----------------------
    Crosstalk Class Report 2
    ----------------------
    I=-16478
    Q=10653
    xtalkScale=0
    illumXtalk=1
    illumScale=2
    illumDac=1
    tmain=2312
    tillum=2458
    shiftIllumPhase=0
    commonScale=0
    Magnitude=63.52
    ----------------------
    

    And the phase offset reports:

    -------------------------
    Phase Offset Class Report-1
    -------------------------
    phaseOffset=39823
    referenceDistanceInCodes=0
    illumScale=0
    illumDac=0
    illumDCdac=0
    freqCount=16384
    shiftIllumPhase=0
    data=
    -----------------------
    
    -------------------------
    Phase Offset Class Report-2
    -------------------------
    phaseOffset=16685
    referenceDistanceInCodes=0
    illumScale=0
    illumDac=0
    illumDCdac=0
    freqCount=16384
    shiftIllumPhase=0
    data=
    -----------------------
    

    So according to the user guide, crosstalk lover than 200 supposed to be very good.

    I will try to use the new SDK.

    Thanks.

     

  • Hi Alex,

    I have a quick look at the new SDK, in the calibrationSession_firstTimeBringUp() now it has the loadIllumCrosstalkSet() loadPhaseOffsetSet() which write the values into the chip registers.

    Previously I have modified the old SDK to do this as well. However the phase reading is still random.

    In the new SDK Users Guide, in step 1 simple bring-up, it requires calibration for a few known fixed distances. However, i check the SDK code, the manuallySetReferenceDistances() function is only called by PhaseTemp calibration and PhaseAmbient calibration. According to the user guide, these two are not mandatory for testing and evaluation. Is there a mistake in the user guide or SDK?

    So must I to do this phase offset calibration for different distances for a quick test? And how to do it without varying the temperature and ambient?

  • Hi,

    In the old SDK you also need to do simple phase offset to get correct distance readings as well. No this does not need to vary temp or ambient. This is also part of the factory calibration process. It is just setting a target at the requested distance and then using that known distance to set the phase offset to output the correct distance. Let me know if you have more questions here. All you need to do is set that distance you want to use, run SDK, and place the target at that distance when requested.

    Best,

    Alex

  • Ok, I noticed that there are some new functions in the calibrationSession_firstTimeBringUp() which are not available in the previous SDK.

    this->measureIllumCrosstalkSet();
    this->loadIllumCrosstalkSet();
    this->measurePhaseOffsetSet();
    this->loadPhaseOffsetSet();

    Now, I can do a simple calibration. I can have phase reading changing according to distance.

    If I use HDR mode, other than doing calibration for TX0, do I need to calibrate TX1 as well?
    So for near distance the TX0 is illuminated and for far distance the TX1 current is diverted to the same diode. Does it work like that.

    But my TX1 is set to inactive so the calibration does not go into the loop.

    Another question is: Is there any register that indicates whether low or high current is being used? So that I can know at what distance it switches the illumination current.

  • Hi,

    Do i need to perform calibration for TX1 if i am using HDR mode? In the sample TX0 is short distance and TX1 is long distance.

    this->refDistancesInMM[0][0]=10;
    this->refDistancesInMM[0][1]=20;
    this->refDistancesInMM[1][0]=80;
    this->refDistancesInMM[1][1]=120;
    this->refDistancesInMM[2][0]=0;
    this->refDistancesInMM[2][1]=0;

  • Hi,

    You only need TX1 for super hrd mode which uses 4 currents. If you only use auto HDR mode then you do not need tx1 and this allows 2 currents on tx0. The HDR_MODE register can be used to see which mode is selected by the device.

    Best,

    Alex