Hello:
I purchased the SparkFun Atmospheric Sensor Breakout - BME280 and is showing me incorrect values for the pressure.
https://www.sparkfun.com/products/13676
The sensor is hooked up with my Raspberry PI 3 using the I2C interface.
I tried several programs:
C program with the official Bosch driver.
git clone https://github.com/BoschSensortec/BME280_driver.git
Python programs:
git clone https://github.com/adafruit/Adafruit_Python_BME280.git
http://www.raspberrypi-spy.co.uk/2016/0 ... -in-python
All of these programs show the same values:
Chip ID : 96
Temperature : 21.02 °C
Pressure : 947.83 hPa
Humidity : 20.53 %
As you can see the pressure is far too low, the correct pressure right now should be around 1022 hPa.
Does anyone has any ideas?
Kind regards,
Rob.
BME280 on Raspberry showing incorrect values
Moderator: leecollings
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: BME280 on Raspberry showing incorrect values
Hi Rob,
Big difference... where's your reference of 1022hPa coming from.
Have nearly the same breakout and mine is close to real, and my BAR500 is mostly far under real (approx 45hPa).
Can't check for now (wires are frozen
)
But seems that there are some faulty ones around, as my humidity stays at 100% even last summer.
Big difference... where's your reference of 1022hPa coming from.
Have nearly the same breakout and mine is close to real, and my BAR500 is mostly far under real (approx 45hPa).
Can't check for now (wires are frozen

But seems that there are some faulty ones around, as my humidity stays at 100% even last summer.
- bbqkees
- Posts: 407
- Joined: Sunday 17 August 2014 21:01
- Target OS: Linux
- Domoticz version: 4.1x
- Location: The Netherlands
- Contact:
Re: BME280 on Raspberry showing incorrect values
Firstly, this sensor costs less than 4 Euro on Ebay.
Secondly, as you have already tried with multiple methods the sensor seems to work just fine.
Maybe you are living in a high building?
Secondly, as you have already tried with multiple methods the sensor seems to work just fine.
Maybe you are living in a high building?
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
-
- Posts: 3
- Joined: Thursday 19 January 2017 8:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: BME280 on Raspberry showing incorrect values
I am living near Madrid at an altitude of 625m. The air pressure giving by the sensor is the air pressure at this altitude.
To calculate the air pressure at sea level we must use the formula (see attachment).
So P0 = 1018.70 hPa which makes more sense.
Regards,
Rob
To calculate the air pressure at sea level we must use the formula (see attachment).
So P0 = 1018.70 hPa which makes more sense.
Regards,
Rob
- Attachments
-
- Formula_Air_Pressue.jpg (36.7 KiB) Viewed 2871 times
- bbqkees
- Posts: 407
- Joined: Sunday 17 August 2014 21:01
- Target OS: Linux
- Domoticz version: 4.1x
- Location: The Netherlands
- Contact:
Re: BME280 on Raspberry showing incorrect values
If you want the correct value to show up, write a small LUA script with the formula and update a virtual sensor.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
-
- Posts: 3
- Joined: Thursday 19 January 2017 8:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: BME280 on Raspberry showing incorrect values
I added this to my Python code:
Code: Select all
altitude = 625 # My local altitude
pressure_sea = pressure_sensor / pow(1 - (0.0065 * altitude) / (temperature_sensor + 0.0065 * altitude + 273.15), 5.257)
Who is online
Users browsing this forum: Google [Bot] and 1 guest