2021-08-23 10:57 PM
2021-08-24 12:10 AM
Welcome, @AMaro.2, to the community!
Pressure sensors always measure a pressure difference, either between two separate connections (differential pressure sensors), or against a reference pressure inside (absolute pressure sensor). ST currently only offers absolute pressure sensors that can be used for 260/300...1260hPa.
So the answer to your question is: no, it is not simply possible to measure negative pressures with an absolute pressure sensor.
Regards
/Peter
2021-08-24 12:18 AM
Thanks for the answer!
Yes, I understand it. My idea is to use two sensors. One senses the ambient pressure and the other generates a negative pressure. The difference between them is the relative pressure.
I mean I did the same with the Bosch BMP280 and it works.
The problem with the LPS22CH that I am currently using is that if I create negative pressure on the hose connection, does the value not change?
2021-08-24 12:35 AM
Oh I understand.
This case is of course also possible because you use it to determine the calculated pressure difference between two sensors.
The second sensor can then measure the negative pressure as long as it is in the absolute range of the sensor, e.g. 260...1260hPa. The calculated difference between the two sensors then corresponds to the negative pressure of the second sensor.
Regards
/Peter
2021-08-24 12:47 AM
My question would be: why doesn't the value of the sensor change when I create a negative pressure on it?
I query the three registers PRESS_OUT_H (2Ah), PRESS_OUT_L (29h), and PRESS_OUT_XL (28h) as described in the "interpreting pressure readings".
The value shown to me is approximately 1020 hpa. It only changes with the temperature and has a slight fluctuation, which according to the data sheet is only sometimes.
The temperature value is displayed correctly.
2021-08-24 12:52 AM
The sensor has no nozzle or hose connection, which is why in your case it has to be exposed completely, i.e. the entire sensor, to the negative pressure.
What is the mechanical structure of the chamber in which the sensor is located and where does the negative pressure act there?
Regards
/Peter
2021-08-24 01:00 AM
The structure is provisional. I press the hose against the circuit board and suck on the hose. I feel that the negative pressure is not escaping.
2021-08-25 07:52 AM
Hi @AMaro.2 ,
are you sure you are sealing well the tube on the adapter?
If not, the air pressure will be almost equal to the ambient one.
You might try to seal the tube on the adapter with hot glue, if you can.
-Eleon
2021-08-25 10:39 PM
I'm actually pretty sure that the pressure of the hose against the plate is tight.
For a simple query I only have to configure the CTRL_REG1 (10h) register to at least 1 hz, i.e. write a 0x10h in the register. And then the query of the three registers PRESS_OUT_H (2Ah), PRESS_OUT_L (29h) and PRESS_OUT_XL (28h) and divide by 4096?
I mean if I check the WhoAmI register and the temperature and the values are correct, I don't know what I'm doing wrong with the print?
2021-08-27 06:11 AM
Hi @AMaro.2 ,
you can check if you are performing well the raw data conversion from these formula (Github -->): lps22ch_reg.c
float_t lps22ch_from_lsb_to_hpa(uint32_t lsb)
{
return ((float_t) lsb / 1048576.0f);
}
float_t lps22ch_from_lsb_to_celsius(int16_t lsb)
{
return ((float_t) lsb / 100.0f);
}
For an example on how to configure the sensor, please check this example --> lps22ch_read_data_polling.c.
/* Enable Block Data Update */
lps22ch_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
/* Set Output Data Rate */
lps22ch_data_rate_set(&dev_ctx, LPS22CH_10_Hz_LOW_NOISE);
-Eleon