-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annoying Reading After Out of Range #57
Comments
i am having the same problems. I use a protective glass as an extra. I occasionally read absurd values when the sensor is out of range. @matriawan |
Which example code is being run? Is |
I use interrupt example with NEW_MEASURE_READY. I am checking RangeStatus variable, when i measure distance. When I occasionally read absurd values, ,I observe that range status is 2(Signal Fail). @caternuson @matriawan |
Specially, . I tested the sky distance :) .(No target) I occasionally read absurd values in this state. I fixed as controlling the LimitCheckValue. But, I can not measure max distance in datasheet value becasue of limitCheckCurrentValue. Is it correct that the sensor gives absurd values when there is no target? @caternuson @matriawan |
Only occasionally? Sometimes you get absurd values with a range status that is OK? |
Sorry for my late response. Yes occasionally. I get absurd values with range status that is "2" or "4". |
The example sketches may not fully cover all possible failure cases. For example, the interrupt example only checks for phase failures:
In general, if the status is anything other than valid, then the measurement should be considered incorrect. Various things can cause this. The status code helps indicate why. 2 = Signal Fail @fafiunal This could be related to your use of cover glass. @matriawan Are you using a cover glass of some kind? What is the target object? What are the ambient lighting conditions? |
@fafiunal |
A status code of 2 is a signal fail, so the reading would not be correct in that case. Only a status code of 0 is valid. Adafruit_VL53L0X/src/core/src/vl53l0x_api_strings.cpp Lines 185 to 218 in 23dc309
|
@caternuson I understand the concept :) but experiments show, that as long as the distance is under 1300mm, the measurement is correct, even if the status code is 2 (300-1300mm). |
It could be for many reasons. Target size. Target color. Ambient lighting conditions. Sensor settings. etc. Keep in mind the sensor has a field of view of 25deg on the range sensing element: In terms of sensor setting, these are the options: Adafruit_VL53L0X/src/Adafruit_VL53L0X.h Lines 44 to 50 in 23dc309
which have different trade offs in performance: Only the long range mode provides sensing beyond 1200mm, and has caveats of being in dark conditions without any infrared (IR) sources. It is probably worth reading through the datasheet and other documents to verify the sensor is being configured and used correctly for your application: In general, these issues do not sound like library code issues. |
@caternuson Thank you for all the info you mention, I appreciate it! |
I use example code and everything works fine, but when I put the sensor without a barrier or to get out of range, the output from Arduino Serial Monitoring sometime shows random numbers such as 2mm or 4mm. How to solve this, just make sure the result/output is always out of range not random numbers.
The text was updated successfully, but these errors were encountered: