2022-02-14 03:32 AM
2022-02-14 04:37 PM
After getting the range distance, or maybe even before it, get the RangeStatus. This is NOT the status that the function returns, but is a register in the sensor that tells you what the status of your number is.
Zero - is what you are hoping for. That's perfect. But there are a dozen other RangeStatus and you can either treat them as warnings and accept them. Or you can treat them as "no legitimate range" and proceed as if no valid target was within the area.
We've always struggled with what to return if the sensor did not get a good range. Generally the algorithm just gives up, sets the RangeStatus, and the distance is whatever it happened to be when the logic gave up.
So your really, really have to check the RangeStatus. It's arguably more important than the distance.
-john
2022-02-14 04:37 PM
After getting the range distance, or maybe even before it, get the RangeStatus. This is NOT the status that the function returns, but is a register in the sensor that tells you what the status of your number is.
Zero - is what you are hoping for. That's perfect. But there are a dozen other RangeStatus and you can either treat them as warnings and accept them. Or you can treat them as "no legitimate range" and proceed as if no valid target was within the area.
We've always struggled with what to return if the sensor did not get a good range. Generally the algorithm just gives up, sets the RangeStatus, and the distance is whatever it happened to be when the logic gave up.
So your really, really have to check the RangeStatus. It's arguably more important than the distance.
-john
2022-02-16 02:20 AM
Thank you for your response. Now I can bypass wrong values thanks to warnings reported in RangeStatus and I have reliable data.
Thank you !
2022-06-20 10:23 PM
I checked Range status initially it is returning 0, and after that it continuously it is sending 255 , I am using Spark fun VL53L1X sensor and i am working on 8 sensors ,it is working fine if obstacle is there between 4 meter range, if obstacle is not there it showing random values
2022-07-19 03:35 AM
I am checking signal status also for Big obstacle it showing Distance up to 2.1 meter(210Cm) and status is 0, and for small obstacle showing distance up to 1.2 meter(120 cm) and status is zero, it is not useful in outdoor environment , and it Hangs after some time continuously giving same result if obstacle present or not present, we are following delay as per directed by datasheet for start ranging and stop ranging
2022-07-19 08:49 AM
HKulk.1 -
Probably better to open a new conversation than to add to the bottom of an existing one. You post is less likely to get lost.
The sensor can only detect an object if enough photons are returned. So a large reflective object can be seen at a longer distance than a small black one. (Color does not matter, but reflectivity matters when considering the max distance.
Try a bit of board spray painted with flat black paint. This is about 5% - a worst case. Then try cardboard. This is about 50%, a typical case, and lastly white printer paper. This is about 88% and a best case.
Choose a size of whatever you think is typical.
This is an indoor sensor. Sunlight contains a lot of 940nm light and it swamps the amazingly sensitive photon detetors.
I'm going to guess the hanging is related to electrial noise. I'd check the XShut pin. My guess is a glitch on that line or the power line caused the chip to fully or partially reboot. Try some larger caps.
2022-07-19 08:51 AM
I transferred this query to a new post:
https://community.st.com/s/question/0D53W00001g0GYqSAM/typical-issues-with-vl53l1x-range-and-status
That way it won't get lost again.
2022-07-19 09:06 PM
Thanks