I am using the SparkFun_VL53L1X library with a VL53L1X sensor on a Mega2560. I think the sensor is malfunctioning, I wanted to confirm this. I ran the example sketch “Example1_ReadDistance”, and modified the print statements so it only prints the measurement in feet, and this is the result on the serial plotter when I aim the sensor at a wall near my desk that’s about 5 or 6 feet away:
It does seem to respond as it should as the distance is varied, with the average being near the correct measurement, but there is this obscene amount of noise on top of it. Is this likely a sensor quality issue?
Yes all I did was comment out a few print statements. It shows the value in mm varying widely from ~770 to 4100 when aimed at a wall several feet away. I also tried different MCUs and different libraries and get the same results. Examining it close up I see the windows on the sensor seem to be marked up and it can be smeared around so I tried to wipe it off but got the same thing.
Just wondering if anyone had a similar problem so I can maybe get root cause. I previously used the VL53L0X sensor which ran great with little noise with several boards and libraries, the same boards I am using with the VL53L1X sensor. I noticed the lenses appeared irregular in appearance so I attempted to clean them with alcohol, which only changed the appearance somewhat, but the noise is the same. It’s possible maybe the sensor was damaged during soldering as the headers are very close to the sensor.