Pressure Sensor Output Conversion

Hi!
I am new to using pressure sensors with Arduino. My pressure sensor is MPXV7002DP and I am using Arduino Uno.

Pressure sensor link: https://www.nxp.com/docs/en/data-sheet/MPXV7002.pdf

I understand that the conversion to voltage is X / 1024 * 5 V (since I am using the 5V source). This is where I am confused:

My sensor is outputting 540 using AnalogRead. So, in terms of voltage, it is 540/1024*5 = 2.64V.
However, if you look at the pressure sensor datasheet (pg. 3), it says that the output voltage is supposed to be between 3.5 - 4.5 V.

Would anybody please explain to me how is this possible? How can I get a voltage reading outside of the specified full scale output?

I am sure my pressure sensor is not broken, since I was able to detect pressure changes quite accurately. It's just this strange voltage reading that's confusing me.

Thank you!

it says that the output voltage is supposed to be between 3.5 - 4.5 V.

No it doesn't.

Are you looking at the Full scale span? The note says:-

5.Full Scale Span (VFSS) is defined as the algebraic difference between the output voltage at full rated pressure and the output voltage at the minimum rated pressure.

So you can get 3.5V between the full pressure and the minimum pressure.

The full scale output is 4.5V and 3.5V down on this is 1V, so it can go as low as this.

However, if you look at the pressure sensor datasheet (pg. 3), it says that the output voltage is supposed to be between 3.5 - 4.5 V.

You're looking at "full scale span".

Look at figure 4. It should be reading about 2.5V with no pressure differential. I assume you have no pressure so you can "zero" your calibration at 2.64V.

Ratiometric sensors like this output 0.1VCC to 0.9VCC.
Try this sketch, assuming you want to display in kPa.
Leo..

int rawValue; // A/D readings
float zero = 5115; // zero calibrate (for 10 readings)
float pressure; // final pressure

void setup() {
  Serial.begin(9600);
}

void loop() {
  rawValue = 0; // reset
  for (int i = 0; i < 10; i++) rawValue += analogRead(A0); // 10 readings for averaging
  pressure = (rawValue - zero) * 0.08555; // multiplication factor, so 0.9*VCC displays as 350kPa
  Serial.print("Pressure is ");
  Serial.print(pressure, 1); // one decimal place
  Serial.println(" kPa");
  delay(500);
}

Hello guys,

Thank you so much for answering my question. I have a better understanding of it now. I have one more question though, so the 540 was for no pressure differential. How to "zero" my calculation?

Is it by substituting the Vfss?
If I substitute the formula:

V = Vs*(0.2P+0.5) +- 6.25%Vfss
2.64 = 5 * (0.2
0+0.5) + 0.0625*Vfss
Vfss = 2.52

Is that correct? How do I know my Vfss?
Also, how to leave a like for all your answers?
Thank you

You should NOT work in 'voltage' with this ratiometric sensor.

The sensor does NOT output 2.5volt without pressure (despite what the datasheet says).
It outputs VCC/2, which is 2.5volt if... your 5volt supply is 5.000volt, which is rarely is.
If the supply happens to be 4.8volt, then sensor output will be 2.4volt with zero pressure.

Better to work with A/D values, because the ratiomatric A/D of the Arduino ALWAYS puts out a value of half of it's range (0-1023) with half of it's supply on the A/D input.

I assumed an average 'zero' A/D value of 511.5 in the sketch I posted, as a start for calibration.

Let me know if you want to display in psi or Bar or any other value.
Leo..

P.S. Can add Karma point to the people who help you.
Hope I didn't confuse you more :slight_smile: