Pages: [1]   Go Down
Author Topic: Accurately measure pressure with Arduino board  (Read 4661 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone, I really need some guidance here. I'm totally new with Arduino. In a project that I have, I need to accurately measure pressure and right now I have a transducer which allows me to measure up to 1psi with 0.25% accuracy. The output is voltage, so I need the system to detect a voltage of about 12.5mV minimum. Again, I never use Arduino before, so is it possible to do it? Any help or suggest would be appreciated.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


An Arduino can do an analog sample 10 bits on a voltage of 0..5 Volt  It returns a value = 0..1023, so stepsize is about 5mVolt. So it should be capable detecting the 12.5 mV range. Furthermore it can change its reference to 1.1V implying a stepsize of 1mV  valueable for the lower values.

Do you have a specification of the tranducer?

Can you tell more about the goal of your project? Do you want to control something (motor, warninglight), or measure and log values?

There are quite some tutorials on the Arduino site and this is one you could start with.
- http://www.arduino.cc/en/Reference/AnalogRead
- http://arduino.cc/en/Tutorial/AnalogInputPins

Rob
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It would be helpful if you could state the whole voltage range of your pressure sensor, 0-?? vdc.
To maintain .25% accuracy there are several issues you may have address. Normally the Arduino uses the board's 5vdc voltage as the reference voltage for the A/D conversion and that voltage is most likely not 5.000vdc, but some value of 5v +/- 5%. Also the 5vdc board voltage will be slightly different if you power the board from the USB port Vs using the on-board 5vdc regulator. These things can be dealt with doing some fixed calibration adjustments in your software.

So again can you post the range of your pressure sensor is, as in 0psi = 0vdc to ??psig = ??vdc.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick reply,
@robtillaart: well, I intend to do something like measure the pressure and graph it on a pressure vs. time plot to show on computer.
What I have is one like this: http://www.omega.com/Pressure/pdf/PX309-5V.pdf but for 1psi gauge.
@lefty: 1psig => 5vdc and yes I want it draws power from the usb port
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick reply,
@robtillaart: well, I intend to do something like measure the pressure and graph it on a pressure vs. time plot to show on computer.
What I have is one like this: http://www.omega.com/Pressure/pdf/PX309-5V.pdf but for 1psi gauge.
@lefty: 1psig => 5vdc and yes I want it draws power from the usb port


Nice sensor, if not a little pricey. We use to buy a lot of stuff from Omega at the oil refinery I worked at before retirement.

Be sure you know which type of pressure you want to use for your application before you order, PSIA or PSIG.

Lefty
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might have to replace the ADC on the Arduino... Somebody mention the Texas Instruments  ADS1213 (22 bits max/20 typ) or ADS 1256 before so maybe that will do... I downloaded the spec sheet -- the 1256 has 23 bits of resolution for example...

They are SPI interface -- I prefer I2C...

I have not looked furthe into them.

Maybe you need an amplifier to "condition" the input into range as well.

hth.
Logged

Just another Hacker

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you need absolute accuracy, rather than just a relative comparison over time,  you'll definitely want a precision voltage regulator,  and probably an external A/D with more resolution.

The Arduino's A/D converter is designed for jobs like reading joystick pots,  where it doesn't matter much if you're off by a quarter or half a percent.  If you look at the electrical specs, it's really only good for 8 bits of resolution: the low-order 2 bits can be wrong without violating the spec.  Even high-priced "precision" ADCs usually have a specified maximum error of +-1 LSB or so.

Additionally, the USB specs allow the "5V" supply to vary by as much as 5% on a high-power hub, and to go as low as 4.4V on a low-power hub.  That doesn't matter if you're blinking LEDs or reading pushbuttons, but it's a killer if you're trying to read an analog sensor accurately.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
with 0.25% accuracy.
Note that at that sort of accuracy, all your other components start to suspect, and things that you'd normally ignore (like temperature coefficients) start to need some attention.  And accuracy vs precision vs repeatability starts to matter as well.
The internal voltage reference and external power supply of the Arduino are NOT accurate to 0.25%, for example.
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12434
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For low pressure ranges the SCP1000 is a neat little sensor, and SPI or I2C interface so no analog issues on the Arduino.
Logged

[ I won't respond to messages, use the forum please ]

Killarney, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I have to measure the liquid pressure too.
I used SMC PSE560-01 transducer (0-1 MPa). It gives the output of 1-5V so it is perfect to use with Arduino UNO. I simply hooked this up to the A0 input, Aref to 5V and entered the code as below:
Code:
int input;
float scale = 1023;
float Vin;
void setup()
{
  Serial.begin(9600);
  analogReference (EXTERNAL);
}

void loop()
{
  input = analogRead(A0);
  Vin = (((float)input/scale)*5);
  Serial.print(input);
  Serial.print(" - ");
  Serial.print(Vin);
  Serial.println(" V");
  delay(200);
}

I have only one problem there - the reading is somewhat false. When there is no pressure applied to the sensor it is giving 1V output (measured with multimeter) and the reading from Arduino is 1.38V (value of 283).
If taking full scale 1023 / 5 = 205 (exactly 204.6) so my reading should be around there. I wander where does the error comes from?
« Last Edit: May 01, 2011, 05:01:36 am by Ostry » Logged

Ostry

'round the world...
Online Online
Faraday Member
**
Karma: 42
Posts: 3287
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

that deviation may be caused by the analog reference. :\

Like it was said before, get an external AD... try getting one with low part count to make it simple to use. A 16 bit AD will probably give you 15 to 14 usable bits, so it will be far better than what you have now for the precision of your sensor.
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Pages: [1]   Go Up
Jump to: