1

I am trying to connect an Adafruit BMP280 with i2c to Raspberry Pi 3. I have been able to connect it to the pi, and it shows up when I run the command: i2cdetect -y 1

$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77

But when I run the command around 10-15 minutes later, I get nothing:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

I saw in another post (https://raspberrypi.stackexchange.com/questions/56775/i2c-disconnecting-after-while) that this could be a problem that the "Pi [is] dying because you are feeding 5V from your LCD into SDA pin." As far as I can tell, both devices run at 3.3 volts, besides the 5v input from the pi that I am using to power the BMP280. (Which uses a voltage regulator to the board runs at 3.3 volts.)

Also, if I unplug all of wires, then reconnect them, the rpi detects the device.

Any help or possible solutions would be greatly appreciated!

Here is a picture of my setup

  • 1
    Usually these problems are down to loose connections. Could you post a photo? – joan Jan 18 '17 at 9:47
0

Do you perhaps use long cables (a few meters or more) to connect the sensor to the RPi? This might lead to the sensor seeing noise, which is interpreted as additional clock pulses. This means the sensor and the RPi can get out of sync and do not understand each other anymore. This is a known problem of I2C communication and usually hard to recover from in software.

0

I see this is an old question, but you should be powering that sensor with 3.3V. It does have a power regulator so that it's compatibly with 5V Arduinos, but that doesn't mean that you should be powering 5V on your 3.3V-logic Pi. I don't know if that's the problem or not, but I don't see how it can help.

You may also need additional pull-ups on the i2c lines. I run a different Adafruit board with similar power set-up and do better on long wires with external pull-ups.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.