Thursday, March 19, 2009

Altimeter

I got four pressure sensors (two MPX4250 and two MP3H6115A) from freescale sometime back. I tried the two 4250s but they didn’t work for some reason. MP3H6115A is a surface mount device (SMD) which can measure pressure from 15kPa to 115kPa. Since I have previous experience working with SMDs, (SHT11, humidity sensor) I decided to work with this. The output (pressure) is reported as a voltage ranging from 0 to 2.8 v. I used PIC16F88 since it has an internal 10-bit ADC (analog to digital converter) and 4k code space.

Pressure is given by
P = (Vout/Vs+.095)/0.009 kPa

Where Vs, supply voltage = 3v
Vout, Output voltage measured from ADC

Altitude is given by

H = -ln(P/Po)*R*T/g

Three variables have to be measured:
T - average temperature in degrees Kelvin
Po - atmospheric pressure at ‘zero’ level
P - atmospheric pressure at current level

Remaining values are fixed constants:
R – universal gas constant = 286
g – gravitational acceleration = 9.81

Assuming Po=101.325 kPa and T=303.15K (30C)
The device reported H = 52.5m

Accuracy of this value is largely depending on the resolution of the ADC.
10-bit resolution of the ADC is not even near to get a reasonable accuracy of the altitude. One unit change in the ADC measurement will change 10m of height. To obtain 1m sensitivity, I need at least 12-bit ADC. So I ordered 12-bit ADCs from Maxim-IC and waiting until they arrive for the final product.





1 comment:

Anonymous said...

Hi, your project is what i'm looking for. Is it possible to get schematics and HEX file to be programmed into the PIC?
Tanks in advance, Cristiano IW0HAA
c.gagliardi@cgtelemar.com