# How to Use MPX5700AP pressure sensor?

I've a project for my final task, to make control and monitoring biogas pressure. But never use pressure sensor before, the sensor i buy is MPX5700AP. Can anybody help me for source code or how to code MPX5700AP? Thank you very much. I already google it but very little people use this sensor.

*Indonesia is welcome, i still learning english ;D

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.

top of page 4

Aread = 1023 * (0.0012858*P + 0.04)
float Pressure = (float(analogRead(A0)) - 40.92)/1.31537 ;

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.

top of page 4

Aread = 1023 * (0.0012858*P + 0.04)
float Pressure = (float(analogRead(A0)) - 40.92)/1.31537 ;

I’ve found a code from post in https://forum.arduino.cc/index.php?topic=515898.0 and try it in my device.

This is the code :

// MPX5700 pressure sensor (700kPa)

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 ?

Can you help me how to make the output in Atm unit ?

Multiply the kPa value by the appropriate conversion factor. Also, please study reply #1, until you understand it.

Always use code tags ("</>" button on post editor) when posting code.