cancel
Showing results for 
Search instead for 
Did you mean: 

vl6180x usage without library

IKhly
Associate II

Hi there, I have got quite an inaccurate range measurement result with vl6180x in my setup with stm8s003f3. I only use low-level I2C tx/rx communication and send to the slave address 0x52 start single ranging command 0x00;0x18;0x01 wait for 100mS and next read the result from 0x0;0x62. I do that in a cycle(start;100mS delay;read result). GPIO0 managed correctly(powerOn GPIO0=0;delay 100mS;GPIO0=1;delay 100mS; start/read cycling). Finally, the result shows me 255mm at 300mm of white paper target but 14mm result I got instead 160mm! Furthermore, vl6180x shows only 14mm even if target going from 160mm up to 0mm. I think something wrong with my vl6180x sample, isn't it? According vl6180x.pdf that sensor is factory precalibrated, and of course I've expected to see the tolerance less than +/-10%.

PS: decoupling caps placed within 2mm of vl6180x pads, 10uf and 1uf 0402. vl6180x powered from 1117 2.8(actulal voltage 2.86VDC with about 20mV ripple). I2C high-level voltage =3.3V.

1 REPLY 1