More docs and example code for the VL53L0X LIDAR sensor

12,081 views
Skip to first unread message

wholder

unread,
Jun 4, 2016, 7:05:42 PM6/4/16
to diyrovers
This document provides "clues" as to where to find additional documentation and example code for the new VL53L0X sensor:


For example, slide 4 is tells you to go to st.com and search for "STSW-IMG005" to find the example code. Likewise, you can search for "UM2039" to get the API doc.  Not sure why the main VL53L0X info page doesn't just provide proper links to this stuff, but perhaps it's a treasure hunt, so I won't spoil it by telling you about the other things you can find this way...

Well, perhaps I'll mention that found that Mouser has an Arduino-compatible PCB that comes with three VL53L0X sensors and an LED display, which you can order here:


The doc for this board is here:


Wayne

Ted Meyers

unread,
Jun 5, 2016, 6:30:41 PM6/5/16
to diyrovers
Wayne,

Thanks!  Don't know if you noticed, but mouser also sells the "satellite" boards: http://www.mouser.com/ProductDetail/STMicroelectronics/53L0-SATEL-I1/?qs=Uem7cGQRk%252bqOknyIJxt3Dg%3d%3d ($18.50 for two sensors -- part #511-53L0-SATEL-I1)

These are the breakout boards that come with the arduino shield that you mentioned.  They do the 2.8V regulation and level shifted up to 5V.  Really at $9.25 each they are probably cheaper to buy than to design and build your own breakout.

Ted

Ted Meyers

unread,
Jun 11, 2016, 9:46:21 PM6/11/16
to diyrovers
Okay, I ordered the set of two satellite boards and received them today.  They are really small, and appear to be well built.  The interface is 2x5 rows of 0.1 headers of which I think that I will only need to use 4 pins (Vdd, ground, SCL, and SDA)  - why did they have to use _TWO_ rows for these four pins!?!  Anyway, I thought that they had some arduino code for it, since they have an arduino "compatible" shield -- but it looks like it is really meant for their nucleo board, whatever that is.  So I download the example/api code (after some hassle with registering -- why do they have to make it sooo hard?)  Turns out the example code has a bin file that you can drag and drop onto the nucleo.  Well, that is helpful, NOT!  Next step look at the pdf document file for the api.... only 150 pages!  and something like 8 different init() functions.  This thing is waaayyyy over engineered.  I don't have the time or patience for this sort of crap.  It really shouldn't be that hard to get a range measurement from a freakin rangefinder.  I mean, the Sharp range finders just start sending out range data at regular intervals.  Simple.  And easy.   Arg!  Every time STMicro, you do this to me every time.  One of these days I will learn.

Ted

wholder

unread,
Jun 13, 2016, 9:45:43 PM6/13/16
to diyrovers
I feel your pain.  I ordered the Arduino-shield-like board thinking it would operate something like the one for the VL6180X.  Surprise... not even close.  Even the 7 segment LED display is programmed differently.  And, the example source is written in a way that feels almost obfuscated...  Lots of #defines that reference #defines before you can get down to what is actually going on.  That, plus a complete lack of a register map in the documentation.  Argh...  However, I am slowly making progress on making the single measurement mode work.  If I've unraveled the code properly, it seems like I can initialize the chip, start a measurement and then detect when it's done.  Next, I need to figure out how to read out the measurement.  Fingers crossed...

Wayne

Wayne Holder

unread,
Jun 13, 2016, 11:03:55 PM6/13/16
to diyr...@googlegroups.com
As a quick follow up, I am now able to get readings from the VL53L0X using some very simple Arduino code running on a Leonardo board and using the VL53L0X shield board.  However, the readings sometimes drop out for, as yet, unknown reasons.  The symptom is that, instead of returning a range reading, it returns a value of 20.  However, when it works, I can move my hand smoothly back and forth and watch the readings increases as my hand gets further away and decrease as it gets closer.  I think the problem is that I need to set some additional mode registers before I start taking readings.  Hopefully, I can figure this out, too.  Stay tuned.

Wayne

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diyrovers/92ce8b9a-64a9-4e26-9372-b39f2f6801c2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ted Meyers

