cancel
Showing results for 
Search instead for 
Did you mean: 

github.com

Hugo van Santen
Associate
Posted on April 25, 2018 at 19:02

disappointing VL53L0x multiple sensors driver

Hello,

I got a st VL53L0X shield from ST, and for any people who needed some code, I wrote some faste code here:

https://github.com/h2mille/les-beffroyables/tree/master/t%C3%A9l%C3%A9m%C3%A9trie/1er_test_53L0A1

  and can use the 3 sensors+write on the 7digit screen.

Anyway this are my conclusions, using it on Arduino Uno original:

-the original code doesn't work on multiple sensors: I had some stupidly hard calibration error  on the use of the 2nd sensor.

-Adafruit used your driver to make a new one, and as far as I tryed, it was really quick: it neither work. Anyway, every sensor takes 40% of memory space of the arduino. I think it's really quite a lot for a simple telemeter sensor. But even with only two sensors, it doesn't work. Ok, I'm using a competitor board, and ST doesn't like it. But is the code really optimised to save space?.

-Pololu made a code using just few percent of memory per sensors, and I can use very easily 3 of them. It's easy, simple, and seems to be based on reverse engineering.  I think it's the only option, as I didn't see any documentation provinding full information about memory map of the chip, initialisation,etc...

-Pololu's code works fine for 3 sensors, but on continuous mode; it doesn't work with more sensors. One of them kind of disconnect (at least stop responding). So I consider �Pololu's code working far better than ST's driver.

The sensor itself works fine, but I was told it provides kind of low res 2.5d scanning, to gets moves and so on. What I get is a very small but not very well made telemeter which get sometings some wrong sample (sees something when it shouldn't and sometimes the opposite).

I'm using it for fun, for some hackerspace robotics project, and so I would be glad to only use the arduino IDE. I'm really lazy to try it on a nucleo board, as it shouldn't make a difference. Or did ST used some int instead of int32_t? Some more useful opinion? Does someone can use it properly?

ps: Some people use it with IO expander on I2c line, and now I start to understand why.

#vl53l0x #arduino
1 REPLY 1
John E KVAM
ST Employee
Posted on May 08, 2018 at 01:07

The Polulu code has been shown to work pretty well, and it was based on reverse engineering. they did a great job.

But they left off the calibration step to save size.

The Adafruit does work, but they didn't implement multiple sensors. (To implement, bring up the first Sensor, command it to switch to a different I2C address, and bring up the next sensor. It's kind of a pain, but it works.) This might be why the Polulu design was limited to 3 devices.

If you get some wrong answers when using multiple sensors, you might try increasing the timing budget. Give each sensor a few extra milliseconds and you will get better numbers.

The ST code was written to be CPU independent. It needs only the I2C functions.

So it really should work on anything.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.