cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L4CX multiple objects at longer range?

cyclops
Associate III

Hey

I've got great success with the VL53L4CX at sorter ranges, but at longer ranges i seem to get two objects. One closeby between 10 and 30mm away, and one at the distance that it should be.

I've done calibration and i cant' get this to go away. I'm assuming it's crosstalk but i've done the crosstalk calibration and so on. What could this be?
Example of some of my log output, where you can see the two outputs and some other values from the same measurements.

[995156] PerformMeasurement(offset=0, maxdepth=2000, ignoreBelow=10)
[995162] Read 388 bytes...
[995163] VL53L4CX_SetCalibrationData status: VL53L4CX_ERROR_NONE
[995166] VL53L4CX_SetXTalkCompensationEnable status: VL53L4CX_ERROR_NONE
[995166] VL53L4CX_SetMeasurementTimingBudgetMicroSeconds status: VL53L4CX_ERROR_NONE
[995166] VL53L4CX_SetDistanceMode status: VL53L4CX_ERROR_NONE
[995166] VL53L4CX_SetOffsetCorrectionMode status: VL53L4CX_ERROR_NONE
[995166] VL53L4CX_SmudgeCorrectionEnable status: VL53L4CX_ERROR_NONE
[995166] VL53L4CX_SetUserROI status: VL53L4CX_ERROR_NONE
[995187] Started measurement status: VL53L4CX_ERROR_NONE
[995187] 0: Status of data: 0; NewData: 1
[995287] 0: Out of Loop: Status of data: 0; NewData: 1
[995295] 0: Status read: 0/VL53L4CX_ERROR_NONE
[995295] 0: VL53L4CX Satellite: Count=237, #Objs=1
[995296] 0:EffectiveSPadRtnCount: 32, nr of objects: 1, HasXtalkValueChanged: 0
[995296] 0: status=VL53L4CX_RANGESTATUS_RANGE_VALID_NO_WRAP_CHECK_FAIL; Distance: 951mm
[995296] 0: Signal=0.078125 Mcps;Ambient=0.054688 Mcps
[995297] 0: Extended Range: 0
[995297] 0: Min: 935, Max: 951
[995297] 0: SigmaMM: 5.078125
[995806] 1: Status of data: 0; NewData: 1
[995906] 1: Out of Loop: Status of data: 0; NewData: 1
[995916] 1: Status read: 0/VL53L4CX_ERROR_NONE
[995916] 1: VL53L4CX Satellite: Count=238, #Objs=2
[995916] 0:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 0
[995916] 0: status=VL53L4CX_RANGESTATUS_RANGE_VALID_NO_WRAP_CHECK_FAIL; Distance: 15mm
[995916] 0: Signal=0.078125 Mcps;Ambient=0.015625 Mcps
[995916] 0: Extended Range: 0
[995916] 0: Min: 15, Max: 23
[995917] 0: SigmaMM: 4.765625
[995917] 1:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 0
[995917] 1: status=VL53L4CX_RANGESTATUS_RANGE_VALID_NO_WRAP_CHECK_FAIL; Distance: 1728mm
[995917] 1: Signal=0.187500 Mcps;Ambient=0.015625 Mcps
[995918] 1: Extended Range: 0
[995918] 1: Min: 1728, Max: 1735
[995918] 1: SigmaMM: 3.453125
[996427] 2: Status of data: 0; NewData: 1
[996527] 2: Out of Loop: Status of data: 0; NewData: 1
[996537] 2: Status read: 0/VL53L4CX_ERROR_NONE
[996537] 2: VL53L4CX Satellite: Count=239, #Objs=2
[996537] 0:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 0
[996538] 0: status=VL53L4CX_RANGESTATUS_RANGE_VALID; Distance: 20mm
[996538] 0: Signal=0.078125 Mcps;Ambient=0.015625 Mcps
[996538] 0: Extended Range: 0
[996538] 0: Min: 20, Max: 25
[996539] 0: SigmaMM: 5.179688
[996539] == ABOVE MEASUREMENT ADDED TO AVERAGE
[996539] 1:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 0
[996539] 1: status=VL53L4CX_RANGESTATUS_RANGE_VALID; Distance: 1728mm
[996540] 1: Signal=0.179688 Mcps;Ambient=0.015625 Mcps
[996540] 1: Extended Range: 0
[996540] 1: Min: 1710, Max: 1737
[996541] 1: SigmaMM: 4.039062
[996541] == ABOVE MEASUREMENT ADDED TO AVERAGE
[997048] 3: Status of data: 0; NewData: 1
[997148] 3: Out of Loop: Status of data: 0; NewData: 1
[997158] 3: Status read: 0/VL53L4CX_ERROR_NONE
[997158] 3: VL53L4CX Satellite: Count=240, #Objs=2
[997158] 0:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 1
[997158] 0: status=VL53L4CX_RANGESTATUS_RANGE_VALID; Distance: 14mm
[997159] 0: Signal=0.085938 Mcps;Ambient=0.015625 Mcps
[997159] 0: Extended Range: 0
[997159] 0: Min: 14, Max: 22
[997160] 0: SigmaMM: 4.843750
[997160] == ABOVE MEASUREMENT ADDED TO AVERAGE
[997160] 1:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 1
[997160] 1: status=VL53L4CX_RANGESTATUS_RANGE_VALID; Distance: 1728mm
[997161] 1: Signal=0.187500 Mcps;Ambient=0.015625 Mcps
[997161] 1: Extended Range: 0
[997161] 1: Min: 1728, Max: 1734
[997162] 1: SigmaMM: 3.453125
[997162] == ABOVE MEASUREMENT ADDED TO AVERAGE
[997669] 4: Status of data: 0; NewData: 1
[997769] 4: Out of Loop: Status of data: 0; NewData: 1
[997779] 4: Status read: 0/VL53L4CX_ERROR_NONE
[997779] 4: VL53L4CX Satellite: Count=241, #Objs=2
[997779] 0:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 0
[997779] 0: status=VL53L4CX_RANGESTATUS_RANGE_INVALID; Distance: -117mm
[997780] 0: Signal=0.031250 Mcps;Ambient=0.015625 Mcps
[997780] 0: Extended Range: 0
[997780] 0: Min: -117, Max: -76
[997781] 0: SigmaMM: 7.890625
[997781] 1:EffectiveSPadRtnCount: 32, nr of objects: 2, HasXtalkValueChanged: 0
[997781] 1: status=VL53L4CX_RANGESTATUS_RANGE_VALID; Distance: 1728mm
[997782] 1: Signal=0.179688 Mcps;Ambient=0.015625 Mcps
[997782] 1: Extended Range: 0
[997782] 1: Min: 1728, Max: 1736
[997782] 1: SigmaMM: 3.960938
[997783] == ABOVE MEASUREMENT ADDED TO AVERAGE
[998291] distance=1043; offset=0; maxdepth=2000