unread,
Jun 14, 2016, 1:44:21 AM6/14/16
to diyr...@googlegroups.com
Wow, good job on that.  I took one 20 minute look at the example code and gave up in frustration. 
(I do have another project that is taking a lot of my hobby time right now -- should be wrapping up in the next few weeks though).
Ted

wholder

unread,
Jun 15, 2016, 6:43:09 PM6/15/16
to diyrovers
One trick I've found that helps make sense of the code is to use the -E option for gcc to run only the preprocessor, like this:

  gcc src.c -o file.out -E -ansi

The output file will contain a lot of crap at the beginning but, if you scroll down, you find the converted source code for all the functions in the file with all the #defines and conditional compilation resolved, which is a lot easier to read.

Wayne

Ted Meyers

unread,
Jun 18, 2016, 2:55:08 PM6/18/16
to diyrovers
Okay, that was a good suggestion.  Between finding the right code, preprocessing it, and finding the API docs, I'm getting something that looks like what I need.  I haven't quite got it working yet, but I've made some progress and it is looking a lot closer to working.

Ted

Ted Meyers

unread,
Jun 28, 2016, 12:01:12 PM6/28/16
to diyrovers
A list of registers that I found.... VL53L0X_REG_IDENTIFICATION_MODEL_ID = 0x00c0 VL53L0X_REG_IDENTIFICATION_REVISION_ID = 0x00c2 VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD = 0x0050 VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD = 0x0070 VL53L0X_REG_SYSRANGE_START = 0x000 VL53L0X_REG_RESULT_INTERRUPT_STATUS = 0x0013 VL53L0X_REG_RESULT_RANGE_STATUS = 0x0014

Ted Meyers

