LPS331AP pressure sensor test flight

Posted by Jan on 20 March 2013

We expect to release a simple carrier for ST’s new LPS331AP pressure sensor this week. While testing and writing example programs for the sensor, one of our engineers, Kevin, came up with a nice demonstration that calculates and displays the altitude on our Orangutan SVP robot controller. It was a beautiful spring day with great flying weather, so Paul and I took Kevin’s digital altimeter on a flight to Lake Havasu City, Arizona, to see how it compared to the altimeter in a plane.

Air pressure is affected by altitude and the weather, so to determine the altitude from air pressure, we need to compensate for the local barometric pressure. For aviation, this calibration value is provided in the form of an “altimeter setting” that pilots receive from weather observation stations. Under “standard conditions”, the setting is 29.92 (which is 1 atmosphere in inches of mercury).

Kevin’s demo let us adjust the altimeter setting and read the altitude on the Orangutan SVP’s LCD. He was planning to have some data logging using the board on the left, but he did not get it working in time for our departure. The altitude in feet is on the right side of the first line; the altimeter setting is on the left of the second line. (We kept turning the board on and off throughout the flight, so the elapsed time on the lower right does not mean much.)

Kevin’s LPS331AP pressure sensor test assembly.

The pressure sensor carrier is the small PC board on the bottom; a close-up picture of the component side is below. There is a little hole for sensing pressure right above the “A” on the first line of the package. After burning holes into integrated circuit packages for decades, it was strange for me to see a package with a hole in it on purpose!

Pololu LPS331AP pressure sensor carrier.

The plane we flew was a Piper Archer from a local flight school.

Preflight inspection at Henderson Executive Airport (KHND).

Paul and the LPS331AP pressure sensor test assembly on the ground in Henderson, Nevada.

On the ground with an altimeter setting of 30.02, our digital altimeter based on the LPS331AP indicated around 2,480 feet, which was close to the 2,460 the plane’s altimeter indicated. The elevation where the plane was parked was about 2,460, so I actually got the altimeter setting by adjusting it until the altimeter showed the right altitude.

Plane altimeter indicating 2,460 feet and LPS331AP demo indicating 2,473 feet on the ground at KHND.

We planned a flight that was almost straight to Lake Havasu City at a cruise altitude of 9,500 feet. The next higher altitude we could have flown for that direction was 11,500 feet, which is probably about as high as that plane could go. On the way back, we stopped by Needles, California and Bullhead City, Arizona. You can also view the detailed GPS log of our flight.

GPS track of LPS331AP pressure sensor test flight from Henderson, Nevada to Lake Havasu City, Arizona (image from Google Maps, 2013).

The early part of departures are always kind of hectic for me because we have to talk to air traffic control in the busy airspace near Las Vegas while avoiding the mountains, so we did not power up our digital altimeter until we were close to 9,000 feet. The plane’s altimeter was reading about 100 feet below our digital one.

Plane altimeter indicating 8,900 feet and LPS331AP demo indicating 8,990 feet while climbing to cruise altitude of 9,500 feet.

Paul and Jan in Archer N32441 at 9,500 feet.

Once we were at our target altitude, we checked again, and the LPS331AP-based altimeter was still showing about 100 feet higher than the plane’s altimeter. The plane’s altimeter uses a pressure port on the outside of the plane, so that might have been part of the reason for the discrepancy. There is an alternate port available inside the plane, but unfortunately, neither of us thought of trying that until we got back.

Plane altimeter indicating 9,560 feet and LPS331AP demo indicating 9,670 feet 5.0 nautical miles north of Searchlight, Nevada.

Laughlin, Nevada and Bullhead City, Arizona from the west at 9,500 feet.

Descending toward Lake Havasu City, Arizona from the north.

On the ground in Lake Havasu City, the lowest point we tried our altimeter, it indicated 726 feet, about 70 feet below what the plane showed.

Plane altimeter indicating 800 feet and LPS331AP demo indicating 726 feet on the ground at Lake Havasu City.

Descending toward Bullhead City, Arizona from the south.

The Bullhead City field elevation is another 80 feet lower than Lake Havasu. Unfortunately, I aborted my first bouncy landing attempt and did an extra lap in the air traffic pattern. It was getting late and I wanted to be back in Henderson before dark, so we did not do any altimeter tests on the ground in Bullhead City.

Sunset over Searchlight, Nevada from 8,500 feet.


I would like to know how this compares to a typical baro sensor found on the APM board?

Which specific sensor are you talking about? Have you looked at the datasheets? What characteristics do you care about?

- Jan
Is the black project mounting board shown available?

The black mounting board shown in those pictures is our RP5/Rover 5 Expansion Plate:



I am using the AltIMU-10 v3 with the LPS331AP pressure sensor on a quadrotor. Using your library here: https://github.com/pololu/lps-arduino
the altitude outputs are very noisy and unusable for a quadrotor altitude hold function. I noticed that you used the LPS331AP on a test flight to compare with the plane's altimeter. Did you find the altitude readings to be noisy or stable? Is there a way you know of to obtain stable altitude readings? Thanks a lot!

Hello, David.

In the email you sent to techsupport, you also mentioned that the noise was about plus or minus 5 feet. I am not sure it is possible to get both the accuracy and response time you are looking for. You could do more averaging to smooth out the reading more, but this will increase the delay before a change in height is detected. For the plane flight in this blog, the averaging was done over several seconds since response time was not an issue. You might have a better chance of using the LPS25H pressure sensor as it is generally less noisy so using it might help, but I would not expect it to be that much better. This blog post about the LPS25H might be useful when comparing the LPS331AP sensor to the LPS25H sensor.

- Grant

Post a comment

Using your Pololu account allows you to customize your avatar and manage your comments; you can also post anonymously.

Related Products

LPS331AP Pressure/Altitude Sensor Carrier with Voltage Regulator
Pololu RP5/Rover 5 Expansion Plate RRC07A (Narrow) Solid Black
Orangutan SVP-1284 Robot Controller (assembled)

Related Categories

Pololu RP5/Rover 5 Expansion Plates
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors