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: OPT3101 Crosstalk Calibration Problem

Part Number: OPT3101

Good morning,

I’m trying to make OPT3101 calibration using EVM Module connecting with ESP32, where the 2 boards communicate with each other via I2C. Communications via I2C it’s perfect because I’m able to send data and read OPT3101 registers.

I have implemented a software where I can see distance through this EVM module via ESP32 but, as it’s not very precise, I want to make a calibration to obtain more precise results.

For making calibration I’ve read all your documents and I’m following the OPT3101 Distance Sensor System Calibration.pdf step by step.

I’m writing in this forum because I’m not able to make Crosstalk calibration (paragraph 4.2), both Internal crosstalk (paragraph 4.2.1) and Illumination crosstalk (paragraph 4.2.2).

OPT3101 sensor is initialized with the following setting:

- i2c_reset_opt3101(); //reset through I2C

- writeReg(0x89, 0x007000); //0x89 is the register address, 0x007000 is the value that I write on this register

- writeReg(0x6E, 0x0A0000);

- writeReg(0x50, 0x200101);

- writeReg(0x2E, 0x0005A0);

- setMonoshotMode();

- setFrameTiming(256);

- setChannel(0);

- writeReg(0x2A, 784920);

About Internal crosstalk calibration (paragraph 4.2.1) I make the following steps.

I2C write command: writeReg(0x2E, 0x100030);

This value (0x100030) is obtaing looking the document, and to be more precise below there is the list of raised bits:

- XTALK_FILT_TIME_CONST [23-20] = 1 (from equation 6 at page 5)

- IQ_READ_DATA_SEL [11-9] = 0

- USE_XTALK_FILT_INT [5] = 1

- USE_XTALK_REG_INT [6] = 0

- INT_XTALK_CALIB [4] = 1

After this settings, I make a delay of about 500ms.

After this delay, I send the following I2C read command: writeReg(0x2E, 0x100020);

where

- XTALK_FILT_TIME_CONST [23-20] = 1 (from equation 6 at page 5)

- IQ_READ_DATA_SEL [11-9] = 0

- USE_XTALK_FILT_INT [5] = 1

- USE_XTALK_REG_INT [6] = 0

- INT_XTALK_CALIB [4] = 0 (before was 1, now I set it equal to 0 to read registers values)

Then I read registers 0x3B (IPHASE_XTALK) and 0x3C (QPHASE_XTALK). As a result, both these registers are empty, while looking at the documents they should contain the result of the crosstalk measurement.

To understand if led TX is driven by OPT3101, I use a probe attached to an oscilloscope to look if there is a voltage drop on the anode but there isn’t any voltage drop while the calibration should be done, symptom that led TX is not driven by OPT3101 during the calibration procedure.

About Illumination crosstalk (paragraph 4.2.2) I have applied the same considerations looking at the document, but 0x3B (IPHASE_XTALK) and 0x3C (QPHASE_XTALK) are always empty.

Please can you help me and give an exact sequence of values that must be written in registers to make these 2 calibrations?

Thanks in advance.

  • Hi,

    We will follow up on this shortly.

    Best,

    Alex

  • Hi,

    Are you using the SDK in order to perform the calibration? Performing a calibration without it will be difficult since the SDK already has pre-made methods and plenty of documentation that goes through the process step-by-step. The SDK is written for MSP430 architecture but it is possible to port to a different ucontroller and will be easier than developing the calibration software from scratch.

    Here is a link to the SDK: https://www.ti.com/tool/OPT3101-SDK

    Thank you,

    Brent Elliott

  • Hi Brent,
    Initially I wanted to develop the whole code in C language looking only at the document I mentioned and the OPT3101 datasheet, but maybe that's too complicated.
    I'm currently trying to make code porting of the SDK library into my project, but as I use another uController (and not the MSP430), can you please give me a stand alone library for the OPT3101?
    
    Thank you in advance,
    
    Spark.
  • Hi,

    I am not sure what you mean by a standalone library. Only some of the methods in the SDK are specifically written for the MSP430 (such as the wait function), but these can be modified in order to work with your uController.

    Thank you,

    Brent Elliott