For my pressure sensor I chose a MPX4115.
It was the cheapest (AUD $17) accurate one I could find.
The data sheet is at:
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.
/* 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
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?
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.
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.
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
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.