unread,
Jun 28, 2016, 10:29:01 PM6/28/16
to diyrovers
I FINALLY got some code to work on the arduino!  Seems to work too.  More testing required, but in case anyone else is interested and working on this, here is the code:  (I found someone who had posted a python script that talked to the VL53LOX, and it gave me some important clues -- but I can't find the page right now, need to go back in my history and look for it again).

Code below:


#include <Wire.h>

#define VL53L0X_REG_IDENTIFICATION_MODEL_ID         0xc0
#define VL53L0X_REG_IDENTIFICATION_REVISION_ID      0xc2
#define VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD   0x50
#define VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD 0x70
#define VL53L0X_REG_SYSRANGE_START                  0x00
#define VL53L0X_REG_RESULT_INTERRUPT_STATUS         0x13
#define VL53L0X_REG_RESULT_RANGE_STATUS             0x14
#define address 0x29

byte gbuf[16];

void setup() {
  // put your setup code here, to run once:
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
  Serial.println("VLX53LOX test started.");
}

void loop() {
  Serial.println("----- START TEST ----");
  test();
  Serial.println("----- END TEST ----");
  Serial.println("");
  delay(4000);
}

void test() {
  byte val1 = read_byte_data_at(VL53L0X_REG_IDENTIFICATION_REVISION_ID);
  Serial.print("Revision ID: "); Serial.println(val1);

  val1 = read_byte_data_at(VL53L0X_REG_IDENTIFICATION_MODEL_ID);
  Serial.print("Device ID: "); Serial.println(val1);

  val1 = read_byte_data_at(VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD);
  Serial.print("PRE_RANGE_CONFIG_VCSEL_PERIOD="); Serial.println(val1); 
  Serial.print(" decode: "); Serial.println(VL53L0X_decode_vcsel_period(val1));

  val1 = read_byte_data_at(VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD);
  Serial.print("FINAL_RANGE_CONFIG_VCSEL_PERIOD="); Serial.println(val1);
  Serial.print(" decode: "); Serial.println(VL53L0X_decode_vcsel_period(val1));

  write_byte_data_at(VL53L0X_REG_SYSRANGE_START, 0x01);

  byte val = 0;
  int cnt = 0;
  while (cnt < 100) { // 1 second waiting time max
    delay(10);
    val = read_byte_data_at(VL53L0X_REG_RESULT_RANGE_STATUS);
    if (val & 0x01) break;
    cnt++;
  }
  if (val & 0x01) Serial.println("ready"); else Serial.println("not ready");

  read_block_data_at(0x14, 12);
  uint16_t acnt = makeuint16(gbuf[7], gbuf[6]);
  uint16_t scnt = makeuint16(gbuf[9], gbuf[8]);
  uint16_t dist = makeuint16(gbuf[11], gbuf[10]);
  byte DeviceRangeStatusInternal = ((gbuf[0] & 0x78) >> 3);

  Serial.print("ambient count: "); Serial.println(acnt);
  Serial.print("signal count: ");  Serial.println(scnt);
  Serial.print("distance ");       Serial.println(dist);
  Serial.print("status: ");        Serial.println(DeviceRangeStatusInternal);
}

uint16_t bswap(byte b[]) {
  // Big Endian unsigned short to little endian unsigned short
  uint16_t val = ((b[0] << 8) & b[1]);
  return val;
}

uint16_t makeuint16(int lsb, int msb) {
    return ((msb & 0xFF) << 8) | (lsb & 0xFF);
}

void write_byte_data(byte data) {
  Wire.beginTransmission(address);
  Wire.write(data);
  Wire.endTransmission();
}

void write_byte_data_at(byte reg, byte data) {
  // write data word at address and register
  Wire.beginTransmission(address);
  Wire.write(reg);
  Wire.write(data);
  Wire.endTransmission();
}

void write_word_data_at(byte reg, uint16_t data) {
  // write data word at address and register
  byte b0 = (data &0xFF);
  byte b1 = ((data >> 8) && 0xFF);
    
  Wire.beginTransmission(address);
  Wire.write(reg);
  Wire.write(b0);
  Wire.write(b1);
  Wire.endTransmission();
}

byte read_byte_data() {
  Wire.requestFrom(address, 1);
  while (Wire.available() < 1) delay(1);
  byte b = Wire.read();
  return b;
}

byte read_byte_data_at(byte reg) {
  //write_byte_data((byte)0x00);
  write_byte_data(reg);
  Wire.requestFrom(address, 1);
  while (Wire.available() < 1) delay(1);
  byte b = Wire.read();
  return b;
}

uint16_t read_word_data_at(byte reg) {
  write_byte_data(reg);
  Wire.requestFrom(address, 2);
  while (Wire.available() < 2) delay(1);
  gbuf[0] = Wire.read();
  gbuf[1] = Wire.read();
  return bswap(gbuf); 
}

void read_block_data_at(byte reg, int sz) {
  int i = 0;
  write_byte_data(reg);
  Wire.requestFrom(address, sz);
  for (i=0; i<sz; i++) {
    while (Wire.available() < 1) delay(1);
    gbuf[i] = Wire.read();
  }
}


uint16_t VL53L0X_decode_vcsel_period(short vcsel_period_reg) {
  // Converts the encoded VCSEL period register value into the real
  // period in PLL clocks
  uint16_t vcsel_period_pclks = (vcsel_period_reg + 1) << 1;
  return vcsel_period_pclks;
}

Chahir BENSMAÏL

unread,
Jun 30, 2016, 9:36:51 AM6/30/16
to diyrovers
Hello,

I'm also working on VL53L0X Expansion board, exactly on P-NUCLEO-53L0A1 (VL53L0X board on STM32F401 Nucleo board). I ran the example given in (http://www.st.com/content/st_com/en/products/embedded-software/proximity-sensors-software/stsw-img005.html), it works, but I could'nt change the DeviceMode from "single ranging" to "continued timed ranging". Do you have any idea ?

Thanks,

Chahir 

Ted Meyers

unread,
Jul 1, 2016, 1:35:15 PM7/1/16
to diyr...@googlegroups.com
I haven't tried changing the mode yet, I'll give it a try soon.  I think there is register setting for the device mode, the trick might be finding the register value, and the value for the mode that you want.

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.

fsdre...@gmail.com

unread,
Jul 25, 2016, 10:10:41 AM7/25/16
to diyrovers
Hey Ted and everyone,

thanks for posting your progress so far! I believe  this is the script you were referencing. I got it working on a raspberry pi as well, but I would prefer the use of an arduino as the rest of my usecase doesn't need a raspberry pi.
I successfully included them in my arduino sketch but haven't gotten very far with using it's many many functions. 
As Chahir mentioned, it would be cool to get to use the continuus mode.

Ted Meyers

unread,
Jul 25, 2016, 9:00:11 PM7/25/16
to diyrovers
Yes, that is the code, thanks for finding it.

Ted

fsdre...@gmail.com

unread,
Jul 26, 2016, 9:24:38 AM7/26/16
to diyrovers
Hello fellow rangers,

I have found this github repository: https://github.com/cassou/VL53L0X_rasp and have spent the morning getting it to build on my raspberry pi zero. It was a bit troublesome at first, but I got it working eventually! I have documented my changes in my fork: https://github.com/steinerlein/VL53L0X_rasp
I hope this does help!
My next step will be to modify the continuous ranging example so that there is a stopRanging function instead of the maximum of 5000 readings
I guess it might be possible to write a vl53l0x_platform.c for Arduino - this way the library could be used through the Arduino IDE - what do you think?


Am Sonntag, 5. Juni 2016 01:05:42 UTC+2 schrieb wholder:

Joep Suijs

unread,
Aug 12, 2016, 9:20:28 AM8/12/16
to diyrovers
Hi,

First of all, thanks Ted for providing your code!  Thought I'd share my experience too.

I have tried three sensors via the 10-pin connector / level shifter and get one working on an i2c bus with multiple devices. The other two block comms to the other devices on the bus. Connecting just the sensor (removing the resistors on the break line) works okay, with just sda/scl and power supply. And a pull-up on xsdn / xshut. Is it expected the level shifter does not work on an i2c bus? (And why does one work then?)

I'd like to run all three sensors on a single i2c bus, so I looked into changing i2c addresses. This is done by writing the new value to register 0x8A. Reading this register provided the current address (which is pretty useless since you need the address to read the register). The register only uses the lower 7 bits (so default is 0x29, arduino style addressing). 

From the STM api:
#define VL53L0X_REG_I2C_SLAVE_DEVICE_ADDRESS          0x008a

The bad thing is the address change seems to be non-persistent. So I guess the sensors need to be enabled one by one via IO lines to XSHUT...

As Ted shows in his code, the range_status (0x14) has 4 relevant bits (bit 3-6, 0x78). The values are named VL53L0X_DEVICEERROR_* and defined in vl53l0x_device.h. I get quite a few bad readings (TCC and PHASECONSISTENCY error, whatever that means), but check for RANGECOMPLETE (11) before using the data provides reliable operation. 

Has anybody looked into the initialization flow (page 11 of the API user manual) or the calibration procedure? I'm quite curious if this would increase performance of the sensor.

Regards,
Joep 



 

Op dinsdag 26 juli 2016 15:24:38 UTC+2 schreef fsdre...@gmail.com:

Ted Meyers

unread,
Aug 12, 2016, 11:16:40 AM8/12/16
to diyr...@googlegroups.com
Joep,

Thanks for the update, it sounds like you are making some progress.  I will look into this again as soon as I get a chance.

I wanted to point out that Pololu just released a breakout board: https://www.pololu.com/product/2490

Ted


--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+unsubscribe@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.

priyanka Ashok

unread,
Aug 15, 2016, 3:12:49 PM8/15/16
to diyrovers
Hi,
  Has anybody tried interfacing the VL53L0X sensor with an ARM CORTEX M4 microcontroller for continuous ranging purpose? If so, could you please share the code. I have been trying to program it using its  predefined API functions but unable to do so. 

Priyanka

Joep Suijs

unread,
Aug 16, 2016, 2:53:18 AM8/16/16
to diyrovers
Hi Priyanka,

Fwiw: it took me about a day to get the api code running on my F4 system, with the intent to study its internal working. Most of the work was to match all i2c functions to my framework (don't understand why they won't use one or two generic calls). I am happy to share it, but doubt it would be helpful in addition to the api code...

Please find enclosed my code based on Teds work. Call Takt() at regular intervals and Distance gets updated.

Note that Pololu also published an arduino library for this sensor. It looks they converted the API library into the basic code required, just like Sparkfun did for the VL6180. Definitely worth to take a look at!

Joep


Op maandag 15 augustus 2016 21:12:49 UTC+2 schreef priyanka Ashok:
VL53L0x.cpp
VL53L0x.h

Joep Suijs

unread,
Aug 20, 2016, 1:54:43 PM8/20/16
to diyrovers
Hi,

Put my experience with the sensor on our wiki at http://wiki.robotmc.org/index.php?title=Vl53l0x. Most of you might have some difficulty understanding Dutch, but I'm sure google translate will be helpful. And if not, feel free to aks :)

The page is a work in progress. Intend to create some test graphs to see the sensor accuracy and noise. After that, proper setup of the sensor to see if that makes a difference.  I might also compare it with the VL6180 to see the max range of that one. I thought it was 200mm, but read somewhere this can be extended to 600mm...

Regards,
Joep


Op dinsdag 16 augustus 2016 08:53:18 UTC+2 schreef Joep Suijs:

fsdre...@gmail.com

unread,
Aug 22, 2016, 10:56:06 AM8/22/16
to diyrovers
Joep,

thank you very much for collection and presenting your information! You seem to have used two (three?) sensors at the same time. Did you use the Satellite boards or the carrier made by Pololu? If you used the boards by ST, did you keep the level shifter?

Regards, Farid

Joep Suijs

unread,
Aug 23, 2016, 2:01:44 AM8/23/16
to diyrovers
Hi Farid,

I'm glad you like my work ;)

Actually, there are four of them ;) Ordered two satellites which turned out to be two pairs. I could not get multiple of them to work on a single i2b bus with the ST level shifter on the board, so I disconnected the sensor by removing the row of 0-Ohm resistors. This works fine on a 3.3 V bus of an STM32F4. 

