1

I'm attempting to read data from the VL53L1X-SATEL and the TSL2561 Luminosity Sensor at the same time using I2C on the Raspberry Pi 3 B+. When just the vl53l1x is connected I get the following from i2cdetect -y 1:

pi@BIKE_SENSOR_SYSTEM:~ $ i2cdetect -y 1

    00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 

    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

    20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- -- 

    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

    70: -- -- -- -- -- -- -- -- 

With just the tsl2561 connected I get:

pi@BIKE_SENSOR_SYSTEM:~ $ i2cdetect -y 1

00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- 

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

70: -- -- -- -- -- -- -- --   

This is as expected.

From what I've read online, in order for them to work together the two devices should be connected in parallel to the corresponding pins on the pi. However, when I do this I get:

pi@BIKE_SENSOR_SYSTEM:~ $ i2cdetect -y 1

00:          -- -- 05 -- -- -- -- -- -- -- -- -- -- 

10: -- -- -- 13 -- -- -- -- -- -- 1a -- -- -- 1e -- 

20: 20 -- -- -- -- -- 26 -- -- -- -- -- -- -- -- 2f 

30: -- -- -- -- -- -- -- -- -- 39 -- -- 3c -- -- -- 

40: -- -- -- -- -- 45 -- -- -- -- -- -- -- -- -- -- 

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

60: 60 -- 62 -- -- -- -- -- 68 -- -- -- -- -- -- 6f 

70: -- -- -- 73 -- 75 -- --   

This changes each time I run i2cdetect -y 1 with only the 39 remaining constant. What do I have to change for i2cdetect to display only the 29 and 39?

Here is how I am connecting the pins:

https://i.stack.imgur.com/EIe4H.png

and here is a photo of my cicuit:

https://i.stack.imgur.com/gAgna.jpg

  • The diagram shows what you intended to do. We need a photo to find out what you actually did. – joan Nov 7 '18 at 16:15
  • Would need to see a schematic of what you did. if neither device has a pull up resistor(either added by you, or built into the device) this may cause undesired effects when i2cdetect goes out and searches for devices. I would at least try adding pull up's to both lines and see if that helps – Chad G Nov 7 '18 at 21:21
  • @ChadG The Pi has 1k8 pull-ups to 3V3 on SDA and SCL (GPIO 2/3). Further pull-ups should not be added. – joan Nov 7 '18 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.