testing the VL53L0X in a stable jig, I obtain very different distances measured, depending on the type of object/material…
77 mm measured manually
55 mm shiny aluminium (extrusion)
67 mm coated/lacquered paper (Beginning C for Arduino book cover)
68 mm satin stainless steel (Mitutoyo slide rule)
71 mm anodised aluminium (iPad back)
77 mm near black matt rubber (iPad cover)
79 mm rough plank o’ maple
86 mm human skin
These measurements are repeatable after resetting the Metro Mini or while interchanging the objects.
Is this to be expected? Are there some settings in the Pololu library or other tricks how one can get something far more predictable?
thanks for replying. I took it apart. It was one, two and three layers of tomato pulp cans to each side, away from the cone of the sensor, with each object, all objects being flat, placed across ; ) The objects are listed in my original post; I think my photography skills will fall short of online images of the things. This is what I obtained with a large fairly white matt postcard…
I probably do some more “rigorous” testing, again, but since the lighting was controlled, the objects were placed at the same height and not moving, the results are quite telling. I also tested all at a different height and got this:
203 (77) mm measured manually, same ambient light conditions as before, room temperature also
176 174 (55) mm shiny aluminium (extrusion)
197 192 (67) mm coated/lacquered paper (Beginning C for Arduino book cover)
193 189 (68) mm satin stainless steel (Mitutoyo slide rule) 205 203 (71) mm anodised aluminium (iPad back)
214 211 (77) mm near black matt rubber (iPad cover)
215 213 (79) mm rough plank o’ maple
220 219 (86) mm human skin
So, the iPad won : D
First row numbers are with weighted averaging disabled, numbers fluctuate much and are averaged by eye ; )
The shiny aluminium, shiny book cover and human skin are the worst. Maybe it’s just the limit of this ultra low-price sensor, compared to those from Bosch, Balluff or Garmin, costing from €50 upwards.
I set up a test here with a piece of white board moved by a stepper motor and then covered the board in aluminum foil. The foil covered board produced different distance measurements than the white board itself. We would still consider this sensor to be more accurate than our Sharp IR distance sensors and sonar range finders, but it appears that the material can have a slight effect on the measurement.
Here is a graph that shows how the average of 250 measurements (with the standard deviation those measurements) differs from the actual distance for tests with whiteboard material and aluminum foil. So for close measurements, the average was closer to the actual for the whiteboard, but further away (past about 200mm) the foil surface produced more accurate measurements. I used a timing budget of 50000us for those measurements.
Alright, thanks, that’s a good one, using a stepper motor for repeatable measurements. It shows that this sensor ain’t no digital ruler. I suppose my beginner’s expectation was too high. If you could be so kind, could you post the code/settings according to the Pololu library you used for continuous measurement? I’d like to compare that to what I used above.
Meanwhile, I saw the new VL53L1X, which is a follow-up that, to a degree (which degree, though), addresses some problems the old VL53L0X has in broad daylight. It has tiny lenses that concentrate the incoming reflected light, also shielding the receptacle hole to a certain degree from stray light ingress. Do you sell that one, too? Is there a library for it already? Worth comparing.
I also learned from automotive electronics discussions that the Asian and European car industry almost exclusively uses low-cost Murata ultrasonic sensors in the cars’ bumpers for parking aids, so I’ll try to get one of those also.
The code (shown below) is pretty straight forward. I used a spreadsheet to calculate the average and standard deviation of the 250 measurements taken at each distance.
I would not expect parking assistance in a full sized automobile to be an application that requires more accuracy than a few centimeters, but we would be interested to see how sensors like those compare.
-Nathan
#include <SPI.h>
#include <AMIS30543.h>
#include <Wire.h>
#include <VL53L0X.h>
const uint8_t amisDirPin = 1;
const uint8_t amisStepPin = 0;
const uint8_t amisSlaveSelect = 4;
AMIS30543 stepper;
VL53L0X sensor;
void setup()
{
Serial.begin(115200);
delay(100);
Wire.begin();
SPI.begin();
stepper_init();
sensor.init();
sensor.setTimeout(500);
sensor.setSignalRateLimit(0.1);
sensor.setVcselPulsePeriod(VL53L0X::VcselPeriodPreRange,14);
sensor.setVcselPulsePeriod(VL53L0X::VcselPeriodFinalRange,10);
sensor.setMeasurementTimingBudget(50000);
//stepper.disableDriver();
delay(10000);
Serial.println("Ready to start");
for (int i = 0; i<10; i++){
//Take 250 measurements
for (unsigned int x = 0; x < 250; x++){
Serial.print(i);
Serial.print(" ");
Serial.println(sensor.readRangeSingleMillimeters());
}
//move 30mm
for (unsigned int x = 0; x < 2387; x++){
step();
}
}
stepper.disableDriver();
}
void loop(){
}
Yes, I did. This sensor is better. But don’t expect it to do wonders.
The biggest issue with these kind of sensors seems to be colour and reflectivity of what is being measured; see my list in an above post and what nathan did with a more controlled set-up.
You cannot use these sensor as a 0-2 metres digital ruler, but rather as some kind distance indicator, which is fine for applications where the accurate distance is not critical.
No surprise that professional laser-based distance meters start from €200 and go to well over €1000.