I am using my Arduino Uno to read analog sensor values from this pressure sensor. I have the Arduino powered with a 12V power supply from the wall. I'm using the 5V from the arduino for the LCD and an 8ch relay board as well.

The sensor is just connected to the 5V, GND and the signal goes to analog input 3. I calibrated the sensor 4 times already, because it keeps giving me unstable values after I pull the power supply out: Calibration graphs with equation, water height in cm versus measured sensor value

The sensor is fixed at the bottom of the water tank, and shielded from water with silicone. Therefore the pressure load is already constant. (e.g. 25 cm h2o). With calibration procedure I meant that I increased stepwise the waterheight, and measured the output signal and then let excel make a linear fit with an equation, which I implement in the software.

As you can see, the sensor's response is quite linear every time, but for me it seems like a sort of offset problem. When I used an external power supply and measured the voltage of the sensor with a DMM, it seemed stable, going to the same voltage every time.

Has anyone an idea what is going wrong, or what I have to add or something? (Already read something about adding a capacitor but I don't think it's a short-time interval).

I'm new to this site and just started with programming with Arduino. (I'm trying to make my aquarium refresh water automatically).

-EDIT: Thanks everyone for the suggestions. I didn't solve the problem with the pressure sensor, but I'm pretty sure it was the problem that the differential p2 was blocked and therefore the reference pressure wrong. Since I indeed want to measure continuously for a long time, the hose like in a washing is no solution for me. I decided to do it with an ultrasonic (hc-sr04) sensor. This works fine! Problem solved:)

  • 1
    \$\begingroup\$ (1) Please give some detail about how you calibrate. (2) With fixed pressure, measure the voltage on the output and repeat, pulling the plug every time, to see if the problem is with the sensor or with the Arduino. \$\endgroup\$
    – Transistor
    Commented May 22, 2016 at 14:30
  • \$\begingroup\$ Was the weather the same each time? \$\endgroup\$ Commented May 22, 2016 at 15:04
  • \$\begingroup\$ Replied to your questions in the main question! water temp was constant so that answers the question about the wheater as well I guess. \$\endgroup\$
    – Bart
    Commented May 22, 2016 at 15:40
  • \$\begingroup\$ Have you measured the power to the device? Is it remaining constant? \$\endgroup\$ Commented May 22, 2016 at 16:00
  • \$\begingroup\$ Have you unintentionaly covered the breathing hole that transmits atmosphefric pressure? \$\endgroup\$ Commented May 22, 2016 at 18:45

3 Answers 3


I think @Marko has correctly identified the problem. The pressure transducer is differential - it measures the difference in pressure between P1 and P2 as shown in Figure 3 in the datasheet.

Differential pressure sensor

Figure 3 from datasheet.

Figure 3 illustrates the gauge configuration in the basic chip carrier (case 98ASB17756C). A fluorosilicone gel isolates the die surface and wire bonds from the environment, while allowing the pressure signal to be transmitted to the silicon diaphragm.

The MPxx5004 series sensor operating characteristics are based on use of dry air as pressure media. Media, other than dry air, may have adverse effects on sensor performance and long-term reliability. Internal reliability and qualification test for dry air, and other media, are available from the factory. Contact the factory for information regarding media tolerance in your application.

You need to vent P2 to atmosphere and monitor the pressure at P1 without getting it wet.

  • \$\begingroup\$ A Yes you and Marko are right, quite stupid of me:p I thought as long as p2 is in the silicone it gets a stable reference, but that didn't work obviously. Thanks for your time and attention! I will let know how I solved the problem! \$\endgroup\$
    – Bart
    Commented May 23, 2016 at 14:05

The sensor has two holes. On first big, you have the attachemnt of the hose. Second is below your sensor, it is breathing hole that transmits atmospheric pressure. Since you have poured the sensor with silicone and submerged into the water is clearly no go solution. Remove the silicone and attach a hose, and use the sensor like in instruction manual. I suspect you want to measure level of water continously, in that case the hose will leak pressure at long term, and it will be useless. This kind of sensor are used in maching machines, where the water goes away and then is filled again, air leaking trough the hose can be neglected. Since you already flooded the sensor, install a hose and bore the wall at the bottom, put the sensor in upside down position, externaly - not submerged obviously.

  • \$\begingroup\$ Ah OK! I think that's the problem indeed:/ I did try that in the beginning as well, with the hose. But that didn't work after a while due to leakage of air I guess as you are suggesting. I'm going to think about boring the hole, or just use another kind of sensor (ultrasound distance-sensor). But thank you very much for looking into my problem! \$\endgroup\$
    – Bart
    Commented May 23, 2016 at 14:03
  • \$\begingroup\$ @smart-beets Yes, not sure about air leaking trough a hose, it's just my thought. Air supply pipes usualy don't leak,so... \$\endgroup\$ Commented May 23, 2016 at 14:06

The reasons suggested above are physically wrong: blocking the reference outlet should not change the calibrated value. It might however make your calibration curve nonlinear which is not the case in the original question (since the gas in the blocked chamber is not in equilibrium with an infinite 1 ATM reservoir, but rather finite. Simply put, the volume taken by the membrane 'inflating' is not insignificant, and pressure higher than 1 ATM can build up in the blocked chamber). In other words, repeating the experiment should yield similar results. Otherwise the sensor or electronics are noisy. I suspect the Arduino voltage is not stable between resets, even further so when powered from USB.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.