Go Down

Topic: Honeywell SA transducer (Read 241 times) previous topic - next topic


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

Code: [Select]

int pwrled = 12;
int whiteled = 11;

void setup(){
   pinMode(pwrled, OUTPUT);
   pinMode(whiteled, OUTPUT);

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.print("Transducer Pressure: ");
  Serial.print(" PSI ");
   Serial.print("Voltage: ");
  digitalWrite(pwrled, HIGH);
   digitalWrite(whiteled, LOW);// Currently haveing it turn on a led
   digitalWrite(pwrled, LOW);
    digitalWrite(whiteled, HIGH);
 delay(500); }
void loop() {




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?

Code: [Select]
  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


Dec 11, 2016, 11:40 pm Last Edit: Dec 11, 2016, 11:41 pm by jremington
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).


Dec 12, 2016, 12:33 pm Last Edit: Dec 12, 2016, 12:39 pm by Eddiedellz
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


Dec 12, 2016, 01:31 pm Last Edit: Dec 12, 2016, 01:36 pm by outsider
Code: [Select]
float pressure = (analogRead(A1) - 204) / 819.0 * 100;

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

Go Up