How to increase sampling speed of bmp280

Hey, so i've made a recording dual deploy altimeter for model rockets and i noticed that when i look at the recorded data it will spit out the same altitude 7 or 8 times. I was wondering if changing the sampling rate would fix it .

this is my data, the second column is altitude and the third is max altitude

6563	153.3	153
6659	153.3	153
6737	153.3	153
6815	153.3	153
6894	153.3	153
6972	153.3	153
7051	153.3	153
7130	222.26	222
7207	222.26	222
7286	222.26	222
7364	222.26	222
7443	222.26	222
7521	222.26	222
7600	222.26	222
7677	222.26	222
7756	287.8	287
7834	287.8	287
7913	287.8	287
7992	287.8	287
8070	287.8	287
8158	287.8	287
8237	287.8	287
8315	349.52	349
8393	349.52	349
8472	349.52	349
8551	349.52	349
8629	349.52	349
8708	349.52	349
8785	349.52	349

and this is the code i was wondering about changing

  bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,     /* Operating Mode. */
                  Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */
                  Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */
                  Adafruit_BMP280::FILTER_X16,      /* Filtering. */
                  Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */

I noticed the pressure sampling rate is taking 16 measurements and averaging to spit out a measurement, and then there is also the sensor filtering sampling rate is set at 16x. does this mean its averaging twice? if it is averaging twice as my suspicions tell me then it would be an easy fix, just reducing the sensor filtering down to x1

Those parameters should be described in the library, if the actions are not performed by the sensor. Check the sensor data sheet, and the library documentation and/or code.

The averaging is usually very helpful, as consumer grade barometric pressure sensors are quite noisy. You may find that the speedup achieved by reducing the averaging creates new problems with high measurement variation.

1 Like

ahh i c, thank you for pointing me in the right direction. I think i found the issue by looking at the data sheet. When it takes measurements there is a standby time in between measurements which by default is 500ms. After i learned this and i looked at the data each new measurement is about 500ms apart. so i reduced the standby to 1ms and hopefully that fixes my issue!

image

Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.