1

I am trying to use a pressure sensor which is MPX2100DP. Datasheet is; https://www.nxp.com/docs/en/data-sheet/MPX2100.pdf

My goal is to measure the air pressure inside a pipe. First of all, I tried it alone. 1st = GND, 2nd = A1, 3rd = +12V. (I connected GND to power supply and arduino.) Whether I close the pipe or not, the result is 1023.. Also, I tried plug the hose into the other port. There arent any difference. Then, I tried to use a differential amplifier to compare the normal air with the air in the pipe and increase the value, but the values ​​​​reflected unchanged at the opamp output. I used the instrumentation amplifier AD620AN, thinking that it is lost because of the low signal, but I still could not get any results. Where is my fault? Someone could advice me? I will convert voltage to pressure but firstly ı want to solve the problem of value.

enter image description here

Arduino code is ;

Serial.begin(9600);
}
void loop() {
 float sensorValue = analogRead(A1);
 Serial.print("A/D is:    ");
 Serial.println(sensorValue);
 delay(750);
}

With AD620AN; enter image description here

zehra
  • 13
  • 4
  • 1
    Please, post a proper schematic. If you don't have a schematic in some CAD program, you can even draw it in paint (try to make it readable). Also, how many volts do you actually have on chip output? Measure with multimeter please. – Ilya Feb 15 '22 at 14:35
  • 2
    The ADC result of 1023 indicates that you are reading a very high voltage. Try measuring the sensor output voltage with a multimeter first. – Klas-Kenny Feb 15 '22 at 15:54
  • How did you connect the AD620? Power supplies? – Antonio51 Feb 15 '22 at 18:58
  • I hope my drawing was self explanatory. I connected the output directly to the arduino and got 1023, that is 5V, as an analog value. I will measure with a multimeter and reply again,thank you. – zehra Feb 15 '22 at 20:12
  • I added a new drawing circuit with the AD620AN. I was using +12V power supply. I used 330 ohm and my gain was 150, thank you for your reply. – zehra Feb 15 '22 at 20:38
  • Don't forget a decoupling capacitor of 0.1uF-1uF, as nearest as possible, between pins supply of AD620 ... – Antonio51 Feb 15 '22 at 20:53
  • Hi sir, i measured the sensor output voltage with a multimeter. Only when there is no self pipe the result is ±Vout=6.07 V. When I close the pipe +Vout=6.08V, -Vout=6.06V. – zehra Feb 16 '22 at 06:58
  • NB: Have you seen that "differential" is only ... 40 mV max ? Reduce the gain at 50, and set a level reference of about 2.5 V. – Antonio51 Feb 16 '22 at 07:02
  • Should i do it when using the AD620AN? actually I saw 40 mV but I did it because the supply voltage is 10-16V. But now I'm trying your advice. – zehra Feb 16 '22 at 07:15
  • sorry sir, how did you calculate it? for example ı want to set the reference voltage as 3.3V how can ı calculate the gain? ı know that normally gain is calculating from (49,4k/R) +1. And why am ı not the getting correct values when ı just use only mpx2100dp. – zehra Feb 16 '22 at 07:45
  • The gain don't change with common-mode voltage. But, if the gain is too high, output voltage can be higher than ADC full range of Arduino board... See the last picture in answer. – Antonio51 Feb 16 '22 at 09:50
  • As pressure can be higher or lower (relatively), the differential "voltage" can be positive or negative, then you have to set a Vr reference. I choose 2.5 V to be at the mid-level of Arduino full scale. – Antonio51 Feb 16 '22 at 09:54
  • See also this post for information https://electronics.stackexchange.com/questions/581532/read-three-signals-from-mpx2102dp-pressure-sensor?rq=1 – Antonio51 Feb 16 '22 at 09:58

2 Answers2

1

Did you use the AD620 correctly?
Note that "common-mode" voltage is eliminated for output.

Here is enter image description herewhat you should get ...

Be careful if Gain and Vref are not well chosen.
The output voltage will be higher than ADC Arduino full range.
Don't forget decoupling capacitor of AD620, nearest supply pins.

enter image description here

Antonio51
  • 11,004
  • 1
  • 7
  • 20
  • Oh, I think ı used the AD620AN wrong.. Ok, ı will search your reply thank you sir. – zehra Feb 15 '22 at 20:41
  • I edited my circuit. i designed a voltage reducer for vref=2.5V and the gain is 50 with 1k ohms. My results are: Vout is 3.1V on the multimeter. While the value is 616 on the arduino when the hose is open, the value is 400 when i turn it off. i think these are the correct values. Now i am going to convert the voltage to pressure, thank you for your reply and helps. My circuit diagram is; [link](https://resimyukle.io/r/oga6zwRJl7) – zehra Feb 17 '22 at 09:10
  • is the link i just added? – zehra Feb 17 '22 at 10:41
  • Yes. Norton gives a warning in red... No worries, make an answer at your own question and add the picture ... – Antonio51 Feb 17 '22 at 10:43
0

This is my last circuit and i get correct values. (batteries represent power supply.)

Note: Actually I didn't understand where I should place the decoupling capacitors. I tried to put it on pin 2 and pin 3 of AD620AN but got the same values.

enter image description here

And it's my arduino code. There is a conversion of voltage to pressure.

int offset =0; 
int pressure; 

void setup() {
Serial.begin(9600);
}

void loop() {
  int Value = 0;
  float  Vout = analogRead(A1);
  Value = Value + analogRead(A1);

 
  float Voltage = Vout /1023 *5;
  pressure = ( (Vout - offset) / 0.0004 ) / pow(10,3) ; 

 
  Serial.print("Vout: ");
  Serial.print(Vout);
 
  Serial.print("     Voltage: ");
  Serial.print(Voltage);
 
  Serial.print("     Pressure " );
  Serial.print(pressure,1);
  Serial.println(" kPa");
  delay(750);
}




//When hose is open; Vout: 620.00     Voltage: 3.03     Pressure 1550 kPa
//When hose is closed; Vout: 420.00     Voltage: 2.05     Pressure 1050 kPa
zehra
  • 13
  • 4