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: Wrong measures with different color target

Part Number: OPT3101

I've performed step 1 of SDK  Calibration for a range 10-20cm with AutoHDR mode. Now the OPT3101 report different measure based on color target, but with a black target the measure is meaningless.

With a white target at 520mm

|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
|000398,001741,001066, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011910,052077,000004, 0, 0, 1|--|069,0x1d, +35,-128.0000|0000161/0003000|

but the error is acceptable.

With a white target at 310mm

|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
|000270,001181,001896, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011364,049689,000003, 0, 0, 1|--|068,0x18, +35,-128.0000|0000697/0003000|

With a black target at 310mm

|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
|000020,000090,000443, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011932,052170,000004, 0, 0, 1|--|068,0x14, +35,-128.0000|0001232/0003000|

and at about 500mm

|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
|014887,065093,000284, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011948,052242,000003, 0, 0, 1|--|068,0x10, +34,-128.0000|0001767/0003000|

Why measures with a black target are completely wrong ?

Best Regards

Roberto Cerati

  • Roberto,

    In HDR mode, the current can switch between 2 current settings on one TX channel, and with super-HDR, TX1 can be used to add 2 more current settings.

    The phase offset measurements are not being done at the proper amplitude for each current setting.

    The documentation recommends doing phase offset calibration at a target distance where the amplitude is between 16000-24000. The preset values in the SDK are arbitrary and definitely don’t follow this rule. The values are set like below in OPT3101Coefficients.cpp.

    void environmentalController::manuallySetReferenceDistances(){

    this->refDistancesInMM[0][0]=50;

    this->refDistancesInMM[0][1]=120;

    this->refDistancesInMM[1][0]=60;

    this->refDistancesInMM[1][1]=150;

    this->refDistancesInMM[2][0]=0;

    this->refDistancesInMM[2][1]=0;

    }

    The indexing on refDistancesInMM is [Tx channel] and [current setting, 0 being H and 1 being L]. In order for them to find the proper distances to set for each current and tx setting, you will need to change your configuration to do just one current, flash that, and see at what distance you can get 16000-24000 codes or LSB's for that particular current. At higher currents, that distance will be pretty far with a white background, so you can use darker backgrounds in order to get lower amplitude settings, but then you will need to remember what current settings used what color background when you do the calibration.

    Once you know these distances, you can enter that into OPT3101Coefficients.cpp and then use super-HDR configuration and perform the calibration.

    This method is used to get extended range because it moves the IQ data calculations into the other quadrants. For more information look up IQ demodulation techniques.

    It's important to tknow that this part is not Direct TOF but Indirect TOF and calculates distance based on the phase angle not a single pulse time. This is why this part is so much better and accurate.

  • Chosen Distance: 150mm and 300mm with a reflective target

    INFO::Loading Phase Offset Set

    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    017066,000655, 3, 31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C), tIlum(C)
    17721,20106, 0, 0,070, 2360, 0000, +39, -128.0000


    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015594,001311, 0, 31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C), tIlum(C)
    16905,11943, 0, 0,069, 2360, 0000, +39, -128.0000

    INFO::Loading Phase Temperature coefficient Set
    INFO::Loading Phase Ambient Coefficient Set

    Measure with white target are ok, while with a black target are wrong.

    Black target at 300mm

    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
    |014960,065413,000397, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|013530,059159,000006, 0, 0, 1|--|069,0x08, +39,-128.0000|0000441/0003000|

    Black target at 150mm

    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
    |000030,000132,000766, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012463,054493,000003, 0, 0, 1|--|068,0x16, +39,-128.0000|0000813/0003000|

    White target at 300mm

    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
    |000243,001064,001789, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|013613,059522,000003, 0, 0, 1|--|068,0x0e, +39,-128.0000|0002209/0003000|

    White target at 150mm

    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
    |000155,000681,004932, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|013132,057418,000003, 0, 0, 1|--|068,0x07, +40,-128.0000|0002442/0003000|

  • I used an aluminium foil to gain high amplitude value for calibration step 1, then I measure white and black target distances.

    If I repeat calibration, sometimes also with white target measures are wrong like with black target: Phase value becomes high.

  • Roberto,

      Aluminum foil is not a proper background for the calibration. The idea is that you need an amplitude in the expected range, based on the current used to drive the emitter. You move the reflective backdrop to achieve the amplitude. If the amplitude is to high then use the black surface and move it accordingly.

    The OPT3101 is not a direct time of flight AFE. It is an indirect time of flight. It does not send out a pulse and measure the time to return as you might expect. The output signal is modulated and the return signal is measured based on a demodulated IQ method. The distance is determined by the phase angle not the amplitude. The reason the amplitude is important for calibration is that to do a calibration you need to make sure you have a solid amplitude at the distance so the phase angel can be measured and used. There are 4 different quadrants that are used to determine the phase angle and distance. Please read the message I sent and try to understand the method. You can also read about demodulated IQ.

  •  Aluminum foil is not a proper background for the calibration. 

    ok, but if I don't use a reflective surface I can reach  16000 codes only with 173mA at 80mm with a white target, while with 43mA I reach 9000codes at 30mm.

    I've not used SFH213FA photodiode.

  • Roberto,

      What photodiode and emitter part numbers are you using?

  • I'm testing an hw with TEMD1000 as Photodiode and SFH 4550 as IR LED.

    I have another hw version with TEMD1000 and LTE-C9506B as IR LED, but amplitude is lower because IR led is driven with a lower current (130mA).

  • What is the maximum distance you are attempting to get with this sensor?

    Have you tried the OPT3101 Configurator Tool v0.9.1?

    I will review your component selections and get back to you asap. I just want to make sure they will provide the distance you require.

  • maximum distance: about 500mm.

    > Have you tried the OPT3101 Configurator Tool v0.9.1?
    yes, I tried Auto HDR mode, and now I'm trying Super HDR mode 

  • Roberto,

      You should have a capacitor connected to INM to ground. My guess is that you have a 6.8pf capacitor as stated in the schematic. This capacitor has to match your photodiode capacitance or the system will not work correctly. The TEMD1000 has a data sheet capacitance of 1.8pf, however if you scroll down to the capacitance chart, you will see that the capacitance is about 2.4pf at 1V. This is the approximate voltage that is placed on the photodiode. You will need to change the 6.8pf capacitor to 2.4pf then try to calibrate using the white and black backgrounds. Remember in Super HDR mode you will need 4 currents at your determined distances to get an amplitude of about 16000 codes (LSB's) based on each current. Do this manually to make predetermined distances for each current, then change these values in the SDK code in order to get a proper calibration for Super HDR.

    Let me know how this works.

  • I checked the capacitor mounted on my board with TEMD1000: it is a 2.2pF so I haven't changed it for now.
    During these days I worked hard to find configuration to do just one current with OPT3101 Configurator Tool:

    I left unchecked Super HDR Mode, Auto HDR mode, Monoshot mode, I set sub-frame count and Avg-frame count to 1, and I checked Tx0 Select, creating 4 different configuration setting ILLUM_DAC/SCALE TX0 current. Current values are chosen for Super HDR Ratio 32, but I can change it.

    When I run 

    opt3101_sdk (for 173.6 mA for example)
    I find that Tx0 and Tx1 channel value are updated, but correct data are referred to Tx0 channel.
    Amplitude value changes a lot from 19K codes to few units codes.
    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |

    |010271,044910,018821,   0,   0,  1|--|003787,016558,019414,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x14,  +39,-128.0000|0000000/0003000|
    |010271,044910,018821,   0,   0,  1|--|003785,016552,019379,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x08,  +39,-128.0000|0000001/0003000|
    |010271,044910,018821,   0,   0,  1|--|012913,056463,000198,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x1c,  +39,-128.0000|0000002/0003000|
    |008957,039166,019240,   0,   0,  1|--|012913,056463,000198,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x11,  +39,-128.0000|0000003/0003000|
    |008957,039166,019240,   0,   0,  1|--|013327,058270,000196,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x0e,  +39,-128.0000|0000004/0003000|
    |011287,049351,000011,   0,   0,  1|--|013327,058270,000196,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x1b,  +39,-128.0000|0000005/0003000|
    |011287,049351,000011,   0,   0,  1|--|003784,016546,019218,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x10,  +39,-128.0000|0000006/0003000|
    |011287,049351,000011,   0,   0,  1|--|003780,016531,019216,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x04,  +39,-128.0000|0000007/0003000|
    |005515,024116,019387,   0,   0,  1|--|003780,016531,019216,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x1f,  +39,-128.0000|0000008/0003000|
    |005515,024116,019387,   0,   0,  1|--|003781,016532,000022,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x0e,  +39,-128.0000|0000009/0003000|
    |005515,024116,019387,   0,   0,  1|--|013621,059558,019367,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x18,  +39,-128.0000|0000010/0003000|
    |003778,016522,000013,   0,   0,  1|--|013621,059558,019367,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x09,  +39,-128.0000|0000011/0003000|
    |003778,016522,000013,   0,   0,  1|--|010284,044968,019215,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x18,  +39,-128.0000|0000012/0003000|
    |005437,023775,019357,   0,   0,  1|--|010284,044968,019215,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|070,0x0b,  +39,-128.0000|0000013/0003000|
    So, my question is if OPT3101 is working fine but I2C reads need to be synced to something, or if there is an issue.
    If I increase sub-frame count and Avg-frame count to 64, for example, Amplitude measure is more stable but there are still units amplitudes.

    Thanks
  • Roberto,

      When you turn off HDR and AUTO HDR, The system uses TXO and TX1 for calibration. The intent is that you will have two different currents at two different distance to do the actual calibration. The ambient levels are only important in calibration because you want to find a background material and distance for TX0 and again for TX1 that will provide you with 1600-24000 codes (LSB) This is importnt because you are forcing the system to operate in different quaderants and calibrating the distance in each quadrant. Once you complete the calibration the amplidude is meaning less. The amplitude helps the system determine which quaderant to perform the calulations. Then the phase angle is calculated and the distance is calcullated. Phase angle and amplitude witll apear speratic and have little meaning after calibration. Ultimatly is the distance correct? If not then you are doing the calibration incorectly. We may need to work on how you are calibrating and your setup.  

  • Sorry, I forgot to specify that I'm performing SDK step 0: I'm looking for the most suitable distances and color targets.

    The system uses TX0 and TX1 for calibration.

    Only for Tx0 is set the wanted current, for Tx1 is always set 168mA (I don't know the reason)

    5p6 16p8 54p6 173p6
    0x2A 792221 792221 792221 792221
    0x29 3F0C23 3F0C83 3F0DA3 3F0FE3
    0x2B 006000 086000 086000 006000
    0x2C 000800 000800 000800 000800
    Tx0 Current 5,6 16,8 54,6 173,6
    Tx1 Current 168 168 168 168
  • When I run SDK step 0 I find amplitude that are quite different from amplitude showed during phase calibration in step 1, with the target at the same distance.

    For example 

    First program (configuration for Super HDR)

    Step 1

    Set Target to distance [0050]mm
    Press any Key to continue:
    INFO:Performing Phase Offset for TX0 HDR 0 @ ref Distance 50mm

    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015382,000218, 0, 01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C), tIlum(C)
    15600,21883, 0, 0,070, 2352, 0000, +38, -128.0000

    Amplitude = 21833

    Second program (configuration to do just one current, 5.6mA)

    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum | Count/Total |
    |004828,021112,000397, 0, 0, 1|--|012397,054206,000002, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|069,0x1e, +37,-128.0000|0000278/0003000|

    Amplitude = 397

    without moving the target.

    Is it possible ?

    Tkanks

  • Roberto,

      Is all of this about the same issue? Are you still struggling to do the calibration? The calibration is complex but not that difficult. 

    If it is, I want to dig into your calibration setup. Please describe your setup in detail. 

    Also look at the SDK Users guide. This document has a better outline on the calibration procedure. OPT3101 SDK Users Guide_calibration Guide.pdf

  • Programs with configuration to do just one current seem that don't work correctly, so now I use only the program with configuration for Super HDR, that measure good amplitude values with a reflective surface.

    Measure for phase offset are done using a reflective surface and amplitude values are about 16K-24K as required.

    The image shows the setup.

    A calibration done on a device with SDK step 1 seems to work quite good with 
    TESTING_LIVE_VIEW test, reloading saved calibration value.

    SDK step 1 saves on files Illumination crosstalk and phase offset values for next tests, while internal crosstalk calibration is done each trial.

    But sometimes repeating TESTING_LIVE_VIEW there is a measure offset that is related to internal crosstalk calibration, I suppose.

    For example, I report 3 different live view test data

    Test 1

    INFO::Internal Cross talk Measurement Completed                  
    I Q S ScaledI ScaledQ tMain tIlum tMain(C) tIlum(C) Magnitd
    -8954 746 0 -8954 746 0 0 0 -128 29,7

    The mean measured distance is 815mm.

    Test 2

    INFO::Internal Cross talk Measurement Completed
    I Q S ScaledI ScaledQ tMain tIlum tMain(C) tIlum(C) Magnitd
    -8053 -427 0 -8053 -427 0 0 0 -128 26,4

    The mean measured distance is 417,5mm.

    Test 3

    INFO::Internal Cross talk Measurement Completed
    I Q S ScaledI ScaledQ tMain tIlum tMain(C) tIlum(C) Magnitd
    -7582 538 0 -7582 538 0 0 0 -128 24,7

     The mean measured distance is 790,5mm.

    Temperature is the same during three tests, so the only change is  internal crosstalk calibration that SDK repeats at the beginning of each test.

    In OPT3101_configuration.cpp
    xtalk_filt_time_const=1

    Is it better to change filter setup parameters or save and reload also internal crosstalk registers ?

    Best Regards

  • Roberto,

    It would be easier to debug if we could see all of the calibration values. I am not fully understanding what it is you are seeing. Can you send me the calibration values? Is this your own board or an EVM?

  • Test are run on my board  with TI SDK based firmware.

    InternalXtalkComp.txt
    Illumination crosstalks and Phase offsets are loaded from files in which values were saved.
    
    For examples for 845mm distance calibration data are the following referred to TX1 channel and High current:
    illumCrosstalk_TX1_h.txt									
       I	Q	S	ScaledI	ScaledQ	tMain	tIlum	tMain(C)	tIlum(C)	Magnitd
    -13757	28025	1	-27514	56050	2320	0	34	-128	200,2
    
    								
    phaseOffset_TX1_h.txt							
    PhOfft	rfDCod	ilmScl	ilmDac	 fqCnt	
    15365	1530	0	31	16384
    Phase	Amplt	SigOl	AmbOl	Amb	tMain	tIlum	tMain(C)
    16895	22162	0	0	69	2320	0	34
    
    I run three tests with SDK TESTING_LIVE_VIEW test; 
    Internal crosstalk is recalculated each time live measure are run and it is reported.
    
    1) Test n. 1, black panel target at 845mm distance
    INFO::Internal Cross talk Measurement Completed	 	 	 	 	 	 	 	 	 
    I	Q	S	ScaledI	ScaledQ	tMain	tIlum	tMain(C)	tIlum(C)	Magnitd
    -8954	746	0	-8954	746	0	0	0	-128	29,7
    
    Illumination crosstalk from illumCrosstalk_TX1_h.txt
    Phase offset phaseOffset_TX1_h.txt
    
    Distmm	 Phase	Amplud	SigS	AmbS	HDR	--	Amb	Cntr	Tmain	Tillum   		LedCh Iin    Qin    	  Count/Total  			
    0	0	0	0	0	0	--	69	0x11	33	-128		0	-1239	117	0000000/0003000	
    1004	4394	27	0	0	1	--	69	0x12	33	-128		1	-7489	4029	0000001/0003000	
    877	3835	29	0	0	1	--	69	0x13	34	-128		1	-7839	4723	0000002/0003000	
    768	3361	28	0	0	1	--	69	0x14	34	-128		1	-7379	4919	0000003/0003000	
    759	3321	29	0	0	1	--	69	0x15	34	-128		1	-7507	5047	0000004/0003000	
    907	3967	30	0	0	1	--	69	0x16	34	-128		1	-8105	4745	0000005/0003000	
    784	3428	28	0	0	1	--	69	0x17	34	-128		1	-7377	4849	0000006/0003000	
    879	3845	29	0	0	1	--	69	0x18	34	-128		1	-7791	4685	0000007/0003000	
    851	3722	28	0	0	1	--	69	0x19	34	-128		1	-7501	4631	0000008/0003000	
    838	3666	30	0	0	1	--	69	0x1a	34	-128		1	-8053	5033	0000009/0003000	
    944	4131	29	0	0	1	--	69	0x1b	34	-128		1	-7885	4453	0000010/0003000	
    911	3984	28	0	0	1	--	69	0x1c	34	-128		1	-7699	4489	0000011/0003000	
    804	3519	29	0	0	1	--	69	0x1d	34	-128		1	-7649	4933	0000012/0003000	
    911	3984	30	0	0	1	--	69	0x1e	34	-128		1	-8107	4727	0000013/0003000	
    820	3586	28	0	0	1	--	69	0x1f	34	-128		1	-7489	4759	0000014/0003000	
    777	3398	28	0	0	1	--	69	0x00	34	-128		1	-7357	4867	0000015/0003000	
    694	3037	28	0	0	1	--	69	0x01	34	-128		1	-7141	5085	0000016/0003000	
    834	3647	28	0	0	1	--	69	0x02	34	-128		1	-7607	4773	0000017/0003000	
    800	3501	29	0	0	1	--	69	0x03	34	-128		1	-7591	4915	0000018/0003000	
    703	3077	28	0	0	1	--	69	0x04	34	-128		1	-7255	5127	0000019/0003000	
    890	3892	28	0	0	1	--	69	0x05	34	-128		1	-7733	4603	0000020/0003000	
    ... other data ...
    
    The mean measured distance is 815mm.
    
    2) Test n. 2, black panel target at 845mm distance
    INFO::Internal Cross talk Measurement Completed									
    I	Q	S	ScaledI	ScaledQ	tMain	tIlum	tMain(C)	tIlum(C)	Magnitd
    -8053	-427	0	-8053	-427	0	0	0	-128	26,4
    
    Illumination crosstalk from illumCrosstalk_TX1_h.txt
    Phase offset phaseOffset_TX1_h.txt
    
    Distmm	 Phase	Amplud	SigS	AmbS	HDR	--	Amb	Cntr	Tmain	Tillum   		LedCh Iin    Qin    	  Count/Total  			
    0	0	0	0	0	0	--	69	0x10	33	-128		0	-18	180	0000000/0003000	
    459	2010	34	0	0	1	--	69	0x12	33	-128		1	-8120	7150	0000001/0003000	
    418	1829	34	0	0	1	--	69	0x13	33	-128		1	-7844	7154	0000002/0003000	
    277	1212	35	0	0	1	--	69	0x14	34	-128		1	-7640	7770	0000003/0003000	
    487	2132	35	0	0	1	--	69	0x15	34	-128		1	-8288	7062	0000004/0003000	
    291	1273	34	0	0	1	--	69	0x16	34	-128		1	-7530	7570	0000005/0003000	
    423	1851	37	0	0	1	--	69	0x17	34	-128		1	-8600	7738	0000006/0003000	
    372	1627	38	0	0	1	--	69	0x18	34	-128		1	-8718	8190	0000007/0003000	
    483	2115	34	0	0	1	--	69	0x19	34	-128		1	-8080	6908	0000008/0003000	
    322	1409	36	0	0	1	--	69	0x1a	34	-128		1	-8060	7890	0000009/0003000	
    376	1648	35	0	0	1	--	69	0x1b	34	-128		1	-8160	7632	0000010/0003000	
    560	2451	35	0	0	1	--	69	0x1c	34	-128		1	-8592	6876	0000011/0003000	
    501	2193	36	0	0	1	--	69	0x1d	34	-128		1	-8674	7304	0000012/0003000	
    485	2123	36	0	0	1	--	69	0x1e	34	-128		1	-8610	7348	0000013/0003000	
    421	1843	36	0	0	1	--	69	0x1f	34	-128		1	-8338	7512	0000014/0003000	
    410	1797	36	0	0	1	--	69	0x00	34	-128		1	-8410	7644	0000015/0003000	
    359	1570	35	0	0	1	--	69	0x01	34	-128		1	-7956	7554	0000016/0003000	
    512	2242	35	0	0	1	--	69	0x02	34	-128		1	-8566	7146	0000017/0003000	
    326	1428	36	0	0	1	--	69	0x03	34	-128		1	-8218	8018	0000018/0003000	
    356	1558	36	0	0	1	--	69	0x04	34	-128		1	-8326	7924	0000019/0003000	
    459	2007	35	0	0	1	--	69	0x05	34	-128		1	-8240	7192	0000020/0003000	
    ... other data ...
    
    The mean measured distance is 417,5mm.
    
    3) Test n. 3, black panel target at 845mm distance
    INFO::Internal Cross talk Measurement Completed									
    I	Q	S	ScaledI	ScaledQ	tMain	tIlum	tMain(C)	tIlum(C)	Magnitd
    -7582	538	0	-7582	538	0	0	0	-128	24,7
    
    Illumination crosstalk from illumCrosstalk_TX1_h.txt
    Phase offset phaseOffset_TX1_h.txt
    
    Distmm	 Phase	Amplud	SigS	AmbS	HDR	--	Amb	Cntr	Tmain	Tillum   		LedCh Iin    Qin    	  Count/Total  			
    0	0	0	0	0	0	--	69	0x11	33	-128		0	-1435	161	0000000/0003000	
    913	3993	35	0	0	1	--	69	0x12	33	-128		1	-9559	5627	0000001/0003000	
    862	3773	34	0	0	1	--	69	0x13	33	-128		1	-9251	5711	0000002/0003000	
    802	3508	35	0	0	1	--	69	0x14	33	-128		1	-9185	5983	0000003/0003000	
    808	3536	36	0	0	1	--	69	0x15	34	-128		1	-9487	6095	0000004/0003000	
    689	3013	34	0	0	1	--	69	0x16	34	-128		1	-8601	6157	0000005/0003000	
    685	2996	33	0	0	1	--	69	0x17	34	-128		1	-8525	6123	0000006/0003000	
    859	3760	33	0	0	1	--	69	0x18	34	-128		1	-8997	5509	0000007/0003000	
    804	3519	36	0	0	1	--	69	0x19	34	-128		1	-9481	6113	0000008/0003000	
    703	3076	35	0	0	1	--	69	0x1a	34	-128		1	-8947	6323	0000009/0003000	
    691	3023	35	0	0	1	--	69	0x1b	34	-128		1	-8897	6353	0000010/0003000	
    951	4160	33	0	0	1	--	69	0x1c	34	-128		1	-9151	5133	0000011/0003000	
    780	3412	33	0	0	1	--	69	0x1d	34	-128		1	-8689	5731	0000012/0003000	
    874	3823	35	0	0	1	--	69	0x1e	34	-128		1	-9441	5703	0000013/0003000	
    706	3087	34	0	0	1	--	69	0x1f	34	-128		1	-8865	6251	0000014/0003000	
    796	3482	36	0	0	1	--	69	0x00	34	-128		1	-9467	6153	0000015/0003000	
    838	3666	31	0	0	1	--	69	0x01	34	-128		1	-8425	5263	0000016/0003000	
    750	3282	35	0	0	1	--	69	0x02	34	-128		1	-9177	6217	0000017/0003000	
    811	3547	35	0	0	1	--	69	0x03	34	-128		1	-9253	5933	0000018/0003000	
    804	3516	36	0	0	1	--	69	0x04	34	-128		1	-9415	6073	0000019/0003000	
    866	3789	36	0	0	1	--	69	0x05	34	-128		1	-9567	5823	0000020/0003000	
    ... other data ...
    
    The mean measured distance is 790,5mm.
    
    
    

  • I've calibrate a new device running SDK Step 1 with a reflective target, then I checked calibration measuring a black target at 850mm; I attach the full log.

    I've modified SDK to be able to repeat phase calibration measure to adjust the alignment between the reflective target and the device to reach an amplitude close to 16K or highest during step 1.

    Step1Calibration_and_LiveView.txt
     ==== ./opt3101_sdk_SHDR_18-18-35-35_setCT_170ma_step3_ag2 ===
    Operations Menu
      0:STEP0
      1:STEP1
      A:STEP1A
      2:STEP2
      3:STEP3
      4:STEP4
      5:IN PRODUCTION
      6:TESTING LIVE VIEW
      c:EXIT
    Press any Key to continue:
    1
    
    
     STEP 1
    INFO::Resetting Host
    INFO::Resetting Host 1
    INFO::Resetting Host 2
    INFO::Writing Initialization sequence I2C registers
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009225,-000306,0,-0009225,-0000306, 0000, 0000,     +00, -128.0000, 31.3
    
    INFO::Cover Photodiode with optical shied for illumination Cross talk measurement
    Press any Key to continue:
    INFO:Performing Illum Crosstalk for TX0 HDR 0
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +002312,+003247,0,+0002312,+0003247, 2320, 0000,     +34, -128.0000, 11.9
    
    INFO:Performing Illum Crosstalk for TX0 HDR 1
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +000149,+006538,0,+0000149,+0006538, 2320, 0000,     +34, -128.0000, 19.8
    
    INFO:Performing Illum Crosstalk for TX1 HDR 0
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009302,+019907,0,-0009302,+0019907, 2320, 0000,     +34, -128.0000, 69.9
    
    INFO:Performing Illum Crosstalk for TX1 HDR 1
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -022761,+028966,1,-0045522,+0057932, 2328, 0000,     +35, -128.0000,236.8
    
    INFO:Completed Illumination cross talk measurement for all channels
    INFO::Loading Illumination cross talk Set
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +002312,+003247,0,+0002312,+0003247, 2320, 0000,     +34, -128.0000, 11.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +000149,+006538,0,+0000149,+0006538, 2320, 0000,     +34, -128.0000, 19.8
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009302,+019907,0,-0009302,+0019907, 2320, 0000,     +34, -128.0000, 69.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -022761,+028966,1,-0045522,+0057932, 2328, 0000,     +35, -128.0000,236.8
    
    Set Target to distance [0180]mm
    Press any Key to continue:
    
    INFO:Performing Phase Offset for TX0 HDR 0 @ ref Distance 180mm
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016795,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17581,09359,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016785,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17571,09787,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016783,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17569,10609,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016811,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17597,09261,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016801,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17587,09644,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016780,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17566,10740,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016777,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17563,10222,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016786,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17572,07907,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016760,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17546,10499,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    016788,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17574,08843,    0,    0,070, 2320, 0000,     +34,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015537,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16323,15627,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    c
    Set Target to distance [0180]mm
    Press any Key to continue:
    INFO:Performing Phase Offset for TX0 HDR 1 @ ref Distance 180mm
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015554,000786,     1,    04, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16340,15570,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015553,000786,     1,    04, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16339,15573,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015561,000786,     1,    04, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16347,16977,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    c
    Set Target to distance [0350]mm
    Press any Key to continue:
    INFO:Performing Phase Offset for TX1 HDR 0 @ ref Distance 350mm
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    014815,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16345,16982,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015555,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17085,11140,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015575,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17105,09290,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015554,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17084,12587,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015549,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17079,15194,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015559,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17089,15226,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015546,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17076,16691,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    c
    Set Target to distance [0350]mm
    Press any Key to continue:
    INFO:Performing Phase Offset for TX1 HDR 1 @ ref Distance 350mm
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015547,001530,     0,    31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17077,16692,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015549,001530,     0,    31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17079,16701,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
      c:Next Distance
    Press any Key to repeate meaure:
    c
    INFO::Loading Phase Offset Set
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015537,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16323,15627,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015561,000786,     1,    04, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16347,16977,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015546,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17076,16691,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015549,001530,     0,    31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17079,16701,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    INFO::Completed First Time bring up
    INFO::Resetting Host
    INFO::Resetting Host 1
    INFO::Resetting Host 2
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -007979,+000228,0,-0007979,+0000228, 0000, 0000,     +00, -128.0000, 26.3
    
    INFO::Loading Illumination cross talk Set
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +002312,+003247,0,+0002312,+0003247, 2320, 0000,     +34, -128.0000, 11.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +000149,+006538,0,+0000149,+0006538, 2320, 0000,     +34, -128.0000, 19.8
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009302,+019907,0,-0009302,+0019907, 2320, 0000,     +34, -128.0000, 69.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -022761,+028966,1,-0045522,+0057932, 2328, 0000,     +35, -128.0000,236.8
    
    INFO::Loading Illumination crosstalk Temperature Coefficient Set
    INFO::Loading Illumination cross talk Set
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +002312,+003247,0,+0002312,+0003247, 2320, 0000,     +34, -128.0000, 11.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +000149,+006538,0,+0000149,+0006538, 2320, 0000,     +34, -128.0000, 19.8
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009302,+019907,0,-0009302,+0019907, 2320, 0000,     +34, -128.0000, 69.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -022761,+028966,1,-0045522,+0057932, 2328, 0000,     +35, -128.0000,236.8
    
    INFO::Loading Phase Offset Set
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015537,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16323,15627,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015561,000786,     1,    04, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16347,16977,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015546,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17076,16691,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015549,001530,     0,    31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17079,16701,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    INFO::Loading Phase Temperature coefficient Set
    INFO::Loading Phase Ambient Coefficient Set
    
    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum   |LedCh Iin    Qin    |  Count/Total  |
    |001174,005135,0012^C,   0,   0,  1|--|000345,001510,016735,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x05,  +35,-128.0000||1,-122179,107296|0000020/0003000|
    root@cyclo:~#
    root@cyclo:~#
    root@cyclo:~# ./opt3101_sdk_SHDR_18-18-35-35_setCT_170ma_step3_scroll_ag2
    -------------------------------
    Starting Main Program Execution
    -------------------------------
    INFO::Validating I2C Transaction
    INFO::I2C Transaction Successful
    INFO::Validating OPT3101 Design ID
    INFO::Design ID 0xc01000100411 Verified
    
    
     ==== ./opt3101_sdk_SHDR_18-18-35-35_setCT_170ma_step3_scroll_ag2 ===
    Operations Menu
      0:STEP0
      1:STEP1
      A:STEP1A
      2:STEP2
      3:STEP3
      4:STEP4
      5:IN PRODUCTION
      6:TESTING LIVE VIEW
      c:EXIT
    Press any Key to continue:
    6
    
    
     LIVE TEST
    INFO::Resetting Host
    INFO::Resetting Host 1
    INFO::Resetting Host 2
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -007737,+001492,0,-0007737,+0001492, 0000, 0000,     +00, -128.0000, 26.5
    
    INFO::Loading Illumination cross talk Set
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +002312,+003247,0,+0002312,+0003247, 2320, 0000,     +34, -128.0000, 11.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +000149,+006538,0,+0000149,+0006538, 2320, 0000,     +34, -128.0000, 19.8
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009302,+019907,0,-0009302,+0019907, 2320, 0000,     +34, -128.0000, 69.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -022761,+028966,1,-0045522,+0057932, 2328, 0000,     +35, -128.0000,236.8
    
    INFO::Loading Illumination crosstalk Temperature Coefficient Set
    INFO::Loading Illumination cross talk Set
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +002312,+003247,0,+0002312,+0003247, 2320, 0000,     +34, -128.0000, 11.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX0_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +000149,+006538,0,+0000149,+0006538, 2320, 0000,     +34, -128.0000, 19.8
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_l.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -009302,+019907,0,-0009302,+0019907, 2320, 0000,     +34, -128.0000, 69.9
    
    reading /home/bticino/cfg/extra/proximity//illumCrosstalk_TX1_h.txt
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -022761,+028966,1,-0045522,+0057932, 2328, 0000,     +35, -128.0000,236.8
    
    INFO::Loading Phase Offset Set
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_l.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015537,000786,     0,    01, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16323,15627,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX0_h.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015561,000786,     1,    04, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    16347,16977,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_l.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015546,001530,     1,    13, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17076,16691,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    Phase - reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    reading /home/bticino/cfg/extra/proximity//phaseOffset_TX1_h.txt
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    015549,001530,     0,    31, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin,  tIlum(C)
    17079,16701,    0,    0,069, 2328, 0000,     +35,00000,00000, -128.0000
    
    INFO::Loading Phase Temperature coefficient Set
    INFO::Loading Phase Ambient Coefficient Set
    
    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum   |LedCh Iin    Qin    |  Count/Total  |
    |003077,013455,000000,   0,   0,  0|--|000000,000000,000000,   0,   0,  0|--|000000,000000,000000,   0,   0,  0|--|069,0x10,  +33,-128.0000| 0    ,-00058,000107|0000000/0003000|
    |002040,008922,000012,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|000000,000000,000000,   0,   0,  0|--|069,0x11,  +33,-128.0000| 0    ,-03914,000059|0000001/0003000|
    |002040,008922,000012,   0,   0,  1|--|001104,004827,000051,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x12,  +34,-128.0000| 1    ,-14814,006395|0000002/0003000|
    |002040,008922,000012,   0,   0,  1|--|000924,004041,000048,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x13,  +34,-128.0000| 1    ,-13226,006935|0000003/0003000|
    |002040,008922,000012,   0,   0,  1|--|000843,003689,000047,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x14,  +34,-128.0000| 1    ,-13604,007225|0000004/0003000|
    |002040,008922,000012,   0,   0,  1|--|000831,003634,000048,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x16,  +34,-128.0000| 1    ,-12964,007455|0000005/0003000|
    |002040,008922,000012,   0,   0,  1|--|000951,004162,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x17,  +34,-128.0000| 1    ,-14044,007155|0000006/0003000|
    |002040,008922,000012,   0,   0,  1|--|000913,003995,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x18,  +34,-128.0000| 1    ,-13684,007251|0000007/0003000|
    |002040,008922,000012,   0,   0,  1|--|000832,003640,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x19,  +34,-128.0000| 1    ,-13476,007741|0000008/0003000|
    |002040,008922,000012,   0,   0,  1|--|000869,003800,000048,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x1a,  +34,-128.0000| 1    ,-13194,007311|0000009/0003000|
    |002040,008922,000012,   0,   0,  1|--|000946,004137,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x1b,  +34,-128.0000| 1    ,-13748,007049|0000010/0003000|
    |002040,008922,000012,   0,   0,  1|--|000853,003732,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x1c,  +34,-128.0000| 1    ,-13648,007635|0000011/0003000|
    |002040,008922,000012,   0,   0,  1|--|000815,003564,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x1d,  +35,-128.0000| 1    ,-13430,007755|0000012/0003000|
    |002040,008922,000012,   0,   0,  1|--|000846,003701,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x1e,  +35,-128.0000| 1    ,-13472,007545|0000013/0003000|
    |002040,008922,000012,   0,   0,  1|--|000883,003864,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x1f,  +35,-128.0000| 1    ,-13604,007341|0000014/0003000|
    |002040,008922,000012,   0,   0,  1|--|000948,004149,000048,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x00,  +35,-128.0000| 1    ,-13370,006753|0000015/0003000|
    |002040,008922,000012,   0,   0,  1|--|000843,003689,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x01,  +35,-128.0000| 1    ,-13302,007471|0000016/0003000|
    |002040,008922,000012,   0,   0,  1|--|000868,003797,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x02,  +35,-128.0000| 1    ,-13506,007403|0000017/0003000|
    |002040,008922,000012,   0,   0,  1|--|000899,003931,000051,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x03,  +35,-128.0000| 1    ,-14094,007489|0000018/0003000|
    |002040,008922,000012,   0,   0,  1|--|000984,004305,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x04,  +35,-128.0000| 1    ,-14156,006889|0000019/0003000|
    |002040,008922,000012,   0,   0,  1|--|000831,003635,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x05,  +35,-128.0000| 1    ,-13342,007585|0000020/0003000|
    |002040,008922,000012,   0,   0,  1|--|000889,003889,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x06,  +35,-128.0000| 1    ,-13892,007455|0000021/0003000|
    |002040,008922,000012,   0,   0,  1|--|000873,003817,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x07,  +35,-128.0000| 1    ,-13406,007315|0000022/0003000|
    |002040,008922,000012,   0,   0,  1|--|000873,003819,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x08,  +35,-128.0000| 1    ,-13418,007317|0000023/0003000|
    |002040,008922,000012,   0,   0,  1|--|000905,003958,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x09,  +35,-128.0000| 1    ,-13610,007189|0000024/0003000|
    |002040,008922,000012,   0,   0,  1|--|000823,003599,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x0a,  +35,-128.0000| 1    ,-13396,007677|0000025/0003000|
    |002040,008922,000012,   0,   0,  1|--|000781,003415,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x0b,  +35,-128.0000| 1    ,-13342,007961|0000026/0003000|
    |002040,008922,000012,   0,   0,  1|--|000925,004045,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x0c,  +35,-128.0000| 1    ,-14066,007279|0000027/0003000|
    |002040,008922,000012,   0,   0,  1|--|000907,003970,000047,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x0d,  +35,-128.0000| 1    ,-13176,006941|0000028/0003000|
    |002040,008922,000012,   0,   0,  1|--|000748,003274,000049,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x0e,  +35,-128.0000| 1    ,-13150,008089|0000029/0003000|
    |002040,008922,000012,   0,   0,  1|--|000777,003399,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x0f,  +35,-128.0000| 1    ,-13420,008035|0000030/0003000|
    |002040,008922,000012,   0,   0,  1|--|000886,003874,000050,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|069,0x10,  +35,-128.0000| 1    ,-13896,007481|0000031/0003000|
    ^C
    root@cyclo:~#

  • Roberto,

      During calibrartion are you setting a current and distance for TX0 and TX1, before the actual calibration? Non HDR modes use TX0 and TX1 to calibrate distance. 

    I have our programmer looking at this.

  • This is the configuration I used

    Phase Offset for TX0 HDR 0 @ ref Distance 180mm,

    Phase Offset for TX0 HDR 1 @ ref Distance 180mm,

    Phase Offset for TX1 HDR 0 @ ref Distance 350mm,

    Phase Offset for TX1 HDR 1 @ ref Distance 350mm

  • Roberto,

      The distances have to be manually set for proper calibration. Based on the emitter and photo detector you select you will have to set the current for TX0, TX1, TX2 and TX3. Each current will have to be turned on manually, then setup a back ground material of either white or black, move it forward and backwards until you measure between 19000 and 24000 ambient codes (LSB). Then record the current and the distance for each setting. 

    Using the OPT3101EVM with the MSP430F5529LP hardware, open the INLAB_step_1 condition in the SDK to compile.

    After you have set the distance for each current then you can begin the calibration for distance. If you have not done this it will not be calibrated properly. 

    From the values you show, you have not completed this process. Please take a look at this calibration process again.

  • Each current will have to be turned on manually

    I did two different tests to understand.

    1) Device with SFH4550 and TEMD1000

    As I wrote in message above,  I tried to set a configuration to do just one current with a dedicated SDK configuration (using only TX0).

    Settings for first current level

    and the same for the other three currents

    It is not possible to have the required illumination level with white or black targets, I need to use a reflective one.

    For example if I run SDK STEP0 with a white target at 350mm you ca see an amplitude level of about 1490 codes (with 173.6mA !); I added a LED active channel info (LedCh) and seems that program drives alternatively LED0 and LED2 (why ? TX2 was not checked).

    INFO::Internal Cross talk Measurement Completed
    I, Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C), tIlum(C),Magnitd
    -009490,+001598,0,-0009490,+0001598, 0000, 0000, +00, -128.0000, 31.7


    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum |LedCh Iin Qin | Count/Total |
    |000000,000000,000000, 0, 0, 0|--|000000,000000,000000, 0, 0, 0|--|009514,041602,000001, 0, 0, 1|--|065,0x10, +29,-128.0000| 2 ,000021,-00359|0000000/0003000|
    |003723,016280,001492, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|009514,041602,000001, 0, 0, 1|--|065,0x11, +30,-128.0000| 0 ,-81214,082837|0000001/0003000|
    |003723,016280,001492, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012578,054997,000010, 0, 0, 1|--|065,0x12, +30,-128.0000| 2 ,003199,-00733|0000002/0003000|
    |003724,016286,001491, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012578,054997,000010, 0, 0, 1|--|065,0x13, +30,-128.0000| 0 ,-81233,082753|0000003/0003000|
    |003724,016286,001491, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012593,055062,000011, 0, 0, 1|--|065,0x14, +30,-128.0000| 2 ,003509,-00781|0000004/0003000|
    |003727,016296,001489, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012593,055062,000011, 0, 0, 1|--|065,0x15, +30,-128.0000| 0 ,-81184,082536|0000005/0003000|
    |003727,016296,001489, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012680,055443,000012, 0, 0, 1|--|065,0x16, +30,-128.0000| 2 ,003719,-00685|0000006/0003000|
    |003724,016285,001489, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012680,055443,000012, 0, 0, 1|--|065,0x17, +30,-128.0000| 0 ,-81091,082622|0000007/0003000|
    |003724,016285,001489, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012258,053599,000011, 0, 0, 1|--|065,0x18, +30,-128.0000| 2 ,003309,-01243|0000008/0003000|
    |003725,016290,001486, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012258,053599,000011, 0, 0, 1|--|065,0x19, +30,-128.0000| 0 ,-80971,082427|0000009/0003000|
    |003725,016290,001486, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012235,053496,000011, 0, 0, 1|--|065,0x1a, +30,-128.0000| 2 ,003387,-01311|0000010/0003000|


    Also at 100mm amplitude is about 12300, lower than 16000.

    INFO::Internal Cross talk Measurement Completed
    I, Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C), tIlum(C),Magnitd
    -008559,+000394,0,-0008559,+0000394, 0000, 0000, +00, -128.0000, 28.0


    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum |LedCh Iin Qin | Count/Total |
    |000000,000000,000000, 0, 0, 0|--|000000,000000,000000, 0, 0, 0|--|002055,008987,000000, 0, 0, 1|--|065,0x10, +31,-128.0000| 2 ,-00016,000187|0000000/0003000|
    |003575,015634,012315, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|002055,008987,000000, 0, 0, 1|--|065,0x11, +32,-128.0000| 0 ,-78325,090464|0000001/0003000|
    |003575,015634,012315, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012050,052690,000007, 0, 0, 1|--|065,0x12, +31,-128.0000| 2 ,002220,-01063|0000002/0003000|
    |003576,015639,012306, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012050,052690,000007, 0, 0, 1|--|065,0x13, +32,-128.0000| 0 ,-78317,090355|0000003/0003000|
    |003576,015639,012306, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012339,053950,000005, 0, 0, 1|--|065,0x14, +32,-128.0000| 2 ,001502,-00509|0000004/0003000|
    |003577,015643,012301, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012339,053950,000005, 0, 0, 1|--|065,0x15, +32,-128.0000| 0 ,-78311,090285|0000005/0003000|
    |003577,015643,012301, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011864,051873,000007, 0, 0, 1|--|065,0x16, +32,-128.0000| 2 ,001952,-01129|0000006/0003000|
    |003578,015646,012294, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011864,051873,000007, 0, 0, 1|--|065,0x17, +32,-128.0000| 0 ,-78294,090217|0000007/0003000|
    |003578,015646,012294, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012374,054104,000006, 0, 0, 1|--|065,0x18, +32,-128.0000| 2 ,001786,-00573|0000008/0003000|
    |003578,015647,012286, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012374,054104,000006, 0, 0, 1|--|065,0x19, +32,-128.0000| 0 ,-78256,090151|0000009/0003000|
    |003578,015647,012286, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012649,055305,000007, 0, 0, 1|--|065,0x1a, +32,-128.0000| 2 ,002302,-00457|0000010/0003000|

    To overcome 16000 I need to move the device at 8cm, but not all devices reach such level at 8cm.

    INFO::Internal Cross talk Measurement Completed
    I, Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C), tIlum(C),Magnitd
    -009744,+000511,0,-0009744,+0000511, 0000, 0000, +00, -128.0000, 32.9


    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum |LedCh Iin Qin | Count/Total |
    |000000,000000,000000, 0, 0, 0|--|000000,000000,000000, 0, 0, 0|--|012356,054024,000001, 0, 0, 1|--|065,0x10, +36,-128.0000| 2 ,000313,-00102|0000000/0003000|
    |003610,015786,016732, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012356,054024,000001, 0, 0, 1|--|065,0x11, +36,-128.0000| 0 ,-108200,121339|0000001/0003000|
    |003610,015786,016732, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011540,050459,000005, 0, 0, 1|--|065,0x12, +36,-128.0000| 2 ,001351,-01048|0000002/0003000|
    |003611,015790,016719, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011540,050459,000005, 0, 0, 1|--|065,0x13, +36,-128.0000| 0 ,-108154,121214|0000003/0003000|
    |003611,015790,016719, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011754,051396,000008, 0, 0, 1|--|065,0x14, +36,-128.0000| 2 ,002143,-01376|0000004/0003000|
    |003611,015792,016701, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011754,051396,000008, 0, 0, 1|--|065,0x15, +37,-128.0000| 0 ,-108074,121052|0000005/0003000|
    |003611,015792,016701, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012418,054298,000004, 0, 0, 1|--|065,0x16, +36,-128.0000| 2 ,001343,-00404|0000006/0003000|
    |003612,015796,016699, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012418,054298,000004, 0, 0, 1|--|065,0x17, +37,-128.0000| 0 ,-108104,120996|0000007/0003000|
    |003612,015796,016699, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011406,049871,000006, 0, 0, 1|--|065,0x18, +36,-128.0000| 2 ,001575,-01372|0000008/0003000|
    |003612,015797,016692, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|011406,049871,000006, 0, 0, 1|--|065,0x19, +37,-128.0000| 0 ,-108074,120934|0000009/0003000|
    |003612,015797,016692, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|012458,054473,000005, 0, 0, 1|--|065,0x1a, +36,-128.0000| 2 ,001743,-00492|0000010/0003000|

    For my device the green lines are IR LED half angle (3°): IR led light cone is inside photodiode cone starting from 13cm, so I think it is better not to move the target too close to the device. Is it correct ?

    With a reflective target, if target and photodiode are correctly aligned amplitude higher than 16000 can be reached also at 35cm.

    2) Device with SFH4550 and SFH213FA

    I reworked the device changing the photodiode from TEMD1000 to SFH213FA, the same of OPT3101EVM.

    Now I can measure higher level also with a white target.

    TX0 HDR 0 @ ref Distance 40mm, amplitude is 5457 (!)

    TX0 HDR 1 @ ref Distance 80mm, amplitude is 17150

    TX1 HDR 0 @ ref Distance 170mm, amplitude is 20860

    TX1 HDR 1 @ ref Distance 300mm, amplitude is 20600

    For lower current is not possible to have higher amplitude, if the target is brought closer the amplitude decreases, so it is needed a reflective target.

    TX0 HDR 0 @ ref Distance 80mm, amplitude is 18550 with a reflective target.


    Which is a suitable calibration setup with TEMD1000 ?

    Should I change the photodiode to SFH213FA ?

  • Roberto,

      Since you have AutoHDR turned on you will be calibrating across all four quadrants. (TX0, TX1, TX2, and TX3) Did you use four currents and four distances to keep the ampilitude at approximatly 19000 to 24000 codes and setup the calibration code file with these numbers?

    Typically this is the reason for color and accuracy measurment issues after calibration. 

  • Roberto,

    What are your currents for each TXn. 

  • What are your currents for each TXn. 

    TX0 HDR 0        5.6 mA

    TX0 HDR 1      16.8 mA

    TX0 HDR 0      54.6 mA

    TX0 HDR 0     173.6 mA

    Did you use four currents and four distances ... ?

    I've used an SDK configuration with SuperHDR Mode checked.  Running SDK step 1 the Phase offset calibration requires 4 measure, one measure for each current, indeed from function

    void OPT3101::device::measurePhaseOffsetSet(bool saveToFile)

    // Loop to iterate over all TX channels
    for (c0 = 0; c0 < 3; c0++) { ///* Loops though all the valid TX channel and register set configurations
    if (this->configurationFlags_isTXChannelActive[c0]) { // Checking is TX channel is active for this profile
    for (c1 = 0; c1 < 2; c1++) { // Loop to iterate over the H/L registers
    if (this->configurationFlags_isRegisterSetActive[c1]) { // Checking if registers are active for this profile
    refDistanceInMM=envController.refDistancesInMM[c0][c1];

    ...

    this->measurePhaseOffset(&this->calibration->phaseOffset[c0][c1], c0, c1 ? 'h' : 'l', refDistanceInCodes);

    ...

    I use a retroreflective target with TEMD1000 

    TX0 HDR 0 @ ref Distance 180mm, amplitude is 15627

    TX0 HDR 1 @ ref Distance 180mm, amplitude is 16977

    TX1 HDR 0 @ ref Distance 350mm, amplitude is 16691

    TX1 HDR 1 @ ref Distance 350mm, amplitude is 16701

    I don't know why, but Amplitude are very similar with different current.

    I have added a while cycle to repeat the measure in function

    void OPT3101::device::measurePhaseOffsetSet(bool saveToFile) 

    because sometimes I need to manually adjust the target position a little (with retroreflective target).

    The code is:

    host.printf("INFO:Performing Phase Offset for TX%d HDR %d @ ref Distance %dmm\r\n",c0,c1,refDistanceInMM);
    + while (1) {
    this->measurePhaseOffset(&this->calibration->phaseOffset[c0][c1], c0, c1 ? 'h' : 'l', refDistanceInCodes); ///* Measures phase offset ...
    this->calibration->phaseOffset[c0][c1].printHeader();
    this->calibration->phaseOffset[c0][c1].print();
    host.printf("\r\n");
    + host.printf(" c:Next Distance\n");
    + host.pause();^M
    + if (host.buffer[0] == 'c' || host.buffer[0] == 'C')
    + break;
    + }

    if(saveToFile) ...

    I did also a test with SFH213FA, but only to verify amplitude that is 12 times greater than with TEMD1000 in calibration distance range, so that a device mounting SFH213FA can be calibrated with white panel as target (white panel position is less critical than retroreflective panel):

    TX0 HDR 0 @ ref Distance 40mm, amplitude is 5457 (!)

    TX0 HDR 1 @ ref Distance 80mm, amplitude is 17150

    TX1 HDR 0 @ ref Distance 170mm, amplitude is 20860

    TX1 HDR 1 @ ref Distance 300mm, amplitude is 20600

    I haven't done a calibration with SFH213FA because it is a THT component and my device mount an SMD component, a TEMD1000 photodiode.

    I need to define a stable calibration setup with TEMD1000, if it is possible.

  • Roberto,

    What distance are you attempting to measure? What is the field of view you want to have?

    The SFH4550 has a half angle of 3 degrees as the emitter. That mean that it will not have a wide field of view. The TEMD1000 is not a good part for time of flight. The Area of the PD is 0.23mm^2. That means that you will need a lot more light from the emitter to work. The error will be 30mm at 500mm distance and it explains why you are having trouble calibrating. 

    You will not be able to get a valid calibration with a retroreflective surface. It really needs to be a glossy white and a flat black surface. 

    I ran the System Estimator on your parts. It looks like an emitter part that may fit your needs is a SFH 4259-UV1. It may have a wider field of view than you need but there were others with a narrower field of view. Try a SFH 2500 FA-EN for a photo diode. 

    If you let me know your requirements and specs I can help to find a good set of emitter and photodiode. I do not believe the TEMD1000 will meet your requirements or ever calibrate correctly for any distance. 

  • Thanks Gordon for your explanation, the photodiode seems critical to me too.

    > What distance are you attempting to measure? What is the field of view you want to have?
    I need to measure the presence of a person in a range between 100mm to 1000m, no great precision required, even a total error of 50-100mm at 500mm can be acceptable. People are normally in front of the device.

    Initially I tried to simplify the project using SMD components (TEMD1000 and LTE-C9506B as IR LED) and avoiding EMI Isolation Rings, but I have large errors, so I thought to increase led power and also reduce noise from background reflection reducing LED FOV, so I tested SFH4550. I can try leds with different FOV.

    > SFH 2500 FA-EN for a photo diode
    it is a side view photodiode, I need a bottom or top view one.

    If it is possible I would mount SMD led and photodiode and don't use an EMI isolation ring.

  • Roberto,

      Let me look for options for you. I feel like 30-45 degree angle in a surface monut package would be your best option. 

    A very important consideration that you need to think about. The emitter and photodetector can't see each other directly or you will have optical cross talk. 

    I will have something for you shortly.

  • Roberto,

    Take a look at VEMD6110X01

    I'm still looking

  • Thanks, I'll try it

  • Roberto,

      Also look at SFH 2400 FA-EN.

  • Roberto,

      also take a look at NJL6414R. This one has a lower price point. It has a larger 1.5mm2 die surface area, that would make it more sensitive. The only draw back is it has a 12.5pf capacitance. 

    I have not tried this part but I am very intreged myself. Remember to match the parallel capacitance for any photo detector in your circuit. 

  • I tried THT components SNF 4550 and SNF 213FA, but I'm not able to obtain a valid calibration. Setup is made with a white panel and amplitude level > 16000, with distance 180mm, 180mm, 350mm and 350mm.

    At 350 mm the measure is about 345mm but if I measure a panel at 850mm measure is more than 5400mm for a black panel and about 1690mm for a white panel.

    Channel used is always n. 1 whit high current.

    |000884,003869,001333, 0, 0, 1|--|000346,001515,015998, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|065,0x00, +33,-128.0000| 1 ,-42659,064966|0000015/0003000|
    |000884,003869,001333, 0, 0, 1|--|000347,001520,015944, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|065,0x01, +33,-128.0000| 1 ,-85085,129459|0000016/0003000|
    |000884,003869,001333, 0, 0, 1|--|000342,001498,016207, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|065,0x02, +33,-128.0000| 1 ,-43104,065887|0000017/0003000|
    |000884,003869,001333, 0, 0, 1|--|004501,019680,000988, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|065,0x03, +33,-128.0000| 1 ,-56126,-52472|0000018/0003000|
    |000884,003869,001333, 0, 0, 1|--|005422,023710,001215, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|065,0x04, +33,-128.0000| 1 ,-39611,-85748|0000019/0003000|
    |000884,003869,001333, 0, 0, 1|--|005426,023724,001215, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|065,0x05, +33,-128.0000| 1 ,-39515,-85848|0000020/0003000|

    |000873,003819,001669,   0,   0,  1|--|001689,007387,002910,   0,   0,  1|--|000000,000000,000000,   0,   0,  0|--|065,0x09,  +36,-128.0000| 1    ,-102949,046827|0000086/0003000|

    Thanks

    Best Regards

  • NB: I changed C to 6pF.

  • Roberto,

    What are your currents for TX0-TX3.

    TXn          Current         Distance

    TX0              ?               180mm

    TX1              ?               180mm

    TX2              ?               350mm

    TX3              ?               350mm

  • I catch now what do you mean !

    I thought that SDK set the expected currents for each calibration distance, but instead they depend on the amplitude value, so I redefined reference distances (and I checked that for each distance expected current is set).

    TXn          Current         Distance

    TX0_L             5.6              45mm

    TX0_H           16.8              90mm

    TX1_L           54.6            200mm

    TX1_H         173.6            360mm

    For TX0_H, TX1_L and TX1_H calibration amplitude is about 16K, for TX0_L is about 5800 (the max value I can have with a white target).

    Calibration seems good for the first three value, but not for TX1_H: 

    moving away from 360mm the measure increase too much.

    For example 

    Distmm, Phase,  Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum |
    001411,  006171, 003080,     0,       0,      1|--|065,0x05, +34,-128.0000| --> White target at 850mm
    004542,  019861, 001132,     0,       0,      1|--|065,0x1b, +34,-128.0000| --> Black target at 850mm
    000358,  001568, 017049,    0,       0,       1|--|065,0x0a, +34,-128.0000| --> White target at 360mm

    It seems that distance is influenced by amplitude.

  • Roberto,

      The currents do not apear to be correct. Where did they come from? Are you using the "Configurator Tool" to get your currents and setup the calibration procedure for your setup1? - For your informtion if the currents selected and the amplitudes do not fall into the required areas the calibration will not work. 

  • Are you using the "Configurator Tool" to get your currents and setup the calibration procedure for your setup1? 

    yes, with Super HDR ratio 32, see image previously attached.

    Excluding the first current value that requires too close a distance (non-overlapping FOV), for other current values the target is into FOV of both LED and Photodiode.

  • In file OPT3101device_Functions.cpp

    version 0.9.1

    function 

    void OPT3101::frameData::populateWithMean(OPT3101::frameData *inputData, uint16_t nFrames)

    there are 2 errors:

    1) else branch of if(nFrames>1) without statement, better with this->phaseovl = 0; initialization;

    2) for cycle with inputData[0] not indexed with c0.

  • Roberto,

      If you have a current that is making the reflective surface to close or the amplitude to high then that is when you need to use the black non-reflective surface as your background. The currents that are set by the configurator tool should never be changed. The tool makes sure that you are calibrating in all 4 quadrants. If you change a current then you may not be calibrating in all quadrants. This would cause an error anytime you are measuring in the quadrant or specific distance. 

  • Roberto,

      I am talking to the programmer to understand these errors. I will have feedback asap. 

  • I added some prints to have more information on the current used in the phase calibration and measurement.

    Info for phase offset check:

    in the log below ignore 

     nT0L, nT0H, nT1L, nT1H, nT2L, nT2H; 

    With ledCh, illumDac  values I can verify that the measure is related to TX1_H current and not to TX0 HDR 0 as reported in the log.

    Set Target to distance [0045]mm
    Press any Key to continue:
    
    INFO:Performing Phase Offset for TX0 HDR 0 @ ref Distance 45mm
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt, nT0L, nT0H, nT1L, nT1H, nT2L, nT2H, ledCh, illumDac
    040729,000196, 0, 01, 16384, 0000, 0000, 0000, 0001, 0000, 0000, 01, 01
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),Iin,Qin, tIlum(C)
    40925,01703, 0, 0,071, 2320, 0000, +34,00000,00000, -128.0000

    Also for live view I added LedCh to show which Distmm column is updated

    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum |LedCh, Iin Qin| Count/Total |
    |000000,000000,000000, 0, 0, 0|--|009320,040753,001689, 0, 0, 1|--|000000,000000,000000, 0, 0, 0|--|071,0x12, +32,-128.0000| 1 ,-01296,-65647|0000000/0003000|

    I attach the code related to

    OPT3101frameData.h

    OPT3101device_Functions.cpp

    OPT3101PhaseOffset.cpp

    to add the prints.

    +++ b/sbac203b/release_0p9p1/OPT3101_SDK/OPT3101frameData.h
                            uint16_t tmain; ///< value of internal temp sensor read from register OPT3101::registers::tmain
    +                       int32_t Iin;
    +                       int32_t Qin;
                            uint16_t tillum; ///< value of external temp sensor read using the I2C Master. Same as OPT3101::registers::tillum
    +                       // statistics
    +                       uint16_t txLedillumDacHiCnt[3][2]; // [OPT3101::registers::tx_channel, OPT3101::registers::hdr_mode] counters
                            /*!
                            * \brief initializes the members to 0
                            *
    
    
    +++ b/sbac203b/release_0p9p1/OPT3101_SDK/OPT3101device_Functions.cpp
    @@ -44,7 +44,7 @@ void OPT3101::device::liveDataView(uint32_t nFrames,uint32_t refreshDelayinms,bo
            host.printf("\r\n");
            for(c1=0;c1<3;c1++)
                    host.printf("|Distmm, Phase,Amplud,SigS,AmbS,HDR|--");
    -       host.printf("|Amb,Cntr,Tmain,Tillum   |  Count/Total  |");
    +       host.printf("|Amb,Cntr,Tmain,Tillum   |LedCh,     Iin    Qin|  Count/Total  |");^M
            host.printf("\r\n");
            for(c0=0;c0<nFrames;c0++){
                    data.capture(&host, this,this->calibration->extTempSensor_connected);
    @@ -66,6 +66,9 @@ void OPT3101::device::liveDataView(uint32_t nFrames,uint32_t refreshDelayinms,bo
                    host.printf("0x%02x,",data.frameCounter);
                    host.printf("  %+03d,",(int32_t) (((int32_t)data.tmain>>3)-256));
                    host.printf("%+07.4f|",((double)data.tillum/16-128));
    +               host.printf(" %01d   ,",data.ledChannel);^M
    +               host.printf("%06d,",data.Iin);^M
    +               host.printf("%06d|",data.Qin);^M
                    host.printf("%07u",c0);
                    host.printf("/%07u|\r",nFrames);
                    if(scroll)
    
    @@ -731,7 +755,27 @@ void OPT3101::frameData::populateWithMean(OPT3101::frameData *inputData, uint16_
                    this->sigovl |= inputData[0].sigovl;
            }
    
    +       // tx_channel and hdr_mode^M
    +               int16_t illHDAC;^M
    +               int16_t TxCh;^M
    +       for (c0 = 0; c0 < nFrames; c0++) {^M
    +       //              host.printf("c0=%d ", c0);^M
    +               // reset counters^M
    +               if(c0==0)^M
    +                       for (int ii = 0; ii < 3; ii++) {^M
    +                               this->txLedillumDacHiCnt[ii][0]=0;^M
    +                               this->txLedillumDacHiCnt[ii][1]=0;^M
    +                       }^M
    +^M
    +               if(inputData[c0].illumDac) // hdr_mode^M
    +                       illHDAC=1;^M
    +               else^M
    +                       illHDAC=0;^M
    
    +               TxCh=inputData[c0].ledChannel;^M
    +               // if (inputData[c0].ledChannel>=0 && inputData[c0].ledChannel<3) // tx_channel^M
    +                       this->txLedillumDacHiCnt[TxCh][illHDAC]=this->txLedillumDacHiCnt[TxCh][illHDAC] + 1;^M
    +       }^M
            // Mean of phase if found
            accum = 0; ///* Accumulates and measures mean for all the input class instance members and assigns them to the method's class members
            for (c0 = 0; c0 < nFrames; c0++)
    @@ -865,10 +909,16 @@ void OPT3101::device::measurePhaseOffsetSet(bool saveToFile) {
                                            envController.setTargetDistance(refDistanceInMM); ///* Calls environmentalController::setTargetDistance method with the specified distance
                                            refDistanceInCodes = (refDistanceInMM * 4477) >> 10; ///* Converts the reference distance specified in codes related to OPT3101::frameData::phase ADC codes
                                            host.printf("INFO:Performing Phase Offset for TX%d HDR %d @ ref Distance %dmm\r\n",c0,c1,refDistanceInMM);
    +                               while (1) {^M
                                            this->measurePhaseOffset(&this->calibration->phaseOffset[c0][c1], c0, c1 ? 'h' : 'l', refDistanceInCodes); ///* Measures phase offset by calling method OPT3101::device::measurePhaseOffset with specified reference distance and OPT3101::calibrationC::phaseOffset as argument to store the phase offset values
                                            this->calibration->phaseOffset[c0][c1].printHeader();
                                            this->calibration->phaseOffset[c0][c1].print();
                                            host.printf("\r\n");
    +                               host.printf("  c:Next Distance\n");^M
    +                               host.pause();^M
    +                               if (host.buffer[0] == 'c' || host.buffer[0] == 'C')^M
    +                                       break;^M
    +                               }^M
    
                                            if(saveToFile){
    
    
    
    +++ b/sbac203b/release_0p9p1/OPT3101_SDK/OPT3101PhaseOffset.cpp
    @@ -65,7 +72,13 @@ void OPT3101::phaseOffsetC::printHeader()
            host.printf("rfDCod,");
            host.printf("ilmScl,");
            host.printf("ilmDac,");
    -       host.printf(" fqCnt\r\n");
    +       host.printf(" fqCnt,");^M
    +       for (int ii=0; ii<3; ii++) {^M
    +               host.printf(" nT%01dL, nT%01dH,",ii, ii);^M
    +       }^M
    +       host.printf(" ledCh,");^M
    +       host.printf(" illumDac\r\n");^M
    +       //host.printf("\r\n");^M
            host.printfSetColor(0xFF);
     }
     void OPT3101::phaseOffsetC::print()
    @@ -75,7 +88,14 @@ void OPT3101::phaseOffsetC::print()
            host.printf("%06u,",this->referenceDistanceInCodes);
            host.printf("     %01u,",this->illumScale);
            host.printf("    %02u,",this->illumDac);
    -       host.printf(" %05u,\r\n",this->freqCount);
    +       host.printf(" %05u,",this->freqCount);^M
    +       for (int ii=0; ii<3; ii++) {^M
    +               host.printf(" %04d,",this->data.txLedillumDacHiCnt[ii][0]);^M
    +               host.printf(" %04d,",this->data.txLedillumDacHiCnt[ii][1]);^M
    +       }^M
    +       host.printf(" %02d,",this->data.ledChannel);^M
    +       host.printf(" %02d\r\n",this->data.illumDac);^M
    +       //host.printf("\r\n");^M
            host.printfSetColor(0xFF);
            this->data.printHeader();
            this->data.print();