Pressure sensor values not consistent

hi all, I have a pressur sensor as in the picture and I write the following code to read values with eps32 2432s028 shield.

#include "HX711.h"
const int DOUT_Pin = 27;   //sensor data pin
const int SCLK_Pin  = 22;   //sensor clock pin
HX711 pressure_sensor; 
void setup() {
	pressure_sensor.begin(DOUT_Pin, SCLK_Pin);
	pressure_sensor.set_scale(2280.f);
	pressure_sensor.tare();
}
void loop() {
  Serial.print("Pascal: ");
  pressure_sensor.power_up();
  Serial.println(pressure_sensor.get_units(),1);
}

unforunately I read always different value which encrease on its own from 830 to 840 Pa.
and then if I put tube inside a glass of water I don't obtain expected different pressure:

P = density * g * H = 1000Kg/m^3 * 0.1m * 9.81 m/s^2 = 981Pa
I obtain just 3Pa difference (passing from 830 to 833Pa and if I remove tube pressure the value remains to 833Pa and then encrease slowly on its own. Can someone help me to better use the pressure sensor?

How do you power the HX710.
It should be powered from VCC of the processor (3.3volt when used with an ESP).

This is a 40 KPa sensor, and might have a low resolution and drift a bit when used with those low pressures (<1KPa). A good airtight fitting hose is also important. And air slowly desolves in water...
Leo..

@sanga
What is the model of your sensor? Do you have a datasheet for it?

Hi, @sanga

What model is your sensor?

Is it an absolute pressure sensor or a gauge pressure sensor?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

It's a 40KPa (0.4 Bar) gauge sensor, followed by a HX710, the stripped down version of the HX711.
No excitation voltage regulator, like a HX711 board has, so a bit more sensitive to supply noise.
I have helped another poster with a fuel tank sensor with this module, which seemed to work OK.
Leo..

Where did you get that number?

I see, it's from the example code and is totally meaningless for your sensor.

You need to do a calibration first.

many thanks for your reply

the article is ZkeeShop 3Pcs Barometric Pressure Sensor Module 3.3-5V Liquid Water Level Controller Board 0-40KPa

I took the scale value from a tutorial
many many thanks for your help

That number is for a particular weighing scale, totally meaningless for your pressure sensor.
To get meaningfull data from your sensor you need to do a calibration first.
Do you need help?

1 Like