Hello,
i have problem with my gauge pressure sensor
i found 2 different topics with MPX5700GP
https://forum.arduino.cc/index.php?topic=425830.0
https://forum.arduino.cc/index.php?topic=99381.0
an they still didnt solve my problems
maybe sth is with my sensor maybe with code or arduino idk
im using arduino nano with lcd and LCM1602
there is my code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN 3
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7);
void setup()
{
lcd.begin(16, 2);
lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
lcd.setBacklight(HIGH);
lcd.home();
lcd.print("Voltage");
lcd.setCursor (0, 1);
lcd.print("Pressure");
}
void loop()
{
// averaging for noise removal
float sensorValue = analogRead(A0);
float voltage = 5000.0 * sensorValue * (1.0/1024.0); // mV
float pressure = ((((voltage / 5) - 0.04) / 0.0012858)/1000.0) ; // kPa
lcd.setCursor (10,0);
lcd.print(voltage);
delay(500);
lcd.setCursor (10,1);
lcd.print(pressure);
delay(500);
}
in attachments there is data sheet for this sensor
after vcc connection on display
i can see
voltage 258.79 (in mV)
and pressure 40.22 (and this in kPa)
this valuse sometimes are softly lower or higher but those are slight changes
so for me it is big offset of valid value
thank you in advance for any help
MPX5700-1127047.pdf (199 KB)