Can't get VL53L1X anywhere near 4M

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
platonicsolid
 
Posts: 19
Joined: Mon Jun 22, 2015 2:44 pm

Can't get VL53L1X anywhere near 4M

Post by platonicsolid »

Good evening, all.

Trying to use some VL53L1X sensors for a garage parking guide system I'm prototyping. I'd hoped it would be a more accurate and reliable alternative to the US-100 ultrasonic sensors, but I'm getting both more error than I expects and notable range dropoff.

The specs say these should sense between 30mm and 4000mm (4m). Problem is, I can't get anywhere near 4m of ranging out of it. I set up a test on a hardwood floor with the sensor on a vertical at different ranges. Detection appears to be breaking down between 50cm and 100cm. The obstruction was a piece of spare 1x4 I have - I tried attaching a yardstick to it for greater reflectivity with no change in results. Likewise I tried in both normal (artificial) lighting and dark conditions, since the chip sheet indicates light can significantly impact range.

I'm using the official example code running on an M4 Airlift, with only the sensor on the I2C bus. It's pulling 5V power from the M4, which is connected both to USB and a 5V, high-amp power supply, so nothing should be undervolting.

Here's what I got:
Range mode SHORT, Time budget 100
  • 25cm: Reports 23cm
  • 50cm: Reports 43cm
  • 100cm: Reports 28.1cm
  • 200cm: Reports 14.3cm
  • 300cm: Reports 15.6cm
Range mode LONG, Time budget 100
  • 25cm: Reports 22.2cm
  • 50cm: Reports 43.6cm
  • 100cm: Reports 29.4cm
  • 200cm: Reports 17.5cm
  • 300cm: Reports 15.5cm
Range mode LONG, Time budget 500
  • 25cm: Reports 22.8cm
  • 50cm: Reports 44.2cm
  • 100cm: Reports 28.7cm
  • 200cm: Reports 17.5cm
  • 300cm: Reports 15.9cm
I can only conclude that 1) My test methodology is wrong, 2) My configuration/setup is wrong, even though I'm running the reference code or 3) This particular device is bum.

Would appreciate any thoughts or direction on this.

Have a good one.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can't get VL53L1X anywhere near 4M

Post by adafruit_support_mike »

How big is your test target, and how empty is the field of view?

By default, the VL53L1X assumes the target will fill its whole field of view (roughly a 30 degree cone). That means the target area is roughly half as wide as the distance to the sensor.

Within the field of view, a fixed-size target that covers N% of the field at 1m will cover N%/4 at 2m and N%/16 at 4m.. the old inverse-square law in action.

From that reasoning and the numbers given, I'd guess your target is about the size of an 8-1/2" x 11" sheet of paper. Is that even close to the facts of your test setup?

User avatar
platonicsolid
 
Posts: 19
Joined: Mon Jun 22, 2015 2:44 pm

Re: Can't get VL53L1X anywhere near 4M

Post by platonicsolid »

Good morning!

Thanks for the reply, that is definitely the detail I missed. I've set up a new test against a gloss white door and am reliably getting up to 2m results. I'll test again later where I have more space.

The chip's documents refer to programmable ROI to adjust the FoV, but don't explicitly say how to do that, nor does the Circuit Python library expose it. Is that exposed elsewhere?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can't get VL53L1X anywhere near 4M

Post by adafruit_support_mike »

That feature isn't exposed in our code, but you can find it in the underlying source:

https://github.com/adafruit/Adafruit_VL ... 1x_class.h
https://github.com/adafruit/Adafruit_VL ... _class.cpp

The implementation lives between lines 758 and 803.

The feature is described in this application note:

https://www.st.com/resource/en/applicat ... ronics.pdf

Unfortunately ST doesn't publish the I2C registers and their descriptions directly. They publish a library based on their own development environment, and you have to reverse-engineer everything from that.

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: Can't get VL53L1X anywhere near 4M

Post by adafruit_support_bill »

Also note that while it is possible to decrease the ROI, the max detection distance also tends to decrease with the reduced active area. See section 4.2 of the app note.

User avatar
platonicsolid
 
Posts: 19
Joined: Mon Jun 22, 2015 2:44 pm

Re: Can't get VL53L1X anywhere near 4M

Post by platonicsolid »

Just finished reading that, thanks! I was thinking narrowing the FOV would decrease the chance of scatter inference. Bad assumption. I'll find a way to work around it. Getting up to 2m now, and think I'm having issues with 3m because of other objects in my office causing reflections.
Thanks for the help!

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: Can't get VL53L1X anywhere near 4M

Post by adafruit_support_bill »

You might also consider one of the Maxbotix ultrasonic sensors. We carry a small selection of their extensive line. The datasheet for each model diagrams the range and sensitivity patterns for different types of target objects.

https://www.adafruit.com/?q=maxbotix&sort=BestMatch

https://www.maxbotix.com/pictures/LV/LV ... tterns.gif

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”