Table of Contents
- Project Introduction
- Getting Started
- Calibrating the MPX2050DP Pressure Sensor
- Calculations and Noise Reduction
- Using Vivado and Testing the System
- Project Report Updated
**********************************************************************************************************************
Calculations
We are going to make use of the fact that the pressure sensor presents a linear measurement, as we could see it in its datasheet and in the graph above where it shows the voltage-pressure relationship. However, you can perfectly calibrate your sensor using linear regression. Based on the differential pressure equation that relates the height:
Where P is pressure, rho is gravity and h is the height or level of the tank.
The units we need to know here are Pascal's:
Water density (approx)
Gravity (approx) 9.8 m / s2
As we saw in the previous chapter, I used a pressure gauge to measure the pressures applied to the sensor. So to obtain the height of the liquid I did the following calculations:
P(mmhg) | P(Pa) | Height(cm) |
100 | 13332 | 136 |
80 | 10665 | 108 |
60 | 7999 | 81 |
50 | 6666 | 68 |
40 | 5332 | 54 |
30 | 3999 | 40 |
20 | 2666 | 27 |
10 | 1333 | 13 |
0 | 0 | 0 |
Now, according to the calculated height, I make voltage measurements at the output of the operational amplifier or the input of the analog port AIN_32 of the Cmod S7 board.
Heighth(cm) | V output(mV) |
136 | 1957 |
108 | 1947 |
81 | 1937 |
68 | 1930 |
54 | 1926 |
40 | 1921 |
27 | 1917 |
13 | 1912 |
0 | 1905 |
Note: between the voltage reading of the multimeter and the Cmod S7 board there is an approximate difference of 50 millivolts. For example, if the AIN_32 serial port measures 1,905 volts, the voltmeter measures 1,851 volts approx.
Noise Reduction
Since I am working with very small voltages from the pressure sensor (0 to 40 mV), so I used an op amp to get an approximate range of 0 to 200 mV, which is still very small and I had to redesign my diagram. schematic for noise reduction.
Changes applied for noise reduction:
- Place a 20 picofarad capacitor between ground and Vcc;
- Power the LM386N-1 operational amplifier with 12 vols;
- Remove the potentiometer that feeds the MPX2050DP pressure sensor and connect it to 12 volts from the source;
- Remove the potentiometer connected to pin 5 of the LM386N-1 operational amplifier and put a voltage divider with resistors; and
- Solder pins to the MPX2050DP pressure sensor, as these are very thin and make false contact.
The final system is shown below: