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 custom board and code interfacing issue. (Integrity of PHASE_OUT data)

Part Number: OPT3101

Hello there. Hope you are doing well.

I am working on a custom two-layer pcb board using the OPT3101 IC with SFH4550 and SFH213FA as the transmitter and receiver respectively, emulating the design of your OPT3101EVM evaluation module. I am communicating correctly with the OPT3101 IC using an 8-bit PIC18f452 (Microchip). I have perfomed all calibration steps apart from the phase ambient correction and the temperature correction pertaining to the existence of an external temperature sensor since our board does not feature an external temperature sensor. Hence all correction values have been loaded excluding those for the ext. temp. sensor(kept at their reset values). The calibration procedure's execution order has been according to the support document of your site titled sbau310. The rest of the registers have been loaded by following the order of the Latte Demo GUI Log provided in your software support section for the evaluation module. 

I have configured my OPT3101 for the Super-HDR mode with TX0 being the main driving channel for the LED with higher current support from TX1 just as configured and routed in your EVM module.

Now when i read register 08h which contains the PHASE_OUT value, i get believable data upto the range of 40cm but with vast inconsistency. That is to say if i get the correct data for a distance of 30cm, then for 15 cm the PHASE_OUT values are not correct. What i am saying is that there is no linear scalability upto the range of 40 cm even though i get correct data for a distance of 30cm from within this range. 

When the target distance increases and the driving current switches to a higher current, the PHASE_OUT values get erroneous (PHASE_OUT value jumps from a correct value to a higher erroneous one e.g. for 30cm target (0x0500h) something correct value to abruptly at (0x0a00h) somehing for 45cm). The maximum PHASE_OUT that is somewhat correct is analogous to a distance of  95cm (0x1000h). If the target is placed beyond 1 meter, the PHASE_OUT data is a garbage value (0x0c00h) or near this value. Moreover, the PHASE_OUT value, whether be correct or not, keeps decreasing in the form of exponential decay, that is to say if i am getting correct value for a target distance of 30cm at power up, the same value will be decreased to that analogous to a distance of 20cm after about one minute and then stays at this value indefinitely.

So to summarize, i need assistance in what step i may be doing wrong in the configuration of the super-hdr mode or in the calibration steps such that my PHASE_OUT values are erroneous (non-linear distance to PHASE_OUT scalability), even when they are correct at certain distances in the range of 25 to 35 cm.

Anticipating your response in earnest.

Regards,

Abdul Khan

Embedded Systems Design Engineer

  • Hi,

    I will need to check on this and get back. Please expect a response next week due to the holidays.

    Best,

    Alex
  • Hi Alex

    Waiting for your reply. If your holidays have ended, help out would be greatly appreciated.
  • Hi Abdul,

    Thanks for the follow up and my apologies for the delay getting back. To summarize you have a custom board and are having trouble with bring up and calibration correct? Have you been using our SDK online to do this?

    When you say "Now when i read register 08h which contains the PHASE_OUT value, i get believable data upto the range of 40cm but with vast inconsistency." it sounds like you are trying to use the device to measure distance without doing the calibration, is this correct? If so I would also suggest taking a look at our calibration document online to give some background before using the SDK to do the bringup and calibration.

    So the SDK in case you are not familiar is a tool for doing the calibration. It has all the functions already implemented and the documentation included should help step you through the process. Since you mentioned you are not sure about configuration for the HRD modes we also have a configurator tool online to help with that. It is a GUI that generates code you can drop directly into the SDK to configure OPT3101 properly.

    Best,

    Alex
  • Hi Alex:

     Thanks for your  response ,So i did download the SDK and ran it as is on MS Visual Studio 2012 but encountered a problem in compilation related to the file "OPT3101_configuration.cpp" when i compiled the project.  It's a syntax error in that file at :

    OPT3101::device::device():

    configurationFlags_isTxChannelActive{true,true,false},    // The compiler shows the error at this line

    configurationFlags_isRegisterSetActive{true,true} {this->calibration =new calibration[1];}

    Moreover, there is no provision of usb protocol on our selected controller for the custom board, so we can't run the SDK directly with our board. Instead i am using(copying) the contents in this file (i.e the initialization setup registers and the calibration register values) to our controller code for the PIC18F452. As for the calibration document you are talking about, i also followed the instructions to the letter in it to perform the required calibrations except for the phase ambient cancellation and the external temperature sensor correction calibrations. But still i only get correct PHASE_OUT data for a target distance of 30 to 40 cm.