Pages: [1]   Go Down
Author Topic: air pressure sensor  (Read 2461 times)
0 Members and 1 Guest are viewing this topic.
Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 210
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am making a weather station using Arduino 2009

For my pressure sensor I chose a MPX4115.
It was the cheapest (AUD $17) accurate one I could find.

The data sheet is at:

http://www.datasheetcatalog.org/datasheet/motorola/MPX4115.pdf

The air pressure range I wanted was 950 to 1070mb.
This equates to 95 to 107 kPa. Using Fig.4 from data sheet the output voltage will be 3.88 to 4.42v(nominal).

I use a LM3900 dc amplifier to amplify and shift the output voltage to 0 - 5.0v.
This uses the full range of the adc for the best accuracy available.

Code:
/*  A simple air pressure sensor check program
    The circuit uses one point calibration.
    Adjust the pot to give the known atmospheric pressure.
   1070 mb = 107 kpa = 802 mm Hg
 */

const int analogpin = 0;  // Analog input pin

void setup()
{
  Serial.begin(9600);   // initialize serial communications at 9600 bps:
}

void loop()
{
  int adcvalue = analogRead(analogpin);    // read the analog in value:            
  Serial.print("sensor = " );                        
  Serial.print(adcvalue);    // print the adc value to the serial monitor:
  long pressure = 950 + adcvalue / 8.5;  //convert it to milli bars
  Serial.print("\t pressure = ");      
  Serial.print(pressure);   // print the pressure
  Serial.println(" mb");
  delay(1000);   // wait 1 second before next sample                    
}

I calibrated the sensor using my Oregon scientific WMR 100.
This is the best I'm able to arrange. It is accurate enough for my use.

I have logged the data from the WMR 100 and my pressure sensor over some days and the result are within 2 mb over this time.

The sensor circuit and other files are at the site given below.
Download MPX4115.zip

http://sourceforge.net/projects/arduinoweather/files/
« Last Edit: January 29, 2010, 10:51:01 pm by carl47 » Logged

0
Offline Offline
Full Member
***
Karma: 4
Posts: 218
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Carl47 - can this device placed in a sealed vertical air tube be used to sense the level of a petrol tank? If you think not ,do you know a device that would work inside a sealed tube mostly filled with air?
« Last Edit: January 30, 2010, 02:17:20 am by april.steel » Logged

Austria
Offline Offline
Sr. Member
****
Karma: 3
Posts: 260
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

cool!

do you plan on posting the data to pachube? or make this by yourself?
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

nice work!  i like the level shifting and amplifying
Logged

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 210
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies.

Quote
april

I have the MPX4115AP, it can use a plastic pipe for a remote connection to a sealed tank.
I cannot say if its what you need.
I would be carefull of anything besides air.
Quote from data sheet:

pressure sensor operating characteristics and internal reliability and qualification tests are based on use of dry air as the pressure media. Media other than dry air may have adverse effects on sensor
performance and long term reliability.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

April,

I use this line of sensors to sense the pressure drop across a fuel filter in a diesel system.  in theory, as long as there are no leaks in the tube leading to the sensor, it should only be contacting air, not diesel.  So far it has been working great.

http://www.peachparts.com/shopforum/showpost.php?p=2257058&postcount=271

(sorry about the video quality).
Logged

0
Offline Offline
Full Member
***
Karma: 4
Posts: 218
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanx carl47. I think diaphram in tube half way, air both sides.Fumes would be avoided
cell, your post very good.I like tubing and it does move around lots .I will try to get in japan
« Last Edit: February 01, 2010, 03:48:26 pm by april.steel » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

April, I don't know where you live, but from your use of the word "petrol", I am assuming "not in the USA".

Depending on what you are trying to do, using air-pressure (petrol fume pressure?) to measure the level of fuel may not work as expected. Furthermore, depending on local environmental laws, modifying an existing fuel tank (or even putting fuel into a non-approved tank) can be against the law.

Also, using a sensor meant for diesel may not work as expected, or may even fail, when using it with petrol fuel; the different composition of the fuels, solvent capabilities, etc - may lead to a failure of the sensor and potentially to a fire or explosion (the same manufacturer, though, may have one specifically designed for petrol).

If you are thinking of doing something with a vehicle's fuel tank, the fuel pump is usually (nowadays) located in the tank, along with a float-valve sender (basically a potentiometer) to measure the fuel level (which is then sent to the fuel level meter on your dash).

If you are working on a custom vehicle (maybe a racing vehicle?), rules may be completely different since the vehicle isn't likely a licensed road vehicle; even so, speak with the manufacturer of your tank and discuss what you want to do with them - they may already have such a system available as an add-on or can custom-incorporate such changes into the tank properly to reduce possible hazards.
Logged

0
Offline Offline
Full Member
***
Karma: 4
Posts: 218
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

lots and lots of ifs and buts and maybees to make up a reason to post.. My petrol is my concern and not yours thank you.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

April: Fine. But when your auto catches on fire as you speed down the motorway, just make sure someone is videotaping it for youtube, ok?

Seriously, gasoline is not a toy. Be careful, ok?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 140
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I need to meassure height between 3 point which can be moved corresponding to each other with high accursy.

What sensor should I get, the mpx sensor mentioned here or the scp1000

or this cheap sensorhttp://www.futurlec.com/Pressure_Sensors.shtml
Logged

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 210
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The HP03D seems to be the only one in stock.

They all look to give accurate air pressure measurement.

If they were easily available here in Aussie I would try one!
Logged

Pages: [1]   Go Up
Jump to: