BMP581 Pressure Sensor Variance

I am testing out the BMP581 on a Thing Plus Artmeis over the qwiic connector and I’m seeing significant variances with the sensor just sitting on my desk. I’m printing the pressure data.pressure every 1s with my board sitting on the table and I recorded a low of 90726.22Pa and a high reading of 90731.03Pa which is a 4.81Pa difference with the sensor just sitting flat on a table.

I used the altitude formula found here https://www.circuitbasics.com/set-bmp18 … r-arduino/ to calculate my altitude from sea level and the above readings give me a 43.79cm difference between the highest and lowest reading which is fairly significant for a sensor that is supposed to be accurate to the centimetre.

Picture of formula:

Arduino-BMP180-Tutorial-International-Barometric-Formula-610x187.png
Conversion of pressure ¶ to altitude (cm):

float pressure_to_altitude(float pressure_pa)
{
  double pressure_mb = pressure_pa / 100;
  double first_term = pow( (pressure_mb/SEA_LEVEL_PRESSURE_MB) , (1/5.255) );
  float altitude = 44330 * (1 - first_term);
  return altitude;
}

How can I mitigate this large variance in pressure samples? Or is there maybe something I’m doing wrong in converting from pressure ¶ to altitude (cm)?

My end goal is to create a wearable sensor to track my vertical jump height accurate to the nearest centimetre. Thanks!

I found in the documentation that there are noise filters. Is it possible I need to calibrate my sensor with these filters or other settings? If so, how would I go about doing it correctly?

Alright so I was able to play around with the noise filters and oversampling. I have set the following:

  • BMP5_IIR_FILTER_BYPASS (default)

  • .osr_t = BMP5_OVERSAMPLING_8X,

  • .osr_p = BMP5_OVERSAMPLING_128X,

  • BMP5_ODR_10_HZ

I am measuring 30cm consistently around 27cm and 100cm consistently around 95cm.

So now this thread is more about how can I correctly calibrate the BMP851 sensor to measure altitude accurately? So far I’ve just been trying things out randomly (setting min possible values, setting max possible values, mid values, different combinations of those for different settings, etc). It’s getting late so I’m off to bed, but I’ll try again tomorrow! Any help from anyone or the mods would be greatly appreciated. Thanks!

To measure altitude with a pressure sensor requires a model of the atmosphere, with one or more adjustable parameters. The simplest model has just one parameter, sea level pressure, which you set so that the altitude is correctly estimated at your location. See https://en.wikipedia.org/wiki/Barometric_formula

As the weather changes, the atmospheric pressure changes (sometimes in the course of just a few minutes), so the sea level pressure parameter has to be updated frequently.

I just want to get the altitude between two points. So instead of using sea level pressure as the base, I’m using the reading taken at ground level, then at a point above ground level (1-2m). This international barometric formula has worked well for me:

delta altiitude = 44330 * (1 - (P/P0)^(1/5.255)), where P0 is the base pressure and P is the second pressure reading I want to measure.

I guess the issue now is that I need to mess with the noise filtering and oversampling on my sensor to make it more accurate. And I’m not sure how best to use these settings.