fanfanlatulipe26 / XGZP6897D

Arduino basic library for XGZP6897D I2C differential pressure sensor from CFSensor
GNU General Public License v3.0
7 stars 0 forks source link

Pressure value differs depending on read frequency #4

Open AcuarioCat opened 1 week ago

AcuarioCat commented 1 week ago

Hi, I am reading a sensor but the pressure value changes substantially depending on the frequency I read the sensor. If I read at roughly 10mS I get 2.05Pa, 50mS I get -5.2Pa, at 100mS -22Pa, at 500 and above mS -34Pa The temperature also varies, at 10mS 26C, at 50mS 25.5C The sensor is not connected to anything that would give a pressure difference. I'm using the +-2500 version with K set to 2048

I'm using an ESP32 with the latest Arduino code.

fanfanlatulipe26 commented 1 week ago

I tried the XGZP6897D_demo at full speed  (whitout any delay in the loop, writing on Serial at 115200bds) and the results are the same  as the one we have with a delay(1000) in the loop. 

Any how the library is always waiting for the completion of a conversion.

Do you have a 100nF capacitor between VCC ang GND, just on top of the chip (very short wires): it makes a BIG difference in the reading.  See the "Circuit Diagram" in the middle of the Datasheet (page 3 & 4 )

My configuration: ESP32 Dev Kit V1, ESP32 software 2.0.14

XGZP6897D -1000/1000

Keep me informed