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.
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.
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:
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