Increase pressure sample using MS5803_14ba

Hi there,

I require quick readings of pressure (few times each second , and display )

with this sensor:

MS5803 sensor(ADDRESS_HIGH);

and this display:

U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=/ 3, / data=/ 4, / reset=*/ U8X8_PIN_NONE);

So far there seem to be no difference if I call:

sensor.getPressure(ADC_256)

or

sensor.getPressure(ADC_4096)

Which one is the high sample rate? and what is the rate? 256 Hz and 4096 Hz respectively?

Maybe the problem is the display which delays the readings?

Thanks in advance!

Irit

I think that might set resolution and not sample rate?

Thank you YellowDog, Do you know of any way to increase the rate?

I see in the data sheet: “1 sample per second” . Is this the rate I should expect?

1 second per sample is just the test conditions that data on the data sheet was collected at.

You’d need to calculate the fastest rate possible for samples based on the timing diagrams in the data sheet. I don’t see a maximum sample rate specified anywhere, just write your code to ask for samples as fast as possible and see what happens. If you start getting errors, slow the code down a bit until they they go away.

Access to a logic analyzer might help but you’d be digging in pretty deep into the i2c protocol and data sheet to make use of that data to get a accurate idea what the maximum rate really is.

Excellent! thank you very much for this explanation :smiley: