I have an Adafruit BMP280 Sensor Module (Adafruit SKU ADA2651) connected to a Microchip controller using I2C (at 100KHz). Electronically, the module works properly, but the calculated pressure value is low. For example, at sea level, the module returns a result of 0.6 atmospheres.
The Bosch BMP280 datasheet that I have is version 1.14, May 2015. This datasheet (page 23) contains a worked example of the calculations for temperature and pressure. I have written my own PIC code which reproduces the floating point calculations in Appendix 8.1 in the datasheet. Using the data from the datasheet example, my PIC code produces results that agree with the Bosch example to two decimal places. I assume that the Bosch example comes from an STP environment, ie. temperature = 25 Celsius, pressure = 101,325 Pascals.
Below are the Bosch worked example (“Datasheet” heading) and the results from my module (“PIC”) compared using the terminology in the Bosch datasheet. My test was performed at sea level and the temperature was 24.4 Celsius (measured with a thermometer accurate to 0.5 Celsius).
The calculated temperature appears to be accurate, but the calculated pressure is very wrong.
There is generally good agreement between the compensation parameters (dig_T1 through dig_P9). The exceptions are the values of dig_P4 and dig_P5. The values of adc_P also differ to some extent. Going through the maths provided in the datasheet, it seems that these are the parameters that cause the pressure result to be low. BTW the pressure reading does vary if I change the ambient pressure, but the reading is always low.
Can anyone suggest a way forward for me? Is it possible that some of the compensation parameters are wrong? Would a faulty pressure sensor be a likely cause? Any thoughts gratefully accepted.
Solved! Go to Solution.
Thank you again for your help.
The BMP280 is now working happily. Briefly, the BMP280 is operating in Forced Mode because I could not get Normal Mode to work. The BMP280 always returned 0x80000 for both temperature and pressure ADC results. Having gone through the API code more thoroughly and blogged how others used the sensor, I found out about the timing delays required for proper operation. Using the API delay function between the Forced Mode set and reading the sensor data fixed my problem.
I will now try to get the sensor working in Normal Mode.