Grove Pressure Sensor HP206c problem

Hello,
I am currently using a HP206c grove pressure sensor and while it is on a table, not moving at all, in an office, I get huge variations of mesures (like 3m from one mesure to another…). I do not think that it is normal, as it is written “High Accuracy sensor” I would have thought of a few cm of variations.

I use the demo of the “Grove HP20x” library, downloaded from the Arduino IDE software, demo which is written by SeeedStudio.

The sensor is plugged on a Grove base Shield, connected to an Arduino Uno and plugged by USB on my PC.

Any suggestions?

Thank you very much.

Hi, I have carefully read the datasheet of the product and the program of the library, maybe you can try my method and see if you can improve the accuracy.


The picture above is the original datasheet, which mentions “The higher DSR will normally achieve higher measuring precision, but consume more time and power”.
By default, we use a sensor output conversion with a DSR of 1024 in the program library.
Grove_Barometer_HP20x/HP20x_dev.cpp at master · Seeed-Studio/Grove_Barometer_HP20x (github.com)
So if you want to improve the accuracy, try changing OSR_CFG to HP20X_CONVERT_OSR4096 and then change OSR_ConvertTime to a time greater than 131.1ms.

Hello,
Thank you for taking the time to help me !

I thought about the same idea yesterday, but I didn’t manage to do it !

In which files precisely do you want me to change those lines, is it in the .h or .c of the librairy ? Do I need to do changes at multiples lines ?

Thank you !

As I said, you need to modify the library.

“try changing OSR_CFG to HP20X_CONVERT_OSR4096 and then change OSR_ConvertTime to a time greater than 131.1ms.”

Hello,

I did the modifications, and the results are a bit better ! Way better than whole meters of variation…

Otherwise, it still shows some up and down while not moving …

If you have any idea how to improve this :thinking:

I already used the moving average method to get better results.

Thank you