Skip to main content
Visitor II
April 2, 2024
Question

About VL53L4CX -Getting the best single-target data

  • April 2, 2024
  • 2 replies
  • 1106 views

Hi,

I have two questions to ask.

1、How do I adjust "VL53LX_MAX_RANGE_RESULTS"and "VL53LX_MAX_USER_ZONES"

if I want to get a best single target of data?

Would it be better to change them all to 1? It's not in the manual.

2、VL53L1CB has a single-target get function "SetSimpleData" that I can't find in the L4CX API. Are there any other functions that can help determine this?

Thanks.

2 replies

John E KVAM
ST Employee
April 22, 2024

The user API that is documented is the file vl53lx_api.c. The files in the vl53lx_api_core.c file were really not meant to be called by the user. 

Neither of those parameters are going to help you get the best single target. 

MAX_RANGE_RESULTS

if you ask for 2 targets you will get a distance to an object and the distance to the wall behind the target. 

if you ask for only 1 target, you can get either the strongest signal or the closest. It depends on what you want.

MAX_USER_ZONES

Each range you get the opportunity to change the region of interest. By taking a sub-sample of the full SPAD photon detection array, you and perhaps find more information. But this only makes sense if you use the VL53L1CD as it has a lens over the receive side of the sensor. That code is a remnant of the prior sensor. 

The VL53LX is a VL53L1CB with the lens removed. Turns out that lens is pretty costly. 

GHuan.2
Associate II
February 28, 2025

Hi John, I have the same question for VL53L3CX. After reading your reply last April, my understanding is that for VL53L3CX, we need to set VL53LX_MAX_USER_ZONES to 1, and set VL53LX_MAX_RANGE_RESULTS to 1 or 2, as my application needs, right? Besides i want to save some ram with my app.