It might be that the purpose of the ST level shifter is to connect that single sensor to dedicated pins of the microcontroller and not to have them on an real i2c bus like the Pololu boards. This makes sens on evaluation and in a smartphone-like application. On my robots, there are often three distance sensors: one to the front and one on 45 degrees left and right.

My intent is to repeat the tests on 2.7V, but it takes more time than anticipated to get the preparations done. A voltage regulator and a (single) level shifter (from ebay, with the fets) needs to be added to the board. 

Regards,
Joep 

Op maandag 22 augustus 2016 16:56:06 UTC+2 schreef fsdre...@gmail.com:

fsdre...@gmail.com

unread,
Aug 23, 2016, 3:34:47 AM8/23/16
to diyrovers
Joep, 

Your reports fits well with my experience so far. I am very glad (not in a mean way) that you didn't have success with using two Satellite boards on the same bus. I did try the same for many hours now and started to lose my mental sanity ;-) I have some carrier boards from Polulu coming my way now, hoping they behave better.
It might be interesting to find out why Exactly the level shifter causes such trouble..

Good luck to you,
regards, Farid

Joep Suijs

unread,
Aug 23, 2016, 1:53:00 PM8/23/16
to diyrovers
Hi Farid,

Good to know you have similar issues with the Satellite boards. The only thing I can think of is that didn't try to ty all inputs to a logical level.
Anyway, if you have a 3.3V controller, you can connect the sensor directly. If you have a 5V controller, get a level shift circuit, eg from ebay for less than a dollar.

