i2cdetect shows no address at all, is the BME280 broken or did I wire it wrong?
Translated from Türkçe by AI ·
Me again 🙂 I wanted to switch from the DHT22 to a BME280 in my greenhouse prototype, since it’s supposed to be more stable. Pi 4, Raspberry Pi OS, I enabled I2C via raspi-config and rebooted. I got a purple 6-pin module: VCC, GND, SCL, SDA, CSB, SDO.Wiring: VCC 3.3 V (pin 1), GND (pin 6), SDA pin 3, SCL pin 5. CSB and SDO are unconnected. Result:
$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
...
70: -- -- -- -- -- -- -- --
No address at all. How can I tell whether I2C is working or not? I bought two modules and both behave the same way.
Yine ben 🙂 Sera prototipinde DHT22’yi bırakıp BME280’e geçmek istedim, daha kararlı diye. Pi 4, Raspberry Pi OS, raspi-config’ten I2C’yi açtım, reboot ettim. 6 pinli mor bir modül aldım: VCC, GND, SCL, SDA, CSB, SDO.
Bağlantı: VCC 3,3 V (pin 1), GND (pin 6), SDA pin 3, SCL pin 5. CSB ve SDO boşta. Sonuç:
$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
...
70: -- -- -- -- -- -- -- --
Hiçbir adres yok. I2C çalışıyor mu çalışmıyor mu nasıl anlarım? İki modül aldım, ikisinde de aynı.
Translated from Türkçe by AI ·
i2cdetect -y 0 try it, maybe it’s on the other bus.
i2cdetect -y 0 dene, belki diÄŸer bus’tadır.
Translated from Türkçe by AI ·
-y 0 says “Could not open file /dev/i2c-0”.
-y 0 “Could not open file /dev/i2c-0” diyor.
Translated from Türkçe by AI ·
On a Pi 4 you don’t need to look at bus 1, 0 on the header. A completely empty table usually comes from one of two things, and I ran into the same thing on a site:1. SDA and SCL are swapped. Pin 3 is SDA (GPIO2), pin 5 is SCL (GPIO3). Follow the wiring again using the labels on the module, cheap cables often have mixed-up colours.2. On a 6-pin module, if CSB is left floating the chip can switch to SPI mode at power-up. Connect CSB to 3.3 V and SDO to GND and the address becomes 0x76; connect SDO to 3.3 V and it becomes 0x77.Quick check: with the Pi on and the sensor connected, measure the voltage of SDA and SCL against GND with a multimeter. Both should be around 3.3 V (the Pi has pull-ups). If you see 0 V, something is pulling the line down: a short circuit or a wrong pin.Once the address shows up, check the chip ID too: on a BME280 register 0xD0 returns 0x60. If it returns 0x58, you were sold a BMP280, which has no humidity sensor; there are a lot of them on the market.
sudo i2cget -y 1 0x76 0xD0
Pi 4’te header’daki bus 1, 0’a bakmana gerek yok. Tamamen boÅŸ bir tablo genelde iki ÅŸeyden olur, ben de bir sahada aynısını yaÅŸadım:
1. SDA ve SCL ters. Pin 3 SDA (GPIO2), pin 5 SCL (GPIO3). Modülün üstündeki yazıya göre kabloyu bir daha takip et, ucuz kablolarda renkler karışıyor.
2. 6 pinli modülde CSB boÅŸta kalırsa çip açılışta SPI moduna geçebiliyor. CSB’yi 3,3 V’a baÄŸla, SDO’yu GND’ye baÄŸlarsan adres 0x76, 3,3 V’a baÄŸlarsan 0x77 olur.
Hızlı kontrol: Pi açıkken ve sensör baÄŸlıyken multimetreyle SDA ve SCL’nin GND’ye göre gerilimini ölç. İkisi de 3,3 V civarında olmalı (Pi’de pull-up var). 0 V görüyorsan bir ÅŸey hattı aÅŸağı çekiyor, kısa devre ya da yanlış pin.
Adres çıkınca chip id’ye de bak: BME280’de 0xD0 register’ı 0x60 döner. 0x58 dönüyorsa sana BMP280 satmışlar, onda nem yok, piyasada çok oluyor.
sudo i2cget -y 1 0x76 0xD0
Translated from Türkçe by AI ·
SDA and SCL were swapped 🤦 After I also connected CSB to 3,3 V, 0x76 showed up. But the chip id came back as 0x58, so both are BMP280s, no humidity. For now I’m sending the temperature and pressure to Hermetry, I’ve ordered a real BME280. Thanks!
SDA ile SCL tersmiÅŸ 🤦 CSB’yi de 3,3 V’a baÄŸlayınca 0x76 çıktı. Ama chip id 0x58 geldi, yani ikisi de BMP280’miÅŸ, nem yok. Sıcaklık ve basıncı ÅŸimdilik Hermetry’ye gönderiyorum, gerçek BME280 sipariÅŸ ettim. SaÄŸ olun!
Translated from Türkçe by AI ·
I fell into the BMP280 trap too, get well soon 🙂
BMP280 tuzağına ben de düşmüştüm, geçmiş olsun 🙂
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

