Gordon Varney wrote... >I have been asked to through together a barometer and altimeter. > >A barometer is easy, using a Motorola MPX4115A. Just convert the voltage out to barometric pressure using a formuli.... >Getting an altitude from this is also easy, Just run another one of them thar formuli.. and you have altitude. The >problem is, neither one of these measurements are a constant. > >If I am driving up a mountain and a storm is approaching then what? The pressure drops from the storm and changes the >barometric pressure changing the altimeter, which is changing because I am driving up the mountain. > >The MPX4115A is calibrated and compensated. Then pressure measured is correct, so how do I know when the change if from >the altitude or a storm? If I am not moving then no problem. The altitude is the constant, If there is no storm then the >relative barometric pressure is the constant. One more factor to consider is the effect of ambient temperature on your pressure sensor. Although Motorola's MPX series are internally temperature compensated, that compensation is not perfect. There are residual errors in both offset and scale factor. When taken as a percentage of the MPX's entire span these are small; but for barometer/altimeter use, where you are using only a part of the sensor's full range, they could lead to significant errors. You might consider keeping track of the ambient temperature with a suitable temperature sensor, and using that to correct any offset/span changes in your MPX. Dave D. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads