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

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.