Regards,
Joep

Op dinsdag 23 augustus 2016 09:34:47 UTC+2 schreef fsdre...@gmail.com:

Joep Suijs

unread,
Aug 24, 2016, 4:48:10 AM8/24/16
to diyrovers

I've been using my own code, based on a mix of Ted's and of Pololu. If you're an Arduino user and want to start with this sensor, I'd recommend to give the Pololu code a try.

The wiki page has been updated and is done for now.

* Calibration of the sensor seems to improve the accuracy a bit.
* Supply voltage (3.3 vs 2.7) seems to have little influence.
* Accuracy on a white paper is a lot better than on an aluminium sheet. Wonder if this has to do with the color or surface structure.

Having said this: it looks this sensor is a large improvement over the Sharp distance sensors. 

Time to mount the sensors on my robot and see how it acts on real world objects and lighting conditions while driving.

Regards,
Joep 

Op zaterdag 20 augustus 2016 19:54:43 UTC+2 schreef Joep Suijs:

fsdre...@gmail.com

unread,
Aug 24, 2016, 8:35:14 AM8/24/16
to diyrovers
Today I have received five carrier boards from pololu. After hooking them up, all the problems I had with the previous boards (Satellite boards by ST) are now GONE! Everything works as expected.
I am leaving this info here for anyone who is trying the same. 
As Joep writes though, you can use the ST boards without the level shifter IF you have a 3.3V logic level board.

