VL53L0X in Simulation
Posted: Fri Aug 20, 2021 1:14 pm
Hi
I obtained a VL53L0X module a while back from a well know online presence. No reviews for any results so.........
Spurred on by another user intending to use this or similar device I thought I'd dig mine out, especially as I now have a use for the function.
Created a very simple flowchart comprising of a combo-board and the component itself. The chart has a flasher sanity check then loops providing "distance" every couple of seconds.
In Simulation it is always -1 that is returned (indicating a time out) which is I believe a "bug".
Below are some findings unrelated to the bug and certainly not FC related.
On hardware (once you finally remember to hold XSHUT high) the component does provide distance readings, and these are just my findings using a cheap module.
Holding the module in a fixed position facing quite a reflective surface, it measured the distance to be 77. Each iteration of the loop gave values between 66 and 78. Actual distance was ~41mm. With a distance of ~87 it returned readings of 112 - 120. I do appreciate that these distances are quite close for this device.
Averaging 10 iterations did of course bring the delta down to just a few numbers but again not very accurately and the difference between read value and actual value wasn't consistent over varying ranges.
Averaging 100 times did improve. The difference between actual distance and read was relatively consistent at 24 over varying range (up to ~350). Moving to longer ranges (actual = ~800) with an average of 100 gave a difference between real vs measured of 41.
The above tests were just rough desktop but does seem to illustrate that a cheap module may be a very false economy. I'd be interested to hear if anyone else has used a branded module to good effect.
Regards
I obtained a VL53L0X module a while back from a well know online presence. No reviews for any results so.........
Spurred on by another user intending to use this or similar device I thought I'd dig mine out, especially as I now have a use for the function.
Created a very simple flowchart comprising of a combo-board and the component itself. The chart has a flasher sanity check then loops providing "distance" every couple of seconds.
In Simulation it is always -1 that is returned (indicating a time out) which is I believe a "bug".
Below are some findings unrelated to the bug and certainly not FC related.
On hardware (once you finally remember to hold XSHUT high) the component does provide distance readings, and these are just my findings using a cheap module.
Holding the module in a fixed position facing quite a reflective surface, it measured the distance to be 77. Each iteration of the loop gave values between 66 and 78. Actual distance was ~41mm. With a distance of ~87 it returned readings of 112 - 120. I do appreciate that these distances are quite close for this device.
Averaging 10 iterations did of course bring the delta down to just a few numbers but again not very accurately and the difference between read value and actual value wasn't consistent over varying ranges.
Averaging 100 times did improve. The difference between actual distance and read was relatively consistent at 24 over varying range (up to ~350). Moving to longer ranges (actual = ~800) with an average of 100 gave a difference between real vs measured of 41.
The above tests were just rough desktop but does seem to illustrate that a cheap module may be a very false economy. I'd be interested to hear if anyone else has used a branded module to good effect.
Regards