2026-01-23 12:34 PM
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.