cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L8CH Motion Indicator doesn’t work correctly with 8x8 resolution

KKKK9
Associate

I’m using the VL53L8CH sensor with an ESP32 and developing a program in Arduino language based on Example_10_motion_indicator.c provided by ST. I successfully obtained the motion indicator output using a 4x4 map.

Next, I tried switching to an 8x8 map by applying the following settings:

 

VL53L8CH sensor(&Wire, LPn_PIN);
 
sensor.set_resolution(VL53LMZ_RESOLUTION_8X8);
sensor.motion_indicator_init(&motion_config, VL53LMZ_RESOLUTION_8X8);
 
 
However, when I checked the output, I noticed that the 1st and 2nd values, as well as the 9th and 10th values, are identical, resulting in behavior similar to a 4x4 map.

Could you please advise if there are any additional settings required or if this might be related to a library issue? Any suggestions or insights would be greatly appreciated.

1 REPLY 1
Anne BIGOT
ST Employee

Hello

The reason for this is....
- The size of the Motion Indicator structure is 32 elements. This is determined by VL53L8CH firmware.
- For reference see the line "uint32_t per_aggregate_indicator_1[VL53LMZ_MI_INDICATOR_LENGTH];" in the file vl53lmz_plugin_motion_indicator.h
- Since we can't have 64 outputs from Motion Indicator we chose to reduce down from 64 to 16 to keep a regular 2x2 reduction.
- This is why in Motion Indicator mode the mi__agg_id array is mapping 64 zones to just 16 motion indicator output elements.
- Code in vl53lmz_motion_indicator_set_resolution() creates this map from 64 zones to 16 outputs.
- It is possible to use all 32 possible outputs with small changes in the vl53lmz_plugin_motion_indicator.c file. Doing this you could, for instance, have a mapping from 2x1 zones to Motion Indicator outputs
- In fact the mi__agg_id map allows a completely flexible mapping from zones to motion_indicator outputs.

Best regards


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'