Unreliable VL53L0X, any alternatives?

I bough this VL53L0X module and for starters, the module wouldn't show 0mm when I had my finger touching the sensor. It would show 40mm. This was an easy fix, I just manually took away 40mm. But as I bring my hand closer to the sensor the distance decreases and goes into negative numbers and then when my hand is nearly touching the sensor it goes back to 0 (the output increases when the distance is decreasing). And sometimes the sensor just stops working altogether and throws random errors. And when I have the sensor a fixed distance from something, the output is very unstable and keeps changing even though no real world changes are made. Are there any good, reliable alternatives for the VL53L0X? I used the example code:

/* This example shows how to use continuous mode to take
range measurements with the VL53L0X. It is based on
vl53l0x_ContinuousRanging_Example.c from the VL53L0X API.

The range readings are in units of mm. */

#include <Wire.h>
#include <VL53L0X.h>

VL53L0X sensor;

void setup()
{
  Serial.begin(9600);
  Wire.begin();

  sensor.setTimeout(500);
  if (!sensor.init())
  {
    Serial.println("Failed to detect and initialize sensor!");
    while (1) {}
  }

  // Start continuous back-to-back mode (take readings as
  // fast as possible).  To use continuous timed mode
  // instead, provide a desired inter-measurement period in
  // ms (e.g. sensor.startContinuous(100)).
  sensor.startContinuous();
}

void loop()
{
  Serial.print(sensor.readRangeContinuousMillimeters());
  if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }

  Serial.println();
}

Were you testing with example code that you did not write and did not mess with?

Pleas post the code you were using when you received these disappointing results.

a7

yes, I was using the example code, didn't change it one bit

Pleas post the code.

Did you use any sketch or process to calibrate the device?

a7

No, I didn't know you needed to calibrate it. I just followed a youtube tutorial. How would I calibrate?

Or, go here, and download the PDF in English.
https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html

if you look at the specification of the VL53L0X sensor you will see the minimum range is approximatly 30mm
consider the VL6180X which is approx 10mm minimum range
what is the minimum you actually require?
what is the application?

I have used various Pololu TOF sensors in several projects and always found they always operated to specification

Any circuit module that you buy from eBay, Alibaba, Amazon, etc. that can't be traced to a trusted supplier is likely to be counterfeit, made from reject parts, etc. Sometimes they work as expected.

Alternatives included suppliers like Adafruit, Pololu, Sparkfun, Conrad, who support and guarantee their genuine products.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.