BME280.py vs bmp280.py

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
peterevans
Posts: 3
Joined: Thu Dec 10, 2020 12:21 pm
Location: Bangkok
Contact:

BME280.py vs bmp280.py

Post by peterevans » Fri May 21, 2021 4:07 pm

I am using a little bme/bmp280 sensor from aliexpress and have been trying out BMP280.py and bmp280.py and I find that their is a descrepency of about 10 hpa in the atmostpheric pressure by just changing the drivers. I am not sure if I should be making calibration changes to the software in the BMP280.py or could I do some changes in the main.py file.

User avatar
Roberthh
Posts: 2759
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: BME280.py vs bmp280.py

Post by Roberthh » Fri May 21, 2021 4:17 pm

Could you give the full URL path of the two respective drivers you are using. Otherwise comparison is difficult.

User avatar
peterevans
Posts: 3
Joined: Thu Dec 10, 2020 12:21 pm
Location: Bangkok
Contact:

Re: BME280.py vs bmp280.py

Post by peterevans » Sat May 22, 2021 4:49 am

I tried the randomnerd tutorial driver :
https://randomnerdtutorials.com/micropy ... -esp8266/

Randomnerd driver gave me Temp:30.80 C Humidity: 56.3% Pressure 997.83 hPa

I felt this was too low compared to the weather maps which were around 1008 hPa.

I tried this one which required a few tweaks to get working for temperature and pressure but I couldn't get humidity to work:
https://github.com/dafvid/micropython-bmp280

and it gave me temperature of 31.32 and pressure of 1007.45 hPa

I tried another driver today from neliogodoi which seemed easier to set up:
https://github.com/neliogodoi/MicroPython-BME280
These produced ('31.1 C', '100674.4 Pa', '56.13183 %')

User avatar
Roberthh
Posts: 2759
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: BME280.py vs bmp280.py

Post by Roberthh » Sat May 22, 2021 6:52 am

Hard to tell without a reliable reference. I also derived a BME280 driver and did a careful review and fox on how the calibration data was read from the device. You'll find it here: https://github.com/robert-hh/BME280
It has a float and int variant. The int variant follows the datasheet of Bosch and avoids rounding errors. For all practical purposes, the results are identical. When testing my driver, I compared the result with the values reported by the nearby university weather station. I used a calm day with low wind for the test. The results were close, but not identical. Reason: The university publishes pressure normalized to the sea level, and I could not get exactly the height over ground of both the university weather station and my place. But the pressure difference I got was in the range of uncertainty of the height over sea level.

User avatar
peterevans
Posts: 3
Joined: Thu Dec 10, 2020 12:21 pm
Location: Bangkok
Contact:

Re: BME280.py vs bmp280.py

Post by peterevans » Sat May 22, 2021 7:46 am

Thanks so much.
It is very helpful. I have now searched around for more drivers and found several that give results closer to what I am expecting.
I am confident now that it isn't the sensor that is causing the differences low pressure values.
I tried your driver https://github.com/robert-hh/BME280 and it gives me results that I feel happy with.

Thank you again for your help.

Post Reply