SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Environment category should be posted in this forum. Includes Air Quality, Altitude, Atmospheric & barometric pressure, Combo boards & other, Temperature & humidity, etc.
#202619
I have the Environmental Breakout Combo board. Using the qwiic connection on the Esp32 Thing Plus. Using the example code it looks like everything is working. Although the readings are quite a bit off. I am in Sarasota, FL and the altitude here is about 20 ft. give or take. The reading from the BME280 is at -196 ft. How is that being calculated and how would you go about calibrating that to be more realistic?
#202676
Hi Tim,

The altitude reading on the BME280 is calculated using the pressure readings in our library so it should "automatically" calibrate to give the proper reading. That said, most likely the value we use in that formula might be off from the true pressure at your test location. I would recommend using the setReferencePressure() function like this issue covers. There is also an example you can use to set that value to match the actual pressure values. You can use that example to incorporate into your code to adjust the sensor and that should fix your altitude discrepancy.

If you continue to have issues or have another question about the Environmental Combo Board, please reply to this thread and I would be happy to help as much as I can.
#202678
Hello, and thanks for using the new SparkFun forums!

What you're seeing is the effect of weather on barometric pressure. As the weather changes barometric pressure also changes and that affects your altitude reading. To correct for this, you'd need to modify your code to accept a correction factor and then when you wanted to get an accurate altitude reading, find the current barometric pressure and apply the correction factor to get your true altitude.

I'm probably not explaining this very well. If you know a pilot, they can probably explain this better than I can as aircraft have to compensate for weather to get the altimeter in their planes to read the correct field altitude when taking off and landing.
#202692
Thanks Chris! I appreciate your response and it does make sense. I figured there some math that needs to be done, I just have no idea what but sounds like you have pointed me in the right direction anyhow. I will do a little more digging into it and see if there is some sort of formula I can apply.
Thanks again!
#202693
TS-Mark wrote: Tue Mar 26, 2019 12:43 pm Hi Tim,

The altitude reading on the BME280 is calculated using the pressure readings in our library so it should "automatically" calibrate to give the proper reading. That said, most likely the value we use in that formula might be off from the true pressure at your test location. I would recommend using the setReferencePressure() function like this issue covers. There is also an example you can use to set that value to match the actual pressure values. You can use that example to incorporate into your code to adjust the sensor and that should fix your altitude discrepancy.

If you continue to have issues or have another question about the Environmental Combo Board, please reply to this thread and I would be happy to help as much as I can.
HI Mark! Thanks for your response! I saw it right after Chris's. I will dig into your suggestions and see where that gets me. I'll reply back with where I end up.
Thanks much!! :)