Arduino Forum

Topics => Science and Measurement => Topic started by: zeroG on Dec 19, 2013, 02:57 pm

Title: Help with pressure sensor MD-PS002
Post by: zeroG on Dec 19, 2013, 02:57 pm
Hello!

I've just bought this pressure sensor  MD-PS002  http://www.arduiner.com/it/home/116-sensore-pressione-arduino-md-ps002-150kpaa-vacuum-sensor-absolute-pressure-sensor-height.html

The datasheet is in Chineese, and i can't understand how it works. Using google translate i know that Vsupply is 5V, input current is 1mA, range 0-150 Kpa. I can't find the relationship between pressure and output voltage.
Also, i don't know how to connect it!
I attached the pin mapping i've found in the datasheet: can you help me with the circuit? Thanks!!


Title: Re: Help with pressure sensor MD-PS002
Post by: retrolefty on Dec 19, 2013, 03:08 pm
It's implemented as a simple four resistance Wheatstone bridge. You 'excite' the bridge by applying a regulated constant voltage or constant current to the power and ground pins. The you measure the differential millivolt output across the two other pins.
The requires significant support electronics in the form of a true differintial instrumentation op-amp set to the desired amplification (gain) to be useful to read with an arduino analog input pin. Lots of example circuits have been posted around here over the years.

There are pressure sensors available that already have the internal amplification needed to be more useful for arduino projects.
If a simple to use barometric sensor is desired here is one that uses digital interfacing and would be easier to use with an arduino by using the SPI library.
https://www.sparkfun.com/datasheets/Sensors/Pressure/MPL115A1.pdf
Lefty
Title: Re: Help with pressure sensor MD-PS002
Post by: zeroG on Dec 19, 2013, 03:56 pm
Thank you Lefty,

i want to try with the Wheatstone bridge. I'm following the notation from wikipedia : http://en.wikipedia.org/wiki/Wheatstone_bridge
In this page there is the formula to calculate the voltage (Vg) that depends on Vsupply and the 4 resistor values. Following the schematics, Vg is the voltage between pin 2 (+out 2) and pin 5 (-out 3)....right?

The datasheet says that the sensor span is 80 mV, does it means that Vg(max) is 80 mV?

Thanks again!

Title: Re: Help with pressure sensor MD-PS002
Post by: retrolefty on Dec 19, 2013, 04:56 pm

Thank you Lefty,

i want to try with the Wheatstone bridge. I'm following the notation from wikipedia : http://en.wikipedia.org/wiki/Wheatstone_bridge
In this page there is the formula to calculate the voltage (Vg) that depends on Vsupply and the 4 resistor values. Following the schematics, Vg is the voltage between pin 2 (+out 2) and pin 5 (-out 3)....right?

The datasheet says that the sensor span is 80 mV, does it means that Vg(max) is 80 mV?

Thanks again!




That datasheet is hard to read as it's not in english. However a measurement span of 0 to 80millivolts is a realistic and common output range when dealing with simple bridge sensors without built in amplifications. Again you have a task ahead of you if you attempt to build the needed electronics for this kind of sensor to be useful on an arduino.

