BME280 sensor I2C connection with Arduino PRO mini 5V problem

Hello!

I'm trying to get information from BME280 sensor (temperaturure, humidity and pressure) connected to Arduino PRO mini 5V using I2C connection. But when run sketch and track on IDE serial monitor, screen freezes when starts BME init (using Seeed's Grove_BME280 library GitHub - Seeed-Studio/Grove_BME280 v1.0.2, example bme280_example.ino). Also any other BME280 library returns that device is not connected. Pins are connected:

Vcc -----> Vcc
GND -----> GND
SCL -----> A5
SDA -----> A4

When try the same scheme but using UNO instead PRO mini, everything works fine.

Would greatly appreciate any help!

Maybe start with an I2C scanner and if that works then try with the Adafruit or Sparkfun BME280 libraries to be sure it's not a Sparkfun library issue.
Be aware this module will probably have a different I2C address to the default expected for the Adafruit & Sparkfun libraries so you will need to specify the address in the setup code.

@Riva This is very helpful, but when upload and start I2C scanner after text:

Scanning...

screen freezes, and when the same program scanner starting on UNO there is response:

Scanning...
I2C device found at address 0x76

So, maybe that indicates on bad sensor connecting with mini PRO?

Hi, to fix this problem you should use the "Adafruit_BMP280_Library-master"-library go inside the folder "Adafruit_BMP280_Library-master" open "Adafruit_BMP280" find the line "#define BMP280_ADDRESS (0x77)" and change "0x77" to "0x76"

Hope this helps you out good luck

ivcompro:
@Riva This is very helpful, but when upload and start I2C scanner after text:

Scanning...

screen freezes, and when the same program scanner starting on UNO there is response:

Scanning...
I2C device found at address 0x76

So, maybe that indicates on bad sensor connecting with mini PRO?

When you do the tests between the Pro Mini & the UNO are you using the same BME280 sensor or a different one?

The wiring matches your image in #0 and the jumper wires your using are in good order (continuity).

Is the Pro Mini a 3.3V or 5V version?

Have you selected the correct board type in the IDE for uploading to the Pro Mini?
It seems you can get both atmega168 & atmega328 versions.

Does the blink sketch upload and work okay?

Do you have any other I2C modules you can check with the I2C scanner?

lenny227:
Hi, to fix this problem you should use the "Adafruit_BMP280_Library-master"-library go inside the folder "Adafruit_BMP280_Library-master" open "Adafruit_BMP280" find the line "#define BMP280_ADDRESS (0x77)" and change "0x77" to "0x76"

Hope this helps you out good luck

I don't think this will help until the device can be found in the I2C scanner.
You do not need to edit the library, just specify the address when starting the device (bme.begin(BME280_I2C_ADDR))

lenny227:
Hi, to fix this problem you should use the "Adafruit_BMP280_Library-master"-library go inside the folder "Adafruit_BMP280_Library-master" open "Adafruit_BMP280" find the line "#define BMP280_ADDRESS (0x77)" and change "0x77" to "0x76"

Hope this helps you out good luck

Thank you lenny227, but unfortunately did not help :frowning: Changed I2C address to 0x76 in Adafruit library you sent me link, but after text: "BME280 text" nothing happenes (empty).

Riva:
When you do the tests between the Pro Mini & the UNO are you using the same BME280 sensor or a different one?

The wiring matches your image in #0 and the jumper wires your using are in good order (continuity).

Is the Pro Mini a 3.3V or 5V version?

Have you selected the correct board type in the IDE for uploading to the Pro Mini?
It seems you can get both atmega168 & atmega328 versions.

Does the blink sketch upload and work okay?

Do you have any other I2C modules you can check with the I2C scanner?

Yes I'm using the same BME280 sensor for testing.

Pro Mini module is 5V, for upload selecting board "Arduino Pro or Pro Mini" and processor "ATmega328P (5V, 16MHz)" and no problem during the process of uploading the sketch (blinks ok and messeage: Done uploading.)

I will try to replace Pro Mini module, so will inform you.

Solved the problem! Arduino Pro Mini works on 5V, but this BME280 sensor has specifacation to work on 3.3V. So, when powered sensor with external 3.3V, everithing works fine. Still not sure how it worked on 5V with UNO??? Anyway, thank you very much!

Yes, it's a 3.3V sensor. Don't connect this to a 5V system unless it has a regulator and level shifters on the breakout board, or you are likely to damage the sensor.

I had the same problem, my sensor didn't work with 3.3v but it does with 5v and I'm using it for a few weeks and it still works fine. It does seem weird

lenny227:
I had the same problem, my sensor didn't work with 3.3v but it does with 5v and I'm using it for a few weeks and it still works fine. It does seem weird

Some of the BME280 boards have a built in voltage regulator and level shifters to reduce 5V power & signal down to 3.3V needed by the BME280.