No connection of Sensors via I2C at MKR1310 possible

Hello, I hope you can help me. I am trying to read a BMP280 from the MKR1310 via I2C. Unfortunately, the search for the I2C address already fails. Here, with several I2C scanners, only the addresses 0x60 and 0x60B are shown in serial monitor. This doesn't change whether the BMP280 is connected or not, so I think these are the addresses from the board itself. Different BMP´s 280 testet. SCL -> SCL 12 and SDA -> SDA 11

Thank you very much

Welcome to the forum.

Arduino Wan 1310: https://store.arduino.cc/products/arduino-mkr-wan-1310
Docs Arduino Wan 1310: https://docs.arduino.cc/hardware/mkr-wan-1310

Can you tell which scanner sketch you have used (a link is okay), because the outcome can not be 0x60A and 0x60B.
There are two I2C devices on the board, you found those.

Can you give a link to the BMP280 module that you use.
How did yo connect the module to the Arduino board ?

Where did you found those pin numbers for the I2C bus ? Because those are wrong.


As you understand, we like to know everything, and we like to know exactly what is going on :nerd_face:
You can change the Category in your first post, or else a moderator will do it for you.

1 Like

Hello Koepel,
thanks for your reply and welcoming me to the forum!
I corrected the pins into SCL -> SCL 12 and SDA -> SDA 11, see above.
The BMP´s are from Berrybase respectively Sertronics.
I measure nearly 3.3 V at the sensor ground to SDA.
The I2C Scanner is the I2CScanner.h

What is the correct category for my post? Thanks!

Both Berrybase and Sertronics have a number of BMP280 modules. Can you give a link to the right modules ?
There are many I2CScanner.h, can you give a link to the one that you use ?

Can you show a photo of your project that also shows the wiring ?
When the I2C bus is idle, then both SDA and SCL should be near 3.3V. You could make a sketch that toggles them and you could read it with a multimeter. There are many tests to do, but I assume that the Arduino board is okay.

The I2C bus goes into the "network" Category: https://forum.arduino.cc/c/using-arduino/networking-protocols-and-devices/27

1 Like

BMP280 Breakout Board, 2in1 Sensor für Temperatur und Luftdruck
Artikel-Nr: GY-BMP280 -> BMP280 Breakout Board, 2in1... kaufen bei BerryBase

Yes, you are absolutely right. 3.3 V on both SDA and SCL to GND!

I loaded the scanner directly over the Arduino IDE library
I2C-Scanner:

//Copyright (c) 2018 Luis Llamas//
//(www.luisllamas.es)//

#include "I2CScanner.h"

I2CScanner scanner;

void setup()
{
Serial.begin(9600);
while (!Serial) {};

scanner.Init();

}

void loop()
{
scanner.Scan();
delay(5000);
}

Wiring:

What is meant by the hint?

Preformatted text toolbar button </>, or the backtick ` key on your keyboard, like so:

single line

multiple
lines

So...I tried now all of them. 3 of 6 are defect, the others give the adress 0x76, which is a good sign.
However, I still don't get any measured value displayed via the serial monitor, and the bmp280_test says that no sensor is connected.

I tried the Adafruit BMP 280 library from the Arduino IDE in version 2.6.2 and all examples, meaning bmp280_forced, bmp280_test and bmp280test.

Found a solution sketch:

#include <Wire.h>
#include <Adafruit_BMP280.h>
#include <Adafruit_Sensor.h>

Adafruit_BMP280 bmp280;

int mostrador = 0;

void setup()
{
Serial.begin(9600);

if (!bmp280.begin(0x76)) // Conectado em interface I2C, pino SDO em nível alto
{
Serial.println("Sensor nao encontrado !!");
while (1) {}
}
}

void loop()
{

Serial.print("Temperatura : ");
if ( bmp280.readTemperature() < 10)
{

 Serial.print(bmp280.readTemperature());
 Serial.println(" C");

}
else
{

 Serial.print(bmp280.readTemperature(),2);
 Serial.println(" C");

}

if (mostrador == 0)
{

 Serial.print("Altitude : ");

 Serial.print(bmp280.readAltitude());
 Serial.println(" m");

}

if (mostrador == 1)
{

 Serial.print("Pressao : ");

 Serial.print(bmp280.readPressure()/100);  
 Serial.println(" hPa");

}

delay(3000);
mostrador = !mostrador;
}

This is your example: https://github.com/luisllamasbinaburo/Arduino-I2CScanner/blob/master/examples/Scanner/Scanner.ino.
That library is over-complicated, but not wrong.

The pins of the module are not soldered. I really does not work if they are not soldered.

The BMP280 is no longer manufactured I think.
Let's make a guess for your 1.10 euro module:
pcb : 40 cents
extra pins: 10 cents
4 resistors: 10 cents
2 capacitors: 10 cents
soldering: 10 cents
That leaves 30 cents for a Bosch sensor a few euros.
Your BMP280 is a counterfeit.

1 Like

"Your BMP280 is a counterfeit"
You are absolutely right, didn´t notice that when bought. Now I´m attentive to that...next time better sensors!

Thank you Koepel!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.