i started off with looking at temp variation, and moved on to voltage and then to laser power. 

here is what is used, a ntc temp sensor (not sure of brand or type, it was in arduino parts kit) and a sensor that has been placed inside of a case that limits its field of view of sent out laser 

there is a lot of noise in raw data. to summarize, you will want to monitor chip voltage. if it goes out of spec dont count the measurement of the range for that reading. variations in voltage, and in laser output power cause the noise in the distance range. but it is still within spec of +/-3% when voltage is above 2.6 (device in spec). the voltage and the laser power variations are still being looked into. 

here is an image of what it looked like when sensor was measuring for about 8hrs thru a camera that had IR filter removed. the laser light is not visible. 

here is a close up of sensor, and 10k resistor.

here is up close of board for temp sensor. it is hooked up to output pin d12 set to output low, and to 5vcc pin of nano. vl53l0x is to vin on chip. nothing really special. it is about 6 inches away from VL53l0x lidar chip

after collecting 528 minute of data for temp and for sensor distance. i'm not convinced that temp causes measurement drift, at least off chip. here is a graph of temp from 16c to 12c, and the values are all over the place below. the noise is just to big, and the temp does not change that much over an hour time, but over 8hrs it drops from about 16c to 12c. the vl53L0x is stable for minutes at a time, but drifts up and down about +/-1.5MM in distance measurements over 8hrs time. fluctuation is not correlated to temp. i just dont see it. i suspect the same to be true for the vl6180 sensor that temp is not directly correlated to drift or noise.

data below is filtered to remove most noise.

yes you might be able to make out a pattern but it is not consistent and the data is +/-1.5mm to 2mm all the time. for minutes at a time it remains stable but it does drift. temp is constantly going down from about 16C to 12c over night in a room with no heat on. temp is not the main culprit of shift. 

on a hunch, from working with thermal sensors, i know that voltages can effect results. so i decided to modify code to also capture the voltage of the VL53L0x thru the SDA pin when the device was idle between measurements. this pin is connected to a pull up resistor that goes to chip vcc. when not in use this pin floats to vcc of chip at 2.8v

i have an hour of data included below, but here is a section of it. the green is the variation in voltage *100

the blue is the variation in distance.  it can be generated with volt_and_temp_and_distance code included


this was with filtered data and a short range. when i tried adjusting for voltage noise, i got a lot of variation. so it seams that something is causing voltage spikes, and is somehow causing measurements to vary.

We only get measurements when SDA line is not in use, so it is not pulled low, it is floating to chip vcc

these are filtered results of temp variation and voltage variation. it seems to match but voltage noise is not the main cause of variation. it does cause change, but something else is causing more variation. something is changing. it is not temp, voltage is a cause and should be compensated for, but there is a bigger culprit. 

i got a short segment that i though was promising, but after further looking at voltage, it varies up and down and sensor ranges +/- delta does not account for most of the noise.

but it you want a lot of raw data at 30-50 times a second with no filtering that shows temp, v of chip and distance look at the included file raw_measurment2_21_21.csv

i do see some correlation with voltage and noise, but there seems to be something bigger causing variation. i began to suspect laser output might be cause of variation, so i encased a cds cell inside of case device i have for the sensor.  i have data collected that suggests that when the power of the laser is out of a set range, the distance will be off. abs(avgPower-delta) the greater this number the greater the deviation is. usually it is a longer measurement. the data is incredibly hard to work with as i am looking at raw values of 23900 values of mm distance delta, laser power level delta, and voltage delta. but i do see some raw values of abs(delta power laser variation causing measurement variation. so i will now look at data that is compensated for the laser power variation.

here is some of the raw data. i have included it in a file below called sat23.cvs

this is too much data to look at on a computer. my program takes up to 5 minutes to manipulate data. but while looking at data i see greater laser energy has more variation it seems to be the more laser energy seen by the cds cell, means a higher distance measure error.

so we are now going to monitor laser power output. this is what i used. the laser light is detected from the reflection on the polarized filter plastic surface. the cds cell is located inside the case of the laser filter.

this is what filter looks like with plastic polarizer removed. the cds cell is the round device inside the casing.

as seen below the polarizing filter reflects some laser light back onto the cds cell

ok so old data shows a drift of 1.5mm distance over time. here is results with adjusting for laser power variation:

here is data of unfiltered mm distance delta in yellow with 350x delta green in voltage and 6x delta in laser output power. i left out temp information in charts, because as long as it is 12-19deg c there is no direct effect from temp. this is for my setup. look at power regulation for temp shift culprit, also voltage spikes are 1 of the two causes of data to be in spec but not as accurate as it could be. the green voltage spikes are as much as +/- 0.25V and anything beyond 0.015v has a huge effect (the chart is scaled green line by 350 times)

so when green line voltage spikes and when laser power spikes distance is delta positive, when green voltage is stable and power output drops distance delta increases, when green line voltage stays the same and blue power increase distance delta goes lower. 

can see that a combination of laser power fluctuation and voltage cause the noise! yellow is mm delta, blue is cds cell power detection from laser, and green is voltage variation (350x scaled), red is combined cds cell and voltage delta red= 0.25(*6x laser variation cds cell) +0.75 *(350v delta variation)

green is voltage (last measureV-current measureV)*350

yellow in this case is (average_distance_MM - current measure for delta)

blue in this case is (last measure cds - current measure) *6

red is (0.75*blue)*(0.25*green) and it looks a lot like the yellow variation with the scaling.

so here is what we want to see: distance variation with noise from cds and voltage. blue delta mm change in measurement, and green line is scaled cds laser power data and scaled voltage delta combined. some phase issues and gain issues still to resolve.

more data is coming. but i can tell you this when you look at mm_volts_laser_power.numbers file 

when sorting data ascending for vchip voltage.

variation (agv mm-current distance )was by 6x, whenever there is two lower voltages in a row and one is below spec, the other right on the edge, or sometimes just a really low voltage, the error range is +/- a great distance. there are some values that are still near normal, but if you get a voltage detection of less than 2.7v from the vchip setup i have above, then do not use that measurement. you are already better off.

now what i am doing is trying to compensate for laser power and for voltage variations. for me these are the real culprits. i think the part has its own internal calibration before each measurement setup, and then the laser power is adjusted, but during measurement the voltage rises, or falls. voltage can effect before measurement or during measurement so its spikes are between single measurements. the laser power seems to self adjust over a few cycles so the slower noise is from laser output variation. 

looking at static data and correcting it for noise is easier that doing it live, i dont know off had the dc offsets and the gains. so i am working on a method that gives me min/max and dc offset of Vchip delta noise, and the same for laser output.