Go Down

Topic: air pressure sensor (Read 2679 times) previous topic - next topic

carl47

Jan 30, 2010, 04:44 am Last Edit: Jan 30, 2010, 04:51 am by carl47 Reason: 1
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: [Select]
/*  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/

april

#1
Jan 30, 2010, 08:10 am Last Edit: Jan 30, 2010, 08:17 am by april.steel Reason: 1
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?

designer2k2

cool!

do you plan on posting the data to pachube? or make this by yourself?
http://www.designer2k2.at

cell

nice work!  i like the level shifting and amplifying

carl47

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.


cell

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).

april

#6
Feb 01, 2010, 09:09 pm Last Edit: Feb 01, 2010, 09:48 pm by april.steel Reason: 1
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

cr0sh2

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.

april

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.

cr0sh2

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?

skatun

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

carl47

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!

Go Up