cancel
Showing results for 
Search instead for 
Did you mean: 

VL6180x distance issue

TBoul.1
Associate

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

1 REPLY 1
John E KVAM
ST Employee

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.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'