Dennis Fischer

unread,
Nov 14, 2016, 4:59:54 PM11/14/16
to diyrovers
Hi Ted.

Thanks for the great work!  This has got me started.  I have got this to work on a PIC. The only thing is that the program on my pic acts a little funny. I keep getting a number "20" on and off while the sensor is pointing to infinity. I thought it was in my program but yours seems to do it as well. Do you have any idea why?

I have been trying to hack this and you have been a great help. Is there a chance you have a revised program I could see? I hate asking but with out proper
documentation from ST im at a loss. Lots of reverse engineering already.

Thanks,
Dennis

Ted Meyers

unread,
Nov 15, 2016, 3:48:59 PM11/15/16
to diyr...@googlegroups.com
I'll do a little more research on this when I get a chance, but for now I will tell you that I also had a lot of trouble with the unit giving me bad values.  That is partially why I gave up on it, although I would like to give it another chance.  It worked best indoors and away from sunlight, and it seemed like some surfaces worked a lot better than others.

Ted

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+unsubscribe@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.

craig caraway

unread,
Nov 19, 2016, 11:03:27 AM11/19/16
to diyrovers

Hi  Dennis
I have been trying off and on for several weeks to get some code working using a PIC but have been very unsuccessful. I would like to know if you performed any of the initialization that is listed in the documentation or did you just fire up the device and fire off I2C packet commands to read the measured values? I have been pulling my hair out trying to get the ported ST-MICRO API code working for PIC. Can you help me?

Joep Suijs

unread,
Nov 19, 2016, 12:38:00 PM11/19/16
to diyrovers
Hi Craig,

You might want to take the Arduino library from Pololu as a starting point. Afaik the documentation is incomplete (no regsiter map and initialisation procedure). The ST library 'contains' the missing info and I guess this is okay if you can use it. Reverse engineering of this library is not an easy task (well... at least it is time consuming).

Regards,
Joep

Op za 19 nov. 2016 om 17:03 schreef craig caraway <craigc...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.

sunw...@hughes.net

unread,
Nov 21, 2017, 2:11:30 AM11/21/17
to diyrovers
Is there any way to replace the laser and sensor with something like a 5mw green laser and increase distance?

googlegroups

unread,
Nov 21, 2017, 11:08:42 AM11/21/17
to diyr...@googlegroups.com
Re-sending -- Google blocked my attachment -- let me know if you want it.

--------------
Attached is a code example that trims the lidar interface down to the basics.  The st code is a giant pig.

This is for a little PIC12F1840 that sits in a lidar pod, and is an i2c slave to whatever main processor is used.  It is designed to allow up to eight pods to be daisy-chained.

This was used for our high school team's  FRC robot last year.  My lidar implementation is described a bit more:

I had a bunch of these pods assembled, and I should probably put them up for sale.

gil


 


--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.

googlegroups

unread,
Nov 21, 2017, 11:10:25 AM11/21/17
to diyr...@googlegroups.com

jesse brockmann

unread,
Nov 21, 2017, 11:28:58 AM11/21/17
to diyr...@googlegroups.com
Several of Sparkfun AVC competitors were using rplidar A2.   Netburner was able to make it through the barrels using it.  The animation he posted of the run showed it worked well.   The key is the range outside isn't great. 


JesseJay

On Nov 21, 2017 10:10 AM, "googlegroups" <google...@surlee.com> wrote:
-------- Original Message --------
Subject: [diyrovers] Re: More docs and example code for the VL53L0X
LIDAR sensor
From: sunw...@hughes.net
Date: Sun, November 19, 2017 6:21 am
To: diyrovers <diyr...@googlegroups.com>

