General Gravity

SEN0456 MXP5700 sampling speed

userHead PeteD 2024-04-10 06:25:40 164 Views0 Replies

I am enjoying the use of the SEN0456 MPX5700 pressure sensor.   Within the provided firmware, there is 100ms delay between requesting a reading and reading the data.  That code is shown below.  Since this module uses a uprocessor to read the voltage output of the MPX5700 and the source code for that processor is not provided, one has no idea exactly how SHORT this delay can actually be without a whole lot of testing.   

 

The question is: Why is this delay so long and what is the minimum, reliable delay that can be used?   

 

I need to sample at least twice as fast as I am controlling the pressurization of a chamber and need hit a pressure more exactly that this delay is allowing.

 

Thanks!

 

 

 

float DFRobot_MPX5700::getPressureValue_kpa(uint8_t ifcalibration)

{

 uint8_t buf[2];

 float voltage, Pressure;

 writeReg(0x09, &ifcalibration, 1);

 delay(100);

 readReg(0x06, buf,2);

 uint16_t Pressure_100 = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];

 return (Pressure_100/100.0);

}