Pressure Sensor MPX2050 DP - Need help

Hello Friends..

I am building a water level meter using arduino to measure water level in a underground tank about 7 feet. I will be using MPX2050 DP pressure transducer which is capable of measuring 50kpa. I believe the pressure is going to be around 20kpa for the full tank (7 feet). My question is what is the best easily available instrumentation amplifier I can use here to amplify the output of the sensor so that my arduino analog pins can read and what will be the output voltage range of instrumentation amplifier for the pressure between 0 and 20 kpa

PS: I will be using a single power supply of 5V for the sensor

The best method is to use two op-amps to amplify and buffer the signal. You may be able to get by with one.

To read the output with any useful resolution, you will need to increase the gain of the device so that the output of your amplifier is around 10 mV per kPa. This would give you 5V if you actually got to 50 kPa and about 2 V at your expected pressure of 20 kPa.

The other problem I forsee, is that your device has a quoted supply range of 10-16 V and may not work well at 5V .

The INA125 instrumentation amplifier is very popular, convenient and includes a precision voltage reference source that you can use to power the sensor. It seems well suited for your application. INA125 data sheet, product information and support |
Depending on where you live, you might be able to get free samples from TI. While you are at it, look at the several other possibilities from TI, including some instrumentation amplifiers in 8 pin packages (all designated INAxxx).

It would have been helpful to provide a link to the complete data sheet for the sensor, but the bit you posted suggests that it should work well at 5V (it is probably a set of strain gauges in a bridge configuration). You are correct that a full tank should produce a bit above 20 kPa.

Thanks for your inputs. I was able to get AD623 and tested my sensor with AD623 and I am getting .34 volts per feet@ gain 500. So I am guessing ~2.4 volts for 7 feet, yet to be tested on full tank(7 feet). If my guess is correct, I will have a variation of 0 volts to 2.4 volts between empty and full tank. Now my question is what will be the minimum voltage increments that arduino analog pin can measure?

In ten bit mode (the default) the analog pin on the Arduino divides the reference voltage into 1024 parts, starting at zero. If you have a 5 V Arduino and use 5 V on AREF as the reference voltage (there are other possibilities), then a measurement will give you an integer (call it value) between 0 and 1023. The voltage measured is V = value*5.0/1023. using floating point representation.

Turn that around algebraically to figure out what the analog measurement will be for a given input voltage.

Thank you jremington,

I was able to test my sensor out put on full tank today. But I am facing a small problem. When there is no pressure, i.e., tank is empty, I am not getting 0 volts at the output of the instrumentation amplifier. I am getting around 0.7 volts. I can round it to 1 volt by adding a voltage divider to ref pin on AD623. I did not find a way to make the output to 0 volt. If I make the output to 1 volt, my reading is going to be 1 volt when tank is empty and 3.70 volts when tank is full(voltage readings are liner to the water level). If I go with this range and use map function for analogread, will I compromise the accuracy? please shed some light on this situation.

Thanks in advance.

I haven't used the map function, so can't make a recommendation. However at the moment you have only two points for the calibration and it is always better to have more points. I'm not surprised that there is an offset.

I use Omega PX-309 sensors to measure tank water levels and what I do to calibrate them is the following. I make a table of the ADC output of the Arduino or the actual output voltage of the gauge (or instrumentation amp), as a function of the water level measured directly, for several water levels. For example, using made up numbers I might have measured:

height voltage (or ADC reading)
0 0.7
2 1.4
4 2.2

Then I use a least squares procedure to find the best fit line height = m*voltage + offset
like found on this page: Linear Least-Squares Data-Fitting Utility

The answer given by the above page for those fake data is (actually dx + e, rounded off a bit)
height = 2.66
voltage - 1.82

The negative number says that if you measure zero volts at the gauge, then you have negative height of water in the tank, which is correct. You can do this for ADC values as well, and then put that equation directly into your program for display of data. If you use a program that can plot the fit, so much the better. You definitely want to check that the response is linear. Excel can do this.

I've attached an example of a calibration line fit from one of my tanks. In this case, the ADC is an external 12 bit ADC, hence the range on the X axis.


I could test it on full level and I see the output voltage is pretty linear. Per feet, I am getting a raise of .4 volts and I am getting the desired values as expected. Now the next step is to have this project build on stand alone with LCD and have it installed. My arduino is going to be 8 meters away from the sensor. If I use 8 meters shield wire between instrumentation amplifier and arduino, is it ok or is it going to pickup some noise? Any suggestions are welcome. Thanks in advance.

First, have the amplifier as close as possible to the sensor, so that large signals are carried by the cable.

Overall, dealing with noise pickup can be a difficult question that depends on your particular circumstances. Noise is potentially a serious problem for long leads and 8 meters qualifies. Normally this problem is solved by using shielded multiconductor cable (power, ground and signal inside a grounded outer conductive sheath). What you do with that shield is the primary issue.

Assuming the sensor will be out of doors, you may consider connecting the shield to earth ground, if possible. Keep in mind that the sensor itself is in contact with the water in the tank, which is most often well grounded to the earth.

However, depending on what you are using as a power supply, you should certainly worry about ground loops, that is, current flowing from one place to another via the ground connection. One way to check for such a problem is to set a multimeter on AC volts and check for an AC voltage between the Arduino ground pin and earth ground near the sensor, for example a metal stake pounded into the ground, a buried water pipe, etc. If you do see a signal higher than a couple of volts, consult a local electrician!

I once destroyed a US$300 pressure sensor, courtesy of a ground loop.

As a final point, if the outlet pipe of the tank runs near your measurement station, you might be able to put the pressure sensor in the pipe and thus avoid long wires. The readings will drop if water is actually flowing, due to the Bernoulli effect but those readings can be ignored. In my setups, the pressure sensor is about 300 meters away from the tanks themselves (and about 30 meters lower in height), but it works very well.