Pressure value not updated as frequently as other sensor values

Hello everyone,

in a nutshell: the pressure sensor does not measure the value as often as other sensors, but sends the same value several times and only updates about every second.

I want to use the RuuviTag as a permanent pressure gauge. To do this, I need to get the current pressure several times a second so that I can draw a diagram that is as accurate as possible.
To get more than just the specified heartbeat interval, I have adapted the firmware.

I adapted the current firmware version v3.33.0:
I set the APP_NUM_REPEATS to 1, as well as the APP_BLE_INTERVAL_MS to (100U) in application_mode_debug.h.
Apart from that, I haven’t changed anything in the firmware.

I now receive updates more frequently. My problem is that the measured pressure is sent the same several times, even though I have artificially increased the pressure around the RuuviTag, and it has changed permanently in reality.
Here is an excerpt from the measurement data with the according time (time, when my phone received the data):

Data

I/flutter ( 2663): [5, 18, 223, 78, 193, 205, 167, 1, 116, 2, 132, 2, 152, 191, 150, 49, 39, 240]
I/flutter ( 2663): 2024-08-25 11:21:20.146368
I/flutter ( 2663): [5, 18, 230, 78, 212, 205, 167, 1, 144, 2, 136, 2, 160, 191, 150, 49, 39, 242]
I/flutter ( 2663): 2024-08-25 11:21:20.152333
I/flutter ( 2663): [5, 18, 223, 78, 217, 216, 254, 1, 176, 2, 140, 2, 168, 191, 150, 49, 39, 243]
I/flutter ( 2663): 2024-08-25 11:21:20.635479
I/flutter ( 2663): [5, 18, 233, 78, 219, 216, 254, 1, 172, 2, 124, 2, 128, 191, 150, 49, 39, 244]
I/flutter ( 2663): 2024-08-25 11:21:20.641423
I/flutter ( 2663): [5, 18, 223, 78, 226, 216, 254, 1, 180, 2, 132, 2, 136, 191, 150, 49, 39, 245]
I/flutter ( 2663): 2024-08-25 11:21:20.646252
I/flutter ( 2663): [5, 18, 227, 78, 247, 216, 254, 1, 196, 2, 120, 2, 120, 191, 150, 49, 39, 248]
I/flutter ( 2663): 2024-08-25 11:21:21.152107
I/flutter ( 2663): [5, 18, 230, 79, 2, 216, 254, 1, 204, 2, 140, 2, 124, 191, 150, 49, 39, 249]
I/flutter ( 2663): 2024-08-25 11:21:21.159798
I/flutter ( 2663): [5, 18, 236, 79, 20, 216, 254, 1, 216, 2, 140, 2, 112, 191, 150, 49, 39, 250]
I/flutter ( 2663): 2024-08-25 11:21:21.163419
I/flutter ( 2663): [5, 18, 225, 79, 27, 216, 254, 1, 220, 2, 128, 2, 92, 191, 150, 49, 39, 251]
I/flutter ( 2663): 2024-08-25 11:21:21.166120
I/flutter ( 2663): [5, 18, 230, 79, 52, 228, 227, 1, 148, 2, 232, 2, 76, 191, 150, 49, 39, 253]
I/flutter ( 2663): 2024-08-25 11:21:21.652634
I/flutter ( 2663): [5, 18, 228, 79, 62, 228, 227, 1, 152, 2, 224, 2, 52, 191, 150, 49, 39, 254]
I/flutter ( 2663): 2024-08-25 11:21:21.655314
I/flutter ( 2663): [5, 18, 223, 79, 64, 228, 227, 1, 160, 2, 200, 2, 52, 191, 150, 49, 39, 255]
I/flutter ( 2663): 2024-08-25 11:21:21.658006
I/flutter ( 2663): [5, 18, 233, 79, 92, 228, 227, 1, 152, 2, 248, 2, 48, 191, 150, 49, 40, 0]
I/flutter ( 2663): 2024-08-25 11:21:21.660252

The data is roughly about one and a half seconds. Because it is in data format 5, the 5th and 6th array index show the pressure, which only changed two times in the shown data (from 205, 167 to 216, 254 to 228,227 It generally changes only about every second.
But other sensor data comes more often (e.g., the humidity at index 3–4) changes every time. The measurement sequence number is also incremented (index 16–17) permanently.

The problem occurs with various RuuviTags and also with the software version v3.30, which I have adapted simultaneously.

What can I do to receive pressure data updates ten times per second, as it should be?

Thanks for your message @Gollum225 ,
@otso might be able to help you out with your question.

You have probably already checked documentation at https://docs.ruuvi.com but linking here anyways.

Hello @Gollum225 ,

The heartbeat rate determines how often value in sensors is sent and broadcast, but not the rate at which the sensors themselves sample the value. Some sensors get refreshed on every read automatically, others run continuously on background.

You need to increase the DPS310 background rate to get fresh data on every read, i.e. ruuvi.firmware.c/src/application_config/app_config.h at 6e1d33f9110c88985ba0e59768b84fb4cf33673d Β· ruuvi/ruuvi.firmware.c Β· GitHub β†’ # define APP_SENSOR_DPS310_SAMPLERATE (10U). This will set the sensor to lowest sensor rate which supports at least 10 samples per second. You could also use 11 Hz to make sure to not get duplicate data.

1 Like

That’s the solution for my problem. Thanks so much for the quick reply!

2 Likes