BMP280 Sensor Wrong Data Readings

Hello, recently i bought myself an “Adafruit BMP280 Barometric Pressure + Temperature Sensor Breakout” from a electronics shop in my town.

(Overview | Adafruit BMP280 Barometric Pressure + Temperature Sensor Breakout | Adafruit Learning System)

I connected it to my arduino nano via I2C wiring shown here -
(Hookup | Arduino to BME280 using I2C)

and tried using the code provided in the Adafruit site. To my surprise the Temperature reading was showing -142.6C constantly and the pressure was bouncing around 700hPa.
I then tried using the code in the site where i got my wiring from and i got an error message “BMP280 not wired properly”.
I also tried various other codes throughout the Internet but with no success. I didnt change any of the code and i have all the needed libraries installed properly and up to date. Im positive that my wiring is correct because im using a custom made pcb. Nevertheless i probed with my multimeter every connection to be sure and everything looks perfect to me.
Any help will be greatly appreciated !

pullup resistors (4k7) is present ?
I2C address correct ?

I checked im on the right I2C address x77. Im now going to try the pullup resistor!


Edit : Where should i add the resisitor?

Hi Achomacho,

Actually two pullup resistors: one 4700 Ohm between SCK and VIN, and another 4700 Ohm between SDI and VIN.

Saw on the Serial Monitor capture that you posted that your BMP reports that it is pretty cold out there ! :wink:
success, F loris

Hi, thanks for the reply!
It sure is pretty cold here :slight_smile: , im going to try it tomorrow and let you know if it worked.

OK, so i tried it now and its not working... any other ideas?

Those breakout boards have pull-up resistors in place normally, so there should be no need to add them.

More importantly is voltage levels: the BMP280 sensor works at 3.3V, but not at 5V. If there are no voltage regulator and level shifters on board this may damage the sensor.

You link to one sensor but say you bought it from another shop - are you sure this are identical modules? Not all such breakout boards have the level shifters and regulator present.

Im using the same original breakout board for BMP280 as shown in the adafruit site. I just bought it from my local supplier.
It says i can use it with 5V on the arduino. this a BME / BMP mixup ?

Maybe a BMP180/280 mix-up.

The difference between the BME280 and BMP280 is the humidity sensor part - the other two (pressure and temperature) are read with the exact same code.

The Adafruit module is okay, it will work with 5V and 3.3V. You don't need extra pullup resistors.
I can buy from Sparkfun and Adafruit in my country as well from a few shops, they even order things that they don't have.

The chip can be in I2C and SPI mode.
The name "Nano" is used for a number of clone/fake boards.

The BMP280 Adafruit library does not have a function to check the sensor ?

When you have the chip in I2C mode, run the I2C Scanner to check the I2C address and the I2C bus. Tell us the results.

Can you make a photo of your "Nano" board ? So we can check that it is indeed an Arduino Nano board with ATmega328P microcontroller.

Be careful when using other libraries, especially since you 'didn't change any of the code'.

The Adafruit BME280 board is wired for address 0x77 and their library uses that address as it's default. You can change the address that the library uses by using bme.begin(0x76). I believe their BMP280 is set up the same way.

The BME280 libraries that I have seen from other sources assume that the device is wired for address 0x76 with various techniques used to change it to 0x77 so I assume the other BMP280 libraries are similar.

My guess is that you have the clock and data wires reversed, I know that I have done that enough times myself.


Wow guys thank you so much for the replies, soo i know there is a difference between the BMP280 and BME280, i have the BMP module without the humidity option, also my arduino is a china clone, on the chip it says its Atmega328P. I ran the I2C scanner and it says the module address is 0x77.

Switching SDA and SCL usually gives me no output at all, definitely not a changing output.

Try another library. Not all libraries are created equal.

I have had this problem and I fixed it. I hope I can help you.

The Breakout board supports both the I2C and SPI protocols, by triggering the CS (chip select) pin ; subsequently, inadvertently leaving the board in SPI mode by having touched the CS pin Low, I found that the two-wire I2C was suddenly showing dramatically incorrect pressures.

Disconnecting and reconnecting the board did not help. Nothing I did helped.

Finally I realised that the board was stuck in SPI mode and had given some of the pins different duties. I touched the CS pin deliberately High for a moment; that reset it back to I2C.

All was sorted; pressure values back to "normal".

Interesting, and non-obvious. I thought the mode was selected every time upon startup of the chip, based on the status of that line.

From the data sheet:

5.1 Interface selection
Interface selection is done automatically based on CSB (chip select) status. If CSB is connected to V DDIO , the I2C interface is active. If CSB is pulled down, the SPI interface is activated. After CSB has been pulled down once (regardless of whether any clock cycle occurred), the I2C interface is disabled until the next power-on-reset. This is done in order to avoid inadvertently decoding SPI traffic to another slave as I2C data. Since power-on-reset is only executed when both V DD and V DDIO are established, there is no risk of incorrect protocol detection due to power-up sequence used. However, if I2C is to be used and CSB is not directly connected to V DDIO but rather through a programmable pin, it must be ensured that this pin already outputs the V DDIO level during power-on-reset of the device. If this is not the case, the device will be locked in SPI mode and not respond to I2C commands.

It seems best to simply connect the CSB through a resistor to VDDIO, to ensure I2C mode at all times.