Good luck
Lefty
Title: Re: Help with pressure sensor MD-PS002
Post by: zeroG on Dec 21, 2013, 07:32 pm
I soldered 5 wires to the sensor and i made a simple circuit to see the output: 52/53 mV. I'm going to make an instrumentation amplifier with a amplification coefficient of 50 or 60, depending on the resistor i have....let's see if it works!
Title: Re: Help with pressure sensor MD-PS002
Post by: jonte987 on Sep 21, 2014, 11:11 pm
This is perfect..
http://www.ebay.it/itm/HX711-Weighing-Sensor-Dual-Channel-24-Bit-Precision-A-D-Module-Pressure-Sensor-/161264280835?pt=LH_DefaultDomain_0&hash=item258c19a503&_uhb=1
HX711 library in github for arduino..
Bye
Title: Re: Help with pressure sensor MD-PS002
Post by: amtpdb1 on Sep 01, 2015, 01:36 am
Did anyone get this to work?
Title: Re: Help with pressure sensor MD-PS002
Post by: stievenart on Nov 10, 2015, 02:59 am
Did anyone get this to work?
Yes, I was able to get readings from my project. Jonte987 was correct, The MD-PS002 is a millivolt wheatstone bridge (https://en.wikipedia.org/wiki/Wheatstone_bridge). In order to read it, you will need to use a weighing sensor amplifier. I used the following links:

HX711 Spec Sheet:
https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf (https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf)

GitHub Library and Example Code:
https://github.com/bogde/HX711 (https://github.com/bogde/HX711)

The example code is for a weight scale and not for a pressure sensor. Both weight scales and this pressure sensor use wheatstone bridges and both send out readings in millivolts. I used the weight scale example to check my MD-PS002. I will be working on calibrating the output from grams to mPa. Beyond that I will be working on multiple vacuum pressure sensors with multiple HX711 breakout boards.
Title: Re: Help with pressure sensor MD-PS002
Post by: AMWEI-thermistor on Nov 17, 2015, 05:16 am
Your attachment for Chinese to English translation is meachanical dimension of the chip, and Power IN OUT, Signal IN and OUT
Title: Re: Help with pressure sensor MD-PS002
Post by: srabsrab on Dec 04, 2015, 12:11 pm
Anyone know the maximum pressure of this? I know datasheet say 150kpa but its not enough for divelogger (15m maximum depth)... unfortunately diveduino project is dead and i2c sensor is expensive to play ...
Title: Re: Help with pressure sensor MD-PS002
Post by: stievenart on Dec 04, 2015, 09:49 pm
Anyone know the maximum pressure of this? I know datasheet say 150kpa but its not enough for divelogger (15m maximum depth)... unfortunately diveduino project is dead and i2c sensor is expensive to play ...
I have a spec sheet that has the "Overload Capacity" of the MD-PS002 is "2times" or 200Kpa. See attached pdf:
Title: Re: Help with pressure sensor MD-PS002
Post by: srabsrab on Dec 07, 2015, 06:09 pm
Now I have one from ebay but seems doesn't work?

I try connect on pin 1 +IN 5V, pin 3 and 4 -IN zero(GND) and try measure mV on pin 2(+OUT) and 5(-OUT) but there is only half voltage (+-half) without any changes by change pressure. And what is very interesting - on output +OUT is minus and on output -OUT is plus .....strange

Something wrong with my circuit or this sensor is bad?
Title: Re: Help with pressure sensor MD-PS002
Post by: stievenart on Dec 08, 2015, 12:33 am
Something wrong with my circuit or this sensor is bad?
I had no little to no success getting the MD-PS002 to read much from a multi-meter or direct to Arduino. I did try an Op Amp LM385 and was able to get a rough reading of 10, 20, 30... wasn't enough resolution for my project. I did get the HX711 chips amplify the signal and the resolution is very fine with the 24-bit HX711. I used a breakout board with the HX711 chip and it was made for stress strain gauges. But, the HX711 can be used on wheatstone sensors like the MD-PS002.

The HX711 breakout boards are cheap on eBay:
Title: Re: Help with pressure sensor MD-PS002
Post by: srabsrab on Dec 08, 2015, 03:08 am
I tryed also LM324 amplifier (have some expensive sensor MS 5407 and I mean i found something equal and very cheap for experiments), but resolution is not the problem now. If datasheet say 80mV so the difference must be about 80mV by maximum pressure not 2,5V constant without any dependence on pressure... (with 3V power is 1,5V constant ... this mean half power voltage like dividing resistance....)....
Title: Re: Help with pressure sensor MD-PS002
Post by: darrencch on Mar 02, 2016, 02:10 pm
If datasheet say 80mV so the difference must be about 80mV by maximum pressure not 2,5V constant without any dependence on pressure... (with 3V power is 1,5V constant ... this mean half power voltage like dividing resistance....)....

I'm also having the same problem as srabsrab had, the output + and - gives me half of the DC voltage supply (5V). I measured the voltage drop accross the resistance between IN+ and OUT+ as well as IN+ and OUT-, they gave me 0V and 2.5V.

I just wanna ask if there's anyone who tried this sensor before and I really need some help and guidance on how to operate this sensor. TQ.
Title: Re: Help with pressure sensor MD-PS002
Post by: EugenNazaroff on Mar 07, 2017, 08:26 pm
I use HX711 with my PS002 vacuum sensor and have no problem. When You use HX711 You should connect HX711 E+ pin to  PS002 +IN pin; E- to both -IN; A+ to +OUT; A- to -OUT. You will have 4 wires from PS002 because both -IN to connected together.

You should install HX711 library and then You can use standard HX711 sketch from examples. If You will set 64 scale in the sketch You will take vacuum pressure in pascals. Full vacuum will show You -100 000 pascals.
Title: Re: Help with pressure sensor MD-PS002
Post by: maopiccoto on May 31, 2017, 01:20 am
I was able to operate the sensor using HX711 module but I´m getting incremental values, I mean, read_average(byte n) function is returning higher and higher values after system restarts so tare(byte n)  is impractical this way.
Title: Re: Help with pressure sensor MD-PS002
Post by: Wawa on May 31, 2017, 06:10 am
HX711 breakout board.
Onboard regulated 4.2volt excitation voltage for the bridge, instrumentation amp, and 24-bit A/D.
Well supported with code here.

Pressure sensors with buildin instrumentation amp are also temp compensated.
The HX711 setup is not.
Leo..
Title: Re: Help with pressure sensor MD-PS002
Post by: Electrobrains on Apr 01, 2019, 10:00 pm
MD-PS002 data sheet in English:
Title: Re: Help with pressure sensor MD-PS002
Post by: siemens350835 on Jul 02, 2019, 10:52 am
Read about the HX711 data sheet, one of which is "Selectable 10SPS or 80SPS output data rate"
How to choose the rate?
What is the default value?
Title: Re: Help with pressure sensor MD-PS002
Post by: Wawa on Jul 02, 2019, 10:44 pm
Default is 10SPS.
With 80SPS you trade accuracy for speed.
Most boards have a link you can cut, and/or solder bridge.
Leo..
Title: Re: Help with pressure sensor MD-PS002
Post by: addennis on Jun 27, 2020, 03:12 am
Does anybody have a code snippet or proof of concept of how to get the MD-PS002 and HX711 to work? Ive tried everything I can dig up and have not yet been able to get any data from this sensor. Ive triple checked the wiring, tried multiple libraries, multiple sensors, etc.
Title: Re: Help with pressure sensor MD-PS002
Post by: Wawa on Jun 27, 2020, 07:50 am
Ive triple checked the wiring, tried multiple libraries, multiple sensors, etc.
So why don't you show us what you have done, and what did/didn't work.
Only then you might have a chance of getting help.
Read the "how to post" guidelines first.
Leo..

Title: Re: Help with pressure sensor MD-PS002
Post by: Nonaak on Jul 03, 2020, 10:09 am
Hi everybody,

I am making a vacuum meter. It works pretty well, but I don't understand how I can calculate it.

maybe someone knows how to handle that.
I have an arduino Nano with an HX711 with dar to an MD-PS002 sensor.
I want to read the Psi data on an Oled display 128X32.
I am now guessing what the Psi should be. I do that with an auto vacuum analog meter.
But that is not the right way.

I have the code for the Arduino here:

#include "HX711.h"
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET LED_BUILTIN
float analog_pot=0;
#define DOUT 2
#define CLK 3

HX711 scale;

//float calibration_factor =5.1714924102396; // 1 Psi is 5.1714924102396 cm Hg
float calibration_factor =51714; // maby
 
Adafruit_SSD1306 display(OLED_RESET);
  #if (SSD1306_LCDHEIGHT != 32)
  #error("Height incorrect, please fix Adafruit_SSD1306.h!");
  #endif
void setup() {
Serial.begin(9600);
scale.begin(2, 3);
scale.set_scale();
scale.tare(); //Reset the scale to 0
long zero_factor = scale.read_average(); //Get a baseline reading


display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
  // init done
    display.display();
  delay(200);
  // Clear the buffer.
display.clearDisplay();
}

void loop() {
scale.set_scale(calibration_factor); //Adjust to this calibration factor

display.clearDisplay();
  display.setTextSize(1.9);
  display.setTextColor(WHITE);
  display.setCursor(25,0);
  display.println("Vacuum");

  display.setTextSize(2.5);
  display.setTextColor(WHITE);
  display.setCursor(10,16);
//display.print(scale.get_units()*0.0000, 2);
display.print(scale.get_units()*0.135, 2);
display.println(" Psi");
display.println();
display.print(scale.get_units(), 2);
display.println(" £");
  display.setTextColor(BLACK, WHITE); // 'inverted' text
  display.display();

delay(10);

}

if anyone can help me with that i will appreciate it very much.

cheers
Title: Re: Help with pressure sensor MD-PS002
Post by: Alert2 on Aug 13, 2020, 06:00 pm
Hi,
If you want to read real psi from the sensor, you need to do some sort of calibration in Your code. I'm not familiar with HX711, so I can't point you exact functions. I would suggest You using a function to take "raw" readings from MD-PS002, and Serial.print those values. Then put the sensor in Your ?tank?.
Here are two alternatives (first is easier, second more accurate):

1) Take two readings at min and max pressure that could be in your ?tank? At both pressure levels you should measure it with Your trusty analog meter and print arduino reading.
You would end up with two points:
 (arduino reading, psi)
Then implement map() function to map arduino reading extremes to psi value extremes. This function should calculate everything in Your pressure range. Example:

real_psi = map(reading, min_reading, max_reading, min_psi, max_psi)

2) Take a few readings at different pressure levels in the ?tank?. At each pressure level you should measure it with Your trusty analog meter and print arduino reading. You would end up with table of points (example):
psi    |     arduino reading
5      |     1321
10    |     2652
15....

Then enter those points (x = arduino reading, y = psi) into some maths graphing software (I used geogebra) which can draw a "straight line that mostly matches all of those points". Then get a equation and embed it in Your code (if using integers do it carefully to balance precision and to avoid roll over).


BTW: Those sensors don't like attaching silicon hoses to them (I damaged seal in mine while doing so). I've also used MD-PS002, but rated for 700kPa. I was using ina333 instrumentation amp and analogReading sensor.