Honeywell SA transducer

I am trying to read a Honeywell SA transducer but the pressure from my gauge is way off from the reading. I'm not sure how to really translate the data from the data sheet to my code.

here's my wacky code. Thanks

int pwrled = 12;
int whiteled = 11;

void setup(){
   pinMode(pwrled, OUTPUT);
   pinMode(whiteled, OUTPUT);
 
   Serial.begin(9600); 
}

void measurePressure(){
  const float offset = 0.0;
  float pressure = 0;
  int rawReading = analogRead(A1);  
  float voltage = rawReading * (5.0 / 1023.0);
  pressure= (voltage - offset) * 100/4.0;
 Serial.println("-----------------------------------------------------");
  Serial.print("Transducer Pressure: ");
  Serial.print(pressure);
  Serial.print(" PSI ");
   Serial.print("Voltage: ");
  Serial.println(voltage);
   Serial.println("-----------------------------------------------------");
  digitalWrite(pwrled, HIGH);
   digitalWrite(whiteled, LOW);// Currently haveing it turn on a led 
 delay(500); 
   digitalWrite(pwrled, LOW);
    digitalWrite(whiteled, HIGH);
 delay(500); }
void loop() {

 measurePressure();


}

What exact model do you have?

The data sheet says to measure the voltage. 1V = zero pressure, 5V = full scale.

However, output up to 6V is possible. You MUST protect the analog input from voltages > 5 V. A 10K resistor in series with the gauge and the analog input will do that.

The following is correct in the basic approach, but why is offset set to zero, and what do you think the term 100/4.0 supposed to do?

  pressure= (voltage - offset) * 100/4.0;

The version is 0 to 100 PSIA
my thinking was divide the 100PSI by the 4V range

when I read just voltage at 0 applied pressure it reads .48v

How are you powering the sensor? It requires at least 9V to operate.

Post a diagram showing how you have everything wired (hand drawn, not Fritzing).

Attached the diagram
I was previously powering it from the 5V pin so now ill change it to off a 9v and I added the 10k resistor.

What would be the correct way to calculate the PSI?

if 0 PSI = 1V & 100 PSI = 5V

Would I be dividing 4V by 1023?

Thank you for the help BTW

20161212_061635.jpg

Try:

float pressure = (analogRead(A1) - 204) / 819.0 * 100;
Serial.println(pressure,1);
delay(500);

Untested.
5V = 1023, 1V = 204, 4V = 819.