VL53L1X does not work proper

Hello All,

i belief - there is still the I2C Device not supported.

VL53L1X - I2C:

Please see for this:

I compare the datasheets, and the i2c-interface is still different from VL53L0X.
So i miss an other Parameter for RNGFND_TYPE = 16 especial for VL53L1X

is there an expert to do this?


Both sensors are working correctly.
Difference within models are taken care within RangeFinder main module :

You have tested this already?

I have no response from the vl53l1x.
I have this one:

with the raspberry pi and i2cdetect i see the address 0x29.

The vl53l0x works proper and i can read the values.

Possible there is a problem with non-default registers?


Tested the Pololu , but the Pimoroni seems pretty standard

Have you tested this unit with a python script to make sure it works?

Ok I think I got it…

The actual driver is expecting this:

And the Pimoroni has this:

So you need to change line 82 from
v2 != 0xCC
v2 != 0xAA

If that work, I suggest you open an issue, and we will probably to add an additional parameter for VL53L1_IDENTIFICATION__MODULE_TYPE

In this Moment i have tested the VL53L1X with the pimoroni-tool.
It works nearly properly.
The graph.py give me not the expected range from 360 cm but 210 cm.
Possible i should use more voltage?

Thanks, i will report the success to you.

but, can you help me in an other case?

I have a source-setup for Cube Black.
But i use now the Pixhawk 2.4.8.
I have no idea, how to switch from the “Cube Black” and to 2.4.8.
Can you back me in this point?

I have to chose the CPU-Type - i have no idea.
I have to make a new configure like this:

configure --board fmuv2 --no-submodule-update

have you an idea how to finde the right way?

many tanks

@nghiajenius take a look at this :wink:

It does not work, i have no idea.

I have done this:

edit the file ardupilot/libraries/AP_RangeFinders/AP_RangeFinder_VL53L1X.cpp
./waf configure --board=fmuv2 (for my pixhawk 2.4.8)
./waf --targets bin/arduplane
./waf --targets bin/arduplane --upload

Hello @smilie

Please follow the guide for build source code to right target: https://github.com/ArduPilot/ardupilot/blob/master/BUILD.md

If success, then you can try modifying the source code as suggested by @ppoirier, then rebuild and check if you can read VL53L1X or not. If you can read it after modifying the check ID, please open an issue.

I’m in vacation at the moment so I will check the library again in next Monday. ST has released new library for VL53L1X, and the library I wrote was from last year, so I may need if there is new variant.

1 Like

Hello @smilie and @ppoirier,

I have quick checked the pimoroni/vl53l1x-python, they don’t check the module ID, value 0xAA is just copied from other libraries and not verified in code. On the other hand, I checked the latest ST datasheet, reference registers value aren’t changed.

So my guest is the ID is not really a problem here, maybe you can remove Line 81-83 in ArduPilot/ardupilot/blob/master/libraries/AP_RangeFinder/RangeFinder.cpp

if ((v1 != 0xEA) ||
(v2 != 0xCC)) {
return false;

to bypass the ID check and see if the function can actually read the register successful or not.

1 Like

Bingo - after removing the lines “81-84” the Range works fine.

Thank you very much.

So , ID is really an issue :laughing:

It would be interesting to probe the registers
0x010F and 0x0110 with I2C GET to get the values

I am not shure, at this point.
May be, there is only a difference between the latest Firmware from the Mission Planner (3.8) or so?

Because i change back the modification (81-84) and the range-finder works also, but if i change back to the latest Mission Planner Firmware the RangeFinder will does not work.

I’m confused to write wrong things, because my experience is week.

We will wait until you find the issue

Hello @smilie
Latest Firmware from MP are Copter-3.6 and Plane 3.9, which have not supported VL53L1X yet, I checked and saw VL53L1X driver only in master branch. So you may try the master branch or beta firmware if you want to use VL53L1X, and wait for next main release I guess. :grin:

Thanks and sory for the my excitement.