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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.