I2C range sensor not working correctly | LabJack
 

I2C range sensor not working correctly

2 posts / 0 new
Last post
Anonymous
_AJ_'s picture
I2C range sensor not working correctly

Hi, 

I'm trying to use this distance sensor (https://www.dfrobot.com/product-1706.html) and am running into some small errors. I have it set up as shown in the attached image, and I am trying to use it with the Time-Of-Flight Proximity Sensor- VL6180X Lua example script found in kipling. The code recognizes the sensor and begins taking measurements, but it just results in 3mm every time.

I am not sure that I have configured this correctly, I am quite new to both Lua scripting and I2C, so I'm not sure what's wrong. Would you expect that if I use this slightly different sensor with the example code for the VL6180X that I would have to change anything for this specific sensor? For example maybe the sI array should be slightly different or some of the addresses being read/written to should be changed? Of course the slave address is correct since it finds the sensor. 

I am also not 100% sure I put the recommended pull up resistors in correctly, I tried 4.64 kOhm, 3.24 kOhm, 2.43 kOhm, and 1.82 kOhm resistors, as well as no resistors and it didn't make a difference.

I have also included an image of all the I2C related registers I could find in kipling and what they had after running the script.

Thank you

LabJack Support
labjack support's picture
The interface for your sensor

The interface for your sensor is likely different than our VL6180X example, your sensor just happens to use the same address. It does not look like the sensor datasheet has much information on the actual I2C commands that you need. Instead, it suggests using some C API and other board for control. I would recommend looking over the documentation for the device for further information or contact ST for more guidance on the I2C interface:

https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html#docum...