user6235: I'm an automotive enthusiast and I want to build some gauges by myself using Arduino.
I was taking a look at this pressure transducer or sender, 100 psi, stainless steel, for oil, fuel, air, water and I was thinking if I can use this sensor to do all of the these tasks: Water, Boost and Oil Pressure.
Look at the Signal output vs read PSI chart of the sensor

I came out with this equation for the PSI calculation:
Since it is a Y = bx + a, where: 
a = 0.5 
b = y2 - y1 / x2 - x1 = (4.5 - 0.5 ) / (100 - 0) = 4/100 = 0.04
x = PSI
y = Signal's Voltage

This means that
Voltage Reading = 0.04PSI + 0.5
So we have :
PSI = (Voltage Reading - 0.5 ) / 0.04 
Am I correct? Can I use this sensor?

user40002: I'd add code to test for voltage between 0.0 to less than or near 0.5 volts. Disconnected pressure transducer won't present 0.5v, 0 PSI transducer voltage; not output 0.5 v @0 PSI shows a lower voltage indicated a fault or open circuit in transducer wiring. My experiences, too many times other engineers "borrowed" hardware and I wound up troubleshooting a non-fault but theft ;} Only a few lines of code to ensure connections are correct.
The floating point vs integer arithmetic compute time is outweighed by settling time of A/D converter and transducer. The auto part was my solution to show HOA board stats for my wildly varying water pressure at Condo Assn,  very cost effective too.

user1585: You math checks you to me.
When you code it, You will probably read a voltage using an analog pin (or external ADC) that will return an integer between 0 being 0 volts, and 1024 = vin volts. vin will be 5 if you don't wire up the vin pin, and 1024 could be different if you use an external ADC.
Anyway you should be aware that the raw readings will probably not be 0-5, and they dont have decimal points. You will need to first convert the reading into the voltage with something like this:
float voltage = ((float)reading)/1024.f;

notice that the datatype float is used (enables decimal points) and that the constant being divided by is also a float so that the calculations will definitly happen between floating point numbers.

6235: <p>I'm an automotive enthusiast and I want to build some gauges by myself using Arduino.</p>

<p>I was taking a look at this <a href="http://www.ebay.com/itm/Pressure-transducer-or-sender-100-psi-stainless-steel-for-oil-fuel-air-water-/271576977896?pt=Motors_Car_Truck_Parts_Accessories&amp;hash=item3f3b3fd1e8&amp;vxp=mtr" rel="nofollow noreferrer">pressure transducer or sender, 100 psi, stainless steel, for oil, fuel, air, water</a> and I was thinking if I can use this sensor to do all of the these tasks: Water, Boost and Oil Pressure.</p>

<p>Look at the Signal output vs read PSI chart of the sensor</p>

<p><img src="https://i.stack.imgur.com/6Yy1T.png" alt=" Signal output vs read PSI chart of the sensor"></p>

<p>I came out with this equation for the PSI calculation:</p>

<p>Since it is a <code>Y = bx + a</code>, where: </p>

<pre><code>a = 0.5 
b = y2 - y1 / x2 - x1 = (4.5 - 0.5 ) / (100 - 0) = 4/100 = 0.04
x = PSI
y = Signal's Voltage
</code></pre>

<p>This means that</p>

<p>Voltage Reading = 0.04PSI + 0.5</p>

<p>So we have :</p>

<p>PSI = (Voltage Reading - 0.5 ) / 0.04 </p>

<p>Am I correct? Can I use this sensor?</p>
 40002: <p>I'd add code to test for voltage between 0.0 to less than or near 0.5 volts. Disconnected pressure transducer won't present 0.5v, 0 PSI transducer voltage; not output 0.5 v @0 PSI shows a lower voltage indicated a fault or open circuit in transducer wiring. My experiences, too many times other engineers "borrowed" hardware and I wound up troubleshooting a non-fault but theft ;} Only a few lines of code to ensure connections are correct.
The floating point vs integer arithmetic compute time is outweighed by settling time of A/D converter and transducer. The auto part was my solution to show HOA board stats for my wildly varying water pressure at Condo Assn,  very cost effective too.</p>
 1585: <p>You math checks you to me.</p>

<p>When you code it, You will probably read a voltage using an analog pin (or external ADC) that will return an integer between 0 being 0 volts, and 1024 = vin volts. vin will be 5 if you don't wire up the vin pin, and 1024 could be different if you use an external ADC.</p>

<p>Anyway you should be aware that the raw readings will probably not be 0-5, and they dont have decimal points. You will need to first convert the reading into the voltage with something like this:</p>

<pre><code>float voltage = ((float)reading)/1024.f;
</code></pre>

<p>notice that the datatype float is used (enables decimal points) and that the constant being divided by is also a float so that the calculations will definitly happen between floating point numbers.</p>
