2020-08-27 10:26 AM
Hi,
We are using VL6180X to measure the cyclic movement of a part (a flat, white plastic sheet). The amplitude of this cyclic movement is about 20mm. The distance sensors work fine but we had two recent instances where the distance sensors returned a correct amplitude and then suddenly returned a reduced amplitude of 5mm only. After resetting the sensor, measurements came back to normal.
Have you ever observed such behavior? What could explain that?
Thank you
2020-10-05 05:08 PM
Yes unfortunately I have. The issue is that every now and again you are querying the sensor at just the wrong moment and it interupts a critical bit of code. The result is basically random number.
Download the latest API.
In it you will see a correction:
VL6180_WrByte(dev, 0x00e3, 0x01); //was 0x00
VL6180_WrByte(dev, 0x00e4, 0x03); //was 0x04
You can just update those two lines in your initialization and it will fix the issue.