2025-04-15 8:16 AM - last edited on 2025-04-15 8:43 AM by Peter BENSCH
Hi Team,
Could you please share the detailed function of INT and SYNC in VL53L8CXV0GC/1?
We would probably use one sensor or two. If case of one sensor SYNC input doesn't add any value to the design. If two sensor used they'll probably share the proximity data(Just confirms if the object present or not) will it a have significance there.
Regards,
Mukesh
2025-04-15 8:51 AM
The INT(errupt) pin simply signifies that data is available. You don't have to use it. You can poll for data ready - assuming your MCU doesn't have anything better to do. Or if the sensor is running continuously, you can just read the result whenever you want it.
The sync pin is there if you want to have absolute control over when ranging starts. For instance, if you take a picture with a camera and then get range data, then take another camera frame, you can insure the two don't conflict by using the sync pin. Again, you don't have to use it.
2025-04-15 9:03 AM
Hi John,
Thanks for the details,
We feed the TOF data to CX3 controller, TOF data will be used to activate imaging section on detection of an object. So, we can either read the data periodically say for example per minute or poll the data continuously whichever is power efficient. Also, depends on the I2C bus traffic.
Ranging means, do you mean the 4m range available for the TOF sensor?
Regards,
Mukesh
2025-04-15 9:14 AM
The sensor can take up to 15 ranges per second in 8x8 mode. Each range can indeed give you the distance to an object of up to 4M.
If you only want data once per minute, it would be silly to range continuously. You can tell the sensor to integrate for a period of time, and then rest for a while before taking another range.
Or you can tell it to start, get the answer, and then tell it to stop.
And the results can be up to some 3000 bytes on the I2C, but you might not need all that data.
There is a data structure in the code where you define how much data you want.
Some people might only need:
// #define VL53L8CX_DISABLE_AMBIENT_PER_SPAD
#define VL53L8CX_DISABLE_NB_SPADS_ENABLED
// #define VL53L8CX_DISABLE_NB_TARGET_DETECTED
#define VL53L8CX_DISABLE_SIGNAL_PER_SPAD
#define VL53L8CX_DISABLE_RANGE_SIGMA_MM
// #define VL53L8CX_DISABLE_DISTANCE_MM
// #define VL53L8CX_DISABLE_REFLECTANCE_PERCENT
// #define VL53L8CX_DISABLE_TARGET_STATUS
#define VL53L8CX_DISABLE_MOTION_INDICATOR
It depends on what you are doing with the data.
If you want to turn something on if there is motion, you can configure the sensor to give you an interrupt when it detects a change in distance, or signal strength (or some other parameters). Then just wait for the interrupt, and do what you need to do.
- john
2025-04-16 2:23 AM - edited 2025-04-16 2:24 AM
Hi @John E KVAM ,
I work with mukesh on the same project. Is INT pin used to generate interrupt , in the Example_9_detection_thresholds.c example , when the target is within a specified threshold ?
Regards,
Vikaash.K.B
2025-04-16 6:20 AM
Hi @John E KVAM,
Can we use 4.7k pull up for I2C instead of 2.2K suggested in the datasheet?
Regards,
Mukesh
2025-04-16 7:03 AM
New questions should be put in a new topic. Otherwise, the results are too hard to search.
But when it comes to those pull-ups anything that works, works. if you have long lines or more parts on the I2C, then you have to increase the strength of the pull-up accordingly.
Phillips invented the bus, and NXP bought them. There are several good articles on how to adjust the pull-up on there site.
But feel free to adjust them until the scope plots look good. Nice square wave with not too much overshoot.
2025-04-16 7:11 AM
By default, you will get an interrupt at the end of every range.
If you set some thresholds, you will only get an interrupt if your conditions are met.
(This saves a lot of MCU time processing range data - when nothing changed.)
The INT pin is dropped when the interrupt is set. What you choose to do with it is up to your MCU.
In the example the STM32 triggers on a low-going edge. And that works.
(and again - a good candidate for a new topic.)
- john