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: Initialization & calibration problem

Part Number: OPT3101

Hello,

We use the OPT3101 in one of our products.

There seems to be a problem with the phase. After initializating the OPT, I tried to perform illumination crosstalk & phase offset calibration. Then, I converted the acquired phase into a distance, using the datasheet's equation.

But the distance is always changing, it is not stable at all. And when I say this, I mean it can pass from 1234 to 9876 suddenly, it is not just a difference of a few mm or cm.

So I am digging in, trying to see where the problem comes from. Now I am reading PHASE_OUT[23:16] to see if there is a problem in the reading of the phase. I alternatively get 0x12 & 0x92. According to the datasheet, that means that I use ILLUM_DAC_H, which is right; that the FRAME_STATUS is valid; and that I alternatively get 0 and 1 in the frame counter's LSB bit, which seems normal to me.

That means I do not have any problem on the reading of the phase. So why am I getting around 9900 or 10000 as the value of the phase? According to the datasheet's equations, it should be around 1749 (I am at 40 cm of the target). As I do not do any calibration, just the registers initialization, I am aware that I will not get 1749, but I did not expect such a difference. 

Does somebody have an idea about that?

You will find my registers initialization attached below.

EDIT: The structure is such that:

typedef struct
{
    uint8_t registerAddress;
    uint8_t eepromAddress;
    uint32_t value;
} initValues_s;

config OPT3101.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* EN_TEMP_CONV = enabled */
{EN_TEMP_CONV, 0x59, 0xA0000},
/* OVERRIDE_CLKGEN_REG = 0, CLIP_MODE_OFFSET = wrap around, CLIP_MODE_TEMP = wrap around, CLIP_MODE_NL = wrap around, CLIP_MODE_FC = clip */
{CLIP_MODE_FC, 0x00, 0x200101},
/* XTALK_FILT_TIME_CONST = 3 (tau = 8), IQ_READ_DATA_SEL = internal crosstalk, USE_XTALK_REG_ILLUM = register value, USE_XTALK_FILT_ILLUM = filter, USE_XTALK_REG_INT = register value, USE_XTALK_FILT_INT = filter, INT_XTALK_CALIB = 0, DIS_AUTO_SCALE = enabled, FORCE_SCALE_VAL = 0 (digital scale = 64) */
{FORCE_SCALE_VAL, 0x26, 0x3001E0},
/* IAMB_MAX_SEL = 11 (= 50 uA) */
{IAMB_MAX_SEL, 0x00, 0xB0},
/* TEMP_COEFF_XTALK_IPHASE_HDR0_TX0 = 177 */
{TEMP_COEFF_XTALK_IPHASE_HDR0_TX0, 0x20, 0xB10000},
/* TEMP_COEFF_XTALK_QPHASE_HDR0_TX0 = 224 */
{TEMP_COEFF_XTALK_QPHASE_HDR0_TX0, 0x23, 0xE00000},
/* TEMP_COEFF_XTALK_IPHASE_HDR1_TX0 = 157 */
{TEMP_COEFF_XTALK_IPHASE, 0x53, 0x9D00},
/* TEMP_COEFF_XTALK_QPHASE_HDR1_TX0 = 212 */
{TEMP_COEFF_XTALK_QPHASE, 0x56, 0xD4},
/* SCALE_AMB_COEFF_XTALK = 4, SCALE_TEMP_COEFF_XTALK = 6, EN_TEMP_XTALK_CORR = enabled */
{SCALE_TEMP_COEFF_XTALK, 0x3B, 0x4D0000},
/* TEMP_COEFF_MAIN_HDR0_TX0 = 1100 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

PS: If you are French, do not hesitate to MP me, please. I will redirect you to my superior, who is looking for a consultant.

  • Megan,

      When you read the distance, is that value jumping around as well? How close is the distance accuracy?

  • Hi Gordon, 

    The distance is jumping as well, so there is no distance accuracy (it can jump from 242 to 6843, then 1194... for example). Actually, that's because the distance was jumping so much that I put my interest on the phase.

  • Megan,

      Have you at any time done a full calibration based on your board? The issue is that the default registers in the OPT3101 have no real meaning except that it can power up in a state that will allow it to work enough to go through the calibration. 

    I assume that by now you are aware that this part is not a DTOF (Direct Time of Flight) part. It is an ITOF (Indirect Time of Flight). It uses a standard I/Q data demodultaion technique to calcultate distance. That means it uess amplitude to determine what quadrant it should use, then it uses phase angle to calculate the distance. For this reason a full calibration is required in order for the part to know what quadrant to use. This is why your phase angle and distance is jumping around. 

    Theoritically every unint needs to have a full calibration. The reality is that there is a way around this. You will need to do a full on calibration to 5 units, then compare registers. If the calibration data is close on all 5 units, then you can replace these values in your production units as the default registers. TI can't gaurentee that they will have any kind of accuracy. You will still need to do the default calibration for crosstalk and phase offset on every unit, but this will provide you with a working unit. If you have not done this then they will not work correctly. 

  • Gordon,

    Thanks for your reply.

    I did not do a full calibration yet. Actually, we are redesigning a product. A full calibration and/or measures must have been done in the previous version, and the registers were initialized according to these measures. That is how I came with those registers values: it worked well with the previous version.

    However, as we fully redesigned the product, the values I have to set in the registers may have changed, I guess from what you say. This would explain why the phase is jumping around. 

    The full calibration you are talking about is the one presented on page 3 of the following document, right? http://www.ti.com/lit/pdf/sbau310 

    That is to say I have to perform Crosstalk • Phase offset • Phase correction with ambient • Phase correction with temperature • Frequency • Square-wave non linearity calibration on several OPTs, am I right?

    Is my only choice to do it with the SDK?

  • Megan,

      If you have updated the board then understand that minor changes to layout will impact the calibration. Yes you will need to do a full calibration on the new board to get the default values. Yes the lst of calibration test on page 3 is what you need. If you also do the full calibration across temperature it will also help with increaseing default accuracy. 

    Unless you have written the calibration code into your board, then you may have to figure out how to use the SDK. 

  • Thanks. I will then do that and come back to solve the issue if it worked.