knut_ny:
See its datasheet.
Only 3 pins to connect: Ucc / Gnd / analog signal out.Aout goes to an analog input. The datasheet shows the function needed to calculate pressure.
Please check my math:
Aread = 1023 * (0.0012858*P + 0.04)
Aread = 1.31537*P + 40.92
float Pressure = (float(analogRead(A0)) - 40.92)/1.31537 ;
I've found a code from post in MPX5700GP pressure sensor - Sensors - Arduino Forum and try it in my device.
This is the code :
// MPX5700 pressure sensor (700kPa)
int rawValue; // A/D readings
int offset = 410; // zero pressure adjust
int fullScale = 9630; // max pressure (span) adjust
float pressure; // final pressure
void setup() {
Serial.begin(9600);
}
void loop() {
rawValue = 0;
for (int x = 0; x < 10; x++) rawValue = rawValue + analogRead(A0);
pressure = (rawValue - offset) * 700.0 / (fullScale - offset); // pressure conversion
Serial.print("Raw A/D is ");
Serial.print(rawValue);
Serial.print(" Pressure is ");
Serial.print(pressure, 1); // one decimal places
Serial.println(" kPa");
delay(1000);
}
And that's working. this is result from serial print :
Raw A/D is 1820 Pressure is 107.0 kPa
Raw A/D is 1818 Pressure is 106.9 kPa
Raw A/D is 1820 Pressure is 107.0 kPa
Raw A/D is 1810 Pressure is 106.3 kPa
Raw A/D is 1805 Pressure is 105.9 kPa
Can you help me how to make the output in Atm unit ?