VL6180x - Determining if continuous mode is running or stopped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-11 09:09 AM
I'm currently using the VL6180x in a project, and I'm encountering some issues where I believe the prox sensor is being reset. I'm operating in Interrupt + Continuous mode. The symptom is that after running an unpredictable amount of time, while being handled, and moved, the VL6180x no longer produces an interrupt when the minimum distance threshold is passed.
I am trying to discover a way to read out the mode of the VL6180x on a periodic basis to determine if it is operating correctly. If it is not, a reset and reconfiguration will recover the device.
My confusion is this. I can't seem to find a register that reflects whether continuous mode is running or not. The SYSRANGE__START register is the closest, but it only shows which mode it is set to, and not if it is currently running. I also can't simply set the start_stop bit of this register, because if it is running correctly, this would halt operation.
Main question:
What sequence can be used to change the device from an unknown operating mode, to Continuous mode, running?
Any thoughts would be appreciated here.
Note: I am using the ST VL6180x library with a 3rd party processor.
- Labels:
-
Time of flight
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 04:14 PM
If you suspect the chip is rebooting, change the I2C address at the start. If it reboots, the sensor will start answering at the default address.
I2C is pretty unreliable if you have long distances. Get a scope. The clock and data lines should always be high except when data is being transferred. A "bus-stuck-low" is a sure sign of glitches on the line and the source of your error.
While waiting for the interrupt feel free to ping the chip. You can read the frame counter which should be incrementing. or you could even read the current distance. Distance should change even if you do not trigger the threshold.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-24 09:03 AM
​There is even a better way. Using a cell phone camera look for the tell-tale sign of the laser firing. If the laser is lighting up, the sensor is working. Conversely if it's not lighting up, it's not working.
You can use this trick on all ST's Time-of-Flight sensors, but the VL53 ones use a 940nm light and the IPhones have an extremely good IR filter on them. So you have to find a non-IPhone to check the VL53 sensors. (So try using the camera when you know the sensor is working to check your phone.)
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-24 09:07 AM
​But the best answer is to download the API from ST, and examine the function, RangeStartContinousMode(). It will show you how to set the register.
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.