The VL53L0X sensors are giving very unstable and inaccurate readings, even when the distance to the object is fixed.

Thread Starter

mahmoud_Adell

Joined Jan 29, 2025
7
The VL53L0X sensors are giving very unstable and inaccurate readings, even when the distance to the object is fixed.


  • For example, when I place a solid object exactly 10 cm from the sensor, the readings fluctuate heavily, sometimes giving 50 mm, other times 100 mm, even though the object is not moving at all.
  • This inconsistency is happening across almost all sensors, especially on the right side.

Troubleshooting I've Done:

  1. Tried using offsets
    I read each sensor at 10 cm and saved that value as an offset in EEPROM. Then I subtracted it from each reading to get a "corrected" value. Still, the readings vary wildly, so the offset has little to no effect.
  2. Tried a custom calibration method
    I manually recorded real distances and the corresponding raw sensor values, then used a formula like:
    corrected = (raw - offset) * (real_distance / raw_value)
    But due to the randomness of readings, the formula fails to stabilize the result.
  3. Tried adjusting the timing budget and inter-measurement period
    I increased the timing budget and tried various values, but didn't notice any significant improvement.
  4. Tested with fewer sensors
    I isolated 1 or 2 sensors and powered them directly, but the fluctuation still exists.

Current Hypothesis:

  • It might be power-related, especially if all sensors are active at the same time.
  • Could also be interference or cross-talk due to the sensors being close together and facing similar directions.
  • Or maybe it's related to the use of shift registers affecting sensor power-up or I2C stability.

Questions:

  1. Has anyone experienced this kind of instability with VL53L0X sensors?
  2. Is there a way to filter out noisy data (median filtering, moving average, etc.) that's known to work well with these sensors?
  3. Is there any hardware-level solution to reduce cross-talk or interference?
  4. Would using VL53L1X or another sensor improve stability?

Any help or direction would be appreciated!


Thanks in advance.
 

KeithWalker

Joined Jul 10, 2017
3,603
I have not used that particular sensor but there are ways to trouble-shoot your setup. It is recommended in the datasheet that the power source and de-coupling capacitors are physically as close to the sensors as possible. That suggests that they are sensitive to noise on the power lines. What are you using for a power source?
You can check for crosstalk and adjacent module interference by powering up just one sensor. Check the output stability. If it is stable, power up each sensor in addition, checking the outputs of each in turn.
How are you using the shift registers that you mention?
 

panic mode

Joined Oct 10, 2011
4,864
i have considered but not tried VL sensors. from what i recall one should expect repeatability of 5-30mm depending on model and range
 

MisterBill2

Joined Jan 23, 2018
27,176
I suggest first, connecting only one sensor to the supply and see if that works. That eliminates any cross talk issue. But first, is the supply stable?? Third, what sort of load is that sensor specified to feed?? Is it by chance a current loop output, not a voltage output device??

I did not search for the specifications for that sensor, those are supposed to be provided along with the question. My "mind reading ability" is worse than poor.
 

KeithWalker

Joined Jul 10, 2017
3,603
I suggest first, connecting only one sensor to the supply and see if that works. That eliminates any cross talk issue. But first, is the supply stable?? Third, what sort of load is that sensor specified to feed?? Is it by chance a current loop output, not a voltage output device??

I did not search for the specifications for that sensor, those are supposed to be provided along with the question. My "mind reading ability" is worse than poor.
See post #2. I recommend that you read all of the thread before commenting.
 

LowQCab

Joined Nov 6, 2012
5,101
You are attempting to implement a very complex Device without
even supplying the Spec-Sheet-PDF, when You can't get it to work correctly.

What job are You expecting this device to perform ?, ( in exact detail please ).

Why did You choose this particular Part-Number ?
.
.
.
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,176
Post #2 does indeed suggest one at a time. I repeated that suggestion because of it's validity! In addition, I went into more detail with what to verify.
It is also possible that whatever light source is used may not be perfectly stable.
AND, external light can have a very big effect on the functioning of optical sensors, as can vibration of either the sensor or the target.
 
Last edited:
Top