Honeywell Pressure Sensor Troubles - Help?
my sensor: sscdann150paab5
sensor datasheet: https://sensing.honeywell.com/index.php?ci_id=151134
below script:
int sensorpin = a0; // select input pin pressure sensor
int pressure = 0; // variable store value coming sensor
int raw = 0;
float voltage = 3.3;
float supply = 5;
float error;
void setup() {
serial.begin(9600);
}
void loop()
{
error = 0.1*supply;
// read value sensor:
raw = analogread(sensorpin);
voltage = raw * ( supply / 1023.0);
pressure = (voltage - error ) * (150/(0.8*supply)); //convert reading psi
// output reading
serial.print("pressure: " );
serial.print(pressure);
serial.print(" psi");
serial.println("");
serial.print("raw: " );
serial.print(raw);
serial.println("");
delay(500);
}
verified wiring connections correct.
i applying 100psi system (known psi of source) , not getting accurate readings.
can spot anywhere in script may source of issue?
also, sensor reading ~20 psi in room (situated in california) (raw value: ~220) - can verify if makes sense?
when apply 100 psi reads 150 psi (i feel larger measurement limit of sensor - have feeling math in script off).
sensor datasheet: https://sensing.honeywell.com/index.php?ci_id=151134
below script:
int sensorpin = a0; // select input pin pressure sensor
int pressure = 0; // variable store value coming sensor
int raw = 0;
float voltage = 3.3;
float supply = 5;
float error;
void setup() {
serial.begin(9600);
}
void loop()
{
error = 0.1*supply;
// read value sensor:
raw = analogread(sensorpin);
voltage = raw * ( supply / 1023.0);
pressure = (voltage - error ) * (150/(0.8*supply)); //convert reading psi
// output reading
serial.print("pressure: " );
serial.print(pressure);
serial.print(" psi");
serial.println("");
serial.print("raw: " );
serial.print(raw);
serial.println("");
delay(500);
}
verified wiring connections correct.
i applying 100psi system (known psi of source) , not getting accurate readings.
can spot anywhere in script may source of issue?
also, sensor reading ~20 psi in room (situated in california) (raw value: ~220) - can verify if makes sense?
when apply 100 psi reads 150 psi (i feel larger measurement limit of sensor - have feeling math in script off).
untested.
assuming sensor 0-150 psi.
offset/max values calculated datasheet (2.5% , 97.5% of vcc).
adjust if needed.
leo..
assuming sensor 0-150 psi.
offset/max values calculated datasheet (2.5% , 97.5% of vcc).
adjust if needed.
leo..
code: [select]
int offset = 26; // 0 pressure adjust
int fullscale = 997; // max pressure adjust
float pressure; // final pressure in psi
void setup() {
serial.begin(9600);
}
void loop() {
pressure = (analogread(a0) - offset) * 150.0 / (fullscale - offset);
serial.print("pressure is ");
serial.print(pressure, 1); // 1 decimal place
serial.println(" psi");
delay(500);
}
Arduino Forum > Using Arduino > Sensors > Honeywell Pressure Sensor Troubles - Help?
arduino
Comments
Post a Comment