Is there any way to replace the laser and sensor with something like a 5mw green laser and increase distance?

On Saturday, June 4, 2016 at 4:05:42 PM UTC-7, wholder wrote:
This document provides "clues" as to where to find additional documentation and example code for the new VL53L0X sensor:


For example, slide 4 is tells you to go to st.com and search for "STSW-IMG005" to find the example code. Likewise, you can search for "UM2039" to get the API doc.  Not sure why the main VL53L0X info page doesn't just provide proper links to this stuff, but perhaps it's a treasure hunt, so I won't spoil it by telling you about the other things you can find this way...

Well, perhaps I'll mention that found that Mouser has an Arduino-compatible PCB that comes with three VL53L0X sensors and an LED display, which you can order here:


The doc for this board is here:


Wayne
--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+unsubscribe@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diyrovers/ca8da53c-6d82-47d7-8ca7-a9e095badb02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+unsubscribe@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.

Joep Suijs

unread,
Nov 21, 2017, 1:09:32 PM11/21/17
to diyr...@googlegroups.com
Hi,

@VL53l0x: to connect from 2 to 8 of them to a single i2c master, you could use a tca9548. This allows you to address them separately during startup to changes addesses. After setup, just enable all ports on the tca9584 at once. Breakout boards with a tc9548 are just a few dollars on ebay.

@Rplidar A1: I've used it indoors and it works great except for that one time it needed to inspect rubber car tires. Unfortunately, the unit failed after only 20 hours of running, due to wear to the slip ring connecting the electronics on the rotating part to the base. At that time the unit was just over a year old. They offered me a 10% discount on their (at that time) new A2 unit (which is said to be more durable) if I returned it. I thought I'd better try and repair it, so put a replacement slip ring with 6 wires in (instead of the 4-wire one in the original), so the most critical wires - ground and serial-tx - are doubled. If it would fail again, I'd probably use the slip ring for power only and add a radio unit for communication.
Bottom line: good electronics (laser, camera) and reasonable rotating mechanism (cheap motor and drive belt are a bit noise but do the job so far). If you could cope with a failing slip ring, $150 seems like a good offer to me (mine was $400).

Joep

Op di 21 nov. 2017 om 17:28 schreef jesse brockmann <jjbr...@gmail.com>:
Several of Sparkfun AVC competitors were using rplidar A2.   Netburner was able to make it through the barrels using it.  The animation he posted of the run showed it worked well.   The key is the range outside isn't great. 


JesseJay
On Nov 21, 2017 10:10 AM, "googlegroups" <google...@surlee.com> wrote:
-------- Original Message --------
Subject: [diyrovers] Re: More docs and example code for the VL53L0X
LIDAR sensor
From: sunw...@hughes.net
Date: Sun, November 19, 2017 6:21 am
To: diyrovers <diyr...@googlegroups.com>

Is there any way to replace the laser and sensor with something like a 5mw green laser and increase distance?

On Saturday, June 4, 2016 at 4:05:42 PM UTC-7, wholder wrote:
This document provides "clues" as to where to find additional documentation and example code for the new VL53L0X sensor:


For example, slide 4 is tells you to go to st.com and search for "STSW-IMG005" to find the example code. Likewise, you can search for "UM2039" to get the API doc.  Not sure why the main VL53L0X info page doesn't just provide proper links to this stuff, but perhaps it's a treasure hunt, so I won't spoil it by telling you about the other things you can find this way...

Well, perhaps I'll mention that found that Mouser has an Arduino-compatible PCB that comes with three VL53L0X sensors and an LED display, which you can order here:


The doc for this board is here:


Wayne
--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diyrovers/ca8da53c-6d82-47d7-8ca7-a9e095badb02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.

Md. Asif Reza

unread,
Feb 12, 2018, 9:37:59 AM2/12/18
to diyrovers
Hay dear group members,

I am looking for code, how to change VL53LOX sensor address, and in this case i am using  my PSOC 4 prototype kit. Here is the code i am using 
Main.c
VL53LOX.h.txt
VL53LOX.c.txt
ToF_Sensor.cywrk
Reply all
Reply to author
Forward
0 new messages