3-pin pressure sensor

Hi guys,

I have some problems dealing with a pressure sensor. It’s a 3-pin sensor (+ / - / signal), which get’s 5V input and delivers a signal up to 4.5V. I attached the datasheet of the sensor and my wiring.

I am not sure which of the sensor pins has which function, but I tried all combinations and in close all cases I got a 5V output even the sensor is just laying around and should give something around 0,5V. Only with one combination I received a signal of around 2,5V which is also to high.

Moreover, if I don’t connect anything to the analog input, the Arduino still show some measured voltage jumping around at 3V. How can this be possible?

Below also my code but I guess this is just standard.

// delcare pins and other values
int sensorPin = A1;
float vout = 0.0;
float vin = 0.0;
float pressure = 0.0;

void setup() {
  pinMode(sensorPin, INPUT);
  Serial.begin(9600);

}

void loop() {
  measurePressure();
  delay(1000);
}

void measurePressure() {
  int voltage = analogRead(sensorPin);
  vin = (voltage * 5.0) / 1024.0;
  pressure = (vin * 20) - 10;
  // print out the value you read:
  Serial.print(pressure,2);
  Serial.print(" bar pressure with: ");
  Serial.print(vin);
  Serial.println("V measured voltage.");
}

Moreover, if I don't connect anything to the analog input, the Arduino still show some measured voltage jumping around at 3V. How can this be possible?

If you don't connect anything the pin is floating, so it's picking up any electrical noise like an antenna. So that's pretty normal.

I am not sure which of the sensor pins has which function, but I tried all combinations and in close all cases I got a 5V output even the sensor is just laying around and should give something around 0,5V. Only with one combination I received a signal of around 2,5V which is also to high.

You might have fried the sensor. Depending on the construction of the sensor it must not be treated that way. Many sensors stop working if you swap GND and Vcc.

Do you tell us the type of your sensor and provide a link to it's datasheet?

That is an 80 bar transducer , I suspect you are not putting 80 bar into it !! And so don’t see the output change .I would agree ... It is quite possible that you have killed it by swapping wires around .

80 bar is a lot of pressure , a car tyre is inflated to about 2bar, you can blow a fraction of a bar

If you connected 5V power wrongly to the sensor, it may be toast now.

To identify pinout if unknown, use about a 500 ohm resistor in series with the 5V to limit the current and prevent damange. Once you get reasonable readings and know the pinout, bypass the current limit resistor.

The combination that gave 2.5V is perhaps the right one, and you have the wrong datasheet or wrong sensor. Many sensors show midrail voltage for zero measurement, so maybe use that connection and see if the output responds to measure.

MarkT: If you connected 5V power wrongly to the sensor, it may be toast now.

Good point. I did not think about this before as the sensor seemed to be just a clunky piece of metal and plastic.. hard to imagine that it is so easy to damage.

The datasheet fit's to this sensor but unfortunately it's just missing the wiring point. And yes, there is a measuring error for sure - especially in the low pressure range - but 2.5V for 1bar is just too much.

I have some more sensors but I'd like to avoid toasting them on the same way. The idea with the 500Ohm resistors sounds good but in this case the expected signal voltage on A1 input won't be 0.5V, right?

The other day I killed an MPXV5004 by doing just that - wrong connection. It was dead instantly. Some sensors can survive this, but many won't. Electronics won't stop being delicate when you put them into a very rugged enclosure.

If you have the type number of your sensor you can normally find complete data sheets (including connections) by simply typing that number in Google.