I’m using a PiicoDev Distance Sensor VL53L1X for my project and when I move a distance of 300mm within a range of 1m, the sensor is reading an error of 30-40mm. And my usage environment is favorable for a better reading state(indoor).
Is it possible to calibrate the sensor? If so, can someone help me with the code, please?
Also wondering how can I check and change the ‘distance mode’ in the sensor using ‘VL53L1_SetDistanceMode()’ to ‘short’, ‘medium’ or ‘long’?
Would it be possible to send through a photo of your setup and clarify which dev board you were using?
What were you looking to measure? The IR laser emitted from the distance sensor can have trouble measuring some surfaces.
I havent sifted through the datasheet but to calibrate any sensor you usually have to provide a known reference then any deviations can be added or subtracted from that. In this case we already have a reference, the speed of light so from my knowledge you shouldnt have to?
I have attached a photo of my sensor. A raspberry pi 3 is used to run the system.
I think my sensor is giving a reading close to a true reading. But I am aiming to get a much more precise data out of it by changing the ‘distance mode’ to ‘short’ which gives better data in ambient light conditions.
Any help to switch modes of VL53L1X in python is much appreciated. Thanks in advance.
I’d suggest looking into some data filtering techniques too (personally, for this sensor I’d suggest looking into implementations of a Kalman filter). Even just taking a large number of readings quickly and then averaging them out after removing the outliers tends to work quite nicely for measurements from distance sensors.