the "== ABOVE MEASUREMENT ADDED TO AVERAGE" is a workaround to ignore values below a certain range. It works, but at the moment i have to set it to 50mm or so to get correct readings. This is not ideal because sometimes i do need to measure < 5cm.

1 ACCEPTED SOLUTION

Accepted Solutions
John_Kvam
Senior II

An object that isn't really there is a 'ghost target'. And it's crosstalk. It's always crosstalk. 

A 'normal' target - even a very black one - at 20 or 30cm has a pretty big signal. It should be a few million photons per second. 

And yours says, "Signal=0.078125 Mcps'.

That's the sort of signal strength you can expect with a target at several meters.

All this to say, I've seen the issue, and I know what it is. 

The trick is to increase the crosstalk correction numbers to a point where the ghost targets go away. 

If you were to add 0.1MCPS to the crosstalk number at least that 'ghost' would be below the threshold, and it would get subtracted out.

The penalty for under correcting the crosstalk is a ghost image, the penalty for OVER correcting, is a slight under-range of targets within 60cm. (After 60cm the crosstalk does not affect the range.)

So do a little experimentation and see what kind of adder you need. 

- john

 

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.

View solution in original post

2 REPLIES 2
John_Kvam
Senior II

An object that isn't really there is a 'ghost target'. And it's crosstalk. It's always crosstalk. 

A 'normal' target - even a very black one - at 20 or 30cm has a pretty big signal. It should be a few million photons per second. 

And yours says, "Signal=0.078125 Mcps'.

That's the sort of signal strength you can expect with a target at several meters.

All this to say, I've seen the issue, and I know what it is. 

The trick is to increase the crosstalk correction numbers to a point where the ghost targets go away. 

If you were to add 0.1MCPS to the crosstalk number at least that 'ghost' would be below the threshold, and it would get subtracted out.

The penalty for under correcting the crosstalk is a ghost image, the penalty for OVER correcting, is a slight under-range of targets within 60cm. (After 60cm the crosstalk does not affect the range.)

So do a little experimentation and see what kind of adder you need. 

- john

 

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.

Thanks John

I have quite a bit of code to set settings up and so on, and i also found that after a bunch of measurements, it stopped working.
So, i start the reading, do the measurements and then sleep the device, but i never stopped measurements and so on.

That lead to some unexpected results. I correct all of this and then re-did the calibration and it now works perfectly.
I think a lot of issues i've seen have come from that. Since i've fixed this it has been pretty good and stable.

The sensor is now being put out in the field (i have to ship it to my friend that uses it). We'll see how it performs there, but overall - i've learned a ton again and feel confident it's